TAPe API technical description

Upload video

Search

Compare

Using API

In order to start working with the system you need a personal API-key. For tests, you can use the demo API-key=89898989898989898989898989898989. It allows you to work with already uploaded videos.

Working with video:

Method POST - Upload video

ULR https://api1.comexp.net/tape/v1/videos

Parameters:

API-KEY  - Api key

video(s) - path to the video file you wish to upload

Response:

List of video_id of the created video

Example using curl:

curl -X POST -H 'API-KEY: 89898989898989898989898989898989’ \

 -F 'video=@'clip.mp4' \

 -F 'video=@'clip.mp3' \

 -F 'video=@'clip.txt' \

https://api1.comexp.net/tape/v1/videos'

Response:

[

    {

        "video_id": "2rUSLOgAQiE",

        "title": "clip.mp4"

    },

    {

        "error": {

            "code": 2000,

            "message": "Invalid video container"

        }

    },

    {

        "error": {

            "code": 2000,

            "message": "Invalid video container"

        }

    }

]

Method GET - get video info

ULR https://api1.comexp.net/tape/v1/videos

Parameters:

API-KEY  - Api key

video_id(s) - List of Video IDs. If missing, then information about all user videos.

https://api1.comexp.net/tape/v1/videos?API-KEY=89898989898989898989898989898989

Response:

[

    {

        "video_id": "x0BCXA6dGCs",

        "title": "commercial1.mp4",

        "status": "ready" or “processing”,

        "duration": 673 or null if "status"=“processing”,

  "url": "https://api2.comexp.net/demo/storage/81R3k-EA2x5/81R3k-EA2x5.mp4" or null if "status"=“processing”,

    },

    {

        "video_id": "UiRXb9yjR5z",

        "title": "commercial2.mp4",

        "status": "ready",

        "duration": 713,

        "url": "https://api2.comexp.net/demo/storage/A09Q5HGkoKh/A09Q5HGkoKh.mp4"

    },

    {

        "video_id": "iVw5VzQvT4a",

        "title": "S24-40165-210613-191751.mp4",

        "status": "ready",

        "duration": 1802,

        "url": "https://api2.comexp.net/demo/storage/HSpcTEHwgox/HSpcTEHwgox.mp4"

    },

    {

        "video_id": "YTkgPKH7E6D",

        "title": "blm1.mp4",

        "status": "ready",

        "duration": 13,

        "url": "https://api2.comexp.net/demo/storage/9WYQweQgntO/9WYQweQgntO.mp4"

    }

]

Method DELETE - delete video by id

ULR https://api1.comexp.net/tape/v1/videos

Parameters:

API-KEY  - Api key

video_id(s) - List of Video IDs. Must not be empty..

curl -X DELETE -H "API-KEY: 89898989898989898989898989898989" ‘http://api1.comexp.net/tape/v1/videos?video_id=2rUSLOgAQiE'

[

    {

        "video_id": "2rUSLOgAQiE",

        "status": "removed"

    }

]

Search

Method GET- Execute search task

ULR https://api1.comexp.net/tape/v1/search

Parameters:

API-KEY  - Api key

video1_id - what will be searched

video2_id - for what will be searched for

https://api1.comexp.net/tape/v1/search?API-KEY=89898989898989898989898989898989&video1-id=iVw5VzQvT4a&video2-id=YTkgPKH7E6D

Response:

{

    "video1_id": "iVw5VzQvT4a",

    "video2_id": "YTkgPKH7E6D",

    "equals": [

        {

            "offset": 855.36

        }

    ]

}

Compare

Method GET- Execute search task

ULR https://api1.comexp.net/tape/v1/compare

Parameters:

API-KEY  - Api key

video1_id - what will be searched

video2_id - for what will be searched for

https://api1.comexp.net/tape/v1/compare?API-KEY=89898989898989898989898989898989&video1-id=x0BCXA6dGCs&video2-id=UiRXb9yjR5z

Response:

{

    "video1_id": "x0BCXA6dGCs",

    "video2_id": "UiRXb9yjR5z",

    "equals": [

        {

            "beg1": 121.2,

            "end1": 210.3,

            "beg2": 603.5,

            "end2": 692.6

        },

        {

            "beg1": 272.9,

            "end1": 333.0,

            "beg2": 384.9,

            "end2": 445.1

        },

        {

            "beg1": 409.8,

            "end1": 439.9,

            "beg2": 447.0,

            "end2": 476.5

        }

    ]

}