Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JSON body example that links an Insight object to a JSM issue

Boswell, Richard
Contributor
March 29, 2022

Does anyone have an example of a JSON body that can be used to create a JSM issue and, within the same body, link an Insight object defined in a custom field? I cannot figure this out, I've tried multiple different ways, the issue is created successfully but the custom field is not populated.

1 answer

1 accepted

3 votes
Answer accepted
Fernando Eugênio da Silva
Community Champion
March 29, 2022

@Boswell, Richard ,

I can do this using the following payload in my JSON

 "customfield_XXXXX": [
{
"workspaceId": "WORKSPACE_ID",
"id": "WORKSPACE_ID:OBJECT_ID(NUMBER)",
"objectId": "OBJECT_ID"
}
]

 

How to get WorkSpaceID:

Access the URL: https://URL/rest/servicedeskapi/insight/workspace;

Collect the ID present in “WorkspaceId”.

How to get the ObjectID:

Access the insight and go to the desired object;

The “Object_ID” number is the numbering information that follows the object's key in Insight.

Boswell, Richard
Contributor
March 29, 2022

Excellent! That worked, I will say it seems like overkill but I'm not complaining. Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events