Skip to content

Commit

Permalink
[CMGR-50789] update postman collection for publicly accessing CM APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
Amisha Agarwal committed Mar 15, 2024
1 parent 881b839 commit e8d02b0
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/pages/guides/getting-started/getting-started-with-postman.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ import RunInPostman from '../../../components/run-in-postman.js'

If you use Postman, there is a Cloud Manager-specific collection which can be imported into your workspace using the button below.

<RunInPostman collectionId="3ab610ab110a6a5fd18b" param="env%5BCloud%20Manager%20Public%20API%5D=W3siZGVzY3JpcHRpb24iOnsiY29udGVudCI6IiIsInR5cGUiOiJ0ZXh0L3BsYWluIn0sInZhbHVlIjoiIiwia2V5IjoiYXBpX2tleSIsImVuYWJsZWQiOnRydWV9LHsiZGVzY3JpcHRpb24iOnsiY29udGVudCI6IiIsInR5cGUiOiJ0ZXh0L3BsYWluIn0sInZhbHVlIjoiIiwia2V5Ijoib3JnYW5pemF0aW9uX2lkIiwiZW5hYmxlZCI6dHJ1ZX0seyJkZXNjcmlwdGlvbiI6eyJjb250ZW50IjoiIiwidHlwZSI6InRleHQvcGxhaW4ifSwidmFsdWUiOiIiLCJrZXkiOiJ0ZWNobmljYWxfYWNjb3VudF9pZCIsImVuYWJsZWQiOnRydWV9LHsiZGVzY3JpcHRpb24iOnsiY29udGVudCI6IiIsInR5cGUiOiJ0ZXh0L3BsYWluIn0sInZhbHVlIjoiIiwia2V5IjoicHJpdmF0ZV9rZXkiLCJlbmFibGVkIjp0cnVlfSx7ImRlc2NyaXB0aW9uIjp7ImNvbnRlbnQiOiIiLCJ0eXBlIjoidGV4dC9wbGFpbiJ9LCJ2YWx1ZSI6IiIsImtleSI6ImNsaWVudF9zZWNyZXQiLCJlbmFibGVkIjp0cnVlfSx7InZhbHVlIjoiIiwia2V5IjoiYWNjZXNzX3Rva2VuIiwiZW5hYmxlZCI6d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iiwic2Vzc2lvblZhbHVlIjoiIiwic2Vzc2lvbkluZGV4Ijo3fV0=" />

## Collection Variables

This collection defines a number of variables which are used in the contained requests. In general, you do not need to modify these variables; if you copy the request definitions from this collection to another collection, you should be sure to set these variables.

* `host_name` - The Cloud Manager API host name, `cloudmanager.adobe.io`.
* `ims_endpoint` - The host name for the Adobe Identity Management System (IMS), `ims-na1.adobelogin.com`.
* `cloudmanager_claim` - The access claim used in the JWT token, `https://ims-na1.adobelogin.com/s/ent_cloudmgr_sdk`.

## Configuration

Expand All @@ -35,16 +34,18 @@ The requests in this collection depend upon a set of Postman environment variabl

Then click on the eye icon to view the environment variables and click the Edit link to edit the variables.

![Postman Environment Details](img/postman-editenvironment.png)
![Postman Environment Details](img/postman-environment-edit-click.png)

Four of these values need to be populated using the values displayed in the Adobe Developer Console.
![Postman Environment Edit Details](img/postman-after-environment-edit-click.png)

Six of these values need to be populated using the values displayed in the Adobe Developer Console.

* `api_key`
* `organization_id`
* `technical_account_id`
* `client_id`
* `client_secret`

The `private_key` variable needs to be populated with the contents of the `private.key` file generated by Open SSL as described in the [Adobe I/O JWT Documentation](https://developer.adobe.com/developer-console/docs/guides/authentication/JWT/JWTCertificate/).
* `scopes`

## Obtaining the Access Token

Expand All @@ -54,8 +55,12 @@ Once the environment variables are populated, open the Obtain Access Token reque

This will automatically set the `access_token` environment variable with a token which is valid for 24 hours. If you need to refresh it, just re-send this request.

<InlineAlert slots="text" variant="warning"/>

Note that generation of JWT access token is deprecated in favor of the OAuth Server-to-Server credentials. Creating new JWT credentials will stop by May 1, 2024. [Learn more](../../../developer-console/docs/guides/authentication/JWT/index.md).

## Executing Other Requests

In addition to the Obtain Access Token request, the collection includes other requests which can be executed.

If you create your own requests in Postman, keep in mind that they must always include the `Authorization`, `x-gw-ims-org-id`, and `x-api-key` headers. The `Authorization` header will be automatically inherited for requests defined in the `Cloud Manager Public API` collection, but if you create your own requests outside of this collection, you will need to configure this header, using the `access_token` envrionment variable.
If you create your own requests in Postman, keep in mind that they must always include the `Authorization`, `x-gw-ims-org-id`, and `x-api-key` headers. The `Authorization` header will be automatically inherited for requests defined in the `Cloud Manager Public API` collection, but if you create your own requests outside of this collection, you will need to configure this header, using the `access_token` environment variable.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e8d02b0

Please sign in to comment.