Error: Invalid spaceKey on retrieving a related space config.

BMC Remedy AR System REST API overview

The REST API is a simple stateless architecture that runs over the HTTP. The AR System server uses JavaScript Object Notation (JSON) format to transmit data between a server and a web application. The advantage of REST is having a limited number of operations for the interactions between clients and services.

Note

The BMC Remedy AR System server uses Jetty as a web server to service the REST API requests. BMC recommends to use Secure Sockets Layer (SSL) certificates with Jetty server to service the REST API requests. For more information, see Configuring the REST API.

The REST API uses the base URI for the web service, such as https://<localhost>:<port>/api/{namespace}/{version} 

api - is the default prefix.

namespace - is used to help separate the different APIs.

version - is the version used for particular REST API.

Note

The root URL path for REST API in BMC Remedy AR System is
https://<localhost>:<port>
/api/arsys/v1. Any partial URLs, for example, /entry/{formName} referred to the documentation are assumed to have this prefix.

The API is a web service that conforms to the architectural principles of Representational State Transfer (REST). Each API is called by issuing a standard HTTP request method: POST, GET, PUT, or DELETE (more commonly known as the CRUD operations: Create, Read, Update, and Delete).

The client creates new entries by issuing POST requests. The details of an individual entry or list of entries is retrieved using a GET request. The client issues PUT requests to modify an entry object. When an entry object is no longer needed, the client issues a DELETE request to remove the entry. 

Encoding for URL parameters

When using GET operation to fetch entries from a form via any REST client, URL parameters may be required. Examples of URL parameters are qualification (q), fields, limit and sort. While using any of these parameters with request URL, these must be encoded properly and then used in the request. Else results may not be as expected.

To encode URL parameters, use any third party tool or site such as https://www.w3schools.com/html/html_urlencode.asp, where non-encoded URL parameters can be converted into encoded URL parameter string. Use these encoded parameters to send a REST request.

For example, for sending qualification on a form:

 'Incident Number' = "INC000000000701"


It should be encoded and sent as

%27Incident+Number%27+%3D+%22INC000000000701%22

Additional Information

For more information on how BMC Remedy AR System integrates using REST APIs and web services watch the video on YouTube at Integrations through REST APIs .

