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

Still need help?

The Atlassian Community is here for you.

Ask the community

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


Purpose

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 the workspaceid & objectid attribute 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 issue create API is as follows
Syntax:-

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}"}]
  }
}'


(info) Note : 


Last modified on Jan 29, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.