REST APIs
This page is about Assets & Inventory Plugin for Jira Cloud. Using Server or Data Center? Click here.
These APIs are here to help you edit and view your data. But before you can use them, you need a special token called JWT for authorization.
For further information, click here to access the REST APIs documentation.
On this page: |
---|
Prerequisites
You must be an AIP administrator or Jira administrator to carry out the instructions on this page.
Create a new token
In the top bar, navigate to Settings.
From the side menu, select API Token.
Click New Token to generate a new token.
Name your token, select when it'll expire, or check the Never expire box to make sure the token doesn’t expire in a certain time period, and how much access it will have. Click Save.
For security reasons, we do not recommend generating tokens that never expire. Please be aware that if this token is somehow exposed, you will need to delete it manually, as it will not expire automatically.
The JWT Token will appear. Save it by clicking the icon shown below. Keep in mind that you won’t be able to access this code after closing the pop-up.
Click Cancel after copying the token, and the token will appear on the main page.
Replace {{jwtToken}} in the header with your token.
Give JWT permission
Here is how you can give JWT authorization using Postman.
Open the AIP REST APIs documentation.
Click Run in Postman > Postman for Web.
On the Postman main page, click Workspaces > My Workspaces.
Click to add a new permission.
Here, to give authorization, first copy and paste the link of the token you’ve chosen from here.
Click Headers.
Under KEY, write Authorization.
Under Value, write “Bearer (paste the token you’ve created and copied)”
Click Send.
10. Tada! You’ve successfully given the JWT authorization.
REST call example
For better comprehension, we included definitions for some values of an example response below.
Example Response | Meaning |
---|---|
| This represents a unique identifier or key associated with an asset. |
| An identifier that categorizes or groups assets into different collections. |
| These are attributes that are shared across multiple assets or throughout a system. |
| This refers to the count or number of attachments that are associated with a particular asset. |
| This indicates the entity (user, system, etc.) that created or added the asset to the system. |
| This refers to the timestamp or date when the asset was created or added to the system. |
| These are specific characteristics, properties, or metadata associated with an asset. |
| This refers to a parameter used in pagination, indicating the starting point or offset from where the results should be fetched. For example, if you want to fetch data in batches of 10 and you fetch the first 50, the "startAt" value should be set to 51 for the second set of 50. |
| This is a parameter related to pagination, specifying the maximum number of results or items to be returned in a single response. |
| These are parameters that define the sorting order for the retrieved data. |