Skip to end of metadata
Go to start of metadata

Table of contents

Authentication

Authentication to the API is done through OAuth2 Authentication

AuthURLAccess Token URLClient IdClient SecretGrant Type
/cv_backend/oauth/token/cv_backend/oauth/tokenYour idYour passwordClient Credentials

As a response, you will get the token used to make API calls.

API Endpoints

AddressDescriptionMethodAuthenticationRequestResponse
/cv_backend/api/video_upload/list/pages
List all of the VideoUpload entities generated by the userGETOAuth2

The request must be authenticated using HTTP OAuth2 authentication

 

URL ParamURL Value
pageNumber of the page you want to see (10 items per page)

A list of all the user's VideoUpload entities. Sample response:

{
  "error": null,
  "responseBody": {
    "listVideoUpload": [
      {
        "id": 1148,
        "percentage": 100,
        "currentStatus": "EMBEDDING",
        "finalUrl": "",
        "message": "Error InvalidParameterException",
        "thumbnail": "http://5998dc42-cd8c-4056-a5ae-87441c53115f/scene_0/clean_thumbnail.jpg",
        "name": "cat.mp4",
        "createdDate": "2017-01-05 00:35:09",
        "totalTime": 9.843166666666667,
        "labels": [
          {
            "id": 10981,
            "name": "pets",
            "score": 1
          },
          {
            "id": 10982,
            "name": "art",
            "score": 0.66038954
          },
          {
            "id": 10983,
            "name": "lighting",
            "score": 0.65498322
          },
          {
            "id": 10984,
            "name": "cat",
            "score": 0.60810471
          },
          {
            "id": 10985,
            "name": "indoors",
            "score": 0.11257644090801477
          }
        ],
        "warningMessage": "Logo embedding failed, please try again with a different asset"
      },
      {
        "id": 1137,
        "percentage": 100,
        "currentStatus": "EMBEDDING",
        "finalUrl": "http://d4f96b7d-3f15-432d-aa95-1be401fa2851/video12-20170105 00-20-04.mp4",
        "message": "Embedding",
        "thumbnail": "http://d4f96b7d-3f15-432d-aa95-1be401fa2851/scene_0/clean_thumbnail.jpg",
        "name": "video12.mp4",
        "createdDate": "2017-01-04 16:31:56",
        "totalTime": 10.04,
        "labels": [
          {
            "id": 10861,
            "name": "health & fitness",
            "score": 1
          },
          {
            "id": 10862,
            "name": "human action",
            "score": 0.97624081
          },
          {
            "id": 10863,
            "name": "person",
            "score": 0.9335947
          },
          {
            "id": 10864,
            "name": "sports",
            "score": 0.87659055
          },
          {
            "id": 10865,
            "name": "physical fitness",
            "score": 0.789648
          },
          {
            "id": 10866,
            "name": "strength training",
            "score": 0.72932297
          },
          {
            "id": 10867,
            "name": "muscle",
            "score": 0.62703
          },
          {
            "id": 10868,
            "name": "physical exercise",
            "score": 0.62084663
          },
          {
            "id": 10869,
            "name": "squat",
            "score": 0.57724327
          },
          {
            "id": 10870,
            "name": "bodypump",
            "score": 0.53049588
          }
        ],
        "warningMessage": null
      },
      {
        "id": 1114,
        "percentage": 100,
        "currentStatus": "EMBEDDING",
        "finalUrl": "http://85ee3bda-ef9c-487f-b43f-7e4e0fd18144/beer_guy-20170104 18-49-30.mp4",
        "message": "Embedding",
        "thumbnail": "http://85ee3bda-ef9c-487f-b43f-7e4e0fd18144/scene_0/clean_thumbnail.jpg",
        "name": "beer_guy.mp4",
        "createdDate": "2017-01-02 16:39:25",
        "totalTime": 4.9623,
        "labels": [
          {
            "id": 10691,
            "name": "arts & entertainment",
            "score": 1
          },
          {
            "id": 10692,
            "name": "person",
            "score": 0.91821212
          },
          {
            "id": 10693,
            "name": "human positions",
            "score": 0.81759769
          },
          {
            "id": 10694,
            "name": "professional",
            "score": 0.55221647
          },
          {
            "id": 10695,
            "name": "clothing",
            "score": 0.18355898559093475
          },
          {
            "id": 10696,
            "name": "outdoors",
            "score": 0.15463770925998688
          }
        ],
        "warningMessage": null
      },
      {
        "id": 1113,
        "percentage": 100,
        "currentStatus": "EMBEDDING",
        "finalUrl": "http://b25f8fb9-fbf0-44d1-9508-17a66e938475/4/video_high_shadow-20170106 10-42-47.mp4",
        "message": "Embedding",
        "thumbnail": "http://b25f8fb9-fbf0-44d1-9508-17a66e938475/scene_0/clean_thumbnail.jpg",
        "name": "video_high_shadow.mp4",
        "createdDate": "2017-01-02 15:15:14",
        "totalTime": 9.6,
        "labels": [
          {
            "id": 10676,
            "name": "hobbies & interest",
            "score": 1
          },
          {
            "id": 10677,
            "name": "structure",
            "score": 0.94043523
          },
          {
            "id": 10678,
            "name": "sport venue",
            "score": 0.8187629
          },
          {
            "id": 10679,
            "name": "stadium",
            "score": 0.78140283
          },
          {
            "id": 10680,
            "name": "soccer specific stadium",
            "score": 0.7331199
          },
          {
            "id": 10681,
            "name": "games",
            "score": 0.70350242
          },
          {
            "id": 10682,
            "name": "basketball moves",
            "score": 0.69411737
          },
          {
            "id": 10683,
            "name": "race track",
            "score": 0.68839645
          },
          {
            "id": 10684,
            "name": "arena",
            "score": 0.62757546
          },
          {
            "id": 10685,
            "name": "sports",
            "score": 0.56023037
          }
        ],
        "warningMessage": null
      },
      {
        "id": 1111,
        "percentage": 100,
        "currentStatus": "EMBEDDING",
        "finalUrl": "http://9d0ff682-b312-4d47-aab9-508f82a441d8/fullscreen4-20170104 18-53-20.mp4",
        "message": "Embedding",
        "thumbnail": "http://9d0ff682-b312-4d47-aab9-508f82a441d8/scene_0/clean_thumbnail.jpg",
        "name": "fullscreen4.mp4",
        "createdDate": "2016-12-31 14:28:11",
        "totalTime": 9.242566666666667,
        "labels": [
          {
            "id": 10588,
            "name": "fashion",
            "score": 1.6344047800000001
          },
          {
            "id": 10589,
            "name": "person",
            "score": 0.90307564
          },
          {
            "id": 10590,
            "name": "clothing",
            "score": 0.7302424311637878
          },
          {
            "id": 10591,
            "name": "finger",
            "score": 0.67595643
          },
          {
            "id": 10592,
            "name": "hand",
            "score": 0.60776246
          },
          {
            "id": 10593,
            "name": "facial hair",
            "score": 0.57105678
          },
          {
            "id": 10594,
            "name": "model",
            "score": 0.5620321
          },
          {
            "id": 10595,
            "name": "photo shoot",
            "score": 0.52896172
          }
        ],
        "warningMessage": null
      },
      {
        "id": 1058,
        "percentage": 100,
        "currentStatus": "UNDER_ANALYSIS",
        "finalUrl": "",
        "message": "uploading",
        "thumbnail": "http://6a069998-6f24-4e4f-905f-c3ec0fd0658d/scene_1/clean_thumbnail.jpg",
        "name": "videoTestMultipleScenes.mp4",
        "createdDate": "2016-12-24 21:38:00",
        "totalTime": 13.8138,
        "labels": [
          {
            "id": 9277,
            "name": "arts & entertainment",
            "score": 1
          },
          {
            "id": 9278,
            "name": "drinks",
            "score": 0.45697327703237534
          },
          {
            "id": 9279,
            "name": "food",
            "score": 0.20714791088054577
          }
        ],
        "warningMessage": null
      },
      {
        "id": 995,
        "percentage": 100,
        "currentStatus": "UNDER_ANALYSIS",
        "finalUrl": "",
        "message": "uploading",
        "thumbnail": "http://859f532b-e9e2-472f-bb55-41b38104eec2/scene_8/clean_thumbnail.jpg",
        "name": "Baby Sloths Get Potty Trained - Too Cute.mp4",
        "createdDate": "2016-12-21 20:35:55",
        "totalTime": 147.18036666666666,
        "labels": [
          {
            "id": 6859,
            "name": "pets",
            "score": 1
          },
          {
            "id": 6860,
            "name": "habitat",
            "score": 0.96117806
          },
          {
            "id": 6861,
            "name": "human action",
            "score": 0.9544496250000001
          },
          {
            "id": 6862,
            "name": "hair",
            "score": 0.9475590353125001
          },
          {
            "id": 6863,
            "name": "phenomenon",
            "score": 0.94444287
          },
          {
            "id": 6864,
            "name": "face",
            "score": 0.93932873
          },
          {
            "id": 6865,
            "name": "mammal",
            "score": 0.9138210118017578
          },
          {
            "id": 6866,
            "name": "vertebrate",
            "score": 0.910163025859375
          },
          {
            "id": 6867,
            "name": "person",
            "score": 0.9097394962500001
          },
          {
            "id": 6868,
            "name": "clothing",
            "score": 0.90848655
          }
        ],
        "warningMessage": null
      },
      {
        "id": 993,
        "percentage": 100,
        "currentStatus": "UNDER_ANALYSIS",
        "finalUrl": "",
        "message": "uploading",
        "thumbnail": "http://a8b42554-ae8d-40e5-afb7-48115f145900/scene_4/clean_thumbnail.jpg",
        "name": "September 15, 2013 - crush.tv-deercam - Evening Show With Wolverine.mp4",
        "createdDate": "2016-12-21 19:23:35",
        "totalTime": 428.6666666666667,
        "labels": [
          {
            "id": 6767,
            "name": "wild animals",
            "score": 1.2806181400083005
          },
          {
            "id": 6768,
            "name": "pets",
            "score": 1
          },
          {
            "id": 6769,
            "name": "phenomenon",
            "score": 0.94444287
          },
          {
            "id": 6770,
            "name": "mammal",
            "score": 0.905659616015625
          },
          {
            "id": 6771,
            "name": "vertebrate",
            "score": 0.9020474959375
          },
          {
            "id": 6772,
            "name": "black and white",
            "score": 0.89037049
          },
          {
            "id": 6773,
            "name": "fauna",
            "score": 0.8455444
          },
          {
            "id": 6774,
            "name": "outdoor play equipment",
            "score": 0.77129889
          },
          {
            "id": 6775,
            "name": "deer",
            "score": 0.7709865423437501
          },
          {
            "id": 6776,
            "name": "wildlife",
            "score": 0.767112715
          }
        ],
        "warningMessage": null
      },
      {
        "id": 992,
        "percentage": 100,
        "currentStatus": "EMBEDDING",
        "finalUrl": "http://b822211f-7a7e-4e26-b4ef-b6320e409629/28a6O05r-21800037.mp4",
        "message": "Embedding",
        "thumbnail": "http://b822211f-7a7e-4e26-b4ef-b6320e409629/scene_3/clean_thumbnail.jpg",
        "name": "28a6O05r-21800037.mp4",
        "createdDate": "2016-12-21 19:06:44",
        "totalTime": 68.45833333333333,
        "labels": [
          {
            "id": 6708,
            "name": "food",
            "score": 1.6879953063875788
          },
          {
            "id": 6709,
            "name": "food & drink",
            "score": 1
          },
          {
            "id": 6710,
            "name": "pink",
            "score": 0.94833088
          },
          {
            "id": 6711,
            "name": "dessert",
            "score": 0.8734581815625
          },
          {
            "id": 6712,
            "name": "sundae",
            "score": 0.83662441
          },
          {
            "id": 6713,
            "name": "cake",
            "score": 0.81707324125
          },
          {
            "id": 6714,
            "name": "ice cream",
            "score": 0.795536875
          },
          {
            "id": 6715,
            "name": "product",
            "score": 0.74546303
          },
          {
            "id": 6716,
            "name": "skin",
            "score": 0.7429439149999999
          }
        ],
        "warningMessage": null
      }
    ],
    "currentPage": 1,
    "maxPages": 41
  }
}
/cv_backend/api/video_upload
Upload a video to be processed (i.e., create a VideoUpload entity)POST (form)OAuth2

