Versions Compared

Key

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

...

  • Method: GET

  • API endpoint: /videos/search

  • Permission: All users

  • Query Params:

Field name

Data type

Mandatory

Description

categoryIds

string

N

Filter by categories Id, separated by commas,

for example: 659284cca8c15372adfd1d1c, 659286005f2915686fcb02b4

tags

string

N

Filter by tags key, separated by commas

for example: trending, featured

channelId

string

N

Filter by channel

performerIds

 

 

Filter by performers Id, separated by commas,

for example: 659284cca8c15372adfd1d1c, 659286005f2915686fcb02b4

2. Get video details

  • Method: GET

  • API endpoint: /videos/:id/view

  • Permission: All users

  • Param:

Field name

Data type

Mandatory

Description

id

string

Y

Id of the video

III. Admin API

1. Import by csv

  • Method: POST

  • API endpoint /admin/videos/main/import-video-via-csv

  • Header

    Code Block
    {
      Authorization: accessToken
    }
  • Body

Field name

Data type

Mandatory

Description

csv

File

Y

File binary data from multipart/form-data form

source

string

Y

Video source

  • Response success sample

    Code Block
    {
        "status": 0,
        "data": {
            "success": true
        }
    }

...

  • Method: POST

  • API endpoint /admin/videos/main/sign-upload-url

  • Header

    Code Block
    {
      Authorization: accessToken
    }
  • Body

Field name

Data type

Mandatory

Description

filename

string

N

Name of the file

2.2 Upload file via upload URL (Check file service document)

...

  • Method: GET

  • API endpoint /admin/videos/files/:fileId/info

  • Params

Field name

Data type

Mandatory

Description

fileId

string

Y

Id of the file

  • Header

    Code Block
    {
      Authorization: accessToken
    }

     

...

  • Method: GET

  • API endpoint: /admin/videos

  • Header

    Code Block
    {
      Authorization: accessToken
    }
  • Query Params:

Field name

Data type

Mandatory

Description

status

string

N

Filter by status of the video

categoryIds

string

N

Filter by categories Id, separated by commas,

for example: 659284cca8c15372adfd1d1c, 659286005f2915686fcb02b4

tags

string

N

Filter by tags key, separated by commas

for example: trending, featured

channelId

string

N

Filter by channel

performerIds

 

 

Filter by performers Id, separated by commas,

for example: 659284cca8c15372adfd1d1c, 659286005f2915686fcb02b4

4. Get video details

  • Method: GET

  • API endpoint: /admin/videos/:id

  • Header

    Code Block
    {
      Authorization: accessToken
    }
  • Param:

Field name

Data type

Mandatory

Description

id

string

Y

Id of the video

5. Create a video with file ID

  • Method: POST

  • API endpoint: /admin/videos

  • Header

    Code Block
    {
      Authorization: accessToken
    }
  • Body

Field name

Data type

Mandatory

Description

title

string

Y

Title of the video

description

string

Y

Description of the video

slug

string

N

Custom video Url

seoTitle

string

Y

SEO title

seoKeywords

string

Y

SEO keywords

seoDesc

string

Y

SEO description

status

string

N

enum: active, inactive

featured

boolean

N

Featured videos?

fileId

string

N

Video file ID, Required if video is uploaded as a file

isSale

boolean

N

Video for sale

price

number

N

Price of the video for sale

performerIds

string[]

N

Id the performer in the video

tags

string[]

N

tags of the video

channelId

string

N

indicates which channel the video belongs to

categoryIds

string[]

N

Categories of the video

6. Update a video

  • Method: PUT

  • API endpoint: /admin/videos/:id

  • Header

    Code Block
    {
      Authorization: accessToken
    }

     

  • Param:

Field name

Data type

Mandatory

Description

id

string

Y

Id of the video

  • Body

Field name

Data type

Mandatory

Description

title

string

Y

Title of the video

description

string

Y

Description of the video

slug

string

N

Custom video Url

seoTitle

string

Y

SEO title

seoKeywords

string

Y

SEO keywords

seoDesc

string

Y

SEO description

status

string

N

enum: active, inactive

featured

boolean

N

Featured videos?

fileId

string

N

Video file ID, Required if video is uploaded as a file

isSale

boolean

N

Video for sale

price

number

N

Price of the video for sale

performerIds

string[]

N

Id the performer in the video

tags

string[]

N

tags of the video

channelId

string

N

indicates which channel the video belongs to

categoryIds

string[]

N

Categories of the video

7. Delete a video

  • Method: DELETE

  • API endpoint: /admin/videos/:id

  • Header

    Code Block
    {
      Authorization: accessToken
    }

     

  • Param:

Field name

Data type

Mandatory

Description

id

string

Y

Id of the video