# Deployments

## Deploy Update

> Deploys an update flow that you have configured in the web UI. Use this API request to initiate an actual software update.

```json
{"openapi":"3.0.0","info":{"title":"Deployments API","version":"1.0.0"},"servers":[{"url":"https://api.connect.jfrog.io"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"You will need to get an access token from the Connect web UI to use the Connect API v2. The v1 token will not work for v2.\n\n    Important: For security reasons, the new token generated by Connect will not be stored. Ensure that you copy the token and save it in a safe place.\n"}},"schemas":{"DeployUpdate":{"type":"object","properties":{"device_filter":{"description":"An object that defines which devices in your fleet will be acted on.","type":"object","properties":{"groups":{"description":"One or multiple groups to be included in the filter.","type":"array","items":{"type":"object","properties":{"name":{"type":"string"}}}},"filters":{"description":"The criteria defined for the filter. Each filter includes a `type`, an `operand`, and a `value`. Although `filters` is required, you can use it with empty values.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["specific_device","tag","app","device_state","deployment"]},"operand":{"type":"string","enum":["is","is_not"]},"value":{"type":"string"}}}}},"required":["filters"]},"deployment_configuration":{"description":"An object that specifies the deployment parameters.","type":"object","required":["flow_uuid"],"properties":{"flow_uuid":{"type":"string","description":"Specifies which update flow to use, for example, f-7b56-3336. You can obtain the UUID from the Update Flows tab in the Deployments page of the web UI."},"comment":{"type":"string","description":"You can add a brief comment that describes the purpose or something important about the deployment."},"app":{"type":"object","properties":{"name":{"type":"string","description":"Set the value as the name of the app you created in the Connect web UI. The app must exist already."},"version":{"type":"string","description":"In devices that deploy the update successfully, the app version will change to the version you set here."}}},"parameters_mapping":{"type":"object","description":"Specifies the values of the update parameters that have been configured in the update flow.","additionalProperties":{"type":"string"}}}}}}}},"paths":{"/api/v2/{project_key}/deployments":{"post":{"summary":"Deploy Update","description":"Deploys an update flow that you have configured in the web UI. Use this API request to initiate an actual software update.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployUpdate"}}}},"parameters":[{"name":"project_key","in":"path","schema":{"type":"string"},"required":true,"description":"The fleet key of the relevant fleet in the account. An account can have multiple fleets (formerly called projects). If you don't know the fleet key, you can find it in the Fleet Settings of the web UI."}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"deployment_uuid":{"type":"string"}}}}}}}}}}}
```

## Get List of Deployments

> Returns the list of deployments for the current user in the defined fleet. The record for each deployment includes the deployment UUID, the comment entered for the deployment, the CVE severities, the time the deployment was created, and the deployment type.

```json
{"openapi":"3.0.0","info":{"title":"Deployments API","version":"1.0.0"},"servers":[{"url":"https://api.connect.jfrog.io"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"You will need to get an access token from the Connect web UI to use the Connect API v2. The v1 token will not work for v2.\n\n    Important: For security reasons, the new token generated by Connect will not be stored. Ensure that you copy the token and save it in a safe place.\n"}},"schemas":{"DeploymentsList":{"type":"object","properties":{"deployments":{"type":"array","items":{"$ref":"#/components/schemas/Deployment"}},"pagination_info":{"type":"object","properties":{"after":{"type":"string"},"total":{"type":"integer"}}}}},"Deployment":{"type":"object","properties":{"comment":{"type":"string"},"created_time":{"type":"string"},"cve_severity":{"type":"object","properties":{"Critical":{"type":"integer"},"High":{"type":"integer"},"Low":{"type":"integer"},"Medium":{"type":"integer"}}},"deployment_uuid":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/api/v2/{project_key}/deployments":{"get":{"summary":"Get List of Deployments","description":"Returns the list of deployments for the current user in the defined fleet. The record for each deployment includes the deployment UUID, the comment entered for the deployment, the CVE severities, the time the deployment was created, and the deployment type.","parameters":[{"name":"project_key","in":"path","schema":{"type":"string"},"required":true,"description":"The fleet key of the relevant fleet in the account. An account can have multiple fleets (formerly called projects). If you don't know the fleet key, you can find it in the Fleet Settings of the web UI."},{"name":"after","in":"query","required":false,"schema":{"type":"string"},"description":"Pagination token to get the next page of results"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"The maximum number of devices to return in the response"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentsList"}}}}}}}}}
```

## Get Deployment by UUID

> Returns information about the requested deployment, including the time it was created, the CVE severities, the UUID, the comment entered at creation time, and the deployment type.

