Hi everyone,
I’m using the Jira Service Management Cloud REST API to create customer requests (POST /rest/servicedeskapi/request
) and need to include Responders (customfield_10044
). According to the metadata (GET /rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/field'
), the schema is:
I added responders in UI-created issues and then tried to get them, the response
shows:
(GET /rest/servicedeskapi/request/{issue_type})
However, when I attempt to send this via API:
Jira is giving 201 created but returns an empty array in the response.
I understand <value>
should be a user identifier, but I'm missing something. Reading the API response suggests each responder must be formatted as:
{ "accountId": "<id>" }
or
{ "id": "<id>" }
So the request should look like:
"customfield_10044": [ { "accountId": "userId" }, { "accountId": "userId" } ]
or
"customfield_10044": [ { "id": "userId" }, { "id": "userId" } ]
or
"customfield_10044": [ { "name": "userId" }, { "name": "userId" } ]
or
"customfield_10044": [ { "value": "userId" }, { "value": "userId" } ]
However, all of these still result in an empty array in the issue response.
Questions:
What is the correct structure to send customfield_10044
in the requestFieldValues
payload?
Does the accountId need special formatting (with/without prefix)?
Are there permission or feature flags needed to allow API population of responders?
Any guidance on how to make Responders populate correctly via the Service Desk API would be greatly appreciated!
HI @abhishek
Welcome to the community.
To set a multi-user picker custom field in Jira via the API, you need to use the accountId of the users, not their names or display names. The field value should be an array of account IDs.
{
"fields": {
"customfield_XXXXX": [
{
"accountId": "user_account_id_1"
},
{
"accountId": "user_account_id_2"
}
]
}
}
Replace XXXXX with the actual ID of your custom field, and user_account_id_1, user_account_id_2 with the account IDs of the users you want to add to the field.
You can retrieve the account ID of a user by using the Jira REST API or by querying the user using their email or name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.