Forums

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

Need to create asset in Jira through Rest API

Mohammed Haneefa Farook
Contributor
July 27, 2023

Hi,

I need to create  asset in Jira through rest API with object attribute type "Project".

The have attached the image below,pro.PNG

what is payload i need to add to pass the project value to jira through rest API. Is it possible ??

2 answers

1 vote
Björn Gullander Eficode
Community Champion
July 31, 2023

Using the REST method .../rest/assets/latest/object/ABC-123, you should be able to use the folowing payload, where 11205 is the id of the project. 

You need of course change objecttypeId and objecttypeattributeId values to match your environment. 

 

{

"objectTypeId": 1557,

"attributes": [

{

"objectTypeAttributeId": 13227,

"objectAttributeValues": [

{

"value": "11205"

}

]

}

]

}


 

1 vote
Robert Wen_Cprime_
Community Champion
July 27, 2023
Mohammed Haneefa Farook
Contributor
July 27, 2023

Hi,

I have gone through but I am unable to map the object type-"Project" alone. Is there any format to send the project type field value to Jira to create an asset??

Robert Wen_Cprime_
Community Champion
July 28, 2023

I think you have to provide more context.  It sounds like you have a custom field in Jira that references a Project object in Assets?   Are you looking at Automation to create the asset?

Suggest an answer

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

Atlassian Community Events