Update Flows
JFrog Connect API requests for creating and managing update flows.
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.
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.
Update flows created successfully.
Bad Request - Invalid YAML format or data.
Unsupported Media Type - Content-Type must be application/yaml.
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"
}
]
}
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.
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.
my-project-abc
The maximum number of records to return.
100
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.
Successfully retrieved all update flows.
Unauthorized - API key is missing or invalid.
Forbidden - Insufficient permissions.
Internal Server Error.
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"
}
]
}
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.
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.
The UUID identifying the update flow.
Update flow YAML retrieved successfully.
Unauthorized - API key is missing or invalid.
Forbidden - Insufficient permissions.
No Found - Update flow with uuid / yaml not found.
Internal Server Error.
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?