The following topics provide details about the BMC Remedy AR System REST API.

Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Shivakumar Mallinar

    Hi,

    We are using ARS 91.

    We are trying to call an external REST API from within Remedy ARS workflow. Can this section of doc or a link address the below features?

    1. Is this feature available in ARS 91 or 91 patch 001? Just like we can call a Web Services within a Remedy filter using set fields, how do we invoke an external REST API call from within Remedy?

    2. Do we need to use run process filter action or do we need to write a custom Filter API plugin for this?

    3. If it can be done, what are the steps to do it? Whats the best practice?

     

    Thanks,

    Shiva

    Oct 11, 2016 12:21
    1. Prachi Kalyani

      Hello Shivakumar,

      Like web-services, we do provide an option or generic plug-in that can be used to invoke external REST API call. You will have to write custom plugins if you want to invoke external REST API.

      Thanks,

      Prachi

      Oct 12, 2016 04:45
  2. Emre Geylani

    Hello,

    We're planing to use REST API for incident integration with BMC AR. 7.6.

    Does 7.6 support the API? if not can you recommend a suitable integration method.

    Thanks

    Emre

    Mar 21, 2017 03:15
    1. Anagha Deshpande

      Hello Emre,

      I will check with SME and will write back to you.

      Regards,

      Anagha

       

      Mar 21, 2017 09:47
      1. Anagha Deshpande

         Hello Emre,

        You cannot use REST API to integrate incident with BMC Remedy AR System version 7.6.04 because this version does not support REST API. You need to use web services for integrating incident with MC Remedy AR System version 7.6.04.

        Regards,

        Anagha

        Mar 22, 2017 10:19
        1. Emre Geylani

          Hello Anagha,

          Thanks a lot for the response,

          Emre

          Mar 23, 2017 02:28
  3. Jay Burrill

    We had been using the Java API against v7.6.  Is there an nMatches parameter in the REST API, such as there was with the Java API?  The resulting value of nMatches in the Java API response being the total record count matching the query.

    Apr 14, 2017 12:04
    1. Nidhi Das

      Hello Jay,

      I will discuss this with the concerned SME and will write back to you.

      Thanks,
      Nidhi

      Apr 17, 2017 12:38
      1. Jay Burrill

        Thank you, Nidhi.  I appreciate your assistance.

        Regards,

        Jay

        Apr 25, 2017 01:54
      1. Jay Burrill

        Nidhi:

        I am wondering if you have any more information on this topic?

        Regards,

        Jay

        May 01, 2017 10:46
    1. Nidhi Das

      Hello Jay,

      In REST API, nMatches is not available currently. If you believe this is a must feature, you should create an idea on BMC Community or you can request for enhancement, and if it’s voted, BMC product management can consider this.

      Regards,
      Nidhi

      May 04, 2017 03:16
  4. Sujan Nellikkandi

    Hi Nidhi,

    What is the max validity of the Token and how to configure it in Jetty.

    Best Regards,

    Sujan

    Jan 12, 2018 04:14
    1. Anagha Deshpande

      Hello Sujan,

      I will check your query with the SME and will write back to you.

      Regards,

      Anagha

      Jan 14, 2018 09:20
    1. Kamalakannan Srinivasan

      Hi Sujan,

      Thank you for your comment.

      The default validity is 3600 (that is 1 hour). It can be configured with the configuration parameter "External-Authentication-Sync-Timeout".

      There is no max limit.

      Regards,

      Kamal

      Feb 20, 2018 11:05
  5. Mohammad Rababah

    hi,

    Does 8.1 support the REST?

    Thanks Mohammad

    Mar 13, 2018 03:50
    1. Anagha Deshpande

      Hello Mohammad,

      I am checking your query with the SME. Will respond to you soon.

      Regards,

      Anagha

      Mar 13, 2018 09:41
      1. Anagha Deshpande

        Hello Mohammad,

        BMC Remedy AR System 8.1 does not support REST API. REST APIs are introduced in BMC Remedy AR System 9.0.

        Regards,

        Anagha


        Mar 14, 2018 12:23
  6. Brent Goodman

    I have found that the requirement of encoding the URL parameters like qualification (q), fields, limit and sort mentioned in the above documentation is incorrect. Only the qualification (q) should be encoded.

    When encoding the other parameters, we get the following errors back:

    {
        "messageType": "ERROR",
        "messageText": "One of the items specified in the field or value list contains error.",
        "messageAppendedText": "Wrong query key values(Restaurant,Status)",
        "messageNumber": 124
    }
    

    So for the fields parameter, using "values%28Restaurant%2CStatus%29" is wrong, but using "values(Restaurant, Status)" is correct. Testing in both Python and Postman confirms this. I would say this is a bug in the remedy REST API. With Python, the params variable gets automatically encoded, which fails in the end. You have to manually append the un-encoded fields information to the URL.

    Apr 06, 2018 09:14
    1. Anagha Deshpande

      Hello Brent, 

      Thanks for bringing this to our notice.

      I will check with the SME and will update the topic.


      Regards,

      Anagha

      Apr 08, 2018 10:01
      1. Anagha Deshpande

        Hello Brent,

        Sorry for responding late.

        This issue will be resolved soon.

        Regards,

        Anagha

        Jun 22, 2018 04:31
  7. Roland Bruegger

    Hi Anagha, we got into the same error as Brent mentioned above (encoding the URL parameters). We are using 9.1.04 Remedy REST API. - Is the big resolved now? - and how to get it? Kind regards, Roland

    Jul 10, 2019 02:27
    1. Anagha Deshpande

      Hello Roland,

      I will update you soon on this.

      Regards,

      Anagha

      Jul 10, 2019 09:41
      1. Anagha Deshpande

        Hello Roland,

        The issue is resolved.

        Could you please share more details about the error you are getting?

        Regards,

        Anagha


        Jul 11, 2019 02:48