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

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

/entry/{formName}

The following operations are available on the resource: 

OPTIONS

The details of the OPTIONS operation are tabulated below:

Description Retrieves the information of the form schema.
URL qualifier

/entry/{formName}

formName - The form for which an entry is to be created.

Method OPTIONS
Headers
Header
Value
Authorization token
(optional) X-AR-Client-Type Client Type ID
(optional) X-AR-RPC-Queue RPC queue to which the client calls are routed
Returns The information about the schema of the form.

POST

This operation is used to create an entry. The details of the Create operations are tabulated below:

Create an entry

Description Creates a new entry on the form.
URL qualifier

/entry/{formName}

formName - The form for which an entry is to be created.

Method POST
Headers
Header
Value
Authorization token
Content-Type application/json
(optional) X-AR-Client-Type Client Type ID
(optional) X-AR-RPC-Queue RPC queue to which the client calls are routed
Parameter


Name Description
fields Selects what parts of the JSON document to return (for example, fields=values(fieldName1,fieldName2))

For more information, see Common parameters.

Request body An entry object in JSON format.
Returns

Create an operation without field parameter

No request body content, but returns one of the following status codes:

  • HTTP status code 201 with the Location header set to the URL of the new entry resource
  • HTTP status code 204

Create an operation with field parameter

Returns request body content with the requested field values and one of the following status codes:

  • HTTP status code 201, with the Location header set to the URL of the new entry resource
  • HTTP status code 204
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.
Notes

