v1.0.0
Base URLs: live.a60.one:88/api
Docs URL: Docs
POST /auth/token
Body 请求参数
grant_type: string
username: string
password: string
scope: string
client_id: string
client_secret: string
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
body | body | object | 否 | none |
» grant_type | body | string | 否 | none |
» username | body | string | 是 | none |
» password | body | string | 是 | none |
» scope | body | string | 否 | none |
» client_id | body | string | 否 | none |
» client_secret | body | string | 否 | none |
返回示例
200 Response
{
"access_token": "string",
"token_type": "string"
}
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | Successful Response | Token |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
POST /users/create
Body 请求参数
{
"username": "string",
"email": "[email protected]",
"full_name": "string",
"password": "string"
}
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
body | body | UserCreate | 否 | UserCreate | none |
返回示例
200 Response
{
"username": "string",
"email": "string",
"full_name": "string",
"permission_level": 0
}
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | Successful Response | User |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
GET /users/me
返回示例
200 Response
{
"username": "string",
"email": "string",
"full_name": "string",
"permission_level": 0
}
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | Successful Response | User |
POST /live/create_token
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
stream | query | string | 是 | none | |
level | query | integer | 否 | none |
返回示例
200 Response
{
"username": "string",
"stream": "string",
"token": "string",
"play_token": "string",
"permissions_level": 0
}
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | Successful Response | LiveToken |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
DELETE /live/destroy_token
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
token | query | string | 是 | none |
返回示例
200 Response
"string"
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | Successful Response | string |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
GET /live/list_tokens
返回示例
200 Response
[
{
"username": "string",
"stream": "string",
"token": "string",
"play_token": "string",
"permissions_level": 0
}
]
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | Successful Response | Inline |
状态码 200
Response List Live Tokens Live List Tokens Get
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
Response List Live Tokens Live List Tokens Get | [LiveToken] | false | none | Response List Live Tokens Live List Tokens Get | none |
» LiveToken | LiveToken | false | none | LiveToken | none |
»» username | string | true | none | Username | none |
»» stream | string | true | none | Stream | none |
»» token | string | true | none | Token | none |
»» play_token | string | true | none | Play Token | none |
»» permissions_level | integer | true | none | Permissions Level | none |
POST /callback/on_publish
Body 请求参数
{
"server_id": "string",
"action": "string",
"client_id": "string",
"ip": "string",
"vhost": "string",
"app": "string",
"tcUrl": "string",
"stream": "string",
"param": "string",
"stream_url": "string",
"stream_id": "string"
}
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
body | body | LiveStreamCallback | 否 | LiveStreamCallback | none |
返回示例
200 Response
"string"
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | Successful Response | string |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
POST /callback/on_play
Body 请求参数
{
"server_id": "string",
"action": "string",
"client_id": "string",
"ip": "string",
"vhost": "string",
"app": "string",
"tcUrl": "string",
"stream": "string",
"param": "string",
"stream_url": "string",
"stream_id": "string"
}
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
body | body | LiveStreamCallback | 否 | LiveStreamCallback | none |
返回示例
200 Response
"string"
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | Successful Response | string |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
POST /callback/on_dvr
Body 请求参数
{
"action": "string",
"client_id": "string",
"ip": "string",
"vhost": "string",
"app": "string",
"stream": "string",
"param": "string",
"cwd": "string",
"file": "string",
"server_id": "string",
"stream_url": "string",
"stream_id": "string"
}
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
body | body | DvrCallback | 否 | DvrCallback | none |
返回示例
200 Response
"string"
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | Successful Response | string |
422 | Unprocessable Entity | Validation Error | HTTPValidationError |
GET /streams/list
返回示例
200 Response
{
"code": 0,
"streams": [
{
"name": "string",
"play_url": "string",
"kbps": {},
"video": {
"codec": "string",
"profile": "string",
"level": "string",
"width": 0,
"height": 0
},
"audio": {
"codec": "string",
"sample_rate": 0,
"channel": 0,
"profile": "string"
},
"clients": 0
}
]
}
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | Successful Response | LiveStreamResponse |
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
ValidationError
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
loc | [anyOf] | true | none | Location | none |
anyOf
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» anonymous | string | false | none | none |
or
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» anonymous | integer | false | none | none |
continued
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
msg | string | true | none | Message | none |
type | string | true | none | Error Type | none |
{
"username": "string",
"email": "[email protected]",
"full_name": "string",
"password": "string"
}
UserCreate
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
username | string | true | none | Username | none |
string(email) | true | none | none | ||
full_name | string | true | none | Full Name | none |
password | string | true | none | Password | none |
{
"username": "string",
"email": "string",
"full_name": "string",
"permission_level": 0
}
User
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
username | string | true | none | Username | none |
string | false | none | none | ||
full_name | string | false | none | Full Name | none |
permission_level | integer | true | none | Permission Level | none |
{
"access_token": "string",
"token_type": "string"
}
Token
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
access_token | string | true | none | Access Token | none |
token_type | string | true | none | Token Type | none |
{
"codec": "string",
"profile": "string",
"level": "string",
"width": 0,
"height": 0
}
StreamVideo
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
codec | string | true | none | Codec | none |
profile | string | true | none | Profile | none |
level | string | true | none | Level | none |
width | integer | true | none | Width | none |
height | integer | true | none | Height | none |
{
"codec": "string",
"sample_rate": 0,
"channel": 0,
"profile": "string"
}
StreamAudio
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
codec | string | true | none | Codec | none |
sample_rate | integer | true | none | Sample Rate | none |
channel | integer | true | none | Channel | none |
profile | string | true | none | Profile | none |
{
"name": "string",
"play_url": "string",
"kbps": {},
"video": {
"codec": "string",
"profile": "string",
"level": "string",
"width": 0,
"height": 0
},
"audio": {
"codec": "string",
"sample_rate": 0,
"channel": 0,
"profile": "string"
},
"clients": 0
}
ResponseStream
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
name | string | true | none | Name | none |
play_url | string | true | none | Play Url | none |
kbps | object | true | none | Kbps | none |
video | StreamVideo | true | none | none | |
audio | StreamAudio | true | none | none | |
clients | integer | true | none | Clients | none |
{
"username": "string",
"stream": "string",
"token": "string",
"play_token": "string",
"permissions_level": 0
}
LiveToken
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
username | string | true | none | Username | none |
stream | string | true | none | Stream | none |
token | string | true | none | Token | none |
play_token | string | true | none | Play Token | none |
permissions_level | integer | true | none | Permissions Level | none |
{
"code": 0,
"streams": [
{
"name": "string",
"play_url": "string",
"kbps": {},
"video": {
"codec": "string",
"profile": "string",
"level": "string",
"width": 0,
"height": 0
},
"audio": {
"codec": "string",
"sample_rate": 0,
"channel": 0,
"profile": "string"
},
"clients": 0
}
]
}
LiveStreamResponse
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
code | integer | true | none | Code | none |
streams | [ResponseStream] | true | none | Streams | none |
{
"server_id": "string",
"action": "string",
"client_id": "string",
"ip": "string",
"vhost": "string",
"app": "string",
"tcUrl": "string",
"stream": "string",
"param": "string",
"stream_url": "string",
"stream_id": "string"
}
LiveStreamCallback
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
server_id | string | true | none | Server Id | none |
action | string | true | none | Action | none |
client_id | string | true | none | Client Id | none |
ip | string | true | none | Ip | none |
vhost | string | true | none | Vhost | none |
app | string | true | none | App | none |
tcUrl | string | true | none | Tcurl | none |
stream | string | true | none | Stream | none |
param | string | true | none | Param | none |
stream_url | string | true | none | Stream Url | none |
stream_id | string | true | none | Stream Id | none |
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
HTTPValidationError
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
detail | [ValidationError] | false | none | Detail | none |
{
"action": "string",
"client_id": "string",
"ip": "string",
"vhost": "string",
"app": "string",
"stream": "string",
"param": "string",
"cwd": "string",
"file": "string",
"server_id": "string",
"stream_url": "string",
"stream_id": "string"
}
DvrCallback
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
action | string | true | none | Action | none |
client_id | string | true | none | Client Id | none |
ip | string | true | none | Ip | none |
vhost | string | true | none | Vhost | none |
app | string | true | none | App | none |
stream | string | true | none | Stream | none |
param | string | true | none | Param | none |
cwd | string | true | none | Cwd | none |
file | string | true | none | File | none |
server_id | string | true | none | Server Id | none |
stream_url | string | true | none | Stream Url | none |
stream_id | string | true | none | Stream Id | none |
{
"grant_type": "string",
"username": "string",
"password": "string",
"scope": "",
"client_id": "string",
"client_secret": "string"
}
Body_login_for_access_token_auth_token_post
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
grant_type | string(string) | false | none | Grant Type | none |
username | string(string) | true | none | Username | none |
password | string(string) | true | none | Password | none |
scope | string(string) | false | none | Scope | none |
client_id | string(string) | false | none | Client Id | none |
client_secret | string(string) | false | none | Client Secret | none |