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

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

/entry/{formName}/{entryId}

The following operations are available on the resource:

GET

The GET operation is used to get an entry from the form. The details of the GET operation are tabulated below:

Get single entry

DescriptionGet an entry from a particular form.
URL qualifier

/entry/{formName}/{entryId}

formName - The form for which an entry is to be read. 
entryId - The entry ID.

MethodGET
Headers
HeaderValue
Authorizationtoken
(optional) X-AR-Client-TypeClient Type ID
(optional) X-AR-RPC-QueueRPC queue to which the client calls are routed
Parameters
Name
Description
fieldsSelects what parts of the JSON document to return (for example, ?fields=entryId1,entryId2).
expandExpands the related entries (associations).

For more information, see Common parameters.

ReturnsAn entry object.
All possible error codes

If the request is not successful, one of the following error codes is returned:

400 - Request body is incorrect

403 - Forbidden

404 - Form does not exist

500 - Internal Server Error

For more information, see HTTP status codes.

NotesThe entry object will contain field values for all data fields to which the user has permission.

    Request URL

    GET http://localhost:8008/api/arsys/v1/entry/SimpleForm/000000000000002
    

    Request header

    Authorization: AR-JWT eyJhbGciOiJIUzI1NiJ9.
    eyJleHAiOjE0MTc2NTM1ODgsInN1YiI6IkFsbGVuIiwibmJmIjoxNDE3NjQ5ODY4LCJpc3MiOi
    JXLUNTRUlFUk9FLTI5LmFkcHJvZC5ibWMuY29tIiwianRpI
    joiSURHQUFCRFVDMllHSUFONkJGUTJBQUFFUEZBNVFXIiwiX2NhY2hlSWQiOjQ3LCJpYXQiOjE0MTc2NDk5ODh9.
    V4LGLcEdwD8V_I4rzoWYYSZmEMA82LBB_lEfz4Xnz9Y

    Response Body

    HTTP/1.1 200 OK
    Date: Wed, 03 Dec 2014 22:53:46 GMT
    Content-Type: application/json
    Server: Jetty(8.1.15.v20140411)
    {
      "values":{
        "Request ID":"000000000000103",
        "Submitter":"Allen",
        "Create Date":"2014-12-03T22:53:37.000+0000",
        "Assigned To":null,
        "Last Modified By":"chris",
        "Modified Date":"2014-12-03T22:53:37.000+0000",
        "Status":"New",
        "Short Description":"testing 123",
        "Status History":{
          "New":{
            "user":"chris",
            "timestamp":"2014-12-03T22:53:37.000+0000"
          }
        }
      },
      "_links":{
        "self":[
          {
            "href":"http://localhost:8008/api/arsys/v1/entry/SimpleForm/000000000000103"
          }
        ]
      }
    }

    The following is a sample code snippet for the GET operation.

    package com.example;
    
    import java.nio.charset.StandardCharsets;
    
    import org.apache.http.HttpEntity;
    import org.apache.http.client.methods.CloseableHttpResponse;
    import org.apache.http.client.methods.HttpGet;
    import org.apache.http.impl.client.CloseableHttpClient;
    import org.apache.http.impl.client.HttpClients;
    import org.apache.http.util.EntityUtils;
    
    public class Get {
    
        public static void main(String[] args) throws Exception {
            String token = args[0];
    
            // start HTTP GET to get an entry
            CloseableHttpClient httpClient = HttpClients.createDefault();
            HttpGet httpGet = new HttpGet(
                    "http://localhost:8008/api/arsys/v1/entry/SimpleForm/000000000000002");
    
            // add the token to the header
            httpGet.addHeader("Authorization", "AR-JWT " + token);
    
            // make the call and print the status
            try (CloseableHttpResponse response = httpClient.execute(httpGet)) {
                HttpEntity entity = response.getEntity();
                String jsonEntry = EntityUtils.toString(entity, StandardCharsets.UTF_8);
                System.out.println(jsonEntry);
            }
        }
    
    }

    PUT

    The PUT operation allows you to modify an entry on the form. The PUT operation also allows you to modify an attachment for a particular entry or from list of entries. The details of the PUT operation are tabulated below:

    Update an entry

    This operation updates a single entry on the form.

    DescriptionThis operation updates an entry on a form.
    URL qualifier

    /entry/{formName}/{entryId}

    formName - The form for which an entry is to be updated. 
    entryId - The entry ID.

    MethodPUT
    Headers
    HeaderValue
    Authorizationtoken
    Content-Typeapplication/json
    (optional) If-Unmodified-SinceHTTP Date
    (optional) X-AR-Client-TypeClient Type ID
    (optional) X-AR-RPC-QueueRPC queue to which the client calls are routed
    Request BodyAn entry object in a JSON format
    Returns

    HTTP status code 204 indicates a successful update.

    If the client sends If-Unmodified-Since and the entry is modified since that time, then the entry is not updated and status code 412 is returned.

    Errors

    If the request is not successful, one of the following error codes are returned

    400 - Request body is incorrect

    403 - Forbidden

    404 - Form does not exist

    500 - Internal Server Error

    For more information, see HTTP status codes.

      The following example returns an updated entry in a Simple form.

      Request URL

      PUT http://localhost:8008/api/arsys/v1/entry/SimpleForm/000000000000002
      

      Request headers

      Authorization: AR-JWT eyJhbGciOiJIUzI1NiJ9.
      eyJleHAiOjE0MTc2NTM1ODgsInN1YiI6IkFsbGVuIiwibmJmIjoxNDE3NjQ5ODY4LCJpc3MiOi
      JXLUNTRUlFUk9FLTI5LmFkcHJvZC5ibWMuY29tIiwianRpI
      joiSURHQUFCRFVDMllHSUFONkJGUTJBQUFFUEZBNVFXIiwiX2NhY2hlSWQiOjQ3LCJpYXQiOjE0MTc2NDk5ODh9.
      V4LGLcEdwD8V_I4rzoWYYSZmEMA82LBB_lEfz4Xnz9Y
      
      Content-Length: 59
      Content-Type: application/json

      Request Body

      {
        "values":{
          "Submitter":"Allen",
          "Short Description":"testing 123"
        }
      }

      The following is a sample code snippet for the PUT operation.

      package com.example;
      
      import org.apache.http.StatusLine;
      import org.apache.http.client.methods.CloseableHttpResponse;
      import org.apache.http.client.methods.HttpPut;
      import org.apache.http.entity.ContentType;
      import org.apache.http.entity.StringEntity;
      import org.apache.http.impl.client.CloseableHttpClient;
      import org.apache.http.impl.client.HttpClients;
      
      public class Put {
      
          public static void main(String[] args) throws Exception {
              String token = args[0];
      
              // start HTTP PUT to modify an entry
              CloseableHttpClient httpClient = HttpClients.createDefault();
              HttpPut httpPut = new HttpPut(
                      "http://localhost:8008/api/arsys/v1/entry/SimpleForm/000000000000002");
      
              // build the JSON entry
              String json = "{ \"values\" : { ";
              json += "\"Short Description\" : \"updated via REST\"";
              json += " } }";
              httpPut.setEntity(new StringEntity(json, ContentType.APPLICATION_JSON));
              httpPut.addHeader("Authorization", "AR-JWT " + token);
      
              // make the call and print the status
              try (CloseableHttpResponse response = httpClient.execute(httpPut)) {
                  StatusLine status = response.getStatusLine();
                  System.out.println(status);
              }
          }
      
      }

      Update an entry with attachments

      Description This operation updates an entry with an attachment.
      URL qualifier

      /entry/{formName}/{entryId}

      formName - The form for which an entry is to be updated. 
      entryId - The entry ID.

      MethodPUT
      Headers
      HeaderValue
      Authorizationtoken
      Content-Typemultipart/form-data
      (optional) If-Unmodified-SinceHTTP Date
      (optional) X-AR-Client-TypeClient Type ID
      (optional) X-AR-RPC-QueueRPC queue to which the client calls are routed
      Request Body

      A multipart/form-data entity. Each part of a multipart entity has a name, a Content-Type and the value.

      There is one part named as entry with Content-Type as application/json and the value is a JSON entry. There are 0 or more parts with names like attach-{fieldName} with any Content-Type and any value. The name is a prefix indicating that it is an attachment binary data, the part after the hyphen is the name of the attachment field. This updates an entry with attachment data.

      Returns

      HTTP status code 204 indicates a successful update.

      If the client sends If-Unmodified-Since and the entry is modified since that time, then the entry is not updated and status code 412 is returned.

      Errors

      If the request is not successful, one of the following error codes are returned

      400 - Request body is incorrect

      403 - Forbidden

      404 - Form does not exist

      500 - Internal Server Error

      For more information, see HTTP status codes.

      DELETE

      The DELETE operation allows you to delete an entry from a particular form. The details of the DELETE operation are tabulated below:

      DescriptionDelete an entry from a particular form.
      URL qualifier

      /entry/{formName}/{entryId}

      formName - The form for which entry is to be deleted.
      entryId - The entry ID.

      MethodDELETE
      Headers
      HeaderValue
      Authorizationtoken
      (optional) X-AR-Client-Type Client Type ID
      (optional) X-AR-RPC-QueueRPC queue to which the client calls are routed
      ReturnsNo request body, but HTTP status 204 indicates successful deletion.
      All possible error codes

      If the request is not successful, one of the following error codes are returned

      403 - Forbidden

      404 - Form does not exist

      500 - Internal Server Error

      For more information, see HTTP status codes.

      NotesYou can also use the option FORCE to force delete all the list of entries, for example, ?options=FORCE

        The following example allows you to delete an entry from the form.

        Request URL

        DELETE http://localhost:8008/api/arsys/v1/entry/SimpleForm/000000000000002
        

        Request header

        Authorization: AR-JWT eyJhbGciOiJIUzI1NiJ9.
        eyJleHAiOjE0MTc2NTM1ODgsInN1YiI6IkFsbGVuIiwibmJmIjoxNDE3NjQ5ODY4LCJpc3MiOi
        JXLUNTRUlFUk9FLTI5LmFkcHJvZC5ibWMuY29tIiwianRpI
        joiSURHQUFCRFVDMllHSUFONkJGUTJBQUFFUEZBNVFXIiwiX2NhY2hlSWQiOjQ3LCJpYXQiOjE0MTc2NDk5ODh9.
        V4LGLcEdwD8V_I4rzoWYYSZmEMA82LBB_lEfz4Xnz9Y

        Response Body

        HTTP/1.1 204 No Content
        Date: Wed, 03 Dec 2014 22:38:14 GMT
        Server: Jetty(8.1.15.v20140411)

        The following is a sample code snippet for the DELETE operation.

        package com.example;
        
        import org.apache.http.StatusLine;
        import org.apache.http.client.methods.CloseableHttpResponse;
        import org.apache.http.client.methods.HttpDelete;
        import org.apache.http.impl.client.CloseableHttpClient;
        import org.apache.http.impl.client.HttpClients;
        
        public class Delete {
        
            public static void main(String[] args) throws Exception {
                String token = args[0];
        
                // start HTTP DELETE to delete an entry
                CloseableHttpClient httpClient = HttpClients.createDefault();
                HttpDelete httpDelete = new HttpDelete(
                        "http://localhost:8008/api/arsys/v1/entry/SimpleForm/000000000000002");
        
                // add the token to the header
                httpDelete.addHeader("Authorization", "AR-JWT " + token);
        
                // make the call and print the status
                try (CloseableHttpResponse response = httpClient.execute(httpDelete)) {
                    StatusLine status = response.getStatusLine();
                    System.out.println(status);
                }
        	}
        }

        Related topics

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

        Comments

        1. Jim Coryat

          For the PUT example, shouldn't the label be "Request Body" instead of "Response Body"?

          Oct 28, 2016 12:03
          1. Poonam Morti

            I have updated the label.

            Thanks,

            Poonam

            Nov 06, 2016 10:46
        2. Kumar Lama

          Hi,

           

          Is there a direct access URL and suggestions with examples for specifying the query parameters ?

          I did the following to get all entries by particular field, but it returned all json entries instead of ones that I want filtered by the given query parameter.

          https:<hostname>:<port>/api/arsys/v1/entry/AST:CI Unavailability?Name=<Value>?fields=values(<Column1>,<Column2>).

          While 'fields' parameter did work, filtering by name did not work. Somehow the query is not reaching the database, I believe.

          Also, how do I specify the date range in the query parameter to get entries as specified by query. the following did not work for me.

          https:<hostname>:<port>/api/arsys/v1/entry/AST:CI Unavailability?StartDate > <DateValue>

           

          Dec 14, 2016 10:02
          1. Prachi Kalyani

            Hello,

            The list of parameters are explained on the Operations on entry objects topic. And for for information related to representing data types please refer to Understanding JSON topic.

            Thanks,

            Prachi

            Dec 15, 2016 01:13