How to create issues with Assets Custom Field using Jira Service Management API

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

Summary

The purpose of this article is to help us with the syntax to create customer issues with Assets custom fields using Jira Service Management API

Solution

Create Customer Request

URI: POST /rest/servicedeskapi/request

As you can see below, you will have to use theworkspaceid & objectidattribute to define the Insight object when creating Issues with Assets custom field values.

The format/syntax to update the insight custom field as part of the issue create API is as follows.

Syntax:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 curl --request POST \ --url 'https://your-domain.atlassian.net/rest/servicedeskapi/request' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "requestParticipants": [ "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d69abfa3980ce712caae" ], "serviceDeskId": "10", "requestTypeId": "25", "requestFieldValues": { "summary": "Request JSD help via REST", "description": "I need a new *mouse* for my Mac" "customfield_10101" : [{"id": "{workspaceid}:{objectid}", "objectId": "{objectid}", "workspaceId": "{workspaceid}"}] } }'

We can fetch the "workspaceId" by using the GET API call: https://<JSM Premium Site Name>.atlassian.net/rest/servicedeskapi/insight/workspace

The "objectId" can be fetched using the API call: https://api.atlassian.com/jsm/insight/workspace/{workspaceid}/v1/iql/objects

The "ServiceDeskId" can be fetched using the GET API call: https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk

The "requestTypeId" can be fetched using the GET API call: https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.