Request URL
GET Request header
Authorization: AR-JWT eyJhbGciOiJIUzI1NiJ9. eyJleHAiOjE0MTc2NTM1ODgsInN1YiI6IkFsbGVuIiwibmJmIjoxNDE3NjQ5ODY4LCJpc3MiOi JXLUNTRUlFUk9FLTI5LmFkcHJvZC5ibWMuY29tIiwianRpI joiSURHQUFCRFVDMllHSUFONkJGUTJBQUFFUEZBNVFXIiwiX2NhY2hlSWQiOjQ3LCJpYXQiOjE0MTc2NDk5ODh9. V4LGLcEdwD8V_I4rzoWYYSZmEMA82LBB_lEfz4Xnz9YResponse 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":"" } ] } }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( ""); // 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); } } }