How to Use Postman
You can use Postman to test Server API V3.
Prerequisites:
You must have Postman installed. Postman is available at go.postman.co/home.
You must have an API Key and an API Secret in order to test Server API in Postman. Go to the User Roles and Permissions help page for more information.
Add API to Postman
To test Server API, import it to Postman.
First, you need to obtain the link you will use to import Server API V3. To find this link, go to the Server UI, select the question mark icon in the upper right corner and then select API Documentation. This will take you to the API V3 Swagger page.
Note the address of the API documentation you find on the Swagger page.
In Postman go to Collections, then select Import.
Select Link and enter the Server API URL you noted in step 2, then select Continue.
Now you can see Alteryx Server API V3 under the Collections tab.
Set Up Authorization
To be able to send your requests, you must set up your authorization in Postman.
Go to Collections and select Alteryx Server API V3.
In the Auth tab, select OAuth 2.0 as Type.
Set up the Current Token as follows:
In the Configure New Token section, set up the following:
Optionally, enter a Token Name.
In Grant Type select Client Credentials.
In Access Token URL,enter the endpoint for the authentication server. To find out the endpoint, go to Swagger and search for the Token URL. For more information visit the How to Authenticate section on the API Configuration and Authorization help page.
Example of the final token configuration:
In Client ID, enter the API Access Key you find under My Profile in the Server UI.
In Client Secret, enter the API Secret Key you find under My Profile in the Server UI.
In Client Authentication, select Send as Basic Auth header.
Select Get New Access Token.
Set Up Environment
Don't forget to set up the same values in Environment.
Select the eye icon in the upper right corner, then select Add for Environment.
Enter the name of your environment.
Enter the same baseUrl, API Key, and API secret as you did in step 4 of the Set Up Authorization section.
Enter the URL for your environment. You can find it in Alteryx System Settings as the Base Address. See step 4 of the Set Up Authorization section.
Select Save.
Send Requests
You can test Server API in Postman – authorize your requests, send them, or explore different code types of your requests.
Example
Let’s say you would like to retrieve a list of assets a user owns.
First, you need to know the specific user id.
Go to Collections, then select Alteryx Server API V3.
Select users, then select GET Search for User records.
In the params tab, you can use the parameters to search in all user records.
To send the request, select Send, and you will get results based on the parameters you entered.
In the results, copy the id of a user for which you want to retrieve a list of assets.
In another tab open another request. Go to users, then select {id}.
Select GET Retrieve a full list of assets that a user owns. Enter the user id you get from the previous request to get the list of assets for this user.
![EF76F0DE8E6C3302DC8217A5E26730F2.png](../../../image/uuid-1ac8ba9c-81d8-cba4-c2c9-cf2594e4a77a.png)
Anmerkung
When you send a request via Postman, don't forget to authorize it. To authorize your request, you have 2 options:
In Type, select OAuth2, then select 1 of your available tokens.
![3E01CCA547A640B4F108491EB7F65ADD.png](../../../image/uuid-6dfbb00e-6dfa-cbef-a3ac-a76dac124f81.png)
In Type, select Inherit auth from parent. The authorization you configured for the whole collection will be used.