Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events