<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
How to Use ASA API Collections with Postman
Advanced Server Access
Overview

This document explains how to use Postman to run Advanced Server Access API collections.

Applies To
  • Advanced Server Access (ASA)
  • API
Solution

Follow these steps to set up ASA API with Postman:

  1. From the Okta dashboard, log in to the Advanced Server Access App.

    1. Create a Group with an Admin role if it does not exist already.

      1. In IU, under the Directory section, go to Groups > Create New Group > choose Group Name (for example, ServiceAdmins) > Create Group.

      2. Click on Groups again Details > Team Roles > select Admin > click Update Roles.

    2. Create a new service user account and add it to the Admins' Group:

      1. Click on Users > Service Accounts tab > Create Service User > select new Username > Create Service User.

      2. Go to Groups > select the newly created Group with the Admin role > click on the Users tab > Add User to Group > Add User.
        NOTE: Only Administrators can list their teams' settings or update these using GET/PUT on /v1/teams/{{asa-team}}/settings.

    3. Generate a new API key and secret using the newly created service user:

      1. Click on Users > Service Users and click on the newly created Service User.

      2. Under the API Keys section > click Create API Key.
        NOTE: Keep both safe and secure.

  2. Next, generate bearer_token using curl on the local machine, for example, on macOS, open a terminal:

    curl -v -X POST \
    -H "Content-Type: application/json" \
    --data '{
    "key_id": "api-key-id-here",
    "key_secret": "api/secret/here"
    }' \
    https://app.scaleft.com/v1/teams/"team_name"/service_token
    • Once the bearer_token is generated, keep it secure with a note of that to be used later.

  3. Fork this Postman API collection (Advance Server Access > Attributes) to the environment.

  4. Once imported in Postman, go to Advanced Server Access API > article:users > select Get List the ASA Users for a team.

    1. In the RHS Window, click Authorization tab > change type to Bearer Token.

    2. In the Token field on the right, paste the bearer token copied in Step 2.a.

  5. Run the GET commands to test, for example:

    1. GET team users list: {{baseUrl}}/v1/teams/"team_name"/users

    2. GET projects list: {{baseUrl}}/v1/teams/"team_name"/projects


If able to GET the users and projects list, the ASA API was set up successfully using Postman.


Related References

Loading
How to Use ASA API Collections with Postman