All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| getRenderedEntitiesFromText | POST /preview | Get Rendered Entities From Text |
| getRenderedEntitiesFromTrainerExport | POST /preview_trainer_export | Get Rendered Entities From Trainer Export |
getRenderedEntitiesFromText(body, trackingId)
Get Rendered Entities From Text
Extract the NER entities in HTML for preview
// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.auth.*;
import org.cms.client.models.*;
import org.cms.client.api.RenderingApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure OAuth2 access token for authorization: OAuth2PasswordBearer
OAuth OAuth2PasswordBearer = (OAuth) defaultClient.getAuthentication("OAuth2PasswordBearer");
OAuth2PasswordBearer.setAccessToken("YOUR ACCESS TOKEN");
// Configure API key authorization: APIKeyCookie
ApiKeyAuth APIKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyCookie");
APIKeyCookie.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyCookie.setApiKeyPrefix("Token");
RenderingApi apiInstance = new RenderingApi(defaultClient);
String body = "body_example"; // String |
String trackingId = "trackingId_example"; // String | The tracking ID of the requested task
try {
apiInstance.getRenderedEntitiesFromText(body, trackingId);
} catch (ApiException e) {
System.err.println("Exception when calling RenderingApi#getRenderedEntitiesFromText");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| body | String | ||
| trackingId | String | The tracking ID of the requested task | [optional] |
null (empty response body)
OAuth2PasswordBearer, APIKeyCookie
- Content-Type: text/plain
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
getRenderedEntitiesFromTrainerExport(projectId, documentId, trackingId, trainerExport, trainerExportStr)
Get Rendered Entities From Trainer Export
Get existing entities in HTML from a trainer export for preview
// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.auth.*;
import org.cms.client.models.*;
import org.cms.client.api.RenderingApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure OAuth2 access token for authorization: OAuth2PasswordBearer
OAuth OAuth2PasswordBearer = (OAuth) defaultClient.getAuthentication("OAuth2PasswordBearer");
OAuth2PasswordBearer.setAccessToken("YOUR ACCESS TOKEN");
// Configure API key authorization: APIKeyCookie
ApiKeyAuth APIKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyCookie");
APIKeyCookie.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyCookie.setApiKeyPrefix("Token");
RenderingApi apiInstance = new RenderingApi(defaultClient);
Integer projectId = 56; // Integer | The target project ID, and if not provided, all projects will be included
Integer documentId = 56; // Integer | The target document ID, and if not provided, all documents of the target project(s) will be included
String trackingId = "trackingId_example"; // String | The tracking ID of the requested task
List<File> trainerExport = Arrays.asList(); // List<File> | One or more trainer export files to be uploaded
String trainerExportStr = "{\\\"projects\\\": []}"; // String | The trainer export raw JSON string
try {
apiInstance.getRenderedEntitiesFromTrainerExport(projectId, documentId, trackingId, trainerExport, trainerExportStr);
} catch (ApiException e) {
System.err.println("Exception when calling RenderingApi#getRenderedEntitiesFromTrainerExport");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Integer | The target project ID, and if not provided, all projects will be included | [optional] |
| documentId | Integer | The target document ID, and if not provided, all documents of the target project(s) will be included | [optional] |
| trackingId | String | The tracking ID of the requested task | [optional] |
| trainerExport | List<File> | One or more trainer export files to be uploaded | [optional] |
| trainerExportStr | String | The trainer export raw JSON string | [optional] [default to {"projects": []}] |
null (empty response body)
OAuth2PasswordBearer, APIKeyCookie
- Content-Type: multipart/form-data
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |