# ProcessTemplates

## Lists all Process Templates

> Lists all Process Templates including older versions and deleted ones. If response data is empty there were no Process Templates found with the chosen filters

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"TemplateType":{"enum":["All","ProcessTemplatesOnly","SubprocessTemplatesOnly"],"type":"string"},"ProcessTemplateListViewModelPagedResponse":{"required":["Data","Paging"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProcessTemplateListViewModel"},"description":"Response data"},"paging":{"$ref":"#/components/schemas/PagingModel"}},"additionalProperties":false},"ProcessTemplateListViewModel":{"required":["modifier","name"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"modifier":{"type":"string"},"modified":{"type":"string","format":"date-time"},"majorVersion":{"type":"integer","format":"int32"},"minorVersion":{"type":"integer","format":"int32"},"targetFramework":{"type":"string"},"frendsVersion":{"type":"string"},"isSubprocess":{"type":"boolean"},"staticRequiredEnvironmentVariablesJson":{"type":"string"},"isForMonitoringRule":{"type":"boolean"},"description":{"type":"string","nullable":true},"promotedResultVariablesJson":{"type":"string","nullable":true},"usedSubprocessesJson":{"type":"string","nullable":true},"usedTasksJson":{"type":"string","nullable":true},"triggersJson":{"type":"string","nullable":true},"manualTriggerJson":{"type":"string","nullable":true},"isCrossPlatform":{"type":"boolean","readOnly":true},"isDotNet":{"type":"boolean","readOnly":true},"isListed":{"type":"boolean"},"version":{"type":"integer","format":"int32"},"isDeleted":{"type":"boolean"},"processVariablesJson":{"type":"string","nullable":true},"processTags":{"type":"string","nullable":true},"uniqueIdentifier":{"type":"string","format":"uuid"},"templateTags":{"type":"array","items":{"type":"string"},"nullable":true}},"additionalProperties":false},"PagingModel":{"required":["CurrentPage","FirstPage","LastPage","PageSize","TotalCount"],"type":"object","properties":{"currentPage":{"type":"integer","description":"Current page","format":"int32"},"pageSize":{"type":"integer","description":"Number of entries per page","format":"int32"},"totalCount":{"type":"integer","description":"Total number of entries","format":"int32"},"firstPage":{"type":"string","description":"Url of the first page","format":"uri","nullable":true},"lastPage":{"type":"string","description":"Url of the last page","format":"uri","nullable":true},"nextPage":{"type":"string","description":"Url of the next page","format":"uri","nullable":true},"previousPage":{"type":"string","description":"Url of the previous page","format":"uri","nullable":true}},"additionalProperties":false}}},"paths":{"/api/v1/process-templates":{"get":{"tags":["ProcessTemplates"],"summary":"Lists all Process Templates","description":"Lists all Process Templates including older versions and deleted ones. If response data is empty there were no Process Templates found with the chosen filters","operationId":"GetAllProcessTemplates","parameters":[{"name":"PageNumber","in":"query","description":"Current page number. Default value is 1.","schema":{"type":"integer","format":"int32"}},{"name":"PageSize","in":"query","description":"Maximum page size is 200. Default page size is 30.","schema":{"type":"integer","format":"int32"}},{"name":"templateGuid","in":"query","description":"Filter Process Templates by unique identifier","schema":{"type":"string","format":"uuid"}},{"name":"processTemplateName","in":"query","description":"Filter Process Templates by name","schema":{"type":"string"}},{"name":"tags","in":"query","description":"Filter Process Templates by tags","schema":{"type":"array","items":{"type":"string"}}},{"name":"processGuid","in":"query","description":"Filter Process Templates by Process unique identifier","schema":{"type":"string","format":"uuid"}},{"name":"processName","in":"query","description":"Filter Process Templates by Process name","schema":{"type":"string"}},{"name":"templateType","in":"query","description":"Control which template types to include in results","schema":{"$ref":"#/components/schemas/TemplateType"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessTemplateListViewModelPagedResponse"}}}}}}}}}
```

## POST /api/v1/process-templates

> Create a new Process Template from a Process

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"CreateTemplateFromProcessRequestBody":{"required":["ProcessId"],"type":"object","properties":{"name":{"minLength":1,"type":"string","description":"Element name"},"description":{"type":"string","description":"Element description","nullable":true},"processVariables":{"type":"array","items":{"$ref":"#/components/schemas/ProcessVariable"},"nullable":true},"processId":{"type":"integer","description":"Process id","format":"int64"},"guid":{"type":"string","format":"uuid"},"templateMajorVersion":{"type":"integer","description":"Templates major version","format":"int32","nullable":true},"templateMinorVersion":{"type":"integer","description":"Templates minor version","format":"int32","nullable":true},"templateTags":{"type":"array","items":{"type":"string"},"description":"Tags for the Process template","nullable":true},"processTags":{"type":"array","items":{"type":"string"},"description":"Predefined tags for Processes created from the template","nullable":true},"linkProcessToCreatedTemplate":{"type":"boolean","description":"Link the Process to the created Template","nullable":true}},"additionalProperties":false},"ProcessVariable":{"type":"object","properties":{"name":{"type":"string","nullable":true},"value":{"type":"string","nullable":true},"isSecret":{"type":"boolean"},"mode":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}},"additionalProperties":false},"Int64Response":{"required":["Data"],"type":"object","properties":{"data":{"type":"integer","description":"Response data","format":"int64"}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/process-templates":{"post":{"tags":["ProcessTemplates"],"summary":"Create a new Process Template from a Process","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTemplateFromProcessRequestBody"}}}},"responses":{"201":{"description":"Created Process Template id","headers":{"Location":{"description":"Location of the created Process Template","schema":{"type":"string"}}},"content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Int64Response"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Process not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Process already has Process template","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## PUT /api/v1/process-templates

> Update an existing Process Template from a Process

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"CreateTemplateFromProcessRequestBody":{"required":["ProcessId"],"type":"object","properties":{"name":{"minLength":1,"type":"string","description":"Element name"},"description":{"type":"string","description":"Element description","nullable":true},"processVariables":{"type":"array","items":{"$ref":"#/components/schemas/ProcessVariable"},"nullable":true},"processId":{"type":"integer","description":"Process id","format":"int64"},"guid":{"type":"string","format":"uuid"},"templateMajorVersion":{"type":"integer","description":"Templates major version","format":"int32","nullable":true},"templateMinorVersion":{"type":"integer","description":"Templates minor version","format":"int32","nullable":true},"templateTags":{"type":"array","items":{"type":"string"},"description":"Tags for the Process template","nullable":true},"processTags":{"type":"array","items":{"type":"string"},"description":"Predefined tags for Processes created from the template","nullable":true},"linkProcessToCreatedTemplate":{"type":"boolean","description":"Link the Process to the created Template","nullable":true}},"additionalProperties":false},"ProcessVariable":{"type":"object","properties":{"name":{"type":"string","nullable":true},"value":{"type":"string","nullable":true},"isSecret":{"type":"boolean"},"mode":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/process-templates":{"put":{"tags":["ProcessTemplates"],"summary":"Update an existing Process Template from a Process","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTemplateFromProcessRequestBody"}}}},"responses":{"200":{"description":"Updated Process template id","content":{"text/plain":{"schema":{"type":"integer","format":"int64"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Process cannot be found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## DELETE /api/v1/process-templates

> Delete Process Templates

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/process-templates":{"delete":{"tags":["ProcessTemplates"],"summary":"Delete Process Templates","parameters":[{"name":"templateIds","in":"query","schema":{"type":"array","items":{"type":"integer","format":"int64"}}}],"responses":{"204":{"description":"Deleted Process Templates successfully"},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Lists latest Process Templates

> Lists the most recent versions of Process Templates. If response data is empty there were no Process Templates found with the chosen filters

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"TemplateType":{"enum":["All","ProcessTemplatesOnly","SubprocessTemplatesOnly"],"type":"string"},"ProcessTemplateListViewModelPagedResponse":{"required":["Data","Paging"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProcessTemplateListViewModel"},"description":"Response data"},"paging":{"$ref":"#/components/schemas/PagingModel"}},"additionalProperties":false},"ProcessTemplateListViewModel":{"required":["modifier","name"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"modifier":{"type":"string"},"modified":{"type":"string","format":"date-time"},"majorVersion":{"type":"integer","format":"int32"},"minorVersion":{"type":"integer","format":"int32"},"targetFramework":{"type":"string"},"frendsVersion":{"type":"string"},"isSubprocess":{"type":"boolean"},"staticRequiredEnvironmentVariablesJson":{"type":"string"},"isForMonitoringRule":{"type":"boolean"},"description":{"type":"string","nullable":true},"promotedResultVariablesJson":{"type":"string","nullable":true},"usedSubprocessesJson":{"type":"string","nullable":true},"usedTasksJson":{"type":"string","nullable":true},"triggersJson":{"type":"string","nullable":true},"manualTriggerJson":{"type":"string","nullable":true},"isCrossPlatform":{"type":"boolean","readOnly":true},"isDotNet":{"type":"boolean","readOnly":true},"isListed":{"type":"boolean"},"version":{"type":"integer","format":"int32"},"isDeleted":{"type":"boolean"},"processVariablesJson":{"type":"string","nullable":true},"processTags":{"type":"string","nullable":true},"uniqueIdentifier":{"type":"string","format":"uuid"},"templateTags":{"type":"array","items":{"type":"string"},"nullable":true}},"additionalProperties":false},"PagingModel":{"required":["CurrentPage","FirstPage","LastPage","PageSize","TotalCount"],"type":"object","properties":{"currentPage":{"type":"integer","description":"Current page","format":"int32"},"pageSize":{"type":"integer","description":"Number of entries per page","format":"int32"},"totalCount":{"type":"integer","description":"Total number of entries","format":"int32"},"firstPage":{"type":"string","description":"Url of the first page","format":"uri","nullable":true},"lastPage":{"type":"string","description":"Url of the last page","format":"uri","nullable":true},"nextPage":{"type":"string","description":"Url of the next page","format":"uri","nullable":true},"previousPage":{"type":"string","description":"Url of the previous page","format":"uri","nullable":true}},"additionalProperties":false}}},"paths":{"/api/v1/process-templates/latest":{"get":{"tags":["ProcessTemplates"],"summary":"Lists latest Process Templates","description":"Lists the most recent versions of Process Templates. If response data is empty there were no Process Templates found with the chosen filters","operationId":"GetLatestProcessTemplates","parameters":[{"name":"PageNumber","in":"query","description":"Current page number. Default value is 1.","schema":{"type":"integer","format":"int32"}},{"name":"PageSize","in":"query","description":"Maximum page size is 200. Default page size is 30.","schema":{"type":"integer","format":"int32"}},{"name":"templateGuid","in":"query","description":"Filter Process Templates by unique identifier","schema":{"type":"string","format":"uuid"}},{"name":"processTemplateName","in":"query","description":"Filter Process Templates by name","schema":{"type":"string"}},{"name":"tags","in":"query","description":"Filter Process Templates by tags","schema":{"type":"array","items":{"type":"string"}}},{"name":"processGuid","in":"query","description":"Filter Process Templates by Process unique identifier","schema":{"type":"string","format":"uuid"}},{"name":"processName","in":"query","description":"Filter Process Templates by Process name","schema":{"type":"string"}},{"name":"templateType","in":"query","description":"Control which template types to include in results","schema":{"$ref":"#/components/schemas/TemplateType"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessTemplateListViewModelPagedResponse"}}}}}}}}}
```

## Get an individual Process Template

> Returns a detailed view of a Process Template

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"ProcessTemplateBaseResponse":{"required":["Data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/ProcessTemplateBase"}},"additionalProperties":false},"ProcessTemplateBase":{"required":["bpmn","name"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"minLength":1,"type":"string"},"modifier":{"type":"string","nullable":true},"modified":{"type":"string","format":"date-time"},"majorVersion":{"type":"integer","format":"int32"},"minorVersion":{"type":"integer","format":"int32"},"targetFramework":{"type":"string"},"frendsVersion":{"type":"string"},"isSubprocess":{"type":"boolean"},"staticRequiredEnvironmentVariablesJson":{"type":"string"},"isForMonitoringRule":{"type":"boolean"},"cancellationDisabled":{"type":"boolean"},"description":{"type":"string","nullable":true},"changeDescription":{"type":"string","nullable":true},"bpmn":{"minLength":1,"type":"string"},"elementParameters":{"type":"string","nullable":true},"promotedResultVariablesJson":{"type":"string","nullable":true},"usedSubprocessesJson":{"type":"string","nullable":true},"usedTasksJson":{"type":"string","nullable":true},"triggersJson":{"type":"string","nullable":true},"manualTriggerJson":{"type":"string","nullable":true},"uniqueIdentifier":{"type":"string","format":"uuid"},"isListed":{"type":"boolean"},"version":{"type":"integer","format":"int32"},"isDeleted":{"type":"boolean"},"processVariablesJson":{"type":"string","nullable":true},"processTags":{"type":"string","nullable":true},"templateTags":{"type":"array","items":{"type":"string"}},"getVersion":{"type":"string","readOnly":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/process-templates/{processTemplateGuid}/versions/{processTemplateVersion}":{"get":{"tags":["ProcessTemplates"],"summary":"Get an individual Process Template","description":"Returns a detailed view of a Process Template","operationId":"GetProcessTemplate","parameters":[{"name":"processTemplateGuid","in":"path","description":"Process Template unique identifier","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"processTemplateVersion","in":"path","description":"Process Template version","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessTemplateBaseResponse"}}}},"404":{"description":"Process Template not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Get an individual Process Template by Id

> Returns a detailed view of a Process Template

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"ProcessTemplateBaseResponse":{"required":["Data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/ProcessTemplateBase"}},"additionalProperties":false},"ProcessTemplateBase":{"required":["bpmn","name"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"minLength":1,"type":"string"},"modifier":{"type":"string","nullable":true},"modified":{"type":"string","format":"date-time"},"majorVersion":{"type":"integer","format":"int32"},"minorVersion":{"type":"integer","format":"int32"},"targetFramework":{"type":"string"},"frendsVersion":{"type":"string"},"isSubprocess":{"type":"boolean"},"staticRequiredEnvironmentVariablesJson":{"type":"string"},"isForMonitoringRule":{"type":"boolean"},"cancellationDisabled":{"type":"boolean"},"description":{"type":"string","nullable":true},"changeDescription":{"type":"string","nullable":true},"bpmn":{"minLength":1,"type":"string"},"elementParameters":{"type":"string","nullable":true},"promotedResultVariablesJson":{"type":"string","nullable":true},"usedSubprocessesJson":{"type":"string","nullable":true},"usedTasksJson":{"type":"string","nullable":true},"triggersJson":{"type":"string","nullable":true},"manualTriggerJson":{"type":"string","nullable":true},"uniqueIdentifier":{"type":"string","format":"uuid"},"isListed":{"type":"boolean"},"version":{"type":"integer","format":"int32"},"isDeleted":{"type":"boolean"},"processVariablesJson":{"type":"string","nullable":true},"processTags":{"type":"string","nullable":true},"templateTags":{"type":"array","items":{"type":"string"}},"getVersion":{"type":"string","readOnly":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/process-templates/{id}":{"get":{"tags":["ProcessTemplates"],"summary":"Get an individual Process Template by Id","description":"Returns a detailed view of a Process Template","operationId":"GetProcessTemplateById","parameters":[{"name":"id","in":"path","description":"Process Template id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessTemplateBaseResponse"}}}},"404":{"description":"Process Template not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## POST /api/v1/process-templates/{templateId}/create-process

> Create a new Process from a Process Template

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"CreateProcessFromTemplateRequestBody":{"required":["IgnoreProcessTags"],"type":"object","properties":{"name":{"minLength":1,"type":"string","description":"Element name"},"description":{"type":"string","description":"Element description","nullable":true},"processVariables":{"type":"array","items":{"$ref":"#/components/schemas/ProcessVariable"},"nullable":true},"ignoreProcessTags":{"type":"boolean","description":"If true the Process will not be created with the predefined tags"}},"additionalProperties":false},"ProcessVariable":{"type":"object","properties":{"name":{"type":"string","nullable":true},"value":{"type":"string","nullable":true},"isSecret":{"type":"boolean"},"mode":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}},"additionalProperties":false},"Int64Response":{"required":["Data"],"type":"object","properties":{"data":{"type":"integer","description":"Response data","format":"int64"}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/process-templates/{templateId}/create-process":{"post":{"tags":["ProcessTemplates"],"summary":"Create a new Process from a Process Template","parameters":[{"name":"templateId","in":"path","description":"Process Template id","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProcessFromTemplateRequestBody"}}}},"responses":{"201":{"description":"Created Process id","headers":{"Location":{"description":"Location of the created Process","schema":{"type":"string"}}},"content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Int64Response"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## PUT /api/v1/process-templates/{templateId}/update-processes

> Updates Processes to the template's version

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"UpdateProcessesBasedOnTemplateRequestBody":{"type":"object","properties":{"processIds":{"type":"array","items":{"type":"integer","format":"int64"},"nullable":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/process-templates/{templateId}/update-processes":{"put":{"tags":["ProcessTemplates"],"summary":"Updates Processes to the template's version","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProcessesBasedOnTemplateRequestBody"}}}},"responses":{"200":{"description":"A dictionary mapping Process GUIDs to its id"},"400":{"description":"Expected between 1 and 20 Processes ","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## POST /api/v1/process-templates/tag

> Update Process Template tags

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"ProcessTemplateTagRequestModel":{"required":["Overwrite","Tags"],"type":"object","properties":{"templateIds":{"type":"array","items":{"type":"integer","format":"int64"},"description":"List of Process template ids"},"tags":{"type":"array","items":{"type":"string"},"description":"Tags to be added to the Process templates"},"overwrite":{"type":"boolean","description":"If true the tags will be overwritten"}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/process-templates/tag":{"post":{"tags":["ProcessTemplates"],"summary":"Update Process Template tags","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessTemplateTagRequestModel"}}}},"responses":{"204":{"description":"Updated Process Template tags successfully"},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## POST /api/v1/process-templates/import

> Import Process Template from file

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"ImportResultResponse":{"required":["Data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/ImportResult"}},"additionalProperties":false},"ImportResult":{"required":["name","resourceLocation"],"type":"object","properties":{"name":{"type":"string"},"elementIdentifier":{"type":"string","format":"uuid"},"id":{"type":"integer","format":"int64"},"resourceLocation":{"type":"string","format":"uri"},"version":{"type":"integer","format":"int32"}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/process-templates/import":{"post":{"tags":["ProcessTemplates"],"summary":"Import Process Template from file","requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file","importConflict"],"type":"object","properties":{"file":{"type":"string","format":"binary"},"importConflict":{"enum":["Error"],"type":"string","description":"Setting for deciding what to do when a Process GUID already exists.\r\n                <ul>\r\n                    <li>Error - the request will fail if Process Template exists.</li>\r\n                </ul>","default":"Error"}},"description":"File to upload.","discriminator":{"propertyName":"ImportProcessTemplate"}}}}},"responses":{"200":{"description":"Template imported successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResultResponse"}}}},"400":{"description":"File not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"415":{"description":"Unsupported Media Type","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## GET /api/v1/process-templates/export

> Export Process Templates

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}}},"paths":{"/api/v1/process-templates/export":{"get":{"tags":["ProcessTemplates"],"summary":"Export Process Templates","parameters":[{"name":"templateIds","in":"query","schema":{"type":"array","items":{"type":"integer","format":"int64"}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.frends.com/reference/frends-6.1.0/frends-platform-api/platform-api-reference/processtemplates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
