Documented a few endpoints
This commit is contained in:
parent
0c7b982ac8
commit
2be0fc90c0
1 changed files with 210 additions and 1 deletions
|
@ -26,9 +26,113 @@
|
||||||
{
|
{
|
||||||
"name": "Playlists",
|
"name": "Playlists",
|
||||||
"description": "Managing playlists"
|
"description": "Managing playlists"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Other"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
|
"/version": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["Other"],
|
||||||
|
"summary": "Returns which API version this server implements",
|
||||||
|
"operationId": "getVersion",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Version"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/initial_setup": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["Other"],
|
||||||
|
"summary": "Returns the current state of the initial setup flow",
|
||||||
|
"operationId": "getInitialSetup",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/InitialSetup"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/trigger_index": {
|
||||||
|
"post": {
|
||||||
|
"tags": ["Other"],
|
||||||
|
"summary": "Begins or queues a crawl of the music collection",
|
||||||
|
"operationId": "postTriggerIndex",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"admin_http_header": [],
|
||||||
|
"admin_cookie": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/settings": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["Settings"],
|
||||||
|
"summary": "Reads the existing server configuration",
|
||||||
|
"operationId": "getSettings",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#components/schemas/Config"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"admin_http_header": [],
|
||||||
|
"admin_cookie": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"tags": ["Settings"],
|
||||||
|
"summary": "Overwrites the server configuration",
|
||||||
|
"operationId": "getSettings",
|
||||||
|
"requestBody": {
|
||||||
|
"required": true,
|
||||||
|
"content": { "application/json": { "schema": { "$ref": "#components/schemas/Config" } } }
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"admin_http_header": [],
|
||||||
|
"admin_cookie": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/pet": {
|
"/pet": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
|
@ -820,6 +924,94 @@
|
||||||
},
|
},
|
||||||
"components": {
|
"components": {
|
||||||
"schemas": {
|
"schemas": {
|
||||||
|
"Version": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"major": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"minor": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"InitialSetup": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"has_any_users": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Config": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"album_art_pattern": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"reindex_every_n_seconds": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"mount_dirs": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/MountPoint"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"prefix_url": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"users": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ConfigUser"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ydns": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"host": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ConfigUser": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Always blank when this field appear in a server response"
|
||||||
|
},
|
||||||
|
"admin": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"MountPoint": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"source": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
"Order": {
|
"Order": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -1023,9 +1215,26 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"securitySchemes": {
|
"securitySchemes": {
|
||||||
"basicAuth": {
|
"auth_http_header": {
|
||||||
"type": "http",
|
"type": "http",
|
||||||
"scheme": "basic"
|
"scheme": "basic"
|
||||||
|
},
|
||||||
|
"auth_cookie": {
|
||||||
|
"type": "apikey",
|
||||||
|
"in": "cookie",
|
||||||
|
"name": "session",
|
||||||
|
"description": "A session token obtained returned as a server cookie by making a request via the auth_http_header scheme."
|
||||||
|
},
|
||||||
|
"admin_http_header": {
|
||||||
|
"type": "http",
|
||||||
|
"scheme": "basic",
|
||||||
|
"description": "Identical to the auth_http_header scheme but only for users recognized as admin by the Polaris server"
|
||||||
|
},
|
||||||
|
"admin_cookie": {
|
||||||
|
"type": "apikey",
|
||||||
|
"in": "cookie",
|
||||||
|
"name": "session",
|
||||||
|
"description": "Identical to the auth_cookie scheme but only for users recognized as admin by the Polaris server"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"links": {},
|
"links": {},
|
||||||
|
|
Loading…
Add table
Reference in a new issue