Run your first API call
A full list of all available API calls is found on Swagger. This may be the best way to get started with APIs since it describes every available API, it displays the scope of the permissions needed for each API, and it highlights the list of required parameters.
Requirements
To be able to use APIs, you must:
- Create an app and have your credentials whitelisted by Autodesk. You only need to do this once.
- Obtain an access token to authenticate API calls. Remember, access tokens only last one hour so you'll likely need to do this each time you want to run APIs.
Run an API call
You must include the access token in API request headers. To do this, the header name must be Authorization
and the value must contain your access token preceded by the word Bearer
with one space character dividing them.
For example, shown here is an API command to run to obtain a list of all public projects in a specific tenant.
curl --location 'https://live.upchain.net/api/project/v1/public_projects' \
--header 'Authorization: Bearer \<your access token\>' \
--header 'upc-selected-company: \<companyID\>' \
--header 'X-User-Id: \<authorized email\>'
Note: Your company ID (tenant ID) will be provided to you once your tenant has been whitelisted.
Important: The
X-User-Id
value is required if you are using a two-legged token. Enter the email address of the user who obtained the access token. If you are using a three-legged token, then this field is not required.