```json
{"openapi":"3.0.0","info":{"title":"Deployments API","version":"1.0.0"},"servers":[{"url":"https://api.connect.jfrog.io"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"You will need to get an access token from the Connect web UI to use the Connect API v2. The v1 token will not work for v2.\n\n    Important: For security reasons, the new token generated by Connect will not be stored. Ensure that you copy the token and save it in a safe place.\n"}},"schemas":{"Deployment":{"type":"object","properties":{"comment":{"type":"string"},"created_time":{"type":"string"},"cve_severity":{"type":"object","properties":{"Critical":{"type":"integer"},"High":{"type":"integer"},"Low":{"type":"integer"},"Medium":{"type":"integer"}}},"deployment_uuid":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/api/v2/{project_key}/deployments/{deployment_uuid}":{"get":{"summary":"Get Deployment by UUID","description":"Returns information about the requested deployment, including the time it was created, the CVE severities, the UUID, the comment entered at creation time, and the deployment type.","parameters":[{"name":"project_key","in":"path","schema":{"type":"string"},"required":true,"description":"The fleet key of the relevant fleet in the account. An account can have multiple fleets (formerly called projects). If you don't know the fleet key, you can find it in the Fleet Settings of the web UI."},{"name":"deployment_uuid","in":"path","schema":{"type":"string"},"required":true,"description":"The UUID of the deployment you are acting on. This is a unique identifier in Connect, for example, dp-e6a5-7e19, and can be found in the web UI in the Deployments table."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployment"}}}},"404":{"description":"NOT FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}
```

## Get Deployment Status on Devices

> Returns the status of the deployment on the devices included in the deployment. The status information includes the start and finish time of the deployment on each device, the deployment status (success or failure), and the status of each action block (steps) included in the update flow.

```json
{"openapi":"3.0.0","info":{"title":"Deployments API","version":"1.0.0"},"servers":[{"url":"https://api.connect.jfrog.io"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"You will need to get an access token from the Connect web UI to use the Connect API v2. The v1 token will not work for v2.\n\n    Important: For security reasons, the new token generated by Connect will not be stored. Ensure that you copy the token and save it in a safe place.\n"}},"schemas":{"DeploymentDevices":{"type":"object","properties":{"deployment_by_device_uuid":{"type":"object","properties":{"additionalProperties":{"description":"device UUID to deployment details","type":"object","properties":{"finished_time":{"type":"string"},"started_time":{"type":"string"},"status":{"type":"string"}}}}},"pagination_info":{"type":"object","properties":{"after":{"type":"string"},"total":{"type":"integer"}}}}}}},"paths":{"/api/v2/{project_key}/deployments/{deployment_uuid}/devices":{"get":{"summary":"Get Deployment Status on Devices","description":"Returns the status of the deployment on the devices included in the deployment. The status information includes the start and finish time of the deployment on each device, the deployment status (success or failure), and the status of each action block (steps) included in the update flow.","parameters":[{"name":"project_key","in":"path","schema":{"type":"string"},"required":true,"description":"The fleet key of the relevant fleet in the account. An account can have multiple fleets (formerly called projects). If you don't know the fleet key, you can find it in the Fleet Settings of the web UI."},{"name":"deployment_uuid","in":"path","schema":{"type":"string"},"required":true,"description":"The UUID of the deployment you are acting on. This is a unique identifier in Connect, for example, dp-e6a5-7e19, and can be found in the web UI in the Deployments table."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentDevices"}}}},"404":{"description":"NOT FOUND","headers":{"Server":{"schema":{"type":"string"}},"Date":{"schema":{"type":"string"}},"Content-Type":{"schema":{"type":"string"}},"Content-Length":{"schema":{"type":"integer"}},"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Connection":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```

## Get Deployment Status on Device

> Returns the status of a deployment on a specified device. The status information includes the start and finish time of the deployment on the device, the deployment status (success or failure), and the status of each step included in the update flow.

```json
{"openapi":"3.0.0","info":{"title":"Deployments API","version":"1.0.0"},"servers":[{"url":"https://api.connect.jfrog.io"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"You will need to get an access token from the Connect web UI to use the Connect API v2. The v1 token will not work for v2.\n\n    Important: For security reasons, the new token generated by Connect will not be stored. Ensure that you copy the token and save it in a safe place.\n"}},"schemas":{"DeviceDeploymentDetails":{"type":"object","properties":{"finished_time":{"type":"string","format":"date-time"},"started_time":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["Success","Failed"]},"steps":{"type":"array","items":{"type":"object","properties":{"exit_code":{"type":"integer"},"name":{"type":"string"},"stderr":{"type":"string"},"stdout":{"type":"string"}}}}}}}},"paths":{"/api/v2/{project_key}/deployments/{deployment_uuid}/devices/{device_uuid}":{"get":{"summary":"Get Deployment Status on Device","description":"Returns the status of a deployment on a specified device. The status information includes the start and finish time of the deployment on the device, the deployment status (success or failure), and the status of each step included in the update flow.","parameters":[{"name":"project_key","in":"path","schema":{"type":"string"},"required":true,"description":"The fleet key of the relevant fleet in the account. An account can have multiple fleets (formerly called projects). If you don't know the fleet key, you can find it in the Fleet Settings of the web UI."},{"name":"deployment_uuid","in":"path","schema":{"type":"string"},"required":true,"description":"The UUID of the deployment you are acting on. This is a unique identifier in Connect, for example, dp-e6a5-7e19, and can be found in the web UI in the Deployments table."},{"name":"device_uuid","in":"path","schema":{"type":"string"},"required":true,"description":"The  UUID of the device you are acting on. This is the unique identifier of the device in Connect, for example, d-4cfe-4e51. You can find the UUID in the ID column of the Devices table in the [Devices](https://docs.connect.jfrog.io/devices/view-device-details) page of the web UI."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceDeploymentDetails"}}}},"404":{"description":"NOT FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}
```

