Postman

Postman is a graphical user interface that makes it easier to build and use APIs.

Install Postman

You can get the app from Postman's website. Postman offers apps for Linux, macOS, and Windows, as well as a browser version.

Authenticate

Postman has the Akamai EdgeGrid authentication method built in to make it easier for you to add your tokens and start using Akamai's APIs.

You'll need to get the values from the credential you created in Control Center and apply them in Postman. Refer to Create authentication credentials if you need help with this.

  1. Launch Postman and create a New Collection.
    Postman new collectionPostman new collection

  2. Click the Authorization tab.

  3. Select Akamai EdgeGrid from the Type menu.
    Postman new collectionPostman new collection

  4. Copy the client_secret value from the Credentials section of the Identity and Access Management tool in Control Center.
    Postman copy client secretPostman copy client secret

  5. Return to Postman and paste it in the Client Secret field.
    Postman paste client secretPostman paste client secret

  6. Copy and paste the access_token and client_token values in their respective fields.

  7. Click Save.

Make an API request

You can use postmancall to make requests to an Akamai API straight from the Postman interface. Postman offers several extra features that make it easier to manage complex calls too.

In this example, we're using postmansample to query the Diagnostic Tools API. We'll view all of the IP addresses assigned to a specific Global Traffic Management (GTM) property.

📘

This example assumes you've set up variables in Postman.

  1. Select Collections{collection-name} and click New Request.

  2. Set the method to GET and type {{base in the Enter request URL field.

  3. Select the base_url variable from the drop-down menu.
    Postman base URLPostman base URL
    This inserts the base URL variable.

  4. Add the list GTM properties endpoint to show the existing revocation list. The full value should look like this:

    {{base_url}}/diagnostic-tools/v2/gtm/gtm-properties
    
  5. Click Send. The interface shows the response:

    {
        "gtmProperties": [
            {
                "property": "origin",
                "domain": "akadns.net",
                "hostName": "origin.akadns.net"
            },
            {
                "property": "origin-r3h",
                "domain": "akadns.net",
                "hostName": "origin-r3h.akadns.net"
            }
        ]
    }
    
  6. Find the hostName for your GTM property and store its property and domain values.

  7. Replace the endpoint path with the list IP addresses for a GTM property operation. Keep the {{base_url}} variable value in this field.

  8. Replace the {property} and {domain} variable values with the ones you noted.

  9. Click Send. The response looks like this:

    {
        "gtmPropertyIps": {
            "property": "origin",
            "domain": "akadns.net",
            "testIps": [
                "1.23.45.678",
                "191.011.121.314",
                "15.16.171.81",
                "192.02.122.23",
                "24.25.262.72"
            ],
            "targetIps": [
                "182.93.03.132",
                "133.34.35.363",
                "273.83.94.04"
            ]
        }
    }
    

Now you can review all of the test and target IP addresses that have been assigned to your selected GTM property.

👍

Click Save at the top right to reuse this operation in Postman. You won't have to run the original operation to get the property and domain values again.

Set up variables

You can use Postman's Variables feature to assign a reusable value to a variable and call on it whenever you need it. This can help protect sensitive data like your EdgeGrid authentication values, or you can use one to quickly call a fixed value in an API request. Here we cover some optional but recommended variables you can create.

First, let's store the base URL used for all Akamai APIs as a variable. This lets you quickly call on it when making a request, rather than typing it manually each time.

  1. Copy the Host value from the Credentials section of the Identity and Access Management tool in Control Center..
    Postman copy hostPostman copy host

  2. Back in Postman, click the Variables tab.

  3. In a new row, click Add a new variable and type base_url as its name.

  4. Click the INITIAL VALUE column cell, type https://, and Paste. The CURRENT VALUE column defaults to this same value. Leave it as is.

  5. Click Save.

    👍

    More on how to use this variable later. Next, let's hide your Access Token, Client Token, and Client Secret values using variables.

  6. With your Collection selected, click the Authorization tab.

  7. Copy the value you set as your Access Token.

  8. Select the Variables tab. Click Add a new variable in the table. Type access_token as the name.

  9. Click in the INITIAL Value column and Paste.

  10. Select the Authorization tab and repeat the steps for the Client Token and Client Secret values, naming the variables client_token and client_secret, respectively.

  11. Return to the Authorization tab and delete all content in the Access Token field.

  12. Type {{access in the Authorization field and select the access_token variable from the drop-down.
    Postman select access tokenPostman select access token

  13. Type {{client to select the variables for both the Client Token and Client Secret.

  14. Click Save.
    Your token and secret values are now protected from direct view.
    Postman values protectedPostman values protected

👍

Find resources for calling Akamai APIs in the Akamai Postman collection.

Video demo

Watch this video for a demonstration of how to create an Akamai delivery configuration using Postman.


Did this page help you?