Forums

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

INSIGHT - How to Create an object with dependency using REST API?

Martyn Bell
Contributor
July 29, 2020

Hi All,

I have figured out how to create objects using REST API, but i get a 400 response error when trying to create an object with a dependent attribute.

 

How is this done ?

See below attribute 51 is dependent on another object how can i create this link using API?

 

jsoncreate = {
"objectTypeId": 4,
"attributes": [
{
"objectTypeAttributeId": 30,
"objectAttributeValues": [{
"value": "Mobile Phone"}]
},
{
"objectTypeAttributeId": 51,
"objectAttributeValues": [{
"value": "Rental"}]
}]}

1 answer

1 accepted

0 votes
Answer accepted
Martyn Bell
Contributor
July 29, 2020

So this should definitely be set as an example in the docs

so you have to set the value as the actually object ID that you are referencing and it will take the label field

{
"objectTypeAttributeId": 51,
"objectAttributeValues": [{
"value": "VIT-63"}]
}

Suggest an answer

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

Atlassian Community Events