All pages
Powered by GitBook
1 of 1

Loading...

Deployments

JFrog Connect API requests that deploy software, retrieve information about deployments, or abort deployments.

Deploy Update

post

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

Authorizations
AuthorizationstringRequired

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.

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.
Path parameters
project_keystringRequired

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.

Body
post
/api/v2/{project_key}/deployments

Get List of Deployments

get

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.

Authorizations
AuthorizationstringRequired

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.

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.
Path parameters
project_keystringRequired

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.

Query parameters
afterstringOptional

Pagination token to get the next page of results

limitinteger · min: 1 · max: 1000Optional

The maximum number of devices to return in the response

Default: 100
Responses
200

OK

application/json
get
/api/v2/{project_key}/deployments

Get Deployment by UUID

get

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.

Authorizations
AuthorizationstringRequired

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.

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.
Path parameters
project_keystringRequired

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.

deployment_uuidstringRequired

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

OK

application/json
404

NOT FOUND

application/json
get
/api/v2/{project_key}/deployments/{deployment_uuid}

Get Deployment Status on Devices

get

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.

Authorizations
AuthorizationstringRequired

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.

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.
Path parameters
project_keystringRequired

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.

deployment_uuidstringRequired

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

OK

application/json
404

NOT FOUND

application/json
get
/api/v2/{project_key}/deployments/{deployment_uuid}/devices

Get Deployment Status on Device

get

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.

Authorizations
AuthorizationstringRequired

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.

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.
Path parameters
project_keystringRequired

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.

deployment_uuidstringRequired

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.

device_uuidstringRequired

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 page of the web UI.

Responses
200

OK

application/json
404

NOT FOUND

application/json
get
/api/v2/{project_key}/deployments/{deployment_uuid}/devices/{device_uuid}

Abort Deployment

post

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.

Authorizations
AuthorizationstringRequired

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.

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.
Path parameters
project_keystringRequired

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.

deployment_uuidstringRequired

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.

Body
Responses
201

Created

application/json
post
/api/v2/{project_key}/deployments/{deployment_uuid}/abort

Abort Device Deployment

post

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.

Authorizations
AuthorizationstringRequired

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.

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.
Path parameters
project_keystringRequired

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.

deployment_uuidstringRequired

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.

device_uuidstringRequired

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 page of the web UI.

post
/api/v2/{project_key}/deployments/{deployment_uuid}/devices/{device_uuid}/abort
Responses
201

Created

application/json
201

Created

200

OK

201

Created

Body
Responses
201

Created

application/json
201

Created

{
  "deployment_uuid": "dp-22be-13ba"
}
{
  "deployments": [
    {
      "comment": "",
      "created_time": "2023-01-09 12:03:28",
      "cve_severity": null,
      "Critical": 0,
      "High": 0,
      "Low": 0,
      "Medium": 0,
      "deployment_uuid": "dp-e6a5-7e19",
      "type": "manual"
    }
  ],
  "pagination_info": {
    "after": "text",
    "total": 1
  }
}
{
  "comment": "",
  "created_time": "2023-01-09 12:03:28",
  "cve_severity": null,
  "Critical": 0,
  "High": 0,
  "Low": 0,
  "Medium": 0,
  "deployment_uuid": "dp-e6a5-7e19",
  "type": "manual"
}
{
  "deployment_by_device_uuid": {
    "2c55-e275": {
      "finished_time": null,
      "started_time": null,
      "status": "Pending"
    },
    "435d-3443": {
      "finished_time": null,
      "started_time": null,
      "status": "Pending"
    },
    "a72c-b016": {
      "finished_time": null,
      "started_time": null,
      "status": "Pending"
    }
  },
  "pagination_info": {
    "after": "eyJjdXJzb3IiOiA0OTEsICJsaW1pdCI6IDN9",
    "total": 3
  }
}
{
  "summary": "200 OK Deployment status failed",
  "value": {
    "finished_time": "2024-03-26 15:09:05",
    "started_time": "2024-03-26 15:09:04",
    "status": "Failed",
    "steps": [
      {
        "exit_code": 0,
        "name": "Script Block",
        "stderr": "sh: 1: /usr/bin/python: not found\n",
        "stdout": "Script exited with bad exit-code: 127"
      }
    ]
  }
}
{
  "message": "Deployment aborted successfully"
}
{
  "message": "Deployment for device aborted successfully"
}
POST /api/v2/{project_key}/deployments HTTP/1.1
Host: api.connect.jfrog.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 497

{
  "device_filter": {
    "groups": [
      {
        "name": "Production"
      }
    ],
    "filters": [
      {
        "type": "specific_device",
        "operand": "is",
        "value": "d-feaf-d9aa"
      },
      {
        "type": "deployment",
        "deployment_id": "dp-9yl3-9ch7",
        "operand": "is",
        "value": "failed"
      },
      {
        "type": "app",
        "app_version": "dp-9yl3-9ch7",
        "operand": "is",
        "value": "failed"
      }
    ]
  },
  "deployment_configuration": {
    "flow_uuid": "f-7b56-3336",
    "comment": "test webhook 1",
    "app": {
      "name": "default_app",
      "version": "v1.1"
    },
    "parameters_mapping": {
      "username": "ubuntu",
      "conf_path": "/etc/app/settings.conf"
    }
  }
}
GET /api/v2/{project_key}/deployments HTTP/1.1
Host: api.connect.jfrog.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
GET /api/v2/{project_key}/deployments/{deployment_uuid} HTTP/1.1
Host: api.connect.jfrog.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
GET /api/v2/{project_key}/deployments/{deployment_uuid}/devices HTTP/1.1
Host: api.connect.jfrog.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
GET /api/v2/{project_key}/deployments/{deployment_uuid}/devices/{device_uuid} HTTP/1.1
Host: api.connect.jfrog.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
POST /api/v2/{project_key}/deployments/{deployment_uuid}/abort HTTP/1.1
Host: api.connect.jfrog.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
POST /api/v2/{project_key}/deployments/{deployment_uuid}/devices/{device_uuid}/abort HTTP/1.1
Host: api.connect.jfrog.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*