Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Verity video analysis endpoints are:

Code Block
languagejava
POST /video/classification

Verity API processes HTTP POST requests to initiate a new video analysis.

Code Block
languagejava
GET /video/classification/{uuid}

Verity API processes HTTP GET requests to return processed results.

Code Block
languagejava
GET /video/classification/{uuid}/status

Verity API processes HTTP GET requests to return the status of the video analysis.

Example Video Request

This example shows a request to analyze an english language video at the URL:

Code Block
languagejava
http://content.jwplatform.com/videos/00D9qbqJ-320.mp4
Table of Contents

Step 1 – Submit a POST video classification request  

To start the video analysis, submit a POST request via curl to /video/classification. Include the required language code parameter:

Code Block
languagejs
curl -H 'x-api-key: <YOUR_API_KEY_HERE>' -X POST -d '{"url":"http://content.jwplatform.com/videos/00D9qbqJ-320.mp4", "languageCode": "en"}'  https://verity-api.gumgum.com/video/classification

Note: The url specified in the body must meet the following requirements:

...

Verity API returns a JSON response with  Content-Type: application/json; charset=UTF-8  showing the request has the following status: 

{

Code Block
languagejson
{
    "uuid": "8f72c44b-05c8-4946-8c69-bcc98c655367",

...


    "url": "http://content.jwplatform.com/videos/00D9qbqJ-320.mp4",

...


    "acceptedAt": "2020-04-18T00:43:44.015+0000"

...


}

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

Step 2 – GET status of request

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

Code Block
languagejs
curl -H 'x-api-key: <YOUR_API_KEY_HERE>' https://verity-api.gumgum.com/video/classification/123e4567-e89b-12d3-a456-426655440000/status

Verity API returns a JSON response with  Content-Type: application/json; charset=UTF-8  showing the request has the following status: 

Code Block
languagejson
{

...


  "uuid" : "123e4567-e89b-12d3-a456-426655440000",

...


  "status": "DOWNLOADING",

...


  "url": "http://content.jwplatform.com/videos/00D9qbqJ-320.mp4"

...


}

Step 3 – Get response

Submit a GET request to /video/classification/{uuid}, specifying the uuid returned in the response in step 1. Once the status changes to PROCESSED, the JSON page classification results are returned in the data payload. For example:

Code Block
languagejs
curl -H 'x-api-key: <YOUR_API_KEY_HERE>' https://verity-api.gumgum.com/video/classification/123e4567-e89b-12d3-a456-426655440000

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

...

Code Block
languagejson
  "uuid": "ccc71550-88e9-4ff2-9b46-fc204610e613",

...


  "url": "http://content.jwplatform.com/videos/00D9qbqJ-320.mp4",

...


  "data": {

...


    "languageCode": "en",

...


    "iab": {

...


      "v2": [

...


        {

...


          "id": "483",

...


          "category": "Sports",

...


          "score": 0.53

...


        },

...


        {

...


          "id": "515",

...


          "category": "Ice Hockey",

...


          "score": 0.26,

...


          "parent": {

...


            "id": "483",

...


            "category": "Sports"

...


          }

...


        },

...


        {

...


          "id": "533",

...


          "category": "Soccer",

...


          "score": 0.15,

...


          "parent": {

...


            "id": "483",

...


            "category": "Sports"

...


          }

...


        }

...


      ]

...


    },

...


    "keywords": [

...


      "cbc news",

...


      "ayers",

...


      "david",

...


      "nhl",

...


      "dallas",

...


      "toronto",

...


      "hurricanes",

...


      "hollywood",

...


      "anderson",

...


      "leafs",

...


      "david man.",

...


      "the toronto maple leafs",

...


      "marta gebre selassie's",

...


      "kidney transplant",

...


      "the carolina hurricanes"

...


    ],

...


    "safe": true,

...


    "threats": [

...


      {

...


        "id": "GGT9",

...


        "category": "Medical",

...


        "confidence": "HIGH"

...


      }

...


    ],

...


    "sentiments": [

...


      {

...


        "sentiment": "neutral",

...


        "score": 0.48

...


      },

...


      {

...


        "sentiment": "positive",

...


        "score": 0.45

...


      },

...


      {

...


        "sentiment": "negative",

...


        "score": 0.06

...


      }

...


    ],

...


    "processedAt": "2020-10-01T01:39:10.836Z"

...


  }

...


}