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 2 Current »

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 INV number using Groovy: name it {{INC_NUM}}

def urlToInc = scope.responseHeaders.Location
def parts = urlToInc.split("/")
return parts[parts.length-1]

Update the issue

Reference https://community.bmc.com/s/article/How-to-create-a-Service-Request-through-REST-API

  • No labels