Submitter API Documentation

Summary

Submitter API is an API, where the Submitters can upload / manage their users videos in a easy and seamless maner.

Contact us

Submitter API endpoint

The base endpoint for all the requests regarding the Submitter API

Authentication

The authentication method used is OAuth2.0.

This will generate a new access token valid for 2hours.

The {current_user_name} and {current_user_password} refers to the username and password of the Glymt account of the videos owner

The {client_id} and {client_secret} refers to the client id and client secret provided by Glymt to the Submitter, you can verify this information on your Glymt account page

Endpoint
POST/auth/login
POST /auth/login
{
  "grant_type": "password", 
  "username": {current_user_name}, 
  "password": {current_user_password}, 
  "client_id": {your_client_id}, 
  "client_secret": {your_client_secret}
}
Response
{
  "status": 200,
  "token": {access_token},
  "access_token": {access_token},
  "expiration_date": 5485
}

Users

Endpoints
GET/users/get_current_unpaid_earnings
GET/users/get_sales
Get unpaid earnings

This will retrieve the current user unpaid earnings

ResponseGET /get_current_unpaid_earnings
{
  "status": 200,
  "current_unpaid_earnings": 120.0
}
Get sales

This will retrieve a list of the current user sales

GET /users/get_sales
{
    "start_date": "2022-06-06",
    "end_date": "2022-06-30"
}
Response
{
  "status": 200,
  "sales": [
  {
    "video_id": {video_id},
    "video_cost": 29.99,
    "created_at": "2022-06-06T14:39:19.000Z"
  },
  {
    "video_id": {video_id},
    "video_cost": 19.99,
    "created_at": "2022-06-08T21:23:47.000Z"
  },
  {
    "video_id": {video_id}>,
    "video_cost": 19.99,
    "created_at": "2022-06-20T13:16:49.000Z"
  }]
}

Videos

Endpoints
GET/videos
GET/videos/:submitter_video_id
POST/videos/create_batch
POST/videos
List Videos

This will retrieve all the current user submitted videos.

GET /videos
{
  "page": 1
}
Response
{
  "status": 200,
  "videos": [
  {
    "submitter_video_id": {submitter_video_id},
    "status": "published",
    "status_observation": null,
    "title": "Girl next to a waterfall",
    "created_at": "2022-06-18T15:09:56.843Z",
    "reviewed_at": "2022-06-18T18:05:56.843Z"
  },
  {
    "submitter_video_id": {submitter_video_id},
    "status": "published",
    "status_observation": null,
    "title": "Bautiful mountain landscape",
    "created_at": "2022-06-18T15:09:56.325Z",
    "reviewed_at": "2022-06-18T18:05:56.843Z"
  }]
}
Get video

This will retrieve a video data given its id.

ResponseGET /videos/:submitter_video_id
{
  "status": 200,
  "video": 
  {
    "submitter_video_id": {submitter_video_id},
    "status": "published",
    "status_observation": null,
    "title": "Girl next to a waterfall",
    "created_at": "2022-06-18T15:09:56.843Z",
    "reviewed_at": "2022-06-18T18:05:56.843Z"
  }
}
Create batch

This will created a batch, with the given folder and correspondent subfolders, and returns the batch folder name.

ResponsePOST /videos/create_batch
{
    "status": 200,
    "message": "Batch created batch successfully!",
    "batch": {batch_id}
}
Import batch

This will import all the videos from the given batch name.

POST /videos
{
  "batch": {batch_id}
}
Response
{
  "status": 200, "message": "Success"
}
DELETE Video

This will delete a video given the video submitter id.

DELETE /videos/:submitter_video_id
{
  "submitter_video_id": {submitter_video_id}
}
Response
{
  "status": 200, "message": "Success"
}

Releases

Endpoints
GET/releases
GET/releases/:submitter_release_id
POST/releases/create_batch
POST/releases
List Releases

This will retrieve all the current user submitted Releases.

GET /releases
{
  "page": 1
}
Response
{
  "status": 200,
  "releases": [{
    "id": {model_release_id},
    "name": {model_release_name},
    "result_file": {
        "url": "{model_release_file_url}"
    },
    "result_file_name": "{model_release_file_name}"
  },
  {
    "id": {model_release_id},
    "name": {model_release_name},
    "result_file": {
        "url": "{model_release_file_url}"
    },
    "result_file_name": "{model_release_file_name}"
  }]
}
Get release

This will retrieve a release data given its id.

ResponseGET /releases/:submitter_release_id
{
  "status": 200,
  "release": 
  {
    "id": {model_release_id},
    "name": {model_release_name},
    "result_file": {
        "url": "{model_release_file_url}"
    },
    "result_file_name": "{model_release_file_name}"
  }
}
Create batch

This will created a batch, with the given folder and correspondent subfolders, and returns the batch folder name.

ResponsePOST /releases/create_batch
{
    "status": 200,
    "message": "Batch created batch successfully!",
    "batch": {batch_id}
}
Import batch

This will import all the releases from the given batch name.

POST /releases
{
  "batch": {batch_id}
}
Response
{
  "status": 200, "message": "Success"
}
DELETE Release

This will delete a video given the Release id.

DELETE /videos/:release_id
{
  "submitter_video_id": {release_id}
}
Response
{
  "status": 200, "message": "Success"
}