v2

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-07-21130282381.6 KB
APIs

Promote an API

Promote an API

Promote the API to another environment.

High risk operation: require explicit user confirmation before execution.

post/environments/{envId}/apis/{apiId}/_promote

Request body

targetEnvCockpitIdstring

The target environment id where the promotion should be done.

targetEnvNamestring

The target environment name where the promotion should be done.

Example request

{
  "targetEnvCockpitId": "df83b2a4-cc3e-3f80-9f0d-c138c106c076",
  "targetEnvName": "prod"
}

Response

Promotion successfully created

idstring

The promotion id.

apiDefinitionstring

The api definition.

apiIdstring

The api id.

status'CREATED' | 'TO_BE_VALIDATED' | 'ACCEPTED' | 'REJECTED' | 'ERROR'

The status of the promotion.

targetEnvCockpitIdstring

The target environment id where the promotion should be done.

targetEnvNamestring

The target environment name where the promotion should be done.

sourceEnvCockpitIdstring

The source environment id where the promotion should come from.

sourceEnvNamestring

The source environment name where the promotion should come from.

createdAtstring date-time

The datetime when the promotion was created.

updatedAtstring date-time

The datetime when the promotion was updated.

targetApiIdstring

The target api id.

Example response

{
  "id": "df83b2a4-cc3e-3f80-9f0d-c138c106c076",
  "apiId": "df83b2a4-cc3e-3f80-9f0d-c138c106c076",
  "targetEnvCockpitId": "df83b2a4-cc3e-3f80-9f0d-c138c106c076",
  "targetEnvName": "prod",
  "sourceEnvCockpitId": "df83b2a4-cc3e-3f80-9f0d-c138c106c076",
  "sourceEnvName": "dev",
  "createdAt": "2023-05-25 12:40:46.184000+00:00",
  "updatedAt": "2023-05-25 12:40:46.184000+00:00",
  "author": {
    "userId": "df83b2a4-cc3e-3f80-9f0d-c138c106c076",
    "displayName": "John Doe",
    "email": "email@example.com",
    "source": "cockpit",
    "sourceId": "89eb0e39-1706-49c1-ab0e-391706d9c10a"
  },
  "targetApiId": "df83b2a4-cc3e-3f80-9f0d-c138c106c076"
}