Get Started - Text API

Text Analysis Endpoints

The Verity text analysis endpoints are:

POST /text/classification

Initiates a new text analysis.

GET /text/classification/{uuid}/status

Returns the status of the text analysis.

GET /text/classification/{uuid}

Returns processed results.

The following example walks through an example text string analysis request.

Example Text Request

This example shows a request to analyze the following text string:

Kubernetes (also known as k8s or kube) is an open source container orchestration platform that automates many of the manual processes

Step 1 – Submit a POST request via curl to /text/classification

Submit a POST request with the text string to be analyzed, for example:

curl -H 'x-api-key: <YOUR_API_KEY_HERE>' -H 'Content-Type: application/json' -X POST -d '{"text":"Kubernetes (also known as k8s or kube) is an open source container orchestration platform that automates many of the manual processes", "languageCode": "en"}'  https://verity-api.gumgum.com/text/classification

Verity API returns a JSON response of  Content-Type: application/json; charset=UTF-8  with a uuid for the request and current request status, for example: 

{   "uuid": "c7bcbe04-ea77-4808-8e91-28d325d1b1fc",   "acceptedAt": "2020-06-25T23:09:41.729Z" }

For a list of supported status messages, refer to Application Status Messages.

Step 2 – Submit a GET request to /text/classification/{uuid}/status

Submit a GET request to /text/classification/{uuid}/status, specifying the uuid returned in the previous step. Within a short period, once analysis of the text is complete, a status change occurs. For example:

curl -H 'x-api-key: <YOUR_API_KEY_HERE>' https://verity-api.gumgum.com/text/classification/c7bcbe04-ea77-4808-8e91-28d325d1b1fc/status

Verity API returns a JSON response showing the request has the following status: 

Step 3 – Submit a GET request to /text/classification/{uuid} 

Submit a GET request to /text/classification/{uuid} , specifying the uuid returned in the response during Step 1. Within a short period, once analysis of the text is complete, a status change occurs and the classification response is PROCESSED. The classification response is ready, for example:

 

Example Text JSON Response Body

The JSON response details the complete brand safety, keyword, and categorization analysis data for the text.  See JSON Response for details about the fields included in the response.

More Information

 


The contents of these documents and any attachments contain GumGum, Inc. confidential information and are legally protected from disclosure.