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

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
Product Admin
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events