BMC Remedy Create Service Request
Using POST action to generate new entry based on "SRM:RequestInterface_Create" the url would be:
http://<servername>:<port>/api/arsys/v1/entry/SRM:RequestInterface_Create
Â
Headers:
Content-Type: application/json
Credentials:
Select the OAuth2 credential that was setup before BMC Remedy - Register OAuth Authentication
Body:
Following fields are required, they are set on the body:Â
{
  "values": {
    Â
    "z1D Action": "CREATE",
    "Source Keyword": "Test",
    "TitleInstanceID": "SR005056B551A03T5GSw6d6ccAIn4E",
    "First Name": "Allen",
    "Last Name": "Allbrook",
    "Customer First Name": "Bob",
    "Customer Last Name": "Baxter",
    "OfferingTitle": "REST API TEST SRM Request 1",
    "Short Description": "REST API TEST SRM Request 1",
    "Status": "Submitted",
    "Company": "Calbro Services",
    "Customer Company": "Calbro Services",
    "Location Company": "Calbro Services"
  }
}
Using the Response
Response from BMC remedy includes the incident number in the response headers.
Example:
Response Variables:{X-Frame-Options=SAMEORIGIN, Status=200, X-AR-TR-Core-Id=uhR8-xO5iY1g, X-AR-TR-Counter=1, X-Content-Type-Options=nosniff, Content-Security-Policy=frame-ancestors 'self', Content-Length=0, X-XSS-Protection=1; mode=block, Date=Mon, 13 Dec 2021 11:38:37 GMT, Location=http://remedy-api-instance/api/arsys/v1/entry/SYSCOM:VendorTransmission/000000000022038}
Get the Request number using Groovy: name it {{REQ_NUM}}
def urlToInc = scope.responseHeaders.Location
def parts = urlToInc.split("/")
return parts[parts.length-1]
Update the issue
Click Create
Select Action and enter a name
Select Template Category: Jira Core Server
Select Template: Edit IssueÂ
Click Create
In the configuration select a authentication user to use when updating the Jira issue (Basic Auth)
In the body section paste the code in below and change the customfield id to match your field.
Â
{
"fields":{"customfield_10201":"{{REQ_NUM}}"}
}
Â
Â
Â
Reference https://community.bmc.com/s/article/How-to-create-a-Service-Request-through-REST-API