Retrieving UTF8 output
Retrieve a particular content UTF8 output based on the analyzerId.
Syntax: GET /ca/rest/content/v1/contentAnalyzer/{analyzerId}/utf8
| Property | Data Type | Description |
|---|---|---|
apiKey
header(required)
|
String | To authenticate API call. |
analyzerId path (required)
|
String | Unique identifier for each analyzer. Get from POST /contentAnalyzer response. |
The UTF8 final output contains all characters of a given file. For more information, see the section Output - UTF8 Schema.
GET/contentAnalyzer/{analyzerId}/utf8
cURL: Example
request
curl -X GET -u 'Functional ID:Password' 'https://requesturl/ca/rest/content/v1/contentAnalyzer/{analyzerId}/utf8' -H 'accept: text/plain' -H 'apiKey: ecfc7da2-19af-4734-bdd7-9d0da7bb4852'Python: Example
request
import requests
import base64
encoding = base64.b64encode(b'Functional ID:Password')
url = "https://requesturl/ca/rest/content/v1/contentAnalyzer/{analyzerId}/utf8"
headers = {
"apiKey" : "d7239f16-98f0-4024-9688-604750a98abb",
"authorization": "Basic " + str(encoding)
}
response = requests.request("GET", url, headers=headers)JavaScript: Example request
var fs = require("fs");
var request = require("request");
var Base64 = require('js-base64').Base64;
var encoding = Base64.encode('Functional ID:Password');
var options = {
method: 'GET',
url: 'https://requesturl/ca/rest/content/v1/contentAnalyzer/{analyzerId}/utf8',
headers:
{
'apiKey' : 'd7239f16-98f0-4024-9688-604750a98abb',
'authorization': "Basic " + encoding
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
});
Java: Example
request
import java.io.IOException;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import java.util.Base64;
String encoding = Base64.getEncoder().encodeToString(("Functional ID:Password").getBytes());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://requesturl/ca/rest/content/v1/contentAnalyzer/{analyzerId}/utf8")
.get()
.addHeader("apiKey", "d7239f16-98f0-4024-9688-604750a98abb")
.addHeader("Authorization", "Basic " + encoding)
.addHeader("Cache-Control", "no-cache")
.build();
Response response = client.newCall(request).execute();
/*
* The JAR files in Referenced Libraries could be found in the Download section with the following link:
* 1. okhttp.jar - https://github.com/square/okhttp
* 2. okio.jar - https://github.com/square/okio
*/