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

  1. Click Create

  2. Select Action and enter a name

  3. Select Template Category: Jira Core Server

  4. Select Template: Edit Issue 

  5. Click Create

  6. In the configuration select a authentication user to use when updating the Jira issue (Basic Auth)

  7. 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