The request body should be in the form-data format and should include a form parameter named "file" whose value is the Multi-Part File (i.e. the video file):

Form ParamForm Value
fileVideo file

 

 

The VideoUpload entity corresponding to the upload. Sample response:

{
  "error": null,
  "responseBody": {
    "id": 1177,
    "percentage": 0,
    "currentStatus": "UNDER_ANALYSIS",
    "finalUrl": "",
    "message": "uploading",
    "thumbnail": null,
    "name": "1.mp4",
    "createdDate": "2017-01-07 15:46:46",
    "totalTime": null,
    "labels": null,
    "warningMessage": null
  }
}
/cv_backend/api/video_upload/{id}
Check the status of a VideoUploadGETOAuth2

The following must be passed in as URL path parameters:

URL ParamURL Value
idVideoUpload id

The VideoUpload entity with up-to-date status information. Sample response:

{
  "error": null,
  "responseBody": {
    "id": 1177,
    "percentage": 100,
    "currentStatus": "UNDER_ANALYSIS",
    "finalUrl": "",
    "message": "uploading",
    "thumbnail": "http://s3.amazonaws.com/brohan/brunno/c6512a93-35da-4db6-8043-bd7fa2b3cc79/scene_0/clean_thumbnail.jpg",
    "name": "1.mp4",
    "createdDate": "2017-01-07 15:46:46",
    "totalTime": 12.166666666666666,
    "labels": null,
    "filters": [],
    "warningMessage": null
  }
}
/cv_backend/api/video_upload/{id}
Delete the VideoUpload and all the assets associated with itDELETEOAuth2

