Update Flows

JFrog Connect API requests for creating and managing update flows.

Create Update Flow

post

Creates an update flow in JFrog Connect. When this request completes successfully, the update flow is visible in the web UI and can be deployed either from the web UI or by using the Deploy Update request in the Connect API.

Important: The Body of this request must be sent in YAML format. Note that the example Body of this request might be shown in JSON format in your tool for sending API requests. Regardless, the Body you send with the request must be in YAML format.

Path parameters
project_keystringRequired

The project (fleet) key of the relevant project (fleet) in the account. An account can have multiple projects. If you don't know the project key, you can find it in the Project (Fleet) Settings in the web UI.

Body
Responses
201

Update flows created successfully.

application/json
post
POST /api/v2/{project_key}/update-flows HTTP/1.1
Host: api.connect.jfrog.io
Content-Type: application/yaml
Accept: */*
Content-Length: 811

{
  "flows": {
    "Flow-1-name": {
      "reboot-after-restart": false,
      "steps": [
        {
          "name": "docker_step",
          "uses": "connect/docker",
          "with": {
            "registry": "account1",
            "image-path": "platform-url/${{inputs.input-1-name }}/${{inputs.input-2-name }}",
            "image-tag": "${{ inputs.input-3-name }}",
            "run-options": {
              "restart": "always",
              "attach": "true"
            },
            "command": "echo hello",
            "delete-previous-image": false,
            "on-failure": {
              "revert-all-files": true,
              "trigger-revert": "any-step-failure"
            }
          }
        },
        {
          "name": "command_step",
          "run": "echo hello"
        },
        {
          "name": "artifact_step",
          "uses": "connect/download-artifact",
          "with": {
            "registry": "account1",
            "artifactory-path": "local-repo/file.txt",
            "device-path": "/tmp",
            "on-failure": {
              "trigger-revert": "this-step-failure",
              "revert-all-files": false
            }
          }
        }
      ]
    }
  },
  "on": {
    "workflow-dispatch": {
      "inputs": {
        "input-1-name": {},
        "input-2-name": {},
        "input-3-name": {}
      }
    }
  }
}
{
  "status": "success",
  "message": "Update flows created successfully.",
  "update_flows": [
    {
      "name": "text",
      "uuid": "123e4567-e89b-12d3-a456-426614174000"
    }
  ]
}

Get List of Update Flows

get

Gets all update flows for a project. Each update flow returned includes the name, UUID, update parameters (if any), time created, and CVE severities of any security issues detected.

Path parameters
project_keystringRequired

The project key (fleet key) of the relevant project (fleet) in the account. An account can have multiple projects. If you don't know the project key, you can find it in the Project (Fleet) Settings in the web UI.

Example: my-project-abc
Query parameters
limitinteger · int32 · min: 1 · max: 1000Optional

The maximum number of records to return.

Default: 100
afterstringOptional

The cursor to use for pagination. Returns the next set (i.e., next cursor) of records. This is applicable whenever the number of records to be returned is greater than the limit. For example, if the first cursor returned the limit of 100 records, this parameter is required to receive the next 100 records. The value of the input string can be found in the output of the current cursor.

Responses
200

Successfully retrieved all update flows.

application/json
get
GET /api/v2/{project_key}/update-flows HTTP/1.1
Host: api.connect.jfrog.io
Accept: */*
{
  "status": "success",
  "update_flows": [
    {
      "name": "My Sample Flow",
      "uuid": "f-g584-cc21",
      "update_parameters": [
        "param1_key",
        "param2_key"
      ],
      "created_time": "2023-05-15 10:30:00",
      "cve_severity": "High"
    }
  ]
}

Get Update Flow YAML

get

Returns the YAML definition of the update flow that you specify. The request returns a YAML only for update flows that were created by sending a YAML with the Create Update Flow API request. No data is returned for update flows created with the web UI.

Path parameters
project_keystringRequired

The project key (fleet key) of the relevant project (fleet) in the account. An account can have multiple projects. If you don't know the project key, you can find it in the Project (Fleet) Settings in the web UI.

update_flow_uuidstringRequired

The UUID identifying the update flow.

Responses
200

Update flow YAML retrieved successfully.

application/yaml
get
GET /api/v2/{project_key}/update-flows/{update_flow_uuid} HTTP/1.1
Host: api.connect.jfrog.io
Accept: */*
{
  "flows": {
    "Flow-1-name": {
      "reboot-after-restart": false,
      "steps": [
        {
          "name": "docker_step",
          "uses": "connect/docker",
          "with": {
            "registry": "account1",
            "image-path": "platform-url/${{inputs.input-1-name }}/${{inputs.input-2-name }}",
            "image-tag": "${{ inputs.input-3-name }}",
            "run-options": {
              "restart": "always",
              "attach": "true"
            },
            "command": "echo hello",
            "delete-previous-image": false,
            "on-failure": {
              "revert-all-files": true,
              "trigger-revert": "any-step-failure"
            }
          }
        },
        {
          "name": "command_step",
          "run": "echo hello"
        },
        {
          "name": "artifact_step",
          "uses": "connect/download-artifact",
          "with": {
            "registry": "account1",
            "artifactory-path": "local-repo/file.txt",
            "device-path": "/tmp",
            "on-failure": {
              "trigger-revert": "this-step-failure",
              "revert-all-files": false
            }
          }
        }
      ]
    }
  },
  "on": {
    "workflow-dispatch": {
      "inputs": {
        "input-1-name": {},
        "input-2-name": {},
        "input-3-name": {}
      }
    }
  }
}

Last updated

Was this helpful?