Calling Deployment Manager APIs from a REST client

From PegaWiki
Invoking Deployment Manager APIs using a Rest client / This is the approved revision of this page, as well as being the most recent.
Jump to navigation Jump to search

Calling Deployment Manager APIs from a REST client

Description Invoking Deployment Manager APIs
Version as of 8.5
Application Pega Platform
Capability/Industry Area DevOps



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:

  1. Download the latest version of Postman.
  2. Start Postman -> Create a new request in scratch pad.
  3. Ensure the REST method is set to GET.
  4. Enter the request URL as: https://<server>:<port>/prweb/PRRestService/DeploymentManager/v1/pipelines.
  5. On the authentication tab, select OAuth 2.0 authorization.
  6. Configure new token:
    1. In the Token Name field, enter a name for your token.
    2. In the Grant Type field, select your client credentials.
    3. In the Access Token URL field, enter https://<server>:<port>/prweb/PRRestService/oauth2/v1/token.
    4. 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.
    5. 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.
    6. Click on Get New Access Token to fetch the token from DevOps server.
    7. Click Use token.
  7. See the image below for a sample configuration.
    Postman request configuration for the pipelines API, including authentication parameters.
  8. Click Send to see the response.
    Example response for the Pipelines API in Postman.

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.