Update Stage

JFrog REST APIs

Content Type
REST API

Description: Updates the definition of the specified stage with new data, including the name, category, and associated repositories (for project stages).

Since: 7.125.4

Usage: PATCH https://{{artifactory-host}}/access/api/v2/stages/{{stage-name}}

Query Parameter (optional):

Parameter

Type

Description

project_key

string

The name of the project that contains the defined stage.

Request Parameters:

Parameter

Type

Description

name

string

The unique name of the stage (for example, DEV, QA, PROD).

category

string

The category of the stage:

  • code

  • promote

Note

The category can be modified only if the stage is not in use by a lifecycle.

repositories

array:string

A list of repository keys assigned to this stage. This field is relevant only when the category is promote.

Consumes: application/json

Response Body:

Sample Request:

PATCH 'https://{host}.jfrog.io/access/api/v2/stages/production-us-east?project_key=mobile-app'
Content-Type: application/json
Authorization: ••••••

{
  "name": "qa-us-east",
  "category": "promote",
  "repositories": [
    "docker-prod-us-east-local",
    "generic-prod-us-east-local",
    "helm-prod-us-east-local"
  ]
}

Sample Response:

{
  "name": "qa-us-east",
  "scope": "project",
  "project_key": "mobile-app",
  "category": "promote",
  "repositories": [
    "docker-prod-us-east-local",
    "generic-prod-us-east-local",
    "helm-prod-us-east-local"
  ],
  "used_in_lifecycle": ["mobile-app"],
  "created_by": "pm_user",
  "created_at": "2025-05-28T17:51:25Z",
  "modified_at": "2025-05-28T17:51:27Z"
}

In addition to the properties inside the request body, the response includes the following information:

Property

Type

Description

used_in_lifecycle

boolean

Indicates whether the stage is currently part of an active lifecycle.

created_by

string

The user ID who created the stage.

created_at

string

The date and time when the stage was created (ISO 8601 format).

modified_at

string

The date and time when the stage was last modified (ISO 8601 format).

Status Codes:

Code

Description

202

Success

400

Bad Request

401

Bad Credentials

403

Permission Denied

404

Not Found