Forums

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

Another Assets Question - creating multiple objects via the API in one objecttype

Ste404
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2024

I was looking at this page

https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-create-post

and having a working powershell script that populates on object in an objecttype with the relevant details, works great.

What if I have 30 objects I want to create, I am not sure on that page how you would achieve that, I doubled up on the attributes but it just made an object of the last lines in the script.

Has anyone created many objects in an objecttype with rest before and could offer up some guidance.

 

ta

 

1 answer

0 votes
Hakan Bahadir {Pio}
Atlassian Partner
February 18, 2024

Hello,

You need to call the api for every object one by one. In summary, for 30 new objects you need to send http post 30 times.

 

Alternatively, you can use the Import API.

https://developer.atlassian.com/cloud/assets/imports-rest-api-guide/schema-and-mapping/

 

My humble opinion:

- If you will create objects continuously and in large amounts (i.e. thousands), then Import API is better.

- On the other hand, if you will create less than 100 objects time to time, then normal API would be sufficient.

 

Cheers.

Hakan Bahadir

Pio

 

Ste404
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 21, 2024

Well that is annoying, I was hoping you could loop through a script.  I have it pushing the one in Powershell, but was hoping to be able to stack them a number of objects.

 

thanks for the reply.

Suggest an answer

Log in or Sign up to answer
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