Hi
I've researched for this on the community and I've not found a way yet - how can I bulk create multiple organization records as I have over 700+ and this would be very helpful.
Currently the POST call I'm using is rest/servicedeskapi/organization with this in the Body:
{
"name": "test-0050"
},
and when I use
{
"name": "test-0050",
"name": "test-0051",
"name": "test-0052"
},
I get a 400 - Bad Request error.
{
"errorMessages": [
"Invalid request payload. Refer to the REST API documentation and try again."
]
}
Hi @Shabana Wollin,
Welcome to Atlassian Community!
The endpoint only except a single organization as the payload, so the error you get is expected. What you can do is use something like Postman which allows you to run a collection with imported data.
I've not explored that - thank you. Can you let me know if this available only in Postman or would Talend API app also have a similar feature for running collections ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have never used Talend so cannot say if it has a feature that would allow you to run collections. But if it has a loop feature then you should be able to do it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can someone let me know what the POST call should look like.
rest/servicedeskapi/organization (or)
rest/servicedeskapi/organization/name:{Organization Name}
I was able to use Postman and setup the collection to loop through the CSV file. However now I'm faced with a new issue - where it is not actually creating the organization from the CSV file.
I'm getting a 404 Not Found Error.
Upon reviewing the Request Response I see that it is formed correctly
{
"name": "test-1234"
}
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your post call should go to rest/servicedeskapi/organization and then in your body you will add the data. Something like this in Postman:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mikael Sandberg I was able to fix the error I was getting - It was expecting for me to pass the Authorization token where I had it set to "Inherit from Parent" after I was doing a Get Organizations. After I changed the order of execution and added back the Authorization Token - I was able to get the Organization records created successfully - Thank you
Now, I am looking to Add The newly created Organization into my Service Project and I'm stuck at how to parse the POST URL successfully right after the create - do you have any suggestions or would I open a new thread for the question ? thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe you've figured out a way to do this in a loop. If you're not scripting a solution, the API call might not be as intuitive as required. However, why struggle with API when there are free apps that perform bulk creation of organization available on the Atlassian Marketplace?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately we have a long process for getting Marketplace Apps approval and as I can manage how to script already - it gives me the ability to customize our requirements easily without having to rely on Apps.
I was also not aware of what Free Apps currently create organizations in bulk - I could check them out ? thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.