Display-only forms and Join forms do not generate an entry ID when they are created, and the status code 204 is returned. If an entry ID is generated, such as on a regular form, status code 201 with the Location header is returned. When Display-only forms and Join forms are created, field parameters are not honored.

    This example provides information to create an entry in a Simple form.

    Request URL

    POST http://localhost:8008/api/arsys/v1/entry/SimpleForm
    

    Request headers

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

    Request body

    {
      "values":{
        "Submitter":"Allen",
        "Short Description":"testing 123",
    	"Assigned To":"Bob"
      }
    }
    The following is a sample code snippet for the POST operation.

     

    package com.example;
    
    import org.apache.http.Header;
    import org.apache.http.client.methods.CloseableHttpResponse;
    import org.apache.http.client.methods.HttpPost;
    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 Post {
    
        public static void main(String[] args) throws Exception {
            String token = args[0];
    
            // start HTTP POST to create an entry
            CloseableHttpClient httpClient = HttpClients.createDefault();
            HttpPost httpPost = new HttpPost("http://localhost:8008/api/arsys/v1/entry/SimpleForm");
    
            // build the JSON entry
            String json = "{ \"values\" : { ";
            json += "\"Submitter\" : \"Allen\", ";
            json += "\"Short Description\" : \"testing 123\"";
            json += " } }";
            httpPost.setEntity(new StringEntity(json, ContentType.APPLICATION_JSON));
            httpPost.addHeader("Authorization", "AR-JWT " + token);
    
            // make the call and print the Location
            try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
                Header locationHeader = response.getFirstHeader("Location");
                System.out.println(locationHeader.getValue());
            }
        }
    
    }

    This example provides information to create an entry in a Simple form.

    Request URL

    POST http://localhost:8008/api/arsys/v1/entry/SimpleForm?fields=values(Submitter, Assigned To)
    

    Request headers

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

    Request body

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

    Response body

    {
      "values": {
        "Submitter": "Allen",
        "Assigned To": "Bob"
      },
      "_links": {
        "self": [
          {
            "href": "http://<local host>:<port>/api/arsys/v1/entry/SimpleForm"
          }
        ]
      }
    }
    
    The following is a sample code snippet for the POST operation.

     

    package com.example;
    
    import org.apache.http.Header;
    import org.apache.http.client.methods.CloseableHttpResponse;
    import org.apache.http.client.methods.HttpPost;
    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 Post {
    
        public static void main(String[] args) throws Exception {
            String token = args[0];
    
            // start HTTP POST to create an entry with fields parameter
            CloseableHttpClient httpClient = HttpClients.createDefault();
            HttpPost httpPost = new HttpPost("http://localhost:8008/api/arsys/v1/entry/SimpleForm?fields=values(field1, field2)");
    
            // build the JSON entry
            String json = "{ \"values\" : { ";
            json += "\"Submitter\" : \"Allen\", ";
            json += "\"Short Description\" : \"testing 123\"";
            json += " } }";
            httpPost.setEntity(new StringEntity(json, ContentType.APPLICATION_JSON));
            httpPost.addHeader("Authorization", "AR-JWT " + token);
    
            // make the call and print the Location
            try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
                Header locationHeader = response.getFirstHeader("Location");
                System.out.println(locationHeader.getValue());
    			HttpEntity entity = response.getEntity(); 
    		// Read the contents of an entity and return it as a String. 
    			String content = EntityUtils.toString(entity); 
    			System.out.println(content); 
            }
        }
    
    }

    Create an entry with attachments

    Description Creates a new entry with attachments
    URL qualifier

    /entry/{formName}

    formName - The form for which an entry is to be created.

    Method POST
    Headers
    Header
    Value
    Authorization token
    Content-Type multipart/form-data
    (optional) X-AR-Client-Type Client Type ID
    (optional) X-AR-RPC-Queue RPC 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 creates an entry with attachment data.

    Returns No request body content, but returns one of the following status codes:
    • HTTP status code 201 with the Location header set to the URL of the new entry resource
    • HTTP status code 204
    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

    Notes Display-only forms and Join forms do not generate an entry ID when they are created, and the status code 204 is returned. If an entry ID is generated, such as on a regular form, status code 201 with the Location header is returned.

      This example provides information to create an entry with attachment in a Simple form.

      Request URL

      POST http://localhost:8008/api/arsys/v1/entry/AttachTest

      Request headers

      Authorization: AR-JWT eyJhbGciOiJIUzI1NiJ9.
      eyJzdWIiOiJxSmNGRjgwY0JOeTgyUDRkUm1vTz
      RHZ1dKQ1QrZ3pzYUpybVwvMFRwMktMYkJXeUd4ZWt1VG1VMW1r
      NXkzcE9aRk9NRlhVM1JTZ3BDbjRNUmR4MVRQRnpGQ2hpNE5KaGk3ZUxCNVlFOFFz
      VVJuYm1HbklHaVc0UT09IiwibmJmIjoxNDQ3NzkzMjQ5LCJfaW1wZXJzb25hdGVkVXNl
      ciI6bnVsbCwiaXNzIjoiVy1DU0VJRVJPRS0yOS5hZHByb2QuYm1jLmNvbSIsIl9jYWNoZUlkIjox
      NDAsImV4cCI6MTQ0Nzc5Njk2OSwiaWF0IjoxNDQ3NzkzMzY5LCJqdGkiOiJJREdBQUJEVUMyWU
      dJQU5YWkk4N0FBQkJPV0RORTkifQ.S4PqNJ_LNLqHxfbI6nn7lJA_aI4_-qDVx4hqR3TfprQ
      
      Content-Length: 17553
      Content-Type: multipart/form-data;boundary=W3NByNRZZYy4ALu6xeZzvWXU3NVmYUxoRB

      Request body

      --W3NByNRZZYy4ALu6xeZzvWXU3NVmYUxoRB
      Content-Disposition: form-data; name="entry"
      Content-Type: application/json; charset=UTF-8
      Content-Transfer-Encoding: 8bit
      
      { 
      	"values" : 
      		{ "Submitter" :"Allen", "Short Description" : "testing 123", "Attachment1" : "sample.jpg"
      		} 
      }
      
      --W3NByNRZZYy4ALu6xeZzvWXU3NVmYUxoRB
      Content-Disposition: form-data;
      name="attach-Attachment1"; filename="sample.png"
      Content-Type: application/octet-stream
      Content-Transfer-Encoding: binary
      
      <binary data removed for brevity>
      --W3NByNRZZYy4ALu6xeZzvWXU3NVmYUxoRB--
      

      The following is a sample code snippet for the POST operation with attachments.

      package com.example;
      
      import java.io.File;
      
      import org.apache.http.Header;
      import org.apache.http.HttpEntity;
      import org.apache.http.client.methods.CloseableHttpResponse;
      import org.apache.http.client.methods.HttpPost;
      import org.apache.http.entity.ContentType;
      import org.apache.http.entity.mime.MultipartEntityBuilder;
      import org.apache.http.impl.client.CloseableHttpClient;
      import org.apache.http.impl.client.HttpClients;
      
      public class PostAttachment {
      
          public static void main(String[] args) throws Exception {
              String token = args[0];
              String filename = args[1];
      
              // start HTTP POST to create an entry
              CloseableHttpClient httpClient = HttpClients.createDefault();
              HttpPost httpPost = new HttpPost("http://localhost:8008/api/arsys/v1/entry/AttachTest");
      
              // build the JSON entry
              String json = "{ \"values\" : { ";
              json += "\"Submitter\" : \"Allen\", ";
              json += "\"Short Description\" : \"testing 123\", ";
              json += "\"Attachment1\" : \"sample.jpg\"";
              json += " } }";
      
              // build the multipart entity
              HttpEntity entity = MultipartEntityBuilder.create()
                      .addTextBody("entry", json, ContentType.APPLICATION_JSON)
                      .addBinaryBody("attach-Attachment1", new File(filename))
                      .build();
              httpPost.setEntity(entity);
              httpPost.addHeader("Authorization", "AR-JWT " + token);
      
              // make the call and print the Location
              try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
                  Header locationHeader = response.getFirstHeader("Location");
                  System.out.println(locationHeader.getValue());
              }
          }
      
      }
      
      

      GET multiple entries

      This operation allows you to get multiple entries. The details of the GET operation are tabulated below:

      Description Get multiple entries on the form.
      URL qualifier

      /entry/{formName}

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

      Method GET
      Header
      Header Value
      Authorization token
      (optional) X-AR-Client-Type Client Type ID
      (optional) X-AR-RPC-Queue RPC queue to which the client calls are routed
      Parameters
      Name
      Description
      fields Selects what parts of the JSON document to return (for example, ?fields=entryId1,entryId2)
      q Search qualification
      offset Offset for the entry return
      limit Number of instances in which limit the result
      sort Order in which sorts the results (for example, ?sort=submitDate.desc)
      expand Expands related entries (associations).

      For more information, see Common parameters.

      Returns An array of entry objects in JSON format.
      Errors

      If the request is not successful, the following error code is returned.

      400 - Request body is incorrect.

      For more information, see HTTP status codes.
      Notes The default behavior is to internally call Get List Entry With Fields, which does not initiate Get Entry workflow.

        This example provides information to get multiple entries in a Simple form.

        Request URL

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

        Request headers

        Authorization: AR-JWT eyJhbGciOiJIUzI1NiJ9.
        eyJleHAiOjE0MTc2NTM1ODgsInN1YiI6IkFsbGVuIiwibm
        JmIjoxNDE3NjQ5ODY4LCJpc3MiOiJXLUNTRUlFUk9FLTI5Lm
        FkcHJvZC5ibWMuY29tIiwianRpIjoiSURHQUFCRFVDMllHSUFONkJGUTJBQUFFUEZBNVFXIiwiX
        2NhY2hlSWQiOjQ3LCJpYXQiOjE0MTc2NDk5ODh9.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)
        {
        "entries": [
        	{
              "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"
                    }
                  ]
        	    }
            }
          ],
          "_links":{
        		"self":[
        	            {"href":"http://localhost:8008/api/arsys/v1/entry/SimpleForm"
                        }
                      ]
                  }
        }
        The following is a sample code snippet for the POST operation for multiple entries.

         

        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 GetMultiple {
        
            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");
        
                // 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);
                }
            }
        
        }
        
        

        Related topics

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

        Comments

        1. Daimen Hutchison

          Just wondering if there is a full list of the X-AR prefixed custom headers available? In particular, I'm looking for something that will return a total count when a query uses the limit parameter.

          But I would be interested in as much information on the API as possible, it's very useful! Are there any other parameters available?

          Ref to discussion; https://communities.bmc.com/thread/145001

           

          Mar 27, 2016 05:40
          1. Prachi Kalyani

            Hello Daimen,

            Thank you for your comment. We are currently verifying this with our SME. We will get back to you soon.

            Thanks,

            Prachi

            Mar 28, 2016 01:50
            1. Christopher Seieroe

              There isn't a way to get back the total count. I also replied to that communities post.

              Apr 13, 2016 01:00
        2. Allen Morgan

          Hi,

          Is there a way using REST to Modify an entry using a qualification?

          Example:

          api/arsys/v1/entry/HPD:IncidentInterface?q='Incident Number'%3D%22INC000001090856%22

          This would be useful to update ITSM tickets which have dual Ids.

          This capability exists with SOAP:

          Ex:

          'Incident Number' = XPATH(/ROOT/Incident_Number)

           

          Is there a way to do this with REST API?

           

          Thank you,

          Allen Morgan

          NASDAQ

           

           

           

           

          Jan 22, 2017 02:21
          1. Alejandro Vidaurri de la cruz

            Hello Allen

            I would use the Merge Operation to update several entries that match a qualification

            https://docs.bmc.com/docs/pages/viewpage.action?pageId=609071442

             

             

            Jan 31, 2017 09:30
            1. Allen Morgan

              Hello Alejandro,

               

              Thank you so much for your reply - I will give that a try.

               

              Regards,

              Allen

              Jan 31, 2017 09:59
        3. Robert Kern

          In the JAVA example I move things around like seen below.

          Reason being you get an exception with the Location being null if not successfull - and then the entity response (like "missing field") is not being seen. So by moving the entity response up - you won't be missing the result.

          Hope this makes sense :-)

              HttpEntity entity = response.getEntity();
              String content = EntityUtils.toString(entity);
              System.out.println("Content:\n" + content);
          
              Header locationHeader = response.getFirstHeader("Location");
              System.out.println(locationHeader.getValue());
          
          Oct 19, 2018 05:55