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
atlassian, jira cloud certification, managing jira projects, jira project administration, jira cloud exam, atlassian certification, agile project management, jira workflows, jira permissions, jira training, jira cloud skills, atlassian learning

Become a Certified Jira Service Project Expert 🦸🏻‍♂️

Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.

Get Certified! ✍️
AUG Leaders

Atlassian Community Events