## Abort Deployment

> Aborts the deployment that you specify with the fleet key and the deployment UUID. This action stops the deployment to all devices that are in Pending state and tries to stop the deployments that are in In Progress state. The abort action does not affect devices that are already in Succeeded or Failed state.\
> \
> Once the deployment has been aborted, the status of the devices is indicated as Aborted in the Status column of the Detailed Deployment Information page in the web UI.

```json
{"openapi":"3.0.0","info":{"title":"Deployments API","version":"1.0.0"},"servers":[{"url":"https://api.connect.jfrog.io"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"You will need to get an access token from the Connect web UI to use the Connect API v2. The v1 token will not work for v2.\n\n    Important: For security reasons, the new token generated by Connect will not be stored. Ensure that you copy the token and save it in a safe place.\n"}}},"paths":{"/api/v2/{project_key}/deployments/{deployment_uuid}/abort":{"post":{"summary":"Abort Deployment","description":"Aborts the deployment that you specify with the fleet key and the deployment UUID. This action stops the deployment to all devices that are in Pending state and tries to stop the deployments that are in In Progress state. The abort action does not affect devices that are already in Succeeded or Failed state.\n\nOnce the deployment has been aborted, the status of the devices is indicated as Aborted in the Status column of the Detailed Deployment Information page in the web UI.","requestBody":{"content":{}},"parameters":[{"name":"project_key","in":"path","schema":{"type":"string"},"required":true,"description":"The fleet key of the relevant fleet in the account. An account can have multiple fleets (formerly called projects). If you don't know the fleet key, you can find it in the Fleet Settings of the web UI."},{"name":"deployment_uuid","in":"path","schema":{"type":"string"},"required":true,"description":"The UUID of the deployment you are acting on. This is a unique identifier in Connect, for example, dp-e6a5-7e19, and can be found in the web UI in the Deployments table."}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}}}}
```

## Abort Device Deployment

> Aborts the deployment to a specific device that you specify. You will need to specify the fleet key, the deployment UUID, and the device UUID. This action stops the deployment to the device if it is in Pending state and tries to stop a deployment that is in In Progress state. The abort action will not affect a device if it is already in Succeeded or Failed state.\
> \
> Once the deployment has been aborted, the status of the device is indicated as Aborted in the Status column of the Detailed Deployment Information page in the web UI.

```json
{"openapi":"3.0.0","info":{"title":"Deployments API","version":"1.0.0"},"servers":[{"url":"https://api.connect.jfrog.io"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"You will need to get an access token from the Connect web UI to use the Connect API v2. The v1 token will not work for v2.\n\n    Important: For security reasons, the new token generated by Connect will not be stored. Ensure that you copy the token and save it in a safe place.\n"}}},"paths":{"/api/v2/{project_key}/deployments/{deployment_uuid}/devices/{device_uuid}/abort":{"post":{"summary":"Abort Device Deployment","description":"Aborts the deployment to a specific device that you specify. You will need to specify the fleet key, the deployment UUID, and the device UUID. This action stops the deployment to the device if it is in Pending state and tries to stop a deployment that is in In Progress state. The abort action will not affect a device if it is already in Succeeded or Failed state.\n\nOnce the deployment has been aborted, the status of the device is indicated as Aborted in the Status column of the Detailed Deployment Information page in the web UI.","requestBody":{"content":{}},"parameters":[{"name":"project_key","in":"path","schema":{"type":"string"},"required":true,"description":"The fleet key of the relevant fleet in the account. An account can have multiple fleets (formerly called projects). If you don't know the fleet key, you can find it in the Fleet Settings of the web UI."},{"name":"deployment_uuid","description":"The UUID of the deployment you are acting on. This is a unique identifier in Connect, for example, dp-e6a5-7e19, and can be found in the web UI in the Deployments table.","in":"path","schema":{"type":"string"},"required":true},{"name":"device_uuid","description":"The  UUID of the device you are acting on. This is the unique identifier of the device in Connect, for example, d-4cfe-4e51. You can find the UUID in the ID column of the Devices table in the [Devices](https://docs.connect.jfrog.io/devices/view-device-details) page of the web UI.","in":"path","schema":{"type":"string"},"required":true}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}}}}
```
