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
Example request
{
"targetEnvCockpitId": "df83b2a4-cc3e-3f80-9f0d-c138c106c076",
"targetEnvName": "prod"
}Response
Promotion successfully created
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"
}