Postman is a cross-platform application that includes tools you can use to both test API calls and confirm their results, which can save you time and frustration when building custom scripts that need access to Acquia’s APIs.
Open Postman, and in the top, left corner, click New.
Scroll to Building Blocks, and then click Request to display the Save Request window.
In Request name, enter a human-readable name for your request.
(Optional) In the Request description field, enter a description that will help you identify the request in the future.
Use one of the following methods to add your request to a collection:
To add your new request to a new collection, click Create Collection, enter the name of the new collection, and then click the check mark.
To add your new request to an existing collection, provide the name of an existing collection in Search for a collection or folder, and then click the magnifying glass icon.
You now have an authorization token you can use when making Cloud Platform API requests. For the process to regenerate the token when it expires, see Regenerating an access token.
In the Method list, click the method of the endpoint (such as GET or POST) you want to access.
In the Enter Request URL field, paste in the full URL of the endpoint. Cloud Platform API endpoints begin with the string https://cloud.acquia.com/api. Most contain placeholders inside curly braces, such as {applicationUuid}, which you must replace with live data from your application.
Click Send to have Postman send your request. In the following example, the endpoint URL contains placeholder data:
In the menu, click Headers, and then in the sub-menu, click Body.
Postman displays the body section of your request in JSON format.
Regenerating an access token
Access tokens are temporary and will expire. If, after sending an API request, Postman displays a response message similar to the following in the Headers section, your access token has expired and must be regenerated:
{
"error": "unauthorized",
"message": "The access token has expired."
}
To regenerate your access token in Postman:
Open Postman.
In the left column, click Collection, and then click the collection to display the requests it contains.
Click a request to select it. Postman displays information about the request.
In the menu, click Authorization.
Click Get New Access Token to display the Get New Access Token window with the information you provided when you created the previous token.
Click Request Token.
Scroll to the bottom of the window, and then click Use Token.
Postman generates a new access token for your use.
Troubleshooting issues in Postman
Postman provides the Postman Console to help you with debugging your requests. To display the console, click the console icon at the bottom left of the Postman interface, as shown in this example:
For more information about the Postman Console, see Debugging and logs at the Postman Learning Center.
Postman is a cross-platform application that includes tools you can use to both test API calls and confirm their results, which can save you time and frustration when building custom scripts that need access to Acquia’s APIs.
Open Postman, and in the top, left corner, click New.
Scroll to Building Blocks, and then click Request to display the Save Request window.
In Request name, enter a human-readable name for your request.
(Optional) In the Request description field, enter a description that will help you identify the request in the future.
Use one of the following methods to add your request to a collection:
To add your new request to a new collection, click Create Collection, enter the name of the new collection, and then click the check mark.
To add your new request to an existing collection, provide the name of an existing collection in Search for a collection or folder, and then click the magnifying glass icon.
You now have an authorization token you can use when making Cloud Platform API requests. For the process to regenerate the token when it expires, see Regenerating an access token.
In the Method list, click the method of the endpoint (such as GET or POST) you want to access.
In the Enter Request URL field, paste in the full URL of the endpoint. Cloud Platform API endpoints begin with the string https://cloud.acquia.com/api. Most contain placeholders inside curly braces, such as {applicationUuid}, which you must replace with live data from your application.
Click Send to have Postman send your request. In the following example, the endpoint URL contains placeholder data:
In the menu, click Headers, and then in the sub-menu, click Body.
Postman displays the body section of your request in JSON format.
Regenerating an access token
Access tokens are temporary and will expire. If, after sending an API request, Postman displays a response message similar to the following in the Headers section, your access token has expired and must be regenerated:
{
"error": "unauthorized",
"message": "The access token has expired."
}
To regenerate your access token in Postman:
Open Postman.
In the left column, click Collection, and then click the collection to display the requests it contains.
Click a request to select it. Postman displays information about the request.
In the menu, click Authorization.
Click Get New Access Token to display the Get New Access Token window with the information you provided when you created the previous token.
Click Request Token.
Scroll to the bottom of the window, and then click Use Token.
Postman generates a new access token for your use.
Troubleshooting issues in Postman
Postman provides the Postman Console to help you with debugging your requests. To display the console, click the console icon at the bottom left of the Postman interface, as shown in this example:
For more information about the Postman Console, see Debugging and logs at the Postman Learning Center.