# ProcessDeployments

## List Process deployments

> If response data is empty there were no deployed Processes 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":{"DtoProcessDeploymentGetPagedResponse":{"required":["Data","Paging"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DtoProcessDeploymentGet"},"description":"Response data"},"paging":{"$ref":"#/components/schemas/PagingModel"}},"additionalProperties":false},"DtoProcessDeploymentGet":{"required":["AgentGroup"],"type":"object","properties":{"deploymentId":{"type":"integer","description":"Unique identifier for the deployment.","format":"int64"},"processId":{"type":"integer","description":"Unique identifier for Process version.","format":"int64"},"processName":{"minLength":1,"type":"string","description":"Process name"},"processGuid":{"type":"string","description":"Process unique identifier. This is shared between all versions of the Process.","format":"uuid"},"processVersion":{"minLength":1,"type":"string","description":"Process version in the format X.Y.Z."},"processBuildVersion":{"type":"integer","description":"Process build version. This version is incremented by 1 on every successful Process build.","format":"int32"},"deployedAtUtc":{"type":"string","format":"date-time","nullable":true},"deployedBy":{"type":"string","nullable":true},"description":{"type":"string","description":"Optional description for deployment","nullable":true},"triggersActive":{"type":"boolean","description":"Are Process Triggers active"},"agentGroup":{"$ref":"#/components/schemas/DtoAgentGroupBase"}},"additionalProperties":false},"DtoAgentGroupBase":{"required":["DisplayName","Id"],"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the Agent Group","format":"int64","readOnly":true},"displayName":{"type":"string","description":"Display name for the Agent Group","readOnly":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},"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-deployments":{"get":{"tags":["ProcessDeployments"],"summary":"List Process deployments","description":"If response data is empty there were no deployed Processes found with the chosen filters","operationId":"GetDeployments","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":"agentGroupId","in":"query","description":"Filter Process deployments by Agent group","schema":{"type":"integer","format":"int64"}},{"name":"processName","in":"query","description":"Filter Process deployments by Process name","schema":{"type":"string"}},{"name":"processGuid","in":"query","description":"Filter Process deployments by Process Unique Identifier","schema":{"type":"string","format":"uuid"}},{"name":"tags","in":"query","description":"Filter Process deployments by tags","schema":{"type":"array","items":{"type":"string"}}},{"name":"excludeSubprocesses","in":"query","description":"Filter Process deployments to exclude subprocesses","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DtoProcessDeploymentGetPagedResponse"}}}},"400":{"description":"Agent group doesnt exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Deploy Processes to an Agent group

> Deploy up to 20 Processes to an Agent group. The following validation rules apply to deploying a Process: All used Environment variables need to have values set.> \
> &#x20;       All used Subprocesses need to be deployed to the target Agent group/Environment Process Target Framework needs to match Agent group framework. You can also deploy an older version of a Process to the 'Default' Agent group.

```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":{"DtoProcessDeploymentCreate":{"required":["ActivateTriggers","AgentGroupId","Processes"],"type":"object","properties":{"agentGroupId":{"type":"integer","format":"int64"},"processes":{"maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/ProcessVersionInputModel"}},"activateTriggers":{"type":"boolean","description":"Whether to automatically activate Triggers for Processes on deployment. Default is true."},"deploymentDescription":{"type":"string"}},"additionalProperties":false},"ProcessVersionInputModel":{"type":"object","properties":{"processGuid":{"type":"string","format":"uuid"},"version":{"type":"integer","format":"int32"},"processVariables":{"type":"array","items":{"$ref":"#/components/schemas/ProcessVariable"},"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},"DtoProcessDeploymentGetListResponse":{"required":["Data"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DtoProcessDeploymentGet"},"description":"Response data","nullable":true}},"additionalProperties":false},"DtoProcessDeploymentGet":{"required":["AgentGroup"],"type":"object","properties":{"deploymentId":{"type":"integer","description":"Unique identifier for the deployment.","format":"int64"},"processId":{"type":"integer","description":"Unique identifier for Process version.","format":"int64"},"processName":{"minLength":1,"type":"string","description":"Process name"},"processGuid":{"type":"string","description":"Process unique identifier. This is shared between all versions of the Process.","format":"uuid"},"processVersion":{"minLength":1,"type":"string","description":"Process version in the format X.Y.Z."},"processBuildVersion":{"type":"integer","description":"Process build version. This version is incremented by 1 on every successful Process build.","format":"int32"},"deployedAtUtc":{"type":"string","format":"date-time","nullable":true},"deployedBy":{"type":"string","nullable":true},"description":{"type":"string","description":"Optional description for deployment","nullable":true},"triggersActive":{"type":"boolean","description":"Are Process Triggers active"},"agentGroup":{"$ref":"#/components/schemas/DtoAgentGroupBase"}},"additionalProperties":false},"DtoAgentGroupBase":{"required":["DisplayName","Id"],"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the Agent Group","format":"int64","readOnly":true},"displayName":{"type":"string","description":"Display name for the Agent Group","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-deployments":{"post":{"tags":["ProcessDeployments"],"summary":"Deploy Processes to an Agent group","description":"Deploy up to 20 Processes to an Agent group. The following validation rules apply to deploying a Process: All used Environment variables need to have values set.\r\n        All used Subprocesses need to be deployed to the target Agent group/Environment Process Target Framework needs to match Agent group framework. You can also deploy an older version of a Process to the 'Default' Agent group.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DtoProcessDeploymentCreate"}}}},"responses":{"201":{"description":"Process deployed successfully","headers":{"Location":{"description":"Details the deployed Process. If multiple Processes are deployed in one batch the Location header will link to get all deployments","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DtoProcessDeploymentGetListResponse"}}}},"400":{"description":"Agent group not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Get single Process deployment

> Gets detailed information for a single Process deployment. Currently this is the same response model as 'List Process deployments'

```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":{"DtoProcessDeploymentGetResponse":{"required":["Data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/DtoProcessDeploymentGet"}},"additionalProperties":false},"DtoProcessDeploymentGet":{"required":["AgentGroup"],"type":"object","properties":{"deploymentId":{"type":"integer","description":"Unique identifier for the deployment.","format":"int64"},"processId":{"type":"integer","description":"Unique identifier for Process version.","format":"int64"},"processName":{"minLength":1,"type":"string","description":"Process name"},"processGuid":{"type":"string","description":"Process unique identifier. This is shared between all versions of the Process.","format":"uuid"},"processVersion":{"minLength":1,"type":"string","description":"Process version in the format X.Y.Z."},"processBuildVersion":{"type":"integer","description":"Process build version. This version is incremented by 1 on every successful Process build.","format":"int32"},"deployedAtUtc":{"type":"string","format":"date-time","nullable":true},"deployedBy":{"type":"string","nullable":true},"description":{"type":"string","description":"Optional description for deployment","nullable":true},"triggersActive":{"type":"boolean","description":"Are Process Triggers active"},"agentGroup":{"$ref":"#/components/schemas/DtoAgentGroupBase"}},"additionalProperties":false},"DtoAgentGroupBase":{"required":["DisplayName","Id"],"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the Agent Group","format":"int64","readOnly":true},"displayName":{"type":"string","description":"Display name for the Agent Group","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-deployments/{id}":{"get":{"tags":["ProcessDeployments"],"summary":"Get single Process deployment","description":"Gets detailed information for a single Process deployment. Currently this is the same response model as 'List Process deployments'","operationId":"SingleDeployment","parameters":[{"name":"id","in":"path","description":"Deployment identifier","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DtoProcessDeploymentGetResponse"}}}},"404":{"description":"Could not find Process deployment with requested identifier","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Undeploy a Process from an Agent group

> It is not possible to undeploy a Process from the Development Agent group.> \
> &#x20;       If you wish to remove the Process completely you should use the DeleteProcess endpoint.

```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-deployments/{id}":{"delete":{"tags":["ProcessDeployments"],"summary":"Undeploy a Process from an Agent group","description":"It is not possible to undeploy a Process from the Development Agent group.\r\n        If you wish to remove the Process completely you should use the DeleteProcess endpoint.","parameters":[{"name":"id","in":"path","description":"Deployment identifier","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"description":"Process undeployed successfully"},"400":{"description":"Can not undeploy Process in Development Agent group","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Could not find Process deployment with requested identifier","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## POST /api/v1/process-deployments/{id}/execute

> Run a Process in the selected Agent group

```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-deployments/{id}/execute":{"post":{"tags":["ProcessDeployments"],"summary":"Run a Process in the selected Agent group","parameters":[{"name":"id","in":"path","description":"Deployment identifier","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}},"responses":{"202":{"description":"Process start message sent","headers":{"Location":{"description":"Url to query for Process execution result","schema":{"type":"string"}}},"content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Process deployment not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## PUT /api/v1/process-deployments/{id}/activation

> Activate Process triggers

```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-deployments/{id}/activation":{"put":{"tags":["ProcessDeployments"],"summary":"Activate Process triggers","parameters":[{"name":"id","in":"path","description":"Deployment identifier","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"description":"Trigger activation successful"},"404":{"description":"Process deployment not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## DELETE /api/v1/process-deployments/{id}/activation

> Deactivate Process triggers

```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-deployments/{id}/activation":{"delete":{"tags":["ProcessDeployments"],"summary":"Deactivate Process triggers","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"description":"Trigger deactivation successful"},"404":{"description":"Process deployment not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## POST /api/v1/process-deployments/{processGuid}/agentGroup/{agentGroupId}/variableUpdate

> Update Process variables

```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":{"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-deployments/{processGuid}/agentGroup/{agentGroupId}/variableUpdate":{"post":{"tags":["ProcessDeployments"],"summary":"Update Process variables","parameters":[{"name":"agentGroupId","in":"path","description":"Target agent group","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"processGuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProcessVariable"}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## GET /api/v1/process-deployments/{agentGroupId}/variables

> List Process variables for Processes in Agent group

```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":{"Int64ProcessVariableListDictionaryResponse":{"required":["Data"],"type":"object","properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/ProcessVariable"}},"description":"Response data","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-deployments/{agentGroupId}/variables":{"get":{"tags":["ProcessDeployments"],"summary":"List Process variables for Processes in Agent group","parameters":[{"name":"agentGroupId","in":"path","description":"Agent group from where to fetch Process variables from","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"processIds","in":"query","description":"List of Process ids","schema":{"type":"array","items":{"type":"integer","format":"int64"}}}],"responses":{"200":{"description":"A dictionary mapping Process IDs to lists of Process Variables","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Int64ProcessVariableListDictionaryResponse"}}}},"404":{"description":"Agent group not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```
