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}

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
Request body An entry object in JSON format.
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 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"
      }
    }
    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());
            }
        }
    
    }

    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. Andreas Mitterdorfer

          Please refer to https://communities.bmc.com/thread/138020

          Could you please provide examples for "Create an entry with attachments" and "GET multiple entries"

           

          Nov 09, 2015 02:14
          1. Prachi Kalyani

            Hello Andreas,

            I have contacted the SME to get the details. I will update the topic soon.

            Thanks,

            Prachi

            Nov 09, 2015 03:28
          1. Prachi Kalyani

            Hello Andreas,

            I have updated the topic with example and sample code for "Create an entry with attachments" and "GET multiple entries".

            Thanks,

            Prachi

            Nov 17, 2015 11:41
            1. Ajay Singh

              Can we get example from Incident worklog attachment case.

              Also from Post man which format is used to send data

              Apr 14, 2016 03:51
            1. Jim Coryat

              I'm confused, the header states "GET multiple entries", however the example states "This example provides information to create multiple entries in a Simple form.".

              I am unclear what this example is showing me.

              Apr 21, 2016 01:01
              1. Prachi Kalyani

                Hello Jim,

                We are sorry for the confusion. The example is to get multiple entries. I have updated the topic.

                Thanks,

                Prachi

                Apr 21, 2016 11:34
        2. Andreas Mitterdorfer

          Thanks Prachi. (smile)

          Nov 18, 2015 01:36
        3. Ajay Singh

          Hi Prachi,

           

          I need to know in "Create an entry with attachments" what is the 'boundary" and how this is generated in header.

          Content-Type: multipart/form-data;boundary=W3NByNRZZYy4ALu6xeZzvWXU3NVmYUxoRB

          Also can we get an example for Incident work log attachment.

           

          Apr 14, 2016 01:42
          1. Christopher Seieroe

            The boundary is some randomly-generated string that your HTTP client library (e.g. Jersey, Apache HTTP Client, ...) should generate that serves as the separator between the different parts in multipart content.

            Apr 14, 2016 02:29
            1. Ajay Singh

              Thanks Christopher, can you please share the Post Man message body in order to create an attachment worklog entry. I am confused which request body to use (Form data, Raw, Binary ). It would be great if you can share any specific example.

              Apr 14, 2016 04:02
              1. Alejandro Vidaurri de la cruz

                Hello Ajay

                Actually the current POSTMAN version is unable to create all the http request details 

                You can find the java code sample on the docs or built your http request is using any http client with enough configuration items

                In nodejs the following sample code works for a simple form with a single attachment

                 

                var request = require("request");
                var fs = require("fs");
                var json_format = {
                values: {
                Submitter__c: "test",
                "Short Description__c": "test",
                Attachment__c: 'myZip.zip'
                }
                }
                var options = { method: 'POST',
                url: 'http://clm-aus-009937:8008/api/arsys/v1/entry/zzTestRESTAttachment',
                headers:
                {
                'Cache-Control': 'no-cache',
                'Content-Type': 'multipart/form-data; boundary=LtcRxsLBA9Hf_9Ts2YHDkL5DslhgppQqLM9',
                'Connection': 'Keep-Alive',
                Authorization: 'AR-JWT eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJVYVY2WUx5MFlyM1pjUTU1cW80ZTdnMW55RGdJUnhTOUwyVW45bmZYS0lLVjdPRzRsM0d0WFg1WVVRcklvdTRLaE5lMWdnV1Z3QUJrc2dyMVZLTVJqSDlZR0tkRU1cL012XC9PSjErTnFjUm04bTNtdmtiNUZEb3c9PSIsIm5iZiI6MTQ3NTUyNTEzNSwiaXNzIjoiY2xtLWF1cy0wMDk5MzcuYm1jLmNvbSIsIl9jYWNoZUlkIjoxMjI0LCJleHAiOjE0NzU1Mjg4NTUsImlhdCI6MTQ3NTUyNTI1NSwianRpIjoiSURHQUE1VjBHRkYzV0FPNDdNS05BQUY2Sk5NRFk1In0.UaXO2MAlfrSPxl05qwSpcZxBB09MZfhPFyG6kanAO_c' },
                'Accept-Encoding': 'gzip,deflate',
                'Transfer-Encoding': "",
                multipart: [
                {
                'Content-Disposition': 'form-data; name="entry"',
                'Content-Type': 'application/json; charset=UTF-8',
                'Content-Transfer-Encoding': '8bit',
                body: JSON.stringify(json_format)
                },
                {
                'Content-Disposition': 'form-data; name="attach-Attachment__c"; filename="myZip.zip"',
                'Content-Type': 'application/octet-stream',
                'Content-Transfer-Encoding': 'binary',

                }
                ]
                };

                fs.readFile(__dirname + '/myZip.zip', (err, data) => {
                if (err) throw err;

                options.multipart[1].body = data;
                request(options, function (error, response, body) {
                if (error) throw new Error(error);
                console.log(response.toJSON());
                });

                });
                Oct 06, 2016 03:00
        4. Divya B

          Hi , Can I get C# sample code to attach a document in Incident Ticket.

          Thanks in advance. 


          Dec 15, 2017 04:00
        5. Levi Lippincott

          I am unable to get the GET multiple entries to correctly work when using the q parameter on the HPD:Help Desk form.

          I have the header information set to:

          Authorization=AR-JWT {{jwt}}

          Content-Type=application/json


          I have the parameter information set to:

          q='Incident Number' = "INC000003064023"


          It formulates the URL in a GET action as: http://myarserver:8008/api/arsys/v1/entry/HPD:Help Desk/?q='Incident Number' = "INC000003064023"


          When I click go what returns is the following:

          {
            "entries": [],
            "_links": {
              "self": [
                {
                "href": "http://myarserver:8008/api/arsys/v1/entry/HPD:Help%20Desk/?q=%27Incident%20Number%27%20=%20%22INC000003064023%22"
                }
              ]
            }

          }

          Mar 05, 2018 02:32
        6. Jim Coryat

          Levi,

          My experience has been this behavior is related to the account not having sufficient permissions to the data being requested.

          Mar 05, 2018 03:51
          1. Levi Lippincott

            Jim,

            I thought it was something to do with that at first but if I just perform a single entry query using the Entry ID of that INC record it returns all the data just fine and I'm using the same account that I'm preforming the q= query and it is failing. So I assume it is some sort of a syntax issue, for the life of me though I can't figure it out.

            Mar 06, 2018 01:46
        7. Jimmy Tsang

          How can we create an entry with attachment when the attachment field name has space in it, like z2AF Work Log01? I can submit a post request and create the worklog, but attachment does not attached to the worklog.

          Oct 30, 2018 04:39
        8. Victor Pulcev

          Wasted many hours and still no luck with creating an entry with attachment. Does anybody have an working example in Postman or PHP?

          Dec 18, 2018 07:33