This article covers the creation of an API key and configuration of Postman to make API calls. Please note this is for demonstration purposes only. This article assumes you have used Postman previously. This article is not intended to be all-encompassing documentation on using our REST API. For detailed information regarding our REST API endpoints, please see our Teams API page.
Generate API key
- Login to the Teams admin portal.
- You must be logged in as a Super Admin to generate an API key.
- Click 'Keys' on left panel.
- Click 'Generate API Key.'
- Provide a friendly name for the API key. Click 'Continue.'
- Click the 'Copy' icon to copy the API key.
- As displayed in the warning, do not lose this key and keep it secured. This key provides authorization to make API calls against your Parsec for Teams tenant. If this keys falls into the wrong hands, they will have full access to your Parsec for Teams tenant.
Postman is an API platform for building and using APIs. The following steps cover how to create a collection for Parsec API calls and a few sample requests.
Create a collection
- Click '+ New.'
- Click 'Collection.'
- Provide a friendly name for the collection.
- Click 'Authorization' tab.
- Select 'Bearer Token' under 'TYPE.'
- Paste your API key in the 'Token' field.
- Click 'Create.'
- Click the ellipsis '...' on your new collection.
- Click 'Add Request.'
- Provide a friendly name for your new request.
- Click 'Save to <your collection name>.'
- Confirm that the request method is set correctly. In this case, because we are getting Groups, our HTTP method will be 'GET.'
- Configure the request URI.
- Example) https://api.parsec.app/v1/teams/YourParsecTeamID/groups?offset=0&limit=200
- Ensure required path and/or query params are provided. In this case, because we are getting Groups, both 'offset' and 'limit' are required query params.
Send a request
- Click the 'Authorization' tab and ensure 'TYPE' set to 'inherit from parent.'
- Click 'Send.'
- Observe API response.
It is possible to automate certain tasks by leveraging our API. As an example, we can send an invites to new Team members and pre-assign them to a group programatically. This takes a huge burden off of administrators, requiring them to do fewer tasks manually.
The screenshot below shows an example request to create a new Team invite, where the new Team member is automatically assigned to the 'NY-Artists' group from the previous example.