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
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.