907 lines
22 KiB
JSON
907 lines
22 KiB
JSON
{
|
|
"/api/v1/theme/": {
|
|
"delete": {
|
|
"parameters": [
|
|
{
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/get_delete_ids_schema"
|
|
}
|
|
}
|
|
},
|
|
"in": "query",
|
|
"name": "q"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Themes bulk delete"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/422"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Bulk delete themes",
|
|
"tags": [
|
|
"Themes"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Gets a list of themes, use Rison or JSON query parameters for filtering, sorting, pagination and for selecting specific columns and metadata.",
|
|
"parameters": [
|
|
{
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/get_list_schema"
|
|
}
|
|
}
|
|
},
|
|
"in": "query",
|
|
"name": "q"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"count": {
|
|
"description": "The total record count on the backend",
|
|
"type": "number"
|
|
},
|
|
"description_columns": {
|
|
"properties": {
|
|
"column_name": {
|
|
"description": "The description for the column name. Will be translated by babel",
|
|
"example": "A Nice description for the column",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ids": {
|
|
"description": "A list of item ids, useful when you don't know the column id",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"label_columns": {
|
|
"properties": {
|
|
"column_name": {
|
|
"description": "The label for the column name. Will be translated by babel",
|
|
"example": "A Nice label for the column",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"list_columns": {
|
|
"description": "A list of columns",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"list_title": {
|
|
"description": "A title to render. Will be translated by babel",
|
|
"example": "List Items",
|
|
"type": "string"
|
|
},
|
|
"order_columns": {
|
|
"description": "A list of allowed columns to sort",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"result": {
|
|
"description": "The result from the get list query",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ThemeRestApi.get_list"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Items from Model"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/422"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Get a list of themes",
|
|
"tags": [
|
|
"Themes"
|
|
]
|
|
},
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ThemeRestApi.post"
|
|
}
|
|
}
|
|
},
|
|
"description": "Theme schema",
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "number"
|
|
},
|
|
"result": {
|
|
"$ref": "#/components/schemas/ThemeRestApi.post"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Theme created"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/422"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Create a theme",
|
|
"tags": [
|
|
"Themes"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/theme/_info": {
|
|
"get": {
|
|
"description": "Get metadata information about this API resource",
|
|
"parameters": [
|
|
{
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/get_info_schema"
|
|
}
|
|
}
|
|
},
|
|
"in": "query",
|
|
"name": "q"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"add_columns": {
|
|
"type": "object"
|
|
},
|
|
"edit_columns": {
|
|
"type": "object"
|
|
},
|
|
"filters": {
|
|
"properties": {
|
|
"column_name": {
|
|
"items": {
|
|
"properties": {
|
|
"name": {
|
|
"description": "The filter name. Will be translated by babel",
|
|
"type": "string"
|
|
},
|
|
"operator": {
|
|
"description": "The filter operation key to use on list filters",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"permissions": {
|
|
"description": "The user permissions for this API resource",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Item from Model"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/422"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Get metadata information about this API resource",
|
|
"tags": [
|
|
"Themes"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/theme/export/": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/get_export_ids_schema"
|
|
}
|
|
}
|
|
},
|
|
"in": "query",
|
|
"name": "q"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/zip": {
|
|
"schema": {
|
|
"format": "binary",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Theme export"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/422"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Download multiple themes as YAML files",
|
|
"tags": [
|
|
"Themes"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/theme/import/": {
|
|
"post": {
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"properties": {
|
|
"formData": {
|
|
"format": "binary",
|
|
"type": "string"
|
|
},
|
|
"overwrite": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Theme imported"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/422"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Import themes from a ZIP file",
|
|
"tags": [
|
|
"Themes"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/theme/related/{column_name}": {
|
|
"get": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "column_name",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/get_related_schema"
|
|
}
|
|
}
|
|
},
|
|
"in": "query",
|
|
"name": "q"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RelatedResponseSchema"
|
|
}
|
|
}
|
|
},
|
|
"description": "Related column data"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Get related fields data",
|
|
"tags": [
|
|
"Themes"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/theme/unset_system_dark": {
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"result": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "System dark theme cleared"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/403"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Clear the system dark theme",
|
|
"tags": [
|
|
"Themes"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/theme/unset_system_default": {
|
|
"delete": {
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"result": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "System default theme cleared"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/403"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Clear the system default theme",
|
|
"tags": [
|
|
"Themes"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/theme/{pk}": {
|
|
"delete": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "pk",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Theme deleted"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/403"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/422"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Delete a theme",
|
|
"tags": [
|
|
"Themes"
|
|
]
|
|
},
|
|
"get": {
|
|
"description": "Get an item model",
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "pk",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/get_item_schema"
|
|
}
|
|
}
|
|
},
|
|
"in": "query",
|
|
"name": "q"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"description_columns": {
|
|
"properties": {
|
|
"column_name": {
|
|
"description": "The description for the column name. Will be translated by babel",
|
|
"example": "A Nice description for the column",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"id": {
|
|
"description": "The item id",
|
|
"type": "string"
|
|
},
|
|
"label_columns": {
|
|
"properties": {
|
|
"column_name": {
|
|
"description": "The label for the column name. Will be translated by babel",
|
|
"example": "A Nice label for the column",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"result": {
|
|
"$ref": "#/components/schemas/ThemeRestApi.get"
|
|
},
|
|
"show_columns": {
|
|
"description": "A list of columns",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"show_title": {
|
|
"description": "A title to render. Will be translated by babel",
|
|
"example": "Show Item Details",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Item from Model"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/422"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Get a theme",
|
|
"tags": [
|
|
"Themes"
|
|
]
|
|
},
|
|
"put": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "pk",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ThemeRestApi.put"
|
|
}
|
|
}
|
|
},
|
|
"description": "Theme schema",
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "number"
|
|
},
|
|
"result": {
|
|
"$ref": "#/components/schemas/ThemeRestApi.put"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Theme updated"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/403"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/422"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Update a theme",
|
|
"tags": [
|
|
"Themes"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/theme/{pk}/set_system_dark": {
|
|
"put": {
|
|
"parameters": [
|
|
{
|
|
"description": "The theme id",
|
|
"in": "path",
|
|
"name": "pk",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"result": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Theme successfully set as system dark"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/403"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/422"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Set a theme as the system dark theme",
|
|
"tags": [
|
|
"Themes"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/theme/{pk}/set_system_default": {
|
|
"put": {
|
|
"parameters": [
|
|
{
|
|
"description": "The theme id",
|
|
"in": "path",
|
|
"name": "pk",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"result": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "Theme successfully set as system default"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/403"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/404"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/422"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/500"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"jwt": []
|
|
}
|
|
],
|
|
"summary": "Set a theme as the system default theme",
|
|
"tags": [
|
|
"Themes"
|
|
]
|
|
}
|
|
}
|
|
}\n |