Summary
It is currently not possible to share a request to an organization when creating it via Service Desk REST API
- Create customer request POST /rest/servicedeskapi/request
Suggestion
Allow the sharing of request to organization when creating the request via REST API
Workaround
Once the request is created, use JIRA REST API to update the Organizations field:
- Get the ID of custom field Organizations from db:
select * from customfield where cfname = 'Organizations';
- Get the ID of the organization itself, also from db:
select * from AO_54307E_ORGANIZATION;
- Use JIRA REST API - PUT editIssue with this JSON body:
{
"fields": {
"customfield_10203": [3]
}
}
- Replace 10203 with the ID of custom field Organizations from step 1
- Replace 3 with the ID of the organization from step 2
Ensure that the organization is in the Customers list of the Service Desk project