Since this has cost me a lot of nerves over the last few days and unfortunately the documentation is silent about the required values, here is a short HowTo
To update an issue and fields of an issue, use the following REST API endpoint:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-put
Unfortunately, the documentation says nothing about the format in which elements in an Asset Custom Field should be passed.
This is what the JSON body must look like to fill an asset field. Alternatively, you can of course also use the other keywords from the documentation (“add”, “remove”, etc.):
"update": {
"customfield_XXXXX": [
{
"set": [
{
"workspaceId": "workspaceId ot the Object",
"id": "GlobalId ot the Object (workspaceId:objectId)",
"objectId": "Id of the Object"
}
]
}
]
}The Global ID consists of the WorkspaceId and the objectId.
Here is an example of what such a body (with values) could look like:
"update": {
"customfield_10217": [
{
"set": [
{
"workspaceId": "ecaa45c7-4578-420f-a2e0-cf7b0da4b5ad",
"id": "ecaa45c7-4578-420f-a2e0-cf7b0da4b5ad:1672",
"objectId": "1672"
}
]
}
]
}
I'm happy if the information helps a few more people 🙂