・環境
Jira Service Management(Cloud)
REST API: POST /rest/servicedeskapi/request
・質問内容
JSMのREST APIを使用して、リクエスト起票時に複数の組織との共有設定を付与してチケットを作成したいです。
ポータルから人間が起票する場合は「組織と共有」で1つの組織を選択できますが、APIから起票する際に複数の組織を同時に設定したいと考えています。仕様上可能でしょうか?
APIに共有設定を個人IDごとに記載することは、メンテナンス上負荷が高いので避けたいと考えています。
※補足
起票アカウントはサービスデスクのエージェント権限を持ち、対象の組織すべてに所属しています。
API送信先では、対象の組織がカスタマーとして登録されており、ポータルからの閲覧が可能な状態です。
Hi @村松 由記子 ,
You better use the create issue api: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post
Here you can create the issue, set the request type and set the organization field.
If you need to add a dynamic form, you can use use the forms api to add a form: https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-issue/#api-issue-issueidorkey-form-post
I hope this helps,
Rudy
Hi @Rudy Holtkamp , thank you for your answer.
When creating a ticket using the Issue API (POST /rest/api/3/issue),
if the Request Type and Organizations fields are properly set at the time of creation,
is it correct to understand that, in the same way as when using /rest/servicedeskapi/request:
the ticket will be displayed as a request in the customer portal, and
users with customer permissions who belong to the specified organizations will be able to view the ticket via the customer portal?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @村松 由記子 ,
Yes, a request is displayed for a JSM customer if:
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.
Hi @Rudy Holtkamp ,
Additionally, I would like to ask a few follow-up questions.
Regarding the following article:
https://support.atlassian.com/jira/kb/update-the-organizations-field-on-an-issue-using-the-jira-service-management/
I noticed that the configuration for setting the Organization ID via the custom field ID is only described for the Edit Issue API endpoint.
Is it correct to understand that the same configuration (i.e., setting the Organizations field using the custom field ID and organization IDs) can also be applied when using the Create Issue API endpoint (POST /rest/api/3/issue)?
Also, in the example provided in the article, only a single organization ID is specified in the custom field.
If I want to assign multiple organization IDs, how should I structure the request?
Could you please provide a concrete example of how to specify multiple organization IDs?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @村松 由記子 ,
Suppose your Organization field has a customfield id 'customfield_10002', then you can use something like this.
{
"fields": {
"project": { "key": "YOUR_PROJECT" },
"issuetype": { "id": "10001" },
"summary": "Example issue",
"customfield_10002": [1, 5]
}
}
So you can use an array of organization ids. You can find the org ids either in the URL when you go to an organization in your browser. It should be something like this:
https://<your_org>.atlassian.net/jira/servicedesk/projects/<project_key/organization/<organization_id>
Or you can get all organizations of the JSM space with:
GET /rest/servicedeskapi/servicedesk/{serviceDeskId}/organization
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.