Postman

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

When configuring Postman, you can either set it up manually from scratch, or use the ready-made Postman collections and environments we created for your Akamai product and published in the Akamai workspace in Postman.

Set up Postman You can set up and use Postman in the browser of your choice or get the app from Postman's website for Linux, macOS, and Windows.

If you want to fork collections and environments, or follow changes in the original collections, create a free Postman account.

How to set up Postman:

  1. Open Postman or go to https://www.postman.com/.

  2. Click Create Account.

  3. Enter the account details and click Create free account.

  4. After creating a Postman account, you can either go directly to your personal workspace or click Explore more collections and look up Akamai’s Public Workspace.

  5. Click the link you received via email to activate your account, and use all of Postman’s features.

When signed in, you can access the Akamai dashboard with collections and workspaces anytime at https://www.postman.com/akamai/. You’re now ready to fork an Akamai collection.

📘

Note

If you want to use Postman without setting up an account, you can manually download the Postman collection and environment for Akamai and import it using the Postman client. See Akamai API Postman collections on GitHub.

Fork a collection

The Akamai API collections are now available in Akamai's Public Workspace. This means you can fork them into My Workspace to configure Postman for Akamai API calls.

If your product doesn’t have a Postman collection yet, or you want to use a new collection, go to Set up a new collection.

To get started, you can fork the collection from Akamai’s workspace:

  1. Launch Postman and log in to your account.

  2. Go to Akamai's Public Workspace.

  3. In the Collections menu, find your product, click and Create a fork.

Creating a fork in PostmanCreating a fork in Postman

  1. On the Fork collection screen, name your fork in Fork label, and choose the workspace where you want to create the fork in Location.

Forking a collection in PostmanForking a collection in Postman

  1. Check the Watch original collection box if you want to get email notifications about any changes to the original collection.

  2. Click Fork Collection.

After forking the collection, you'll be redirected to your own API workspace. You can navigate through the Collections tab to get familiar with different operations available for the API you want to use.

To make API calls, you need to authorize them with Akamai API credentials. See how to Create authentication credentials for Akamai.

If you want to optimize your API workflows, you can optionally fork an environment into your own workspace.

Fork an environment (optional)

Optionally, you can also use Postman to fork the Akamai environment template for the API you want to use. Environments come with a set of API-specific variables you don’t have to configure each time you build an API call. You can use them to optimize your API-related tasks and automate workflows.

  1. Go to Akamai's Public Workspace.

  2. In the Environments menu, find the environment you want to use, click and Create a Fork.

Creating an environment fork in PostmanCreating an environment fork in Postman

  1. On the Fork collection screen, name your fork in Fork label, and choose the workplace where you want to create the fork in Location.

  2. Click Fork Collection.

  3. Before you make an API request in Postman, you need to Authenticate a collection with your Akamai credentials.

Authenticate a collection

Each Akamai collection comes with authentication variables set at the collection level. We recommend that you resolve them by setting your authentication credentials as environment variables. To save your time, Akamai environments have these credentials already defined for you.

Before you begin

Before you configure authentication variables, fork an environment from the Akamai public workspace, or create a new environment in Postman.

How to

  1. Go to the Credentials section of the Identity and Access Management tool in the Akamai Control Center.

  2. Open your Postman environment and copy the client_secret, host, access_token, and client_token values to replace the default variables in the environment. Make sure that the value you copy does not contain extra characters (such as spaces or slashes).

Authentication values in PostmanAuthentication values in Postman

  1. Go to Collections and switch to the environment you want to work in.

Switching work environments in PostmanSwitching work environments in Postman

  1. Choose the Collection for your product from the list, and click Authorization to hover over your authentication details to check if they resolve correctly, and make sure the Type is set to Akamai Edge Grid. If not, choose it from the drop-down list.

Authorization details in PostmanAuthorization details in Postman

After you've configured the authentication for your Akamai collection, you’re ready to make an API request in Postman.

Set up a new collection

If you want to use your own collection or your product doesn’t have a public Akamai collection in Postman yet, you can set up a new collection. This requires configuring authorization and setting up variables manually before making an API request.

Before you begin, 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.

Follow these steps to create and authenticate a new collection:

  1. Launch Postman and create a New Collection.

Creating a new collection in PostmanCreating a new collection in Postman

👍

Tip

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.

  1. Click the Authorization tab.

  2. Select Akamai EdgeGrid from the Type menu.

  3. Copy the client_secret value from the Credentials section of the Identity and Access Management tool in Control Center.

  4. Return to Postman and paste it in the Client Secret field.

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

  6. Click Save.

Next, you need to set up variables for your collection. 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 the Control Center.

Postman copy hostPostman copy host

  1. Back in Postman, click the Variables tab.

  2. In a new row, click Add a new variable and enter base_url as its name.

  3. Click the INITIAL VALUE column cell, type https://, and paste the rest of the base URL. The CURRENT VALUE column defaults to this same value. Leave it as is.

  4. 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.

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

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

  3. Select the Variables tab. Click Add a new variable in the table. Enter access_token as the name.

  4. Click in the INITIAL VALUE column and paste the access token.

  5. 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.

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

  7. Enter {{access in the Authorization field and select the access_token variable from the drop-down.

Postman select access tokenPostman select access token

  1. Enter {{client to select the variables for both the Client Token and Client Secret.

  2. Click Save.

    Your token and secret values are now protected from direct view.

After setting up authentication and variables for your new collection, you’re ready to make an API request in Postman.

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.

Next steps

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


Did this page help you?