REST API for retrieving, consulting and storing channel data.
OpenAPI Version: 3.1.0
API Version: v1
Base URL: http://localhost:8080
Retrieve channels, videos, comments and captions
Pagination support
Sorting support
Filter channels by minimum number of videos
Filter videos by date
CRUD operations for channels, videos, comments and captions
Nested resources support:
Videos by channel
Comments by video
Captions by video
{
"id" : " 80" ,
"name" : " tv" ,
"description" : " random videos channel" ,
"createdTime" : " 2023-01-01T23:36:17.306Z" ,
"videos" : []
}
Field
Type
Required
id
string
❌
name
string
✅
description
string
❌
createdTime
string
✅
videos
array(Video)
✅
{
"id" : " 21856" ,
"name" : " Alien: Isolation live on iOS" ,
"description" : " HOW WILL YOU SURVIVE?" ,
"releaseTime" : " 2023-01-09T22:32:41.126Z" ,
"user" : {},
"comments" : [],
"captions" : []
}
Field
Type
Required
id
string
❌
name
string
✅
description
string
❌
releaseTime
string
✅
user
User
❌
comments
array(Comment)
❌
captions
array(Caption)
❌
Comment
{
"id" : " 3955" ,
"text" : " Funniest video I've ever seen" ,
"createdOn" : " 2023-01-03T23:45:40.196Z"
}
Field
Type
Required
id
string
❌
text
string
❌
createdOn
string
❌
{
"id" : " 1" ,
"link" : " /lazy-static/video-captions/file.vtt" ,
"language" : " Spanish"
}
Field
Type
Required
id
string
❌
link
string
❌
language
string
❌
{
"id" : 1 ,
"name" : " stux" ,
"user_link" : " https://peertube.tv/accounts/stux" ,
"picture_link" : " https://peertube.tv/lazy-static/avatar.png"
}
Field
Type
Required
id
integer
❌
name
string
❌
user_link
string
❌
picture_link
string
❌
Parameter
Type
Description
Default
page
integer
Page number
0
size
integer
Page size
100
minVideos
integer
Minimum number of videos
0
order
string
Sort by id, name or createdTime (- for descending order)
-
GET /videominer/channels?page=0&size=10&minVideos=5&order=-createdTime
GET /videominer/channels/{id}
Parameter
Type
Description
id
string
Channel identifier
POST /videominer/channels
{
"name" : " tv" ,
"description" : " random videos channel" ,
"createdTime" : " 2023-01-01T23:36:17.306Z" ,
"videos" : []
}
Status
Description
201
Channel successfully saved
500
Internal Server Error caused by incorrect body format
POST /videominer/channels/all
[
{
"name" : " science" ,
"createdTime" : " 2024-01-01T10:00:00.000Z" ,
"videos" : []
}
]
PUT /videominer/channels/{id}
DELETE /videominer/channels/{id}
Parameter
Type
page
integer
size
integer
findDate
string
year
integer
month
integer
day
integer
GET /videominer/videos?year=2023&month=1&day=9
GET /videominer/videos/{videoId}
Get all videos from a channel
GET /videominer/channels/{channelId}/videos
PUT /videominer/videos/{id}
DELETE /videominer/videos/{id}
Comment Endpoints
Get all comments
Parameter
Type
page
integer
size
integer
order
string
Get a comment
GET /videominer/comments/{commentId}
Get all comments from a video
GET /videominer/videos/{videoId}/comments
Update a comment
PUT /videominer/comments/{id}
Delete a comment
DELETE /videominer/comments/{id}
Parameter
Type
page
integer
size
integer
order
string
GET /videominer/captions/{captionId}
Get all captions from a video
GET /videominer/videos/{videoId}/captions
PUT /videominer/captions/{id}
DELETE /videominer/captions/{id}
Several endpoints support pagination and sorting.
Pagination Example
GET /videominer/channels?page=1&size=20
GET /videominer/channels?order=-createdTime
GET /videominer/channels?order=name
curl -X GET " http://localhost:8080/videominer/channels?page=0&size=5"
[
{
"id" : " 80" ,
"name" : " tv" ,
"description" : " random videos channel" ,
"createdTime" : " 2023-01-01T23:36:17.306Z" ,
"videos" : []
}
]
Code
Meaning
200
OK
201
Created
204
No Content
500
Internal Server Error
Java
Spring Boot
Maven
OpenAPI / Swagger