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 |
|---|---|---|
| string | Filters the list for a specific project. |
Request Body:
Parameter | Type | Description |
|---|---|---|
| array:array(string) | The new, ordered list of stage names that comprise the lifecycle. |
Consumes: application/json
Response Body:
Property | Type | Description |
|---|---|---|
| string | The category name ( |
| array:objects | An ordered list of stages within a particular category. |
| string | The stage name (for example, |
| string | The level at which the stage exists ( |
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 |