Searching...

Usage

get /projects/{project_id}/delivery-usage

Get delivery usage

This endpoint enables you to retrieve the total amount of minutes delivered for a specific project based on its project_id .

interval string required

Set the period of time that you want to retrieve delivery usage for. month returns data for the past 30 days, while week returns data for the past 7 days.

Enum
  • month
  • week
project_id string required

The ID of the project you want to retrieve usage data for.

Responses

Successful response

Response body Headers
items array

This response does not contain any headers

Bad request

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

name string

The name of the parameter that caused the error.

detail string

Details about the error that happened.

total_problems int

The number of problems in your request.

constraint string

The limitation that your request did not meet.

This response does not contain any headers

Response examples

Successful response

{
  "items": [
    {
      "collected_on": "2024-08-09",
      "video_hls_duration_minutes": 10,
      "video_mp4_duration_minutes": 22,
      "live_stream_hls_duration_minutes": 422
    },
    {
      "collected_on": "2024-08-10",
      "video_hls_duration_minutes": 33,
      "video_mp4_duration_minutes": 245,
      "live_stream_hls_duration_minutes": 32
    }
  ]
}

Bad request

{
  "constraint": "required",
  "detail": "An attribute is invalid.",
  "name": "interval",
  "title": "Bad request.",
  "total_problems": 1,
  "type": "https://docs.api.video/reference/invalid-attribute"
}
get /projects/{project_id}/hosting-usage

Get hosting usage

This endpoint enables you to retrieve the cumulative amount of video minutes hosted in a specific project based on its project_id .

interval string required

Set the period of time that you want to retrieve hosting usage data for. month returns data for the past 30 days, while week returns data for the past 7 days.

Enum
  • month
  • week
project_id string required

The ID of the project you want to retrieve usage data for.

Responses

Successful response

Response body Headers
items array

This response does not contain any headers

Bad request

Response body Headers
type string

A link to the error documentation.

title string

A description of the error that occurred.

name string

The name of the parameter that caused the error.

detail string

Details about the error that happened.

total_problems int

The number of problems in your request.

constraint string

The limitation that your request did not meet.

This response does not contain any headers

Response examples

Successful response

{
  "items": [
    {
      "collected_on": "2024-08-09",
      "video_duration_minutes": 235
    },
    {
      "collected_on": "2024-08-10",
      "video_duration_minutes": 454
    }
  ]
}

Bad request

{
  "constraint": "required",
  "detail": "An attribute is invalid.",
  "name": "interval",
  "title": "Bad request.",
  "total_problems": 1,
  "type": "https://docs.api.video/reference/invalid-attribute"
}