The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Setting users on a "User Picker (multiple users)" custom field via REST API

Philip Colmer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
June 21, 2023

I'm trying to set the value for a multiple users User Picker custom field to one or more people by using the REST API.

I'm looking up the account ID for each person I want to put into the field and then sending the JSON block to the issue's "self" URL with a PUT method.

So, for example, the JSON block might look like this:

{"fields": {"customfield_10184": [{"id": "5b31f567349a91633c1b9c72"}]}}

and I "PUT" it to https://<redacted>.atlassian.net/rest/api/2/<issue_id>

MOST of the time, this works just fine.

Occasionally, though, I'm getting a 404 response with this reply:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>404</status-code><message>null for uri: https://<redacted>.atlassian.net/rest/api/2/issue_id</message></status>

Trying the call again later with exactly the same payload succeeds.

Is it a timing issue with the REST API? Do I need to back off and just try again? Or is there something wrong with the payload I'm sending and it is just lucky if it works?

Thanks.

 

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events