Update Lifecycle

JFrog REST APIs

Content Type
REST API

Description: Adds, removes, and reorders the stages of a project lifecycle.

Note

Global stages, such as PR, COMMIT, and PROD, cannot be modified and should not be included in the request.

Since: 7.125.4

Usage: PATCH https://{{artifactory-host}}/access/api/v2/lifecycle/

Query Parameter (optional):

Parameter

Type

Description

project_key

string

Filters the list for a specific project.

Request Body:

Parameter

Type

Description

promote_stages

array:array(string)

The new, ordered list of stage names that comprise the lifecycle.

Consumes: application/json

Response Body:

Property

Type

Description

category

string

The category name (CODE or PROMOTE).

category.stages

array:objects

An ordered list of stages within a particular category.

categories.stages.name

string

The stage name (for example, DEV or QA).

categories.stages.scope

string

The level at which the stage exists (global or project).

Sample Request:

PATCH 'https://{host}.jfrog.io/access/api/v2/lifecycle'
Content-Type: application/json
Authorization: ••••••

{
  "promote_stages": [
    "qa-testing",
    "staging-deploy"
  ]
}

Sample Response:

[
  {
    "category": "CODE",
    "stages": [
      { "name": "PR", "scope": "global" },
      { "name": "COMMIT", "scope": "global" }
    ]
  },
  {
    "category": "PROMOTE",
    "stages": [
      { "name": "qa-testing", "scope": "project" },
      { "name": "staging-deploy", "scope": "project" },
      { "name": "PROD", "scope": "global" }
    ]
  }
]

Status Codes:

Code

Description

202

Success

400

Bad Request

401

Bad Credentials

403

Permission Denied

404

Not Found

422

Unprocessable Entity