How to create issues with Assets Custom Field using Jira Service Management API
プラットフォームについて: Cloud のみ - この記事は クラウド プラットフォームのアトラシアン製品に適用されます。
目的
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
ソリューション
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}"}]
}
}'
Note :
- We can fetch the "workspaceId" by using the below GET API call:-
- https://<JSM Premium Site Name>.atlassian.net/rest/servicedeskapi/insight/workspace
- The "objectId" can be fetched using the below API call:-
- The "ServiceDeskId" can be fetched using the below GET API call:-
- The "requestTypeId" can be fetched using the below GET API call:-
最終更新日: 2024 年 1 月 29 日
Powered by Confluence and Scroll Viewport.