The following must be passed in as URL path parameters:

URL ParamURL Value
idVideoUpload Id
HTTP Status 200
/cv_backend/api/video_upload/{id}/video
Get a list of all the Scenes in a VideoGETOAuth2

The following parameters must be passed on the path of the URL:

URL ParamURL Value
idVideoUpload Id
A ResponseWrapper with a list of Scenes inside a Video

 

{
  "error": null,
  "responseBody": {
    "username": "brunno",
    "videoId": "910",
    "videoUrl": "http://s3.amazonaws.com/brohan/brunno/b25f8fb9-fbf0-17a66e938475/video_analysis_pending.mp4",
    "totalTime": 9.6,
    "percentage": 100,
    "videoName": "video_high_shadow.mp4",
    "status": "EMBEDDING",
    "sceneUrls": [
      {
        "id": 4655,
        "url": "http://s3.amazonaws.com/brohan/brunno/b25f8fb9-fbf0-17a66e938475/scene_0/clean.jpg",
        "scene": {
          "initFrame": 0,
          "surfacesList": [
            {
              "id": 37473,
              "x": 297,
              "y": 720,
              "w": 844,
              "h": 342,
              "p1": null,
              "p2": null,
              "p3": null,
              "p4": null,
              "area": 52731
            }
          ],
          "label": [
            {
              "id": 10686,
              "name": "structure",
              "score": 0.94043523
            },
            {
              "id": 10687,
              "name": "sport venue",
              "score": 0.8187629
            },
            {
              "id": 10688,
              "name": "stadium",
              "score": 0.78140283
            },
            {
              "id": 10689,
              "name": "soccer specific stadium",
              "score": 0.7331199
            },
            {
              "id": 10690,
              "name": "games",
              "score": 0.70350242
            }
          ],
          "motion": false,
          "length": 240,
          "dbId": 4655,
          "imageLocation": "",
          "preview": false,
          "totalTime": 9.6,
          "motionValue": null,
          "initTime": 0,
          "confidenceScore": 11,
          "eligible": true,
          "file": "logo.png",
          "warp": false,
          "blend": true,
          "shadow": true,
          "facebookSafe": false
        }
      }
    ],
    "scores": [
      {
        "frame": 240,
        "score": 0,
        "time": 9.6
      }
    ],
    "labels": [
      {
        "id": 10676,
        "name": "hobbies & interest",
        "score": 1
      },
      {
        "id": 10677,
        "name": "structure",
        "score": 0.94043523
      },
      {
        "id": 10678,
        "name": "sport venue",
        "score": 0.8187629
      }
    ]
  }
}
/cv_backend/api/video_upload/{id}/video/scene/{sceneId}/surface
Get a list of Surfaces from a given SceneGETOAuth2

