mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
392 lines
10 KiB
JSON
392 lines
10 KiB
JSON
{
|
|
"openapi": "3.1.0",
|
|
"info": { "title": "bknd API", "version": "0.0.0" },
|
|
"paths": {
|
|
"/api/system/ping": {
|
|
"get": {
|
|
"summary": "Ping",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Pong",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"pong": { "default": true, "type": "boolean" }
|
|
},
|
|
"required": ["pong"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["system"]
|
|
}
|
|
},
|
|
"/api/system/config": {
|
|
"get": {
|
|
"summary": "Get config",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Config",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"version": { "type": "number" },
|
|
"server": { "type": "object", "properties": {} },
|
|
"data": { "type": "object", "properties": {} },
|
|
"auth": { "type": "object", "properties": {} },
|
|
"flows": { "type": "object", "properties": {} },
|
|
"media": { "type": "object", "properties": {} }
|
|
},
|
|
"required": [
|
|
"version",
|
|
"server",
|
|
"data",
|
|
"auth",
|
|
"flows",
|
|
"media"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["system"]
|
|
}
|
|
},
|
|
"/api/system/schema": {
|
|
"get": {
|
|
"summary": "Get config",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Config",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"version": { "type": "number" },
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"server": { "type": "object", "properties": {} },
|
|
"data": { "type": "object", "properties": {} },
|
|
"auth": { "type": "object", "properties": {} },
|
|
"flows": { "type": "object", "properties": {} },
|
|
"media": { "type": "object", "properties": {} }
|
|
},
|
|
"required": ["server", "data", "auth", "flows", "media"]
|
|
}
|
|
},
|
|
"required": ["version", "schema"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["system"]
|
|
}
|
|
},
|
|
"/api/data/{entity}": {
|
|
"get": {
|
|
"summary": "List entities",
|
|
"parameters": [
|
|
{
|
|
"name": "entity",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": { "type": "string" }
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List of entities",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": { "id": { "type": "number" } },
|
|
"required": ["id"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["data"]
|
|
},
|
|
"post": {
|
|
"summary": "Create entity",
|
|
"parameters": [
|
|
{
|
|
"name": "entity",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": { "type": "string" }
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "type": "object", "properties": {} }
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Entity",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "id": { "type": "number" } },
|
|
"required": ["id"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["data"]
|
|
}
|
|
},
|
|
"/api/data/{entity}/{id}": {
|
|
"get": {
|
|
"summary": "Get entity",
|
|
"parameters": [
|
|
{
|
|
"name": "entity",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": { "type": "string" }
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": { "type": "number" }
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Entity",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "id": { "type": "number" } },
|
|
"required": ["id"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["data"]
|
|
},
|
|
"patch": {
|
|
"summary": "Update entity",
|
|
"parameters": [
|
|
{
|
|
"name": "entity",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": { "type": "string" }
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": { "type": "number" }
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": { "type": "object", "properties": {} }
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Entity",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": { "id": { "type": "number" } },
|
|
"required": ["id"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["data"]
|
|
},
|
|
"delete": {
|
|
"summary": "Delete entity",
|
|
"parameters": [
|
|
{
|
|
"name": "entity",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": { "type": "string" }
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": { "type": "number" }
|
|
}
|
|
],
|
|
"responses": { "200": { "description": "Entity deleted" } },
|
|
"tags": ["data"]
|
|
}
|
|
},
|
|
"/api/auth/password/login": {
|
|
"post": {
|
|
"summary": "Login",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string" },
|
|
"password": { "type": "string" }
|
|
},
|
|
"required": ["email", "password"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "User",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"user": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"email": { "type": "string" },
|
|
"name": { "type": "string" }
|
|
},
|
|
"required": ["id", "email", "name"]
|
|
}
|
|
},
|
|
"required": ["user"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["auth"]
|
|
}
|
|
},
|
|
"/api/auth/password/register": {
|
|
"post": {
|
|
"summary": "Register",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": { "type": "string" },
|
|
"password": { "type": "string" }
|
|
},
|
|
"required": ["email", "password"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "User",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"user": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"email": { "type": "string" },
|
|
"name": { "type": "string" }
|
|
},
|
|
"required": ["id", "email", "name"]
|
|
}
|
|
},
|
|
"required": ["user"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["auth"]
|
|
}
|
|
},
|
|
"/api/auth/me": {
|
|
"get": {
|
|
"summary": "Get me",
|
|
"responses": {
|
|
"200": {
|
|
"description": "User",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"user": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"email": { "type": "string" },
|
|
"name": { "type": "string" }
|
|
},
|
|
"required": ["id", "email", "name"]
|
|
}
|
|
},
|
|
"required": ["user"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["auth"]
|
|
}
|
|
},
|
|
"/api/auth/strategies": {
|
|
"get": {
|
|
"summary": "Get auth strategies",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Strategies",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"strategies": { "type": "object", "properties": {} }
|
|
},
|
|
"required": ["strategies"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": ["auth"]
|
|
}
|
|
}
|
|
}
|
|
}
|