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: 

Cannot set User-type attribute using REST API

Rei Song
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 16, 2022

I am following the formatting of the JSON as shown on this guide, but I keep getting the following error:

 

{"errorMessages":[],"errors":{"rlabs-insight-attribute-55":"<Account Id> is not valid Object id or key"}}

 

Here is the payload I'm submitting for https://api.atlassian.com/jsm/insight/workspace/<workplace ID>/v1/object/create endpoint:

 

{
"objectTypeId": "2",
"attributes": [
{
"objectTypeAttributeId": "14",
"objectAttributeValues": [
{
"value": "Blahblahblah"
}
]
},
{
"objectTypeAttributeId": "55",
"objectAttributeValues": [
{
"value": "<Account Id>"
}
]
}
]
}

55 is the ID of the User-type attribute. I'm passing in the Atlassian ID (not the username/email address) as shown in the doc.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Rei Song
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 16, 2022

Never mind.. I realized I set the attribute type to an another Insight object (User list). I had to punch in the asset key instead of account ID and it worked.

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

Atlassian Community Events