Configure Jira assets as a datasource
This guide provides step-by-step instructions to configure Jira Assets as a datasource in Elements Connect for Jira Cloud. By setting up this integration, you'll enable seamless access to asset data within your Jira issues, enhancing your ability to manage and utilize assets information effectively across your projects.
Prerequisites
A Jira Service Management Cloud instance with a Premium or Enterprise plan.
Elements Connect must be installed on your Jira instance.
Jira Assets should already be configured in your instance.
Configuration steps
Discover your Workspace ID
The Jira Service Management REST API uses the workspaceId
to identify your individual instance of Assets. You must include the workspaceId
when making any calls to the REST API.
You can discover your workspaceId
through the following endpoint:
https://<JSM Site Name>.atlassian.net/rest/servicedeskapi/assets/workspace
Be sure to replace <JSM Site Name>
with the name of your own Jira instance.
Generate a token to authenticate API calls
To authenticate API calls in Elements Connect, you need to use an API Token.
An API token is linked to an Atlassian user account and provides access to Jira Assets data based on the permissions of the user used to generate the token.
Considerations
The API token provides access to all Jira data that the user has permission to view, not just Jira Assets data. However, you can control which data is accessed by carefully configuring your queries, ensuring that only the intended information is exposed
The token’s access is limited by the user's permissions, so any changes in the user’s access could impact data retrieval
How to generate
Follow these instructions to generate an API token.
After generating your API token, save it for later use in the Elements Connect configuration.
While a container token is mentioned in Jira Assets documentation, it does not work with Elements Connect and should not be used for this purpose.
Configure the Elements Connect datasource
Access your Jira instance:
Go to your Jira instance
Access Elements Connect administration:
Click on “Apps” in the top bar menu, then select “Elements Connect”
In the Elements Connect administration, click on “Data sources” to manage your connections.
Create a new data source:
Click on “Create data source”
Select “REST API” as the data source type and click “Next”
Provide a unique name for your data source and click “Create”
Configure the data source:
Server Details:
API Base URL:
https://api.atlassian.com/jsm/assets/workspace/<Workspace ID>/v1
API Documentation:
https://developer.atlassian.com/cloud/assets/rest/
API Test URL:
https://api.atlassian.com/jsm/assets/workspace/YOUR_WORKSPACE_ID/v1/objectschema/list
Be sure to replace<Workspace ID>
with your own Workspace ID
Authentication:
Mode: Basic
Login: Enter the email address associated with the Atlassian account used to generate the API token.
Password: Input the API token you generated, as detailed in the previous section.
Test the connection:
Click the “Test connection” button to ensure that everything is working properly.
Save your configuration:
Once the connection test is successful, save your datasource configuration. You’re all set!
Going further
The Jira Assets datasource in Elements Connect offers a wide range of capabilities that can enhance your Jira Service Management experience. Below are some use cases and examples to help you maximize the potential of this integration.
Use cases
The Jira Assets datasource can be used to enhance your service catalog by integrating asset data directly into Jira issues. For more details, see our guide: Optimizing service catalog navigation and maintenance in Jira: a complete guide to reducing workload and boosting user adoption
Endpoints examples
Once your datasource is configured, you can create connected fields and retrieve various types of information from Jira Assets. Here are some example API calls:
Name | Description | Method | URL |
---|---|---|---|
Fetch Assets objects by performing an AQL search | POST |
Request body example: | |
Load an asset object | GET |
| |
Find object schemas in Assets | GET |
|
For more details and additional endpoints, explore the Assets REST API documentation.