The following parameters must be passed on the path of the URL:

URL ParamURL Value
idVideoUpload Id
sceneIddbId of the Scene

Returns a ResponseWrapper with the list of Surfaces of the queried Scene. Example:

{
  "error": null,
  "responseBody": {
    "username": "brunno",
    "videoId": "910",
    "videoUrl": "http://s3.amazonaws.com/brohan/brunno/b25f8fb9-9508-17a66e938475/video_analysis_pending.mp4",
    "surfacesUrl": [
      {
        "id": 37473,
        "url": "http://s3.amazonaws.com/brohan/brunno/b25f8fb9-9508-17a66e938475/scene_0/surface0.jpg",
        "surface": {
          "id": 37473,
          "x": 297,
          "y": 720,
          "w": 844,
          "h": 342,
          "p1": null,
          "p2": null,
          "p3": null,
          "p4": null,
          "area": 52731
        }
      }
    ]
  }
}
Bind a logo to a given scene for later on doing the embedding

 POST

(form)

 OAuth2

The following parameters must be passed on the path of the URL:

URL ParamURL Value
videoUploadIdVideoUpload Id
sceneIdScene where the logo is to be associated

Returns the VideoUpload with the most recent update. Example:

{
  "error": null,
  "responseBody": {
    "id": 1177,
    "percentage": 100,
    "currentStatus": "UNDER_ANALYSIS",
    "finalUrl": "",
    "message": "uploading",
    "thumbnail": "http://s3.amazonaws.com/brohan/brunno/c6512a93-35da-4db6-8043-bd7fa2b3cc79/scene_0/clean_thumbnail.jpg",
    "name": "1.mp4",
    "createdDate": "2017-01-07 15:46:46",
    "totalTime": 12.166666666666666,
    "labels": null,
    "filters": [],
    "warningMessage": null
  }
}
cv_backend/api/video_upload/{videoUploadId}/video/custom
Generate the embedding with the logos that were binded to scenes POST OAuth2

