This documentation supports the 19.02 version of Remedy Action Request System.

To view the latest version, select the version from the Product version menu.

REST operations on AR System forms

The REST API uses a resource to perform HTTP operations. A resource is an object with a type, associated data, relationships to other resources, and a set of methods that operate on it. The following are resources on which the actions are performed:

  • An entry on a form
  • A field on a form


TypeURLActions

An entry on a form




/entry/{formName}Performs HTTP requests on just the form and allows you to create or search all entries on the form.
/entry/{formName}/{entryId}Performs HTTP requests on an entry on a form and allows you to get, modify, and delete that particular entry.
A field on a form/fields/{formName}/{fieldId}

Performs HTTP requests on a field of a form and allows you to fetch field metadata.

Supported operations

The following table displayed common parameters for REST operations: 


OperationDescriptionURLHTTP methodEquivalent API call
Get an entryReturns the details of an entry on a form./entry/{formName}/{entryId}GETGet Entry
Get multiple entriesReturns the details of all the entries on a form./entry/{formName}GETGet List Entries With Fields
Retrieving an attachment using REST APIReturns an attachment for a particular entry or for the list of entries. /entry/{formName}/{entryId}/attach/{fieldName}GETnot applicable
Retrieving an association using REST APIReturns the list of associated entries for a particular entry. /entry/{formName}/{entryId}/assoc/{associationName}GETnot applicable
Get a field metadata informationReturns information about field metadata for requested field./fields/{formName}/{fieldId}GETGet Field
Get multiple fields metadata informationReturns information about multiple fields metadata./fields/{formname}
GETGet list of fields
Creating an entry using REST APICreates new entry on the form./entry/{formName}POSTCreate Entry
Merging an entry using REST APIMerges an existing entry into a form./mergeEntry/{formName}POSTMerge entry
Modify an entry Updates a single entry on a form./entry/{formName}/{entryId}PUTSet Entry
Delete an entryDeletes an entry on a form./entry/{formName}/{entryId}DELETEDelete Entry

Common parameters for entry APIs

The following table explains the list of parameters commonly used in the REST operations:


NameDescriptionExample
fields

Returns parts of the entry object (fields and association links).

You can use values() with a comma-separated list of field names inside the parentheses to return only those field values.

You can use assoc to get links to all related entries.

You can also use assoc() with a comma-separated list of association names inside the parenthesis to get links following those associations.

fields=values(Status,Notes)

fields=assoc

fields=assoc(Worklog,Testlog)

fields=values(Status,Notes),assoc(WorkLog)

q

Sends a search qualification.

Use a URL-encoded value for the search qualification.

q=%27Submitter%27%20%3D%20%22Allen%22

%27Submitter%27%20%3D%20%22Allen%22 is the URL-encoded version of 'Submitter' = "Allen" to find entries that Allen has submitted.

offset

Specifies the number (non-negative integer) of entries to offset the results by. Used for paginating results.

offset=50

Offsets the result by 50 entries

limitSpecifies the  number (non-negative integer) of entries to limit the results by. Used for paginating results.

limit=10

Gets no more than 10 entries

expand

Expands the related entry (associations). You can use assoc() for every association that you want to expand or retrieve the related entries.


expand=assoc(association1)& expand=assoc(association2)

Retrieves data related an entry with respect to association1 and association2.

sort

Sorts results on a search by field name and direction. Multiple field names can be used, separated by commas.

The direction is indicated by appending .asc for ascending and .desc for descending after the field name.

sort=Status.asc,Create Date.desc

Sorts first by Status in ascending order and then by Create Date in descending order.

option

Use in delete entry calls.

Allowed values:

  • NONE
  • FORCE — Use this option if you want to delete individual entries that are not retrieved from the join schema.
  • NOCASCADE — Use this option if you do not want to run the workflow when the delete entry operation is called.

options=NOCASCADE&options=FORCE

HTTP status codes

When responding to requests, the REST API uses some of the HTTP status codes. The following table gives a summary of the different status codes that are returned. Each operation specifies the response code you receive on successful calls or errors. 

CodeNameUsage
200OKThis code is the default response for a successful API call. If the documentation does not specify a HTTP status code that is returned on a successful call, it is assumed to be 200.
201CreatedThis code is used when you create new resources. REST includes the Location header in the response body, which denotes where the new resource is found.
204No ContentThis code is similar to 200, but with no response body. This code is commonly used for DELETE operations.
400Bad RequestThis code is used if the request body is not correct. For example, a JSON document is sent but it is not the correct format or the client sends a date value in the wrong format.
401UnauthorizedThis code is used if the user is not authenticated. 
403ForbiddenThis code is used when the call is authenticated, but the user does not have access to the resource. For example, an entry operation on a form to which the user does not have permission.
404Not foundThis code is used when a resource does not exist.
500Internal Server ErrorThis code is the default response for any error that occurs when an API call is being processed.

JSON representation of an error

The HTTP status codes are the response that classify the failure of the request. The HTTP status code is provided in the response header, whereas, the additional information for the error is provided in the response body. The following code sample represents the format of the message you receive when you encounter an error:

[
    {
       "messageType": "ERROR",
       "messageText": "Form does not exist on the server",
       "messageAppendedText": "someFormName",
       "messageNumber": 303
    }
    ...
]
NameData typeDescription
messageTypeStringType of message returned. For example, OK, ERROR, WARNING, FATAL, BAD STATUS.
messageTextStringThe actual text of the error message.
messageAppendedTextStringThe text that augments the error message.
messageNumberIntegerThe AR error number associated with the error message.

Related topics

Integrating AR System forms with a third-party application by using REST API

Use cases for integrating AR REST API with an external form

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

Comments