Calling Deployment Manager APIs from a REST client
Calling Deployment Manager APIs from a REST client
Invoking Deployment Manager APIs using a Rest client | |
---|---|
New URL | https://pega-dev.zoominsoftware.io/bundle/deployment-manager/page/deployment-manager/dm/access-api-doc.html |
This article has been moved over to our Pega Community here in order to align with our larger content strategy. Please update any bookmarks or links that you may have to this location. |
Deployment Manager offers a feature set of APIs for querying data and performing actions within the system. See below for more information on invoking these APIs from a REST client.
Use case examples
There are numerous ways to interact with the API set to enhance your experience with Deployment Manager. For example, you can use these APIs to:
- Debug connection issues
- Get a list of all pipelines
- Create / clone a pipeline
- Get a list of all deployments
- Start a deployment
- Progress a task programmatically
- Fix tasks which are in a bad state
- Bulk process tasks
Before you begin
Before getting started, you need the client ID and secret that Deployment Manager generates when setting up the instance. This example uses Postman as a REST client, but any REST client application can be used to achieve the same result.
Process/Steps to achieve objective
Use the API to retrieve a list of available pipelines:
- Download the latest version of Postman.
- Start Postman -> Create a new request in scratch pad.
- Ensure the REST method is set to GET.
- Enter the request URL as:
https://<server>:<port>/prweb/PRRestService/DeploymentManager/v1/pipelines
. - On the authentication tab, select OAuth 2.0 authorization.
- Configure new token:
- In the Token Name field, enter a name for your token.
- In the Grant Type field, select your client credentials.
- In the Access Token URL field, enter
https://<server>:<port>/prweb/PRRestService/oauth2/v1/token
. - In the Client ID field, enter the client ID provided by Deployment Manager when setting up the instance. This is included in the client secret file.
- In the Client Secret field, enter the client secret provided by Deployment Manager when setting up the instance. This is included in the client secret file.
- Click on Get New Access Token to fetch the token from DevOps server.
- Click Use token.
- See the image below for a sample configuration.
- Click Send to see the response.
Results
You now have the ability to perform actions against a Deployment Manager system through the associated REST APIs. Ensure you review the documentation included in the Deployment Manager distribution on Pega Marketplace for a full overview of supported APIs.