Deployment API

This article provides information about using Deployment API for API deployments.
apip43
This article provides information about using Deployment API for API deployments.
Prerequisite
The deployment API requires a valid OAuth 2.0 access token to be retrieved before using any APIs. All the API calls mentioned are also documented through the API Explorer accessible through the Portal APIs functionality.
An API deployment can be managed through the Deployment API. For a proxy with an automatic deployment type, the deployments are read-only and cannot be created, updated, or deleted. The following list displays how to use the deployment API for a Portal that currently has three proxies that are enrolled:
  • DEV proxy with a deployment type of AUTOMATIC which maps to the UI as automatic
  • UAT proxy with a deployment type of ON_DEMAND which maps to the UI as on-demand
  • PROD proxy with a deployment type of MANUAL which maps to the UI as scripted
Retrieve the list of proxies using the following command:
curl -H 'Authorization: Bearer {token}' https://{portalApiHost}/{tenantId}/deployments/1.0/proxies
Example request
:
curl -H 'Authorization: Bearer cde69bcc-3bed-44e0-af5b-c33fcb9020d5' \ https://apim-ssg-apim-uswest-prod.app.prod.w2.dev.ca.com:443/atenant/deployments/1.0/proxies
Example response:
[ { "uuid": "8f6bc46c-a131-4388-b654-1e2b599b0ee9", "name": "DEV", "enrollmentStatus": "ACTIVE", "deploymentType": "AUTOMATIC" }, { "uuid": "de484ed2-cea4-4adc-885b-bf495f94b9f7", "name": "UAT", "enrollmentStatus": "ACTIVE", "deploymentType": "ON_DEMAND" }, { "uuid": "639536fc-230d-434e-8b88-3e13d5069c34", "name": "PROD", "enrollmentStatus": "ACTIVE", "deploymentType": "MANUAL" } ]
From the response example, you can see that there are three proxies currently enrolled with the Portal: DEV, UAT, PROD. Each proxy has a different deployment type and one of them has API deployments that are handled automatically. For the other two proxies (on-demand and scripted), the deployments APIs are used to manage API deployments.