The following parameters must be passed on the path of the URL:

URL ParamURL Value
videoUploadIdVideoUpload Id

A JSON with the information about the placement, such as the example below:

{"surfaceList":[{"sceneId":4655,"surface":{
"id":36380,"x":297.2903225806451,
"y":720.6883365200764,"w":844.3870967741935,"h":342.791586998088,
"p1":null,"p2":null,"p3":null,"p4":null,"area":52731},
"warp":false,"noShadow":false,"noBlend":false,
"facebookSafe":false}]}

These are the parameters:

ParametersDescription
sceneIdId of the scene where the logo has been binded
surface

Surface Entity:

ParameterValue
idid of the surface
xUpper left x coordinate of the surface rectangle
yUpper left y coordinate of the surface rectangle
hHeight of the rectangle
wWidth of the rectangle
p1,p2,p3,p4Points for custom surfaces
areaArea of the surface
warpAllow the algorithm to perform automatic warp (aka fitting the art into a skewed surface)
noShadowIf enabled, disables illumination changes on the logo
noBlendIf enabled, don't remove the white border on jpg logos
facebookSafeIf enabled, your logo placement will follow Facebook safe guidelines

Returns the VideoUpload with the most recent update. Example:

 

{
  "error": null,
  "responseBody": {
    "id": 1177,
    "percentage": 25,
    "currentStatus": "EMBEDDING",
    "finalUrl": "",
    "message": "uploading",
    "thumbnail": "http://s3.amazonaws.com/brohan/brunno/c6512a93-35da-4db6-8043-bd7fa2b3cc79/scene_0/clean_thumbnail.jpg",
    "name": "1.mp4",
    "createdDate": "2017-01-07 15:46:46",
    "totalTime": 12.166666666666666,
    "labels": null,
    "filters": [],
    "warningMessage": null
  }
}
cv_backend/api/video_upload/{videoUploadId}/midroll
 Binds an interstitial to a scene break

 POST (form)

 OAuth2

 The following parameters must be passed on the path of the URL:

