mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
API: Add playlists endpoints to the swagger spec (#51918)
This commit is contained in:
parent
958e1b6ad0
commit
42f69a5e63
177
pkg/api/docs/definitions/playlists.go
Normal file
177
pkg/api/docs/definitions/playlists.go
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
package definitions
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/grafana/grafana/pkg/api/dtos"
|
||||||
|
"github.com/grafana/grafana/pkg/models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// swagger:route GET /playlists playlists searchPlaylists
|
||||||
|
//
|
||||||
|
// Get playlists.
|
||||||
|
//
|
||||||
|
// Responses:
|
||||||
|
// 200: searchPlaylistsResponse
|
||||||
|
// 500: internalServerError
|
||||||
|
|
||||||
|
// swagger:route GET /playlists/{uid} playlists getPlaylist
|
||||||
|
//
|
||||||
|
// Get playlist by UID.
|
||||||
|
//
|
||||||
|
// Responses:
|
||||||
|
// 200: getPlaylistResponse
|
||||||
|
// 401: unauthorisedError
|
||||||
|
// 403: forbiddenError
|
||||||
|
// 404: notFoundError
|
||||||
|
// 500: internalServerError
|
||||||
|
|
||||||
|
// swagger:route GET /playlists/{uid}/items playlists getPlaylistItems
|
||||||
|
//
|
||||||
|
// Get playlist items.
|
||||||
|
//
|
||||||
|
// Responses:
|
||||||
|
// 200: getPlaylistItemsResponse
|
||||||
|
// 401: unauthorisedError
|
||||||
|
// 403: forbiddenError
|
||||||
|
// 404: notFoundError
|
||||||
|
// 500: internalServerError
|
||||||
|
|
||||||
|
// swagger:route GET /playlists/{uid}/dashboards playlists getPlaylistDashboards
|
||||||
|
//
|
||||||
|
// Get playlist dashboards.
|
||||||
|
//
|
||||||
|
// Responses:
|
||||||
|
// 200: getPlaylistDashboardsResponse
|
||||||
|
// 401: unauthorisedError
|
||||||
|
// 403: forbiddenError
|
||||||
|
// 404: notFoundError
|
||||||
|
// 500: internalServerError
|
||||||
|
|
||||||
|
// swagger:route DELETE /playlists/{uid} playlists deletePlaylist
|
||||||
|
//
|
||||||
|
// Delete pllaylist.
|
||||||
|
//
|
||||||
|
// Responses:
|
||||||
|
// 200: okResponse
|
||||||
|
// 401: unauthorisedError
|
||||||
|
// 403: forbiddenError
|
||||||
|
// 404: notFoundError
|
||||||
|
// 500: internalServerError
|
||||||
|
|
||||||
|
// swagger:route PUT /playlists/{uid} playlists updatePlaylist
|
||||||
|
//
|
||||||
|
// Update playlist.
|
||||||
|
//
|
||||||
|
// Responses:
|
||||||
|
// 200: updatePlaylistResponse
|
||||||
|
// 401: unauthorisedError
|
||||||
|
// 403: forbiddenError
|
||||||
|
// 404: notFoundError
|
||||||
|
// 500: internalServerError
|
||||||
|
|
||||||
|
// swagger:route POST /playlists playlists createPlaylist
|
||||||
|
//
|
||||||
|
// Create playlist.
|
||||||
|
//
|
||||||
|
// Responses:
|
||||||
|
// 200: createPlaylistResponse
|
||||||
|
// 401: unauthorisedError
|
||||||
|
// 403: forbiddenError
|
||||||
|
// 404: notFoundError
|
||||||
|
// 500: internalServerError
|
||||||
|
|
||||||
|
// swagger:parameters searchPlaylists
|
||||||
|
type SearchPlaylistsParams struct {
|
||||||
|
// in:query
|
||||||
|
// required:false
|
||||||
|
Query string `json:"query"`
|
||||||
|
// in:limit
|
||||||
|
// required:false
|
||||||
|
Limit int `json:"limit"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// swagger:parameters getPlaylist
|
||||||
|
type GetPlaylistParams struct {
|
||||||
|
// in:path
|
||||||
|
// required:true
|
||||||
|
UID string `json:"uid"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// swagger:parameters getPlaylistItems
|
||||||
|
type GetPlaylistItemsParams struct {
|
||||||
|
// in:path
|
||||||
|
// required:true
|
||||||
|
UID string `json:"uid"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// swagger:parameters getPlaylistDashboards
|
||||||
|
type GetPlaylistDashboardsParams struct {
|
||||||
|
// in:path
|
||||||
|
// required:true
|
||||||
|
UID string `json:"uid"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// swagger:parameters deletePlaylist
|
||||||
|
type DeletePlaylistParams struct {
|
||||||
|
// in:path
|
||||||
|
// required:true
|
||||||
|
UID string `json:"uid"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// swagger:parameters updatePlaylist
|
||||||
|
type UpdatePlaylistParams struct {
|
||||||
|
// in:body
|
||||||
|
// required:true
|
||||||
|
Body models.UpdatePlaylistCommand
|
||||||
|
// in:path
|
||||||
|
// required:true
|
||||||
|
UID string `json:"uid"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// swagger:parameters createPlaylist
|
||||||
|
type CreatePlaylistParams struct {
|
||||||
|
// in:body
|
||||||
|
// required:true
|
||||||
|
Body models.CreatePlaylistCommand
|
||||||
|
}
|
||||||
|
|
||||||
|
// swagger:response searchPlaylistsResponse
|
||||||
|
type SearchPlaylistsResponse struct {
|
||||||
|
// The response message
|
||||||
|
// in: body
|
||||||
|
Body models.Playlists `json:"body"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// swagger:response getPlaylistResponse
|
||||||
|
type GetPlaylistResponse struct {
|
||||||
|
// The response message
|
||||||
|
// in: body
|
||||||
|
Body *models.PlaylistDTO `json:"body"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// swagger:response getPlaylistItemsResponse
|
||||||
|
type GetPlaylistItemsResponse struct {
|
||||||
|
// The response message
|
||||||
|
// in: body
|
||||||
|
Body []models.PlaylistItemDTO `json:"body"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// swagger:response getPlaylistDashboardsResponse
|
||||||
|
type GetPlaylistDashboardsResponse struct {
|
||||||
|
// The response message
|
||||||
|
// in: body
|
||||||
|
Body dtos.PlaylistDashboardsSlice `json:"body"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// swagger:response updatePlaylistResponse
|
||||||
|
type UpdatePlaylistResponseResponse struct {
|
||||||
|
// The response message
|
||||||
|
// in: body
|
||||||
|
Body *models.PlaylistDTO `json:"body"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// swagger:response createPlaylistResponse
|
||||||
|
type CreatePlaylistResponse struct {
|
||||||
|
// The response message
|
||||||
|
// in: body
|
||||||
|
Body *models.Playlist `json:"body"`
|
||||||
|
}
|
@ -5806,6 +5806,231 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/playlists": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["playlists"],
|
||||||
|
"summary": "Get playlists.",
|
||||||
|
"operationId": "searchPlaylists",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "query",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64",
|
||||||
|
"description": "in:limit",
|
||||||
|
"name": "limit",
|
||||||
|
"in": "query"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/responses/searchPlaylistsResponse"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/responses/internalServerError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"tags": ["playlists"],
|
||||||
|
"summary": "Create playlist.",
|
||||||
|
"operationId": "createPlaylist",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "Body",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/CreatePlaylistCommand"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/responses/createPlaylistResponse"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/responses/unauthorisedError"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"$ref": "#/responses/forbiddenError"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/responses/notFoundError"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/responses/internalServerError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/playlists/{uid}": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["playlists"],
|
||||||
|
"summary": "Get playlist by UID.",
|
||||||
|
"operationId": "getPlaylist",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "uid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/responses/getPlaylistResponse"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/responses/unauthorisedError"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"$ref": "#/responses/forbiddenError"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/responses/notFoundError"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/responses/internalServerError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"tags": ["playlists"],
|
||||||
|
"summary": "Update playlist.",
|
||||||
|
"operationId": "updatePlaylist",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "Body",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/UpdatePlaylistCommand"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "uid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/responses/updatePlaylistResponse"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/responses/unauthorisedError"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"$ref": "#/responses/forbiddenError"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/responses/notFoundError"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/responses/internalServerError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"tags": ["playlists"],
|
||||||
|
"summary": "Delete pllaylist.",
|
||||||
|
"operationId": "deletePlaylist",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "uid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/responses/okResponse"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/responses/unauthorisedError"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"$ref": "#/responses/forbiddenError"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/responses/notFoundError"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/responses/internalServerError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/playlists/{uid}/dashboards": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["playlists"],
|
||||||
|
"summary": "Get playlist dashboards.",
|
||||||
|
"operationId": "getPlaylistDashboards",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "uid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/responses/getPlaylistDashboardsResponse"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/responses/unauthorisedError"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"$ref": "#/responses/forbiddenError"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/responses/notFoundError"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/responses/internalServerError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/playlists/{uid}/items": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["playlists"],
|
||||||
|
"summary": "Get playlist items.",
|
||||||
|
"operationId": "getPlaylistItems",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "uid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/responses/getPlaylistItemsResponse"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/responses/unauthorisedError"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"$ref": "#/responses/forbiddenError"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/responses/notFoundError"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/responses/internalServerError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/query-history": {
|
"/query-history": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "Returns a list of queries in the query history that matches the search criteria.\nQuery history search supports pagination. Use the `limit` parameter to control the maximum number of queries returned; the default limit is 100.\nYou can also use the `page` query parameter to fetch queries from any page other than the first one.",
|
"description": "Returns a list of queries in the query history that matches the search criteria.\nQuery history search supports pagination. Use the `limit` parameter to control the maximum number of queries returned; the default limit is 100.\nYou can also use the `page` query parameter to fetch queries from any page other than the first one.",
|
||||||
@ -10040,6 +10265,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"CreatePlaylistCommand": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Result": {
|
||||||
|
"$ref": "#/definitions/Playlist"
|
||||||
|
},
|
||||||
|
"interval": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/PlaylistItemDTO"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"CreateQueryInQueryHistoryCommand": {
|
"CreateQueryInQueryHistoryCommand": {
|
||||||
"description": "CreateQueryInQueryHistoryCommand is the command for adding query history",
|
"description": "CreateQueryInQueryHistoryCommand is the command for adding query history",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -13001,6 +13246,112 @@
|
|||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int64"
|
"format": "int64"
|
||||||
},
|
},
|
||||||
|
"Playlist": {
|
||||||
|
"description": "Playlist model",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"interval": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"uid": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PlaylistDTO": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"interval": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/PlaylistItemDTO"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"uid": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PlaylistDashboard": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"order": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"slug": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"uri": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PlaylistDashboardsSlice": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/PlaylistDashboard"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PlaylistItemDTO": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"order": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"playlistid": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Playlists": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/Playlist"
|
||||||
|
}
|
||||||
|
},
|
||||||
"Point": {
|
"Point": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"title": "Point represents a single data point for a given timestamp.",
|
"title": "Point represents a single data point for a given timestamp.",
|
||||||
@ -15278,6 +15629,29 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"UpdatePlaylistCommand": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Result": {
|
||||||
|
"$ref": "#/definitions/PlaylistDTO"
|
||||||
|
},
|
||||||
|
"interval": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/PlaylistItemDTO"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"uid": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"UpdatePrefsCmd": {
|
"UpdatePrefsCmd": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -16325,6 +16699,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"createPlaylistResponse": {
|
||||||
|
"description": "",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/Playlist"
|
||||||
|
}
|
||||||
|
},
|
||||||
"createReportResponse": {
|
"createReportResponse": {
|
||||||
"description": "",
|
"description": "",
|
||||||
"schema": {
|
"schema": {
|
||||||
@ -16745,6 +17125,27 @@
|
|||||||
"$ref": "#/definitions/AddPermissionDTO"
|
"$ref": "#/definitions/AddPermissionDTO"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"getPlaylistDashboardsResponse": {
|
||||||
|
"description": "",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/PlaylistDashboardsSlice"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"getPlaylistItemsResponse": {
|
||||||
|
"description": "",
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/PlaylistItemDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"getPlaylistResponse": {
|
||||||
|
"description": "",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/PlaylistDTO"
|
||||||
|
}
|
||||||
|
},
|
||||||
"getPreferencesResponse": {
|
"getPreferencesResponse": {
|
||||||
"description": "",
|
"description": "",
|
||||||
"schema": {
|
"schema": {
|
||||||
@ -17098,6 +17499,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"searchPlaylistsResponse": {
|
||||||
|
"description": "",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/Playlists"
|
||||||
|
}
|
||||||
|
},
|
||||||
"searchResponse": {
|
"searchResponse": {
|
||||||
"description": "",
|
"description": "",
|
||||||
"schema": {
|
"schema": {
|
||||||
@ -17163,6 +17570,12 @@
|
|||||||
"$ref": "#/definitions/ErrorResponseBody"
|
"$ref": "#/definitions/ErrorResponseBody"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"updatePlaylistResponse": {
|
||||||
|
"description": "",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/PlaylistDTO"
|
||||||
|
}
|
||||||
|
},
|
||||||
"userResponse": {
|
"userResponse": {
|
||||||
"description": "",
|
"description": "",
|
||||||
"schema": {
|
"schema": {
|
||||||
|
@ -5806,6 +5806,231 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/playlists": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["playlists"],
|
||||||
|
"summary": "Get playlists.",
|
||||||
|
"operationId": "searchPlaylists",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "query",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64",
|
||||||
|
"description": "in:limit",
|
||||||
|
"name": "limit",
|
||||||
|
"in": "query"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/responses/searchPlaylistsResponse"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/responses/internalServerError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"tags": ["playlists"],
|
||||||
|
"summary": "Create playlist.",
|
||||||
|
"operationId": "createPlaylist",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "Body",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/CreatePlaylistCommand"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/responses/createPlaylistResponse"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/responses/unauthorisedError"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"$ref": "#/responses/forbiddenError"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/responses/notFoundError"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/responses/internalServerError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/playlists/{uid}": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["playlists"],
|
||||||
|
"summary": "Get playlist by UID.",
|
||||||
|
"operationId": "getPlaylist",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "uid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/responses/getPlaylistResponse"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/responses/unauthorisedError"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"$ref": "#/responses/forbiddenError"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/responses/notFoundError"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/responses/internalServerError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"tags": ["playlists"],
|
||||||
|
"summary": "Update playlist.",
|
||||||
|
"operationId": "updatePlaylist",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "Body",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/UpdatePlaylistCommand"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "uid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/responses/updatePlaylistResponse"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/responses/unauthorisedError"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"$ref": "#/responses/forbiddenError"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/responses/notFoundError"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/responses/internalServerError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"tags": ["playlists"],
|
||||||
|
"summary": "Delete pllaylist.",
|
||||||
|
"operationId": "deletePlaylist",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "uid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/responses/okResponse"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/responses/unauthorisedError"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"$ref": "#/responses/forbiddenError"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/responses/notFoundError"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/responses/internalServerError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/playlists/{uid}/dashboards": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["playlists"],
|
||||||
|
"summary": "Get playlist dashboards.",
|
||||||
|
"operationId": "getPlaylistDashboards",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "uid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/responses/getPlaylistDashboardsResponse"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/responses/unauthorisedError"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"$ref": "#/responses/forbiddenError"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/responses/notFoundError"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/responses/internalServerError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/playlists/{uid}/items": {
|
||||||
|
"get": {
|
||||||
|
"tags": ["playlists"],
|
||||||
|
"summary": "Get playlist items.",
|
||||||
|
"operationId": "getPlaylistItems",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"name": "uid",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/responses/getPlaylistItemsResponse"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"$ref": "#/responses/unauthorisedError"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"$ref": "#/responses/forbiddenError"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/responses/notFoundError"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"$ref": "#/responses/internalServerError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/query-history": {
|
"/query-history": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "Returns a list of queries in the query history that matches the search criteria.\nQuery history search supports pagination. Use the `limit` parameter to control the maximum number of queries returned; the default limit is 100.\nYou can also use the `page` query parameter to fetch queries from any page other than the first one.",
|
"description": "Returns a list of queries in the query history that matches the search criteria.\nQuery history search supports pagination. Use the `limit` parameter to control the maximum number of queries returned; the default limit is 100.\nYou can also use the `page` query parameter to fetch queries from any page other than the first one.",
|
||||||
@ -9170,6 +9395,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"CreatePlaylistCommand": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Result": {
|
||||||
|
"$ref": "#/definitions/Playlist"
|
||||||
|
},
|
||||||
|
"interval": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/PlaylistItemDTO"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"CreateQueryInQueryHistoryCommand": {
|
"CreateQueryInQueryHistoryCommand": {
|
||||||
"description": "CreateQueryInQueryHistoryCommand is the command for adding query history",
|
"description": "CreateQueryInQueryHistoryCommand is the command for adding query history",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -11066,6 +11311,112 @@
|
|||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int64"
|
"format": "int64"
|
||||||
},
|
},
|
||||||
|
"Playlist": {
|
||||||
|
"description": "Playlist model",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"interval": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"uid": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PlaylistDTO": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"interval": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/PlaylistItemDTO"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"uid": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PlaylistDashboard": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"order": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"slug": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"uri": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PlaylistDashboardsSlice": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/PlaylistDashboard"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PlaylistItemDTO": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"order": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"playlistid": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Playlists": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/Playlist"
|
||||||
|
}
|
||||||
|
},
|
||||||
"PostAnnotationsCmd": {
|
"PostAnnotationsCmd": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -12319,6 +12670,29 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"UpdatePlaylistCommand": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Result": {
|
||||||
|
"$ref": "#/definitions/PlaylistDTO"
|
||||||
|
},
|
||||||
|
"interval": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/PlaylistItemDTO"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"uid": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"UpdatePrefsCmd": {
|
"UpdatePrefsCmd": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -12784,6 +13158,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"createPlaylistResponse": {
|
||||||
|
"description": "",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/Playlist"
|
||||||
|
}
|
||||||
|
},
|
||||||
"createReportResponse": {
|
"createReportResponse": {
|
||||||
"description": "",
|
"description": "",
|
||||||
"schema": {
|
"schema": {
|
||||||
@ -13204,6 +13584,27 @@
|
|||||||
"$ref": "#/definitions/AddPermissionDTO"
|
"$ref": "#/definitions/AddPermissionDTO"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"getPlaylistDashboardsResponse": {
|
||||||
|
"description": "",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/PlaylistDashboardsSlice"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"getPlaylistItemsResponse": {
|
||||||
|
"description": "",
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/PlaylistItemDTO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"getPlaylistResponse": {
|
||||||
|
"description": "",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/PlaylistDTO"
|
||||||
|
}
|
||||||
|
},
|
||||||
"getPreferencesResponse": {
|
"getPreferencesResponse": {
|
||||||
"description": "",
|
"description": "",
|
||||||
"schema": {
|
"schema": {
|
||||||
@ -13557,6 +13958,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"searchPlaylistsResponse": {
|
||||||
|
"description": "",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/Playlists"
|
||||||
|
}
|
||||||
|
},
|
||||||
"searchResponse": {
|
"searchResponse": {
|
||||||
"description": "",
|
"description": "",
|
||||||
"schema": {
|
"schema": {
|
||||||
@ -13622,6 +14029,12 @@
|
|||||||
"$ref": "#/definitions/ErrorResponseBody"
|
"$ref": "#/definitions/ErrorResponseBody"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"updatePlaylistResponse": {
|
||||||
|
"description": "",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/PlaylistDTO"
|
||||||
|
}
|
||||||
|
},
|
||||||
"userResponse": {
|
"userResponse": {
|
||||||
"description": "",
|
"description": "",
|
||||||
"schema": {
|
"schema": {
|
||||||
|
Loading…
Reference in New Issue
Block a user