Moved v3 code from NginxProxyManager/nginx-proxy-manager-3 to NginxProxyManager/nginx-proxy-manager
This commit is contained in:
117
backend/embed/api_docs/paths/users/get.json
Normal file
117
backend/embed/api_docs/paths/users/get.json
Normal file
@ -0,0 +1,117 @@
|
||||
{
|
||||
"operationId": "getUsers",
|
||||
"summary": "Get a list of users",
|
||||
"tags": ["Users"],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "query",
|
||||
"name": "offset",
|
||||
"schema": {
|
||||
"type": "number"
|
||||
},
|
||||
"description": "The pagination row offset, default 0",
|
||||
"example": 0
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "limit",
|
||||
"schema": {
|
||||
"type": "number"
|
||||
},
|
||||
"description": "The pagination row limit, default 10",
|
||||
"example": 10
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "sort",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "The sorting of the list",
|
||||
"example": "name,nickname.desc,email.asc"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"required": ["result"],
|
||||
"properties": {
|
||||
"result": {
|
||||
"$ref": "#/components/schemas/UserList"
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"result": {
|
||||
"total": 3,
|
||||
"offset": 0,
|
||||
"limit": 100,
|
||||
"sort": [
|
||||
{
|
||||
"field": "name",
|
||||
"direction": "ASC"
|
||||
},
|
||||
{
|
||||
"field": "nickname",
|
||||
"direction": "DESC"
|
||||
},
|
||||
{
|
||||
"field": "email",
|
||||
"direction": "ASC"
|
||||
}
|
||||
],
|
||||
"items": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Jamie Curnow",
|
||||
"nickname": "James",
|
||||
"email": "jc@jc21.com",
|
||||
"created_on": 1578010090,
|
||||
"modified_on": 1578010095,
|
||||
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
|
||||
"is_disabled": false,
|
||||
"capabilities": ["full-admin"]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "John Doe",
|
||||
"nickname": "John",
|
||||
"email": "johdoe@example.com",
|
||||
"created_on": 1578010100,
|
||||
"modified_on": 1578010105,
|
||||
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
|
||||
"is_disabled": false,
|
||||
"capabilities": [
|
||||
"hosts.view",
|
||||
"hosts.manage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Jane Doe",
|
||||
"nickname": "Jane",
|
||||
"email": "janedoe@example.com",
|
||||
"created_on": 1578010110,
|
||||
"modified_on": 1578010115,
|
||||
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
|
||||
"is_disabled": false,
|
||||
"capabilities": [
|
||||
"hosts.view",
|
||||
"hosts.manage"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
79
backend/embed/api_docs/paths/users/post.json
Normal file
79
backend/embed/api_docs/paths/users/post.json
Normal file
@ -0,0 +1,79 @@
|
||||
{
|
||||
"operationId": "createUser",
|
||||
"summary": "Create a new User",
|
||||
"tags": ["Users"],
|
||||
"requestBody": {
|
||||
"description": "User to Create",
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": "{{schema.CreateUser}}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "201 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"required": ["result"],
|
||||
"properties": {
|
||||
"result": {
|
||||
"$ref": "#/components/schemas/UserObject"
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"result": {
|
||||
"id": 1,
|
||||
"name": "Jamie Curnow",
|
||||
"nickname": "James",
|
||||
"email": "jc@jc21.com",
|
||||
"created_on": 1578010100,
|
||||
"modified_on": 1578010100,
|
||||
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
|
||||
"is_disabled": false,
|
||||
"auth": {
|
||||
"$ref": "#/components/schemas/UserAuthObject"
|
||||
},
|
||||
"capabilities": ["full-admin"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "400 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"required": ["error"],
|
||||
"properties": {
|
||||
"result": {
|
||||
"nullable": true
|
||||
},
|
||||
"error": {
|
||||
"$ref": "#/components/schemas/ErrorObject"
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"error": {
|
||||
"code": 400,
|
||||
"message": "An user already exists with this email address"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
65
backend/embed/api_docs/paths/users/userID/auth/post.json
Normal file
65
backend/embed/api_docs/paths/users/userID/auth/post.json
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
"operationId": "setPassword",
|
||||
"summary": "Set a User's password",
|
||||
"tags": ["Users"],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "userID",
|
||||
"schema": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^me$"
|
||||
}
|
||||
]
|
||||
},
|
||||
"required": true,
|
||||
"description": "Numeric ID of the user or 'me' to set yourself",
|
||||
"example": 1
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"description": "Credentials to set",
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": "{{schema.SetAuth}}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"required": ["result"],
|
||||
"properties": {
|
||||
"result": {
|
||||
"$ref": "#/components/schemas/UserAuthObject"
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"result": {
|
||||
"id": 2,
|
||||
"user_id": 3,
|
||||
"type": "password",
|
||||
"created_on": 1648422222,
|
||||
"modified_on": 1648423979
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
60
backend/embed/api_docs/paths/users/userID/delete.json
Normal file
60
backend/embed/api_docs/paths/users/userID/delete.json
Normal file
@ -0,0 +1,60 @@
|
||||
{
|
||||
"operationId": "deleteUser",
|
||||
"summary": "Delete a User",
|
||||
"tags": [
|
||||
"Users"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "userID",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"required": true,
|
||||
"description": "Numeric ID of the user",
|
||||
"example": 1
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"result": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "400 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/DeletedItemResponse"
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"result": null,
|
||||
"error": {
|
||||
"code": 400,
|
||||
"message": "You cannot delete yourself!"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
60
backend/embed/api_docs/paths/users/userID/get.json
Normal file
60
backend/embed/api_docs/paths/users/userID/get.json
Normal file
@ -0,0 +1,60 @@
|
||||
{
|
||||
"operationId": "getUser",
|
||||
"summary": "Get a user object by ID or 'me'",
|
||||
"tags": ["Users"],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "userID",
|
||||
"schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^me$"
|
||||
}
|
||||
]
|
||||
},
|
||||
"required": true,
|
||||
"description": "Numeric ID of the user or 'me' to get yourself",
|
||||
"example": 1
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"required": ["result"],
|
||||
"properties": {
|
||||
"result": {
|
||||
"$ref": "#/components/schemas/UserObject"
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"result": {
|
||||
"id": 1,
|
||||
"name": "Jamie Curnow",
|
||||
"nickname": "James",
|
||||
"email": "jc@jc21.com",
|
||||
"created_on": 1578010100,
|
||||
"modified_on": 1578010105,
|
||||
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
|
||||
"is_disabled": false,
|
||||
"capabilities": ["full-admin"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
107
backend/embed/api_docs/paths/users/userID/put.json
Normal file
107
backend/embed/api_docs/paths/users/userID/put.json
Normal file
@ -0,0 +1,107 @@
|
||||
{
|
||||
"operationId": "updateUser",
|
||||
"summary": "Update an existing User",
|
||||
"tags": ["Users"],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "userID",
|
||||
"schema": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^me$"
|
||||
}
|
||||
]
|
||||
},
|
||||
"required": true,
|
||||
"description": "Numeric ID of the user or 'me' to update yourself",
|
||||
"example": 1
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"description": "User details to update",
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": "{{schema.UpdateUser}}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"required": ["result"],
|
||||
"properties": {
|
||||
"result": {
|
||||
"$ref": "#/components/schemas/UserObject"
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"result": {
|
||||
"id": 1,
|
||||
"name": "Jamie Curnow",
|
||||
"nickname": "James",
|
||||
"email": "jc@jc21.com",
|
||||
"created_on": 1578010100,
|
||||
"modified_on": 1578010110,
|
||||
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
|
||||
"is_disabled": false,
|
||||
"capabilities": ["full-admin"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "400 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"required": ["error"],
|
||||
"properties": {
|
||||
"result": {
|
||||
"nullable": true
|
||||
},
|
||||
"error": {
|
||||
"$ref": "#/components/schemas/ErrorObject"
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {
|
||||
"duplicateemail": {
|
||||
"value": {
|
||||
"result": null,
|
||||
"error": {
|
||||
"code": 400,
|
||||
"message": "A user already exists with this email address"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nodisable": {
|
||||
"value": {
|
||||
"result": null,
|
||||
"error": {
|
||||
"code": 400,
|
||||
"message": "You cannot disable yourself!"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user