Using the Jira servicedesk API I can retrieve all the organizations (paged).
.../rest/servicedeskapi/organization
We have 100's of organizations, I would like to verify if an organization exists and if not, add it. How can I filter/search/query on the name of an organization?
@Rob Dubbeldam - Team Rockstars, there isn't a way within the endpoint itself to filter for an organization by name.
The only way to do this is to consume the response and preogramatically iterate over each organization and check to see if it matches the organization you are looking for.
Thanks,
Kian
Thank you for your reply, that is what I'm doing now. Do you know if there is a way to increase the limit of 50 results? Increasing the limit or maxResults doesn't have any effect. Or is there another endpoint available to get the organizations?
Edit 10mins later]
Found another endpoint. Unfortunately the same results, limit also capped at 50.
...rest/servicedeskapi/servicedesk/1/organization
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Found a workaround, if you post/create an organization with a name that already exists it will return the existing id. So instead of verifying if an organization exists before creating it, I will always create it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Rob Dubbeldam - Team Rockstars, good to hear! Thanks for letting me know about that!
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.