{
	"openapi": "3.1.0",
	"info": {
		"title": "Device Fingerprinter Gate",
		"summary": "This is a REST API service.",
		"termsOfService": "https://theredteam.io/terms",
		"contact": {
			"name": "Support Team",
			"url": "https://theredteam.io/contact",
			"email": "support@theredteam.io"
		},
		"version": "0.0.0-250101"
	},
	"paths": {
		"/api/v1/tasks/": {
			"get": {
				"tags": [
					"Tasks"
				],
				"summary": "Get Task List",
				"operationId": "get_tasks_api_v1_tasks__get",
				"parameters": [
					{
						"name": "skip",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"minimum": 0,
							"title": "Skip",
							"description": "Number of data to skip.",
							"examples": [
								0
							],
							"default": 0
						},
						"description": "Number of data to skip."
					},
					{
						"name": "limit",
						"in": "query",
						"required": false,
						"schema": {
							"type": "integer",
							"maximum": 100000,
							"minimum": 1,
							"title": "Limit",
							"description": "Limit of data list.",
							"examples": [
								100
							],
							"default": 100
						},
						"description": "Limit of data list."
					},
					{
						"name": "is_desc",
						"in": "query",
						"required": false,
						"schema": {
							"type": "boolean",
							"title": "Sort Direction",
							"description": "Is sort descending or ascending.",
							"examples": [
								true
							],
							"default": true
						},
						"description": "Is sort descending or ascending."
					}
				],
				"responses": {
					"200": {
						"description": "Successful Response",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ResTasksPM"
								}
							}
						}
					},
					"422": {
						"description": "Unprocessable Entity"
					}
				}
			},
			"post": {
				"tags": [
					"Tasks"
				],
				"summary": "Create Task",
				"operationId": "create_task_api_v1_tasks__post",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/TaskBasePM",
								"title": "Task data",
								"description": "Task data to create."
							}
						}
					}
				},
				"responses": {
					"201": {
						"description": "Successful Response",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ResTaskPM"
								}
							}
						}
					},
					"422": {
						"description": "Unprocessable Entity"
					}
				}
			}
		},
		"/api/v1/tasks/{task_id}": {
			"get": {
				"tags": [
					"Tasks"
				],
				"summary": "Get Task",
				"operationId": "get_task_api_v1_tasks__task_id__get",
				"parameters": [
					{
						"name": "task_id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string",
							"minLength": 8,
							"maxLength": 64,
							"pattern": "^[0-9a-zA-Z_\\-]+$",
							"title": "Task ID",
							"description": "Task ID to get.",
							"examples": [
								"1701388800_a0dc99d68d5e427eafe00525fac47012"
							]
						},
						"description": "Task ID to get."
					}
				],
				"responses": {
					"200": {
						"description": "Successful Response",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ResTaskPM"
								}
							}
						}
					},
					"404": {
						"description": "Not Found"
					},
					"422": {
						"description": "Unprocessable Entity"
					}
				}
			},
			"put": {
				"tags": [
					"Tasks"
				],
				"summary": "Update Task",
				"operationId": "update_task_api_v1_tasks__task_id__put",
				"parameters": [
					{
						"name": "task_id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string",
							"minLength": 8,
							"maxLength": 64,
							"pattern": "^[0-9a-zA-Z_\\-]+$",
							"title": "Task ID",
							"description": "Task ID to update.",
							"examples": [
								"1701388800_cd388fca74de4e8085df41e7c6df762e"
							]
						},
						"description": "Task ID to update."
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/TaskUpPM",
								"title": "Task data",
								"description": "Task data to update."
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Successful Response",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ResTaskPM"
								}
							}
						}
					},
					"404": {
						"description": "Not Found"
					},
					"422": {
						"description": "Unprocessable Entity"
					}
				}
			},
			"delete": {
				"tags": [
					"Tasks"
				],
				"summary": "Delete Task",
				"operationId": "delete_task_api_v1_tasks__task_id__delete",
				"parameters": [
					{
						"name": "task_id",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string",
							"minLength": 8,
							"maxLength": 64,
							"pattern": "^[0-9a-zA-Z_\\-]+$",
							"title": "Task ID",
							"description": "Task ID to delete.",
							"examples": [
								"1701388800_cd388fca74de4e8085df41e7c6df762e"
							]
						},
						"description": "Task ID to delete."
					}
				],
				"responses": {
					"204": {
						"description": "Successful Response"
					},
					"404": {
						"description": "Not Found"
					},
					"422": {
						"description": "Unprocessable Entity"
					}
				}
			}
		},
		"/api/v1/": {
			"get": {
				"tags": [
					"Utils"
				],
				"summary": "Base",
				"description": "Base path for all API endpoints.",
				"operationId": "get_base_api_v1__get",
				"responses": {
					"200": {
						"description": "Successful Response",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/BaseResPM"
								}
							}
						}
					}
				}
			}
		},
		"/api/v1/ping": {
			"get": {
				"tags": [
					"Utils"
				],
				"summary": "Ping",
				"description": "Check if the service is up and running.",
				"operationId": "get_ping_api_v1_ping_get",
				"responses": {
					"200": {
						"description": "Successful Response",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/BaseResPM"
								}
							}
						}
					}
				}
			}
		},
		"/api/v1/health": {
			"get": {
				"tags": [
					"Utils"
				],
				"summary": "Health",
				"description": "Check health of all related backend services.",
				"operationId": "get_health_api_v1_health_get",
				"responses": {
					"200": {
						"description": "Successful Response",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/BaseResPM"
								}
							}
						}
					}
				}
			}
		},
		"/": {
			"get": {
				"tags": [
					"Default"
				],
				"summary": "Root",
				"description": "Redirect to base endpoint: '/api/v1/'",
				"operationId": "get_root__get",
				"responses": {
					"307": {
						"description": "Successful Response",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				}
			}
		},
		"/openapi.json": {
			"get": {
				"tags": [
					"Default"
				],
				"summary": "OpenAPI JSON",
				"description": "Redirect to OpenAPI JSON: '/api/v1/openapi.json'",
				"operationId": "get_openapi_json_openapi_json_get",
				"responses": {
					"307": {
						"description": "Successful Response",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				}
			}
		},
		"/docs": {
			"get": {
				"tags": [
					"Default"
				],
				"summary": "Swagger UI docs",
				"description": "Redirect to Swagger UI docs: '/api/v1/docs'",
				"operationId": "get_docs_docs_get",
				"responses": {
					"307": {
						"description": "Successful Response",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				}
			}
		},
		"/redoc": {
			"get": {
				"tags": [
					"Default"
				],
				"summary": "Redoc",
				"description": "Redirect to Redoc: '/api/v1/redoc'",
				"operationId": "get_redoc_redoc_get",
				"responses": {
					"307": {
						"description": "Successful Response",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				}
			}
		}
	},
	"components": {
		"schemas": {
			"BaseResPM": {
				"properties": {
					"message": {
						"type": "string",
						"maxLength": 256,
						"minLength": 1,
						"title": "Message",
						"description": "Response message about the current request.",
						"examples": [
							"Successfully processed the request."
						]
					},
					"data": {
						"anyOf": [
							{},
							{
								"type": "object"
							},
							{
								"items": {},
								"type": "array"
							}
						],
						"title": "Data",
						"description": "Resource data or any data related to response.",
						"examples": [
							"Any data: dict, list, str, int, float, null, etc."
						]
					},
					"links": {
						"$ref": "#/components/schemas/LinksResPM",
						"title": "Links",
						"description": "Links related to the current request or resource."
					},
					"meta": {
						"$ref": "#/components/schemas/MetaResPM",
						"title": "Meta",
						"description": "Meta information about the current request."
					},
					"error": {
						"anyOf": [
							{
								"$ref": "#/components/schemas/ErrorResPM"
							},
							{}
						],
						"title": "Error",
						"description": "Error information about the current request.",
						"examples": [
							null
						]
					}
				},
				"type": "object",
				"required": [
					"message"
				],
				"title": "BaseResPM"
			},
			"ErrorResPM": {
				"properties": {
					"code": {
						"type": "string",
						"maxLength": 36,
						"minLength": 3,
						"title": "Error code",
						"description": "Code that represents the error.",
						"examples": [
							"400_00000"
						]
					},
					"description": {
						"anyOf": [
							{
								"type": "string",
								"maxLength": 1024
							},
							{
								"type": "null"
							}
						],
						"title": "Error description",
						"description": "Description of the error.",
						"examples": [
							"Bad request syntax or unsupported method."
						]
					},
					"detail": {
						"anyOf": [
							{},
							{
								"type": "object"
							},
							{
								"items": {},
								"type": "array"
							}
						],
						"title": "Error detail",
						"description": "Detail of the error.",
						"examples": [
							{
								"ctx": {
									"constraint": "value"
								},
								"loc": [
									"body",
									"field"
								],
								"msg": "Error message.",
								"type": "Error type."
							}
						]
					}
				},
				"type": "object",
				"required": [
					"code"
				],
				"title": "ErrorResPM"
			},
			"LinksResPM": {
				"properties": {
					"self": {
						"anyOf": [
							{
								"type": "string",
								"maxLength": 2048
							},
							{
								"type": "null"
							}
						],
						"title": "Self link",
						"description": "Link to the current resource.",
						"examples": [
							"/api/v1/resources"
						]
					}
				},
				"additionalProperties": false,
				"type": "object",
				"title": "LinksResPM"
			},
			"MetaResPM": {
				"properties": {
					"request_id": {
						"anyOf": [
							{
								"type": "string",
								"maxLength": 64,
								"minLength": 8
							},
							{
								"type": "null"
							}
						],
						"title": "Request ID",
						"description": "Current request ID.",
						"examples": [
							"211203afa2844d55b1c9d38b9f8a7063"
						]
					},
					"base_url": {
						"anyOf": [
							{
								"type": "string",
								"maxLength": 256,
								"minLength": 2
							},
							{
								"type": "null"
							}
						],
						"title": "Base URL",
						"description": "Current request base URL.",
						"examples": [
							"https://api.theredteam.io"
						]
					},
					"method": {
						"anyOf": [
							{
								"$ref": "#/components/schemas/MethodEnum"
							},
							{
								"type": "null"
							}
						],
						"title": "Method",
						"description": "Current request method.",
						"examples": [
							"GET"
						]
					},
					"api_version": {
						"type": "string",
						"maxLength": 16,
						"minLength": 1,
						"title": "API version",
						"description": "Current API version.",
						"default": "1",
						"examples": [
							"1"
						]
					},
					"version": {
						"type": "string",
						"maxLength": 32,
						"minLength": 5,
						"title": "Version",
						"description": "Current system version.",
						"default": "0.0.0-250101",
						"examples": [
							"0.0.0-250101"
						]
					}
				},
				"additionalProperties": false,
				"type": "object",
				"title": "MetaResPM"
			},
			"MethodEnum": {
				"type": "string",
				"enum": [
					"GET",
					"POST",
					"PUT",
					"PATCH",
					"DELETE",
					"HEAD",
					"OPTIONS",
					"CONNECT",
					"TRACE"
				],
				"title": "MethodEnum"
			},
			"ResTaskPM": {
				"properties": {
					"message": {
						"type": "string",
						"maxLength": 256,
						"minLength": 1,
						"title": "Message",
						"description": "Response message about the current request.",
						"examples": [
							"Successfully processed the request."
						]
					},
					"data": {
						"anyOf": [
							{
								"$ref": "#/components/schemas/TaskPM"
							},
							{
								"type": "null"
							}
						],
						"title": "Task data",
						"description": "Task as a main data.",
						"examples": [
							{
								"created_at": "2021-01-01T00:00:00+00:00",
								"id": "1699928748406212_46D46E7E55FA4A6E8478BD6B04195793",
								"name": "Task 1",
								"point": 70,
								"updated_at": "2021-01-01T00:00:00+00:00"
							}
						]
					},
					"links": {
						"$ref": "#/components/schemas/LinksResPM",
						"title": "Links",
						"description": "Links related to the current request or resource."
					},
					"meta": {
						"$ref": "#/components/schemas/MetaResPM",
						"title": "Meta",
						"description": "Meta information about the current request."
					},
					"error": {
						"anyOf": [
							{
								"$ref": "#/components/schemas/ErrorResPM"
							},
							{}
						],
						"title": "Error",
						"description": "Error information about the current request.",
						"examples": [
							null
						]
					}
				},
				"type": "object",
				"required": [
					"message"
				],
				"title": "ResTaskPM"
			},
			"ResTasksPM": {
				"properties": {
					"message": {
						"type": "string",
						"maxLength": 256,
						"minLength": 1,
						"title": "Message",
						"description": "Response message about the current request.",
						"examples": [
							"Successfully processed the request."
						]
					},
					"data": {
						"items": {
							"$ref": "#/components/schemas/TasksPM"
						},
						"type": "array",
						"title": "List of tasks",
						"description": "List of tasks as main data.",
						"default": [],
						"examples": [
							[
								{
									"created_at": "2021-01-01T00:00:00+00:00",
									"id": "1699928748406212_46D46E7E55FA4A6E8478BD6B04195793",
									"links": {
										"self": "/api/v1/tasks/1699928748406212_46D46E7E55FA4A6E8478BD6B04195793"
									},
									"name": "Task 1",
									"point": 70,
									"updated_at": "2021-01-01T00:00:00+00:00"
								},
								{
									"created_at": "2021-01-01T00:00:00+00:00",
									"id": "1699854600504660_337FC34BE4304E14A193F6A2793AD9D1",
									"links": {
										"self": "/api/v1/tasks/1699854600504660_337FC34BE4304E14A193F6A2793AD9D1"
									},
									"name": "Task 2",
									"point": 30,
									"updated_at": "2021-01-01T00:00:00+00:00"
								}
							]
						]
					},
					"links": {
						"$ref": "#/components/schemas/LinksResPM",
						"title": "Links",
						"description": "Links related to the current request or resource."
					},
					"meta": {
						"$ref": "#/components/schemas/MetaResPM",
						"title": "Meta",
						"description": "Meta information about the current request."
					},
					"error": {
						"anyOf": [
							{
								"$ref": "#/components/schemas/ErrorResPM"
							},
							{}
						],
						"title": "Error",
						"description": "Error information about the current request.",
						"examples": [
							null
						]
					}
				},
				"type": "object",
				"required": [
					"message"
				],
				"title": "ResTasksPM"
			},
			"TaskBasePM": {
				"properties": {
					"name": {
						"type": "string",
						"maxLength": 64,
						"minLength": 2,
						"pattern": "^[0-9a-zA-Z_\\-. ]+$",
						"title": "Task name",
						"description": "Name of the task.",
						"examples": [
							"Task 1"
						]
					},
					"point": {
						"type": "integer",
						"maximum": 100.0,
						"minimum": 0.0,
						"title": "Task point",
						"description": "Point of the task.",
						"default": 70,
						"examples": [
							70
						]
					}
				},
				"type": "object",
				"required": [
					"name"
				],
				"title": "TaskBasePM"
			},
			"TaskPM": {
				"properties": {
					"id": {
						"type": "string",
						"maxLength": 64,
						"minLength": 8,
						"title": "ID",
						"description": "Identifier value of the resource.",
						"examples": [
							"res1701388800_dc2cc6c9033c4837b6c34c8bb19bb289"
						]
					},
					"name": {
						"type": "string",
						"maxLength": 64,
						"minLength": 2,
						"pattern": "^[0-9a-zA-Z_\\-. ]+$",
						"title": "Task name",
						"description": "Name of the task.",
						"examples": [
							"Task 1"
						]
					},
					"point": {
						"type": "integer",
						"maximum": 100.0,
						"minimum": 0.0,
						"title": "Task point",
						"description": "Point of the task.",
						"default": 70,
						"examples": [
							70
						]
					},
					"updated_at": {
						"type": "string",
						"format": "date-time",
						"title": "Updated datetime",
						"description": "Last updated datetime of the resource.",
						"examples": [
							"2024-12-01T00:00:00+00:00"
						]
					},
					"created_at": {
						"type": "string",
						"format": "date-time",
						"title": "Created datetime",
						"description": "Created datetime of the resource.",
						"examples": [
							"2024-12-01T00:00:00+00:00"
						]
					}
				},
				"type": "object",
				"required": [
					"name"
				],
				"title": "TaskPM"
			},
			"TaskUpPM": {
				"properties": {
					"name": {
						"anyOf": [
							{
								"type": "string",
								"maxLength": 64,
								"minLength": 2,
								"pattern": "^[0-9a-zA-Z_\\-. ]+$"
							},
							{
								"type": "null"
							}
						],
						"title": "Task name",
						"description": "Name of the task.",
						"examples": [
							"Task 1"
						]
					},
					"point": {
						"type": "integer",
						"maximum": 100.0,
						"minimum": 0.0,
						"title": "Task point",
						"description": "Point of the task.",
						"default": 70,
						"examples": [
							70
						]
					}
				},
				"type": "object",
				"title": "TaskUpPM"
			},
			"TasksPM": {
				"properties": {
					"id": {
						"type": "string",
						"maxLength": 64,
						"minLength": 8,
						"title": "ID",
						"description": "Identifier value of the resource.",
						"examples": [
							"res1701388800_dc2cc6c9033c4837b6c34c8bb19bb289"
						]
					},
					"name": {
						"type": "string",
						"maxLength": 64,
						"minLength": 2,
						"pattern": "^[0-9a-zA-Z_\\-. ]+$",
						"title": "Task name",
						"description": "Name of the task.",
						"examples": [
							"Task 1"
						]
					},
					"point": {
						"type": "integer",
						"maximum": 100.0,
						"minimum": 0.0,
						"title": "Task point",
						"description": "Point of the task.",
						"default": 70,
						"examples": [
							70
						]
					},
					"updated_at": {
						"type": "string",
						"format": "date-time",
						"title": "Updated datetime",
						"description": "Last updated datetime of the resource.",
						"examples": [
							"2024-12-01T00:00:00+00:00"
						]
					},
					"created_at": {
						"type": "string",
						"format": "date-time",
						"title": "Created datetime",
						"description": "Created datetime of the resource.",
						"examples": [
							"2024-12-01T00:00:00+00:00"
						]
					},
					"links": {
						"$ref": "#/components/schemas/LinksResPM",
						"title": "Links",
						"description": "Links related to the current task.",
						"examples": [
							{
								"self": "/api/v1/tasks/1699928748406212_46D46E7E55FA4A6E8478BD6B04195793"
							}
						]
					}
				},
				"type": "object",
				"required": [
					"name"
				],
				"title": "TasksPM"
			}
		}
	},
	"tags": [
		{
			"name": "Utils",
			"description": "Useful utility endpoints."
		},
		{
			"name": "Tasks",
			"description": "Endpoints to manage tasks."
		},
		{
			"name": "Default",
			"description": "Redirection of default endpoints."
		}
	]
}