Use Okta Advanced Server Access API Collections With Postman
Last Updated:
Overview
Administrators can use Postman to run Okta Advanced Server Access (ASA) API collections. Set up the Okta Advanced Server Access API with Postman by creating a service user account, generating an API key, obtaining a bearer token, and configuring the Postman environment.
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- Okta Advanced Server Access (ASA)
- Postman
- API
Solution
How does an administrator set up the Okta Advanced Server Access API with Postman?
Configure the Okta Advanced Server Access API with Postman by creating a service user, generating a bearer token, and importing the API collection by following these steps.
- Log in to the Okta Advanced Server Access application from the Okta dashboard.
- Create a group with an admin role if one does not already exist. Navigate to Groups under the Directory section, click Create New Group, enter a Group Name (for example, ServiceAdmins), and click Create Group.
- Click Groups, click Details, click Team Roles, select Admin, and click Update Roles.
- Create a new service user account and add it to the admin group. Click Users, select the Service Accounts tab, click Create Service User, enter a new Username, and click Create Service User.
- Navigate to Groups, select the newly created group with the admin role, click the Users tab, click Add User to Group, and click Add User.
NOTE: Only administrators can list their teams' settings or update these using GET/PUT on /v1/teams/{{asa-team}}/settings.
- Generate a new API key and secret using the newly created service user. Click Users, click Service Users, and click the newly created service user.
- Click Create API Key under the API Keys section.
NOTE: Keep the API key and secret safe and secure.
- Generate a
bearer_tokenusingcurlon the local machine. For example, open a terminal on macOS and run the following command:
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
- Save the generated
bearer_tokensecurely for later use. - Fork this Postman API collection (Advanced Server Access > Attributes) to the environment.
- Open Postman, navigate to Advanced Server Access API, click article:users, and select Get List the ASA Users for a team.
- Click the Authorization tab in the right pane and change the type to Bearer Token.
- Paste the copied bearer token into the Token field on the right.
- Run the
GETcommands to test the configuration. For example:- GET team users list:
{{baseUrl}}/v1/teams/"team_name"/users - GET projects list:
{{baseUrl}}/v1/teams/"team_name"/projects
- GET team users list:
Successfully retrieving the users and projects list confirms the Okta Advanced Server Access API setup in Postman.
