Deploy APIs to Proxies using PAPI

This article provides information about how to deploy APIs to proxies by making calls to the
Deployments
resource for the Portal API (PAPI).
You can deploy APIs to proxies by making calls to the
Deployments
resource for the Portal API (PAPI) for the following purposes:
  • To deploy APIs to proxies with the On Demand or Scripted API deployment type (On Demand or Scripted proxies). For proxies with the Automatic API deployment type, the deployments are read-only and cannot be created, updated, or deleted.
  • To assign organizations to a proxy.
  • (Automatic and On Demand proxies only) To deploy APIs to proxies using
    API Portal
    , see Deploy APIs.
  • To assign organizations to a proxy using
    API Portal
    , see Manage Proxies.
Prerequisites
  • You have retrieved a valid OAuth 2.0 access token. The API calls mentioned are also documented through the API Explorer accessible through the Portal API's functionality.
  • You have installed the REST Management API (restman) on your proxy:
    • For more information, see Install the REST Management Service in the API Gateway documentation.
    • For the SaaS solution, restman is installed for you.
API Explorer is only accessible through the API Portal/Ingress tenant.
You can manage API deployments to proxies by making calls to the
Deployments
resource for the PAPI. The following example displays how to use the deployments resource for three active proxies:
  • DEV proxy with the AUTOMATIC API deployment type, which maps to
    API Portal
    as automatic.
  • UAT proxy with the ON_DEMAND API deployment type, which maps to
    API Portal
    as on demand.
  • PROD proxy with a MANUAL API deployment type, which maps to
    API Portal
    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 API deployment type and one of them has API deployments that are handled automatically. For the other two proxies (On Demand and Scripted), you manage API deployments to proxies by making calls to the
Deployments
resource for the PAPI.