URL paramURL Value
videoUploadIdVideoUpload id

The following parameters must be passed in the Form Data:

Form ParamForm Value

midroll

Interstitial/Midroll video

 

 

 Returns the VideoUpload with the most recent update. Example:

{
  "error": null,
  "responseBody": {
    "id": 1177,
    "percentage": 100,
    "currentStatus": "UNDER_ANALYSIS",
    "finalUrl": "",
    "message": "uploading",
    "thumbnail": "http://s3.amazonaws.com/brohan/brunno/c6512a93-35da-4db6-8043-bd7fa2b3cc79/scene_0/clean_thumbnail.jpg",
    "name": "1.mp4",
    "createdDate": "2017-01-07 15:46:46",
    "totalTime": 12.166666666666666,
    "labels": null,
    "filters": [],
    "warningMessage": null
  }
}
cv_backend/api/video_upload/{videoUploadId}/midroll/generate
 Generate the final video with the interstitial inserted in itPOSTOAuth2

 The following parameters must be passed on the path of the URL:

URL ParamURL Value
videoUploadIdVideoUpload Id

 

The following JSON must be passed with the frame to insert the interstitial:

{"frame":124}
ParameterValue
frameFrame in which to insert interstitial

 

 

Returns the VideoUpload with the most recent update. Example:

 

{
  "error": null,
  "responseBody": {
    "id": 1177,
    "percentage": 25,
    "currentStatus": "EMBEDDING",
    "finalUrl": "",
    "message": "uploading",
    "thumbnail": "http://s3.amazonaws.com/brohan/brunno/c6512a93-35da-4db6-8043-bd7fa2b3cc79/scene_0/clean_thumbnail.jpg",
    "name": "1.mp4",
    "createdDate": "2017-01-07 15:46:46",
    "totalTime": 12.166666666666666,
    "labels": null,
    "filters": [],
    "warningMessage": null
  }
}
cv_backend/api/video_upload/{id}/video/scene/{sceneId}/surface/{surfaceId}/generate
Place a Logo in a specific Surface

POST

(form)

OAuth2

The following parameters must be passed on the path of the URL:

URL paramURL Value
idVideoUpload id
sceneIddbId of the selected scene
surfaceIdid of the selected surface

 

The following parameters must be passed in the Form Data:

Form ParamForm Value
artArt file
blendBoolean value to define if art will be blended or not. Default is true.

Returns the VideoUpload with the most recent update. Example:

{
  "error": null,
  "responseBody": {
    "id": 44,
    "percentage": 0,
    "currentStatus": "EMBEDDING",
    "finalUrl": null,
    "message": "embedding"
  }
}
cv_backend/api/video_upload/{id}/video/generate
Place a Logo in a customized Scene and Surface. This API call allows users to pick the time and coordinates they would like their Logo to be placed

POST

(form)

OAuth2

The following parameters must be passed on the path of the URL:

 

URL paramURL Value
idVideoUpload id

The following parameters must be passed in the Form Data:

Form ParamForm Value
artArt file
surfaceSurface json Representation
sceneScene json Representation
blendBoolean value to define if art will be blended or not. Default is true.

Returns the VideoUpload with the most recent update. Example:

{
  "id": 29,
  "percentage": 0,
  "currentStatus": "EMBEDDING",
  "finalUrl": null
}

 















  • No labels