sqldb-ws/swagger/swagger.json

690 lines
23 KiB
JSON
Raw Normal View History

2021-10-29 23:37:32 +02:00
{
"swagger": "2.0",
"info": {
2023-08-23 21:38:49 +02:00
"title": "SqlDB WS API",
"description": "Generic database access API\n",
2021-10-29 23:37:32 +02:00
"version": "1.0.0",
2023-08-23 21:33:00 +02:00
"termsOfService": "https://www.irt-saintexupery.com/",
2021-10-29 23:37:32 +02:00
"contact": {
2023-08-23 21:33:00 +02:00
"email": "yves.cerezal@irt-saintexupery.com"
2021-10-29 23:37:32 +02:00
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"basePath": "/v1",
"paths": {
2024-01-04 15:14:59 +01:00
"/helper/create": {
"post": {
"tags": [
"helper"
],
"description": "Post raw header\n\u003cbr\u003e",
"operationId": "HelperController.CreateTable",
"parameters": [
{
"in": "body",
"name": "body",
"description": "body of jsonform data",
"schema": {
"$ref": "#/definitions/form"
}
}
],
"responses": {
"200": {
"description": "{string} success !"
},
"500": {
"description": "query error"
}
}
}
},
"/helper/header": {
"post": {
"tags": [
"helper"
],
"description": "Post raw header\n\u003cbr\u003e",
"operationId": "HelperController.ParseHeader",
"parameters": [
{
"in": "body",
"name": "body",
"description": "body of jsonform data",
"schema": {
"$ref": "#/definitions/form"
}
}
],
"responses": {
"200": {
"description": "{string} success !"
},
"500": {
"description": "query error"
}
}
}
},
"/helper/import/{table}": {
"post": {
"tags": [
"helper"
],
"description": "Post raw header\n\u003cbr\u003e",
"operationId": "HelperController.Import",
"parameters": [
{
"in": "body",
"name": "body",
"description": "body of jsonform data",
"schema": {
"$ref": "#/definitions/form"
}
}
],
"responses": {
"200": {
"description": "{string} success !"
},
"500": {
"description": "query error"
}
}
}
},
2021-10-29 23:37:32 +02:00
"/l/adduser": {
"post": {
"tags": [
"l"
],
2023-08-23 21:33:00 +02:00
"description": "Add user\n\u003cbr\u003e",
2021-10-29 23:37:32 +02:00
"operationId": "LoginController.AddUser",
"parameters": [
{
"in": "query",
"name": "username",
"description": "The username for register format",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "password",
"description": "The password for register",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": ""
},
"403": {
2023-08-23 21:38:49 +02:00
"description": "user already exist"
2021-10-29 23:37:32 +02:00
}
}
}
},
"/l/login": {
"post": {
"tags": [
"l"
],
2023-08-23 21:33:00 +02:00
"description": "User login\n\u003cbr\u003e",
2021-10-29 23:37:32 +02:00
"operationId": "LoginController.Login",
"parameters": [
{
"in": "body",
"name": "body",
"description": "Credentials",
"required": true,
"schema": {
"$ref": "#/definitions/Credential"
}
}
],
"responses": {
"200": {
"description": "{string} success !"
},
"402": {
"description": "user already connected"
},
"403": {
"description": "user does not exist"
}
}
}
},
"/l/logout": {
"post": {
"tags": [
"l"
],
2023-08-23 21:33:00 +02:00
"description": "Logs user\n\u003cbr\u003e",
2021-10-29 23:37:32 +02:00
"operationId": "LoginController.Logout",
"responses": {
"200": {
"description": ""
},
"403": {
2023-08-23 21:38:49 +02:00
"description": "user not exist"
2021-10-29 23:37:32 +02:00
}
}
}
},
"/s/": {
"get": {
"tags": [
"s"
],
2023-04-24 16:53:10 +02:00
"description": "Get database tables list\n\u003cbr\u003e",
"operationId": "SchemaController.GetTablesList",
2021-10-29 23:37:32 +02:00
"responses": {
"200": {
"description": "{string} success !"
},
2023-04-24 16:53:10 +02:00
"500": {
"description": "query error"
2021-10-29 23:37:32 +02:00
}
}
}
},
"/s/{table}": {
"get": {
"tags": [
"s"
],
2023-04-24 16:53:10 +02:00
"description": "Get table schema\n\u003cbr\u003e",
2021-10-29 23:37:32 +02:00
"operationId": "SchemaController.GetSchema",
"parameters": [
{
"in": "path",
"name": "table",
"description": "Name of the table",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "success !"
},
2023-04-24 16:53:10 +02:00
"204": {
2021-10-29 23:37:32 +02:00
"description": "no table"
}
}
}
},
"/t/{table}": {
"get": {
"tags": [
"t"
],
2023-08-23 21:33:00 +02:00
"description": "get all Datas\n\u003cbr\u003e",
2021-10-29 23:37:32 +02:00
"operationId": "TableController.GetAllTable",
"parameters": [
{
"in": "path",
"name": "table",
"description": "Name of the table",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{string} success !"
},
"403": {
"description": "no table"
}
}
},
2022-05-17 18:05:18 +02:00
"put": {
"tags": [
"t"
],
2023-08-23 21:33:00 +02:00
"description": "put data in table\n\u003cbr\u003e",
2022-05-17 18:05:18 +02:00
"operationId": "TableController.Put data in table",
"parameters": [
{
"in": "path",
"name": "table",
"description": "Name of the table",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "data",
"description": "body for data content (Json format)",
"required": true,
"schema": {
"$ref": "#/definitions/json"
}
}
],
"responses": {
"200": {
"description": "{string} success"
},
"403": {
"description": ":table put issue"
}
}
},
2022-04-20 15:25:05 +02:00
"post": {
"tags": [
"t"
],
2023-08-23 21:33:00 +02:00
"description": "get all Datas\n\u003cbr\u003e",
2022-04-20 15:25:05 +02:00
"operationId": "TableController.TablePost",
"parameters": [
{
"in": "path",
"name": "table",
"description": "Name of the table",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "TableQuery",
"required": true,
"schema": {
"$ref": "#/definitions/TableQuery"
}
}
],
"responses": {
"200": {
"description": "{string} success !"
},
"403": {
"description": "no table"
}
}
},
2021-10-29 23:37:32 +02:00
"delete": {
"tags": [
"t"
],
2023-08-23 21:33:00 +02:00
"description": "delete the data in table\n\u003cbr\u003e",
2021-10-29 23:37:32 +02:00
"operationId": "TableController.Delete",
"parameters": [
{
"in": "path",
"name": "table",
"description": "Name of the table",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "body for data content (Json format)",
"schema": {
"$ref": "#/definitions/true"
}
}
],
"responses": {
"200": {
"description": "{string} delete success!"
},
"403": {
"description": "delete issue"
}
}
}
},
"/t/{table}/{columns}": {
"get": {
"tags": [
"t"
],
2023-08-23 21:33:00 +02:00
"description": "get all Datas\n\u003cbr\u003e",
2021-10-29 23:37:32 +02:00
"operationId": "TableController.GetAllTableColumn",
"parameters": [
{
"in": "path",
"name": "table",
"description": "Name of the table",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "columns",
2023-08-23 21:38:49 +02:00
"description": "Name of the columns (separate with a comma)",
2021-10-29 23:37:32 +02:00
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{string} success !"
},
"403": {
"description": "no table"
}
}
}
},
"/t/{table}/{columns}/{restriction}": {
"get": {
"tags": [
"t"
],
2023-08-23 21:33:00 +02:00
"description": "get all Datas\n\u003cbr\u003e",
2021-10-29 23:37:32 +02:00
"operationId": "TableController.GetAllTableColumnRestriction",
"parameters": [
{
"in": "path",
"name": "table",
"description": "Name of the table",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "columns",
2023-08-23 21:38:49 +02:00
"description": "Name of the columns (separate with a comma)",
2021-10-29 23:37:32 +02:00
"required": true,
"type": "string"
},
{
"in": "path",
"name": "restriction",
"description": "SQL restriction",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{string} success !"
},
"403": {
"description": "no table"
}
}
}
},
"/t/{table}/{columns}/{restriction}/{sortkeys}": {
"get": {
"tags": [
"t"
],
2023-08-23 21:33:00 +02:00
"description": "get all Datas\n\u003cbr\u003e",
2021-10-29 23:37:32 +02:00
"operationId": "TableController.GetAllTableColumnRestrictionSortkeys",
"parameters": [
{
"in": "path",
"name": "table",
"description": "Name of the table",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "columns",
2023-08-23 21:38:49 +02:00
"description": "Name of the columns (separate with a comma)",
2021-10-29 23:37:32 +02:00
"required": true,
"type": "string"
},
{
"in": "path",
"name": "restriction",
"description": "SQL restriction",
"required": true,
"type": "string"
2023-04-28 16:53:14 +02:00
},
{
"in": "path",
"name": "sortkeys",
2023-08-23 21:38:49 +02:00
"description": "Order by: columns names (separate with a comma)",
2023-04-28 16:53:14 +02:00
"required": true,
"type": "string"
2021-10-29 23:37:32 +02:00
}
],
"responses": {
"200": {
"description": "{string} success !"
},
"403": {
"description": "no table"
}
}
}
},
"/t/{table}/{columns}/{restriction}/{sortkeys}/{dir}": {
"get": {
"tags": [
"t"
],
2023-08-23 21:33:00 +02:00
"description": "get all Datas\n\u003cbr\u003e",
2021-10-29 23:37:32 +02:00
"operationId": "TableController.GetAllTableColumnRestrictionSortkeysDir",
"parameters": [
{
"in": "path",
"name": "table",
"description": "Name of the table",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "columns",
2023-08-23 21:38:49 +02:00
"description": "Name of the columns (separate with a comma)",
2021-10-29 23:37:32 +02:00
"required": true,
"type": "string"
},
{
"in": "path",
"name": "restriction",
"description": "SQL restriction",
"required": true,
"type": "string"
2023-04-28 16:53:14 +02:00
},
{
"in": "path",
"name": "sortkeys",
2023-08-23 21:38:49 +02:00
"description": "Order by: columns names (separate with a comma)",
2023-04-28 16:53:14 +02:00
"required": true,
"type": "string"
},
{
"in": "path",
"name": "dir",
"description": "asc or desc",
"required": true,
"type": "string"
2021-10-29 23:37:32 +02:00
}
],
"responses": {
"200": {
"description": "{string} success !"
},
"403": {
"description": "no table"
}
}
}
2023-08-23 21:33:00 +02:00
},
2024-01-04 15:14:59 +01:00
"/ui/form/{fid}": {
2023-08-23 21:33:00 +02:00
"get": {
"tags": [
"ui"
],
"description": "create access form\n\u003cbr\u003e",
"operationId": "UiController.form",
"parameters": [
{
"in": "path",
"name": "fid",
"description": "The fid of the form",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "json form"
},
"403": {
"description": "body is empty"
}
}
}
},
2024-01-04 15:14:59 +01:00
"/ui/form/{fid}/{uid}": {
2023-08-23 21:33:00 +02:00
"get": {
"tags": [
"ui"
],
"description": "create access form\n\u003cbr\u003e",
"operationId": "UiController.form",
"parameters": [
{
"in": "path",
"name": "fid",
"description": "The fid of the form",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "uid",
"description": "The uid you want to edit",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "json form"
},
"403": {
"description": "body is empty"
}
}
2024-01-04 15:14:59 +01:00
},
2023-08-23 21:33:00 +02:00
"post": {
"tags": [
"ui"
],
"description": "insert access\n\u003cbr\u003e",
"operationId": "UiController.Access form data post",
"parameters": [
2024-01-04 15:14:59 +01:00
{
"in": "path",
"name": "fid",
"description": "The fid of the form",
"required": true,
"type": "string"
},
2023-08-23 21:33:00 +02:00
{
"in": "path",
"name": "uid",
"description": "The uid you want to edit",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "body of jsonform data",
"schema": {
"$ref": "#/definitions/form"
}
}
],
"responses": {
"200": {
"description": "json"
},
"403": {
"description": "body is empty"
}
}
}
2024-01-04 15:14:59 +01:00
},
"/ui/tableview/{tvid}": {
"get": {
"tags": [
"ui"
],
"description": "Get table view\n\u003cbr\u003e",
"operationId": "UiController.Tableview",
"parameters": [
{
"in": "path",
"name": "tvid",
"description": "The id of the tableview",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "json form"
},
"403": {
"description": "body is empty"
}
}
}
2021-10-29 23:37:32 +02:00
}
},
"definitions": {
"Credential": {
"title": "Credential",
"type": "object"
},
2022-04-20 15:25:05 +02:00
"TableQuery": {
"title": "TableQuery",
"type": "object"
},
2023-08-23 21:33:00 +02:00
"form": {
"title": "form",
"type": "object"
},
2022-05-17 18:05:18 +02:00
"json": {
"title": "json",
"type": "object"
},
2021-10-29 23:37:32 +02:00
"true": {
"title": "true",
"type": "object"
}
},
"tags": [
{
"name": "t",
"description": "Operations about table\n"
},
{
"name": "s",
"description": "Operations about schema\n"
},
{
"name": "l",
"description": "Operations about login\n"
2023-08-23 21:33:00 +02:00
},
{
"name": "ui",
"description": "Operations about table\n"
2024-01-04 15:14:59 +01:00
},
{
"name": "helper",
"description": "Operations about schema\n"
2021-10-29 23:37:32 +02:00
}
]
}