I am currently developing an app to post data to Jira Assets Module. As a precheck, I want to know whether the user has access to the Assets Module which is only available in Premium or Enterprise Plan. Is there any way I can add a check for this availability in my app?
Hi @Siddique Afraaz N , we do have a workaround for this:
You can check if a customer's Jira Service Management instance has the JSM Assets capability by using the Get JSM Asset workspace API. This API allows you to retrieve information about the JSM asset workspace.
Obtain the necessary scopes: Make sure that your app has the required scopes to access the JSM Asset workspace API. In this case, the required scope is read:servicedesk-request
.
Make a GET request to the Get JSM Asset workspace API: Use Forge’s Product fetch API to make a GET request to the Get JSM Asset workspace API endpoint. The endpoint URL is https://your-domain.atlassian.net/rest/servicedeskapi/assets/workspace
const workspaceData = async() => {
const getWorkspace = await api.asApp().requestJira(route`/rest/servicedeskapi/assets/workspace`)
const response = await getWorkspace.json()
return response
}
Parse the response: Once you receive the response from the API, parse the JSON data to extract the relevant information. If you get a 200 status response with values
object in API response as non-empty, then the customer's JSM instance has the JSM Assets capability. If it is empty JSM Assets is not available.
Hi @Siddique Afraaz N , welcome to the Atlassian Community!
Unfortunately I don't think this is possible. An answer from Atlassian here indicates that it is on their backlog, however I can't find any API information for this.
There's this API call which can find out if the licenses are Atlassian products are paid or free, but it doesn't look like this tells you the specific payment plan the product is on. Feel free to take a look through the API docs here https://developer.atlassian.com/cloud/admin/rest-apis/, but I haven't seen anything to achieve this myself
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.