Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

#if its not created via Email, its not us.

JSM Projects

When issues are created by JEMHC in a JSM Project their description heard has:

Username raised this request via Email

the ‘via’ part gives the clue. Its values are defined in CustomerRequestChannelSource:

  • “via Email” is used by JEMHC

  • “via Jira” is used by:

  • “via API” is used by:

  • “via Portal” appears to be for portal users..

Validating

Creating an issue via standard Jira REST : /rest/api/2/issue

This will show up as “raised this request via Jira

B64AUTH is a base64 value eg:

Read https://developer.atlassian.com/cloud/jira/service-desk/basic-auth-for-rest-apis/

echo "andy@blah.com:myusertoken" | base64

Invoke rest

The script, where you paste the b64 encoded token:

curl --request POST \
  --url 'https://thepluginpeople.atlassian.net/rest/api/2/issue' \
  --header 'Authorization: Basic $B64AUTH' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data @/home/andy/issue.json

issue.json

{
    "fields": {
       "project":
       {
          "key": "SUPPORT"
       },
       "summary": "REST ye merry gentlemen.",
       "description": "Creating of an issue using project keys and issue type names using the REST API",
       "issuetype": {
          "name": "Support Request"
       }
   }
}

Creating an issue via JSM REST:

This will show up as “raised this request via API

B64AUTH is a base64 value eg:

Read https://developer.atlassian.com/cloud/jira/service-desk/basic-auth-for-rest-apis/

echo "andy@blah.com:myusertoken" | base64

Invoke rest

The script, where you paste the b64 encoded token:

curl --request POST \
  --url 'https://thepluginpeople.atlassian.net/rest/servicedeskapi/request' \
  --header 'Authorization: Basic YW5keUB0aGVwbHVnaW5wZW9wbGUuY29tOlVrQjhoYUo0bGU4NW1teWx3dHVERUU3Qg==' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data @/home/andy/jsm.json

jsm.json

{
  "serviceDeskId": "1",
  "requestTypeId": "6",
  "requestFieldValues": {
    "summary": "Request raised via service REST API",
    "description": "test."
  },
  "raiseOnBehalfOf": "lol@google.com"
}
  • No labels