All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| get_rendered_entities_from_text | POST /preview | Get Rendered Entities From Text |
| get_rendered_entities_from_trainer_export | POST /preview_trainer_export | Get Rendered Entities From Trainer Export |
get_rendered_entities_from_text(body, tracking_id=tracking_id)
Get Rendered Entities From Text
Extract the NER entities in HTML for preview
- OAuth Authentication (OAuth2PasswordBearer):
- Api Key Authentication (APIKeyCookie):
import cms_client
from cms_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cms_client.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Configure API key authorization: APIKeyCookie
configuration.api_key['APIKeyCookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyCookie'] = 'Bearer'
# Enter a context with an instance of the API client
with cms_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cms_client.RenderingApi(api_client)
body = 'body_example' # str |
tracking_id = 'tracking_id_example' # str | The tracking ID of the requested task (optional)
try:
# Get Rendered Entities From Text
api_instance.get_rendered_entities_from_text(body, tracking_id=tracking_id)
except Exception as e:
print("Exception when calling RenderingApi->get_rendered_entities_from_text: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | str | ||
| tracking_id | str | The tracking ID of the requested task | [optional] |
void (empty response body)
OAuth2PasswordBearer, APIKeyCookie
- Content-Type: text/plain
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_rendered_entities_from_trainer_export(project_id=project_id, document_id=document_id, tracking_id=tracking_id, trainer_export=trainer_export, trainer_export_str=trainer_export_str)
Get Rendered Entities From Trainer Export
Get existing entities in HTML from a trainer export for preview
- OAuth Authentication (OAuth2PasswordBearer):
- Api Key Authentication (APIKeyCookie):
import cms_client
from cms_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cms_client.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Configure API key authorization: APIKeyCookie
configuration.api_key['APIKeyCookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyCookie'] = 'Bearer'
# Enter a context with an instance of the API client
with cms_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cms_client.RenderingApi(api_client)
project_id = 56 # int | The target project ID, and if not provided, all projects will be included (optional)
document_id = 56 # int | The target document ID, and if not provided, all documents of the target project(s) will be included (optional)
tracking_id = 'tracking_id_example' # str | The tracking ID of the requested task (optional)
trainer_export = None # List[bytearray] | One or more trainer export files to be uploaded (optional)
trainer_export_str = '{"projects": []}' # str | The trainer export raw JSON string (optional) (default to '{"projects": []}')
try:
# Get Rendered Entities From Trainer Export
api_instance.get_rendered_entities_from_trainer_export(project_id=project_id, document_id=document_id, tracking_id=tracking_id, trainer_export=trainer_export, trainer_export_str=trainer_export_str)
except Exception as e:
print("Exception when calling RenderingApi->get_rendered_entities_from_trainer_export: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | int | The target project ID, and if not provided, all projects will be included | [optional] |
| document_id | int | The target document ID, and if not provided, all documents of the target project(s) will be included | [optional] |
| tracking_id | str | The tracking ID of the requested task | [optional] |
| trainer_export | List[bytearray] | One or more trainer export files to be uploaded | [optional] |
| trainer_export_str | str | The trainer export raw JSON string | [optional] [default to '{"projects": []}'] |
void (empty response body)
OAuth2PasswordBearer, APIKeyCookie
- Content-Type: multipart/form-data
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]