{ "openapi": "3.1.0", "info": { "title": "Lara Dashboard API Documentation", "version": "1.0.0", "description": "Lara Dashboard API - A comprehensive Laravel CMS API with User Management, Content Management, Role & Permission system, and more." }, "servers": [ { "url": "https://demo.laradashboard.com/api" } ], "paths": { "/v1/action-logs": { "get": { "operationId": "action-logs.index", "summary": "Display a listing of the action logs", "tags": [ "ActionLog" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Action logs retrieved successfully" ] }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/ActionLogResource" } } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/action-logs/{id}": { "get": { "operationId": "action-logs.show", "summary": "Display the specified action log", "tags": [ "ActionLog" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Action log retrieved successfully" ] }, "data": { "$ref": "#/components/schemas/ActionLogResource" } }, "required": [ "success", "message", "data" ] } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Action log not found" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/auth/login": { "post": { "operationId": "auth.login", "summary": "Login user and create token", "tags": [ "Auth" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "format": "email" }, "password": { "type": "string" } }, "required": [ "email", "password" ] } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Login successful" ] }, "data": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/UserResource" }, "token": { "type": "string" }, "token_type": { "type": "string", "enum": [ "Bearer" ] } }, "required": [ "user", "token", "token_type" ] } }, "required": [ "success", "message", "data" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/auth/user": { "get": { "operationId": "auth.user", "summary": "Get authenticated user", "tags": [ "Auth" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "User retrieved successfully" ] }, "data": { "$ref": "#/components/schemas/UserResource" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/auth/logout": { "post": { "operationId": "auth.logout", "summary": "Logout user (revoke token)", "tags": [ "Auth" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Logout successful" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/auth/revoke-all": { "post": { "operationId": "auth.revokeAll", "summary": "Revoke all tokens for the authenticated user", "tags": [ "Auth" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "All tokens revoked successfully" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/modules": { "get": { "operationId": "modules.index", "summary": "Display a listing of the modules", "tags": [ "Module" ], "parameters": [ { "name": "search", "in": "query", "schema": { "type": "string" } }, { "name": "status", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Modules retrieved successfully" ] }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/ModuleResource" } } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/modules/{name}": { "get": { "operationId": "modules.show", "summary": "Display the specified module", "tags": [ "Module" ], "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Module retrieved successfully" ] }, "data": { "$ref": "#/components/schemas/ModuleResource" } }, "required": [ "success", "message", "data" ] } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Module not found" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "delete": { "operationId": "modules.destroy", "summary": "Remove the specified module", "tags": [ "Module" ], "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "500": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Module deleted successfully" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Module not found" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/modules/{name}/toggle-status": { "patch": { "operationId": "modules.toggle-status", "summary": "Toggle module status", "tags": [ "Module" ], "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "500": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Module enabled successfully" ] }, "data": { "$ref": "#/components/schemas/ModuleResource" } }, "required": [ "success", "message", "data" ] } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Module not found" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/permissions": { "get": { "operationId": "permissions.index", "summary": "Display a listing of the permissions", "tags": [ "Permission" ], "parameters": [ { "name": "search", "in": "query", "schema": { "type": "string" } }, { "name": "group_name", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Permissions retrieved successfully" ] }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/PermissionResource" } } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/permissions/groups": { "get": { "operationId": "permissions.groups", "summary": "Get permissions grouped by group name", "tags": [ "Permission" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Permission groups retrieved successfully" ] }, "data": { "type": "object" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/permissions/{id}": { "get": { "operationId": "permissions.show", "summary": "Display the specified permission", "tags": [ "Permission" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Permission retrieved successfully" ] }, "data": { "$ref": "#/components/schemas/PermissionResource" } }, "required": [ "success", "message", "data" ] } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Permission not found" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/posts/{postType}": { "get": { "operationId": "posts.index", "summary": "Display a listing of posts for a specific post type", "tags": [ "Post" ], "parameters": [ { "name": "postType", "in": "path", "required": true, "description": "**Optional**", "schema": { "type": "string", "default": "post" }, "x-optional": true } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/PostResource" } } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "post": { "operationId": "posts.store", "summary": "Store a newly created post", "tags": [ "Post" ], "parameters": [ { "name": "postType", "in": "path", "required": true, "schema": { "type": "string", "default": "post" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/StorePostRequest" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "$ref": "#/components/schemas/PostResource" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/v1/posts/{postType}/{id}": { "get": { "operationId": "posts.show", "summary": "Display the specified post", "tags": [ "Post" ], "parameters": [ { "name": "postType", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "$ref": "#/components/schemas/PostResource" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "put": { "operationId": "posts.update", "summary": "Update the specified post", "tags": [ "Post" ], "parameters": [ { "name": "postType", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/UpdatePostRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "$ref": "#/components/schemas/PostResource" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "delete": { "operationId": "posts.destroy", "summary": "Remove the specified post", "tags": [ "Post" ], "parameters": [ { "name": "postType", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/posts/{postType}/bulk-delete": { "delete": { "operationId": "posts.bulk-delete", "summary": "Bulk delete posts", "tags": [ "Post" ], "parameters": [ { "name": "postType", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ids", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "integer" }, "minItems": 1 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "deleted_count": { "type": "string" } }, "required": [ "deleted_count" ] } }, "required": [ "success", "message", "data" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/roles": { "get": { "operationId": "roles.index", "summary": "Display a listing of the resource", "tags": [ "Role" ], "parameters": [ { "name": "search", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Roles retrieved successfully" ] }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/RoleResource" } } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "post": { "operationId": "roles.store", "summary": "Store a newly created resource in storage", "tags": [ "Role" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreRoleRequest" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Role created successfully" ] }, "data": { "$ref": "#/components/schemas/RoleResource" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/v1/roles/{id}": { "get": { "operationId": "roles.show", "summary": "Display the specified resource", "tags": [ "Role" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Role retrieved successfully" ] }, "data": { "$ref": "#/components/schemas/RoleResource" } }, "required": [ "success", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "put": { "operationId": "roles.update", "summary": "Update the specified resource in storage", "tags": [ "Role" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateRoleRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Role updated successfully" ] }, "data": { "$ref": "#/components/schemas/RoleResource" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "delete": { "operationId": "roles.destroy", "summary": "Remove the specified resource from storage", "tags": [ "Role" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Role deleted successfully" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Cannot delete role with assigned users" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/roles/bulk-delete": { "delete": { "operationId": "roles.bulk-delete", "summary": "Bulk delete roles", "tags": [ "Role" ], "parameters": [ { "name": "ids", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "integer" }, "minItems": 1 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "deleted_count": { "type": "string" } }, "required": [ "deleted_count" ] } }, "required": [ "success", "message", "data" ] } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Cannot delete roles with assigned users" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/settings": { "get": { "operationId": "settings.index", "summary": "Display a listing of the settings", "tags": [ "Setting" ], "parameters": [ { "name": "group", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Settings retrieved successfully" ] }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/SettingResource" } } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "put": { "operationId": "settings.update", "summary": "Update the specified settings", "tags": [ "Setting" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "settings": { "type": "array", "items": { "type": "string" } } }, "required": [ "settings" ] } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Settings updated successfully" ] }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/SettingResource" } } }, "required": [ "success", "message", "data" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/settings/{key}": { "get": { "operationId": "settings.show", "summary": "Get a specific setting by key", "tags": [ "Setting" ], "parameters": [ { "name": "key", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Setting retrieved successfully" ] }, "data": { "$ref": "#/components/schemas/SettingResource" } }, "required": [ "success", "message", "data" ] } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Setting not found" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/taskmanagers": { "get": { "operationId": "taskmanager.index", "summary": "Display a listing of the resource", "tags": [ "TaskManager" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "post": { "operationId": "taskmanager.store", "summary": "Store a newly created resource in storage", "tags": [ "TaskManager" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/v1/taskmanagers/{id}": { "put": { "operationId": "taskmanager.update", "tags": [ "TaskManager" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object" } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "delete": { "operationId": "taskmanager.destroy", "tags": [ "TaskManager" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/terms/{taxonomy}": { "get": { "operationId": "terms.index", "summary": "Display a listing of terms for a specific taxonomy", "tags": [ "Term" ], "parameters": [ { "name": "taxonomy", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/TermResource" } } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "post": { "operationId": "terms.store", "summary": "Store a newly created term", "tags": [ "Term" ], "parameters": [ { "name": "taxonomy", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreTermRequest" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "$ref": "#/components/schemas/TermResource" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/v1/terms/{taxonomy}/{id}": { "get": { "operationId": "terms.show", "summary": "Display the specified term", "tags": [ "Term" ], "parameters": [ { "name": "taxonomy", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "$ref": "#/components/schemas/TermResource" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "put": { "operationId": "terms.update", "summary": "Update the specified term", "tags": [ "Term" ], "parameters": [ { "name": "taxonomy", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTermRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "$ref": "#/components/schemas/TermResource" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "delete": { "operationId": "terms.destroy", "summary": "Remove the specified term", "tags": [ "Term" ], "parameters": [ { "name": "taxonomy", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Cannot delete term with assigned posts" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/terms/{taxonomy}/bulk-delete": { "delete": { "operationId": "terms.bulk-delete", "summary": "Bulk delete terms", "tags": [ "Term" ], "parameters": [ { "name": "taxonomy", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ids", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "integer" }, "minItems": 1 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "deleted_count": { "type": "string" } }, "required": [ "deleted_count" ] } }, "required": [ "success", "message", "data" ] } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Cannot delete terms with assigned posts" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/admin/terms/{taxonomyName}": { "post": { "operationId": "admin.api.terms.store", "summary": "Store a new term via API", "tags": [ "Terms" ], "parameters": [ { "name": "taxonomyName", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreTermRequest" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" }, "term": { "$ref": "#/components/schemas/Term" }, "taxonomies": { "type": "string" }, "post_type": { "type": "string" }, "content": { "type": "string" } }, "required": [ "message", "term", "taxonomies", "post_type", "content" ] } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/v1/users": { "get": { "operationId": "users.index", "summary": "Display a listing of the resource", "tags": [ "User" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "Users retrieved successfully" ] }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/UserResource" } } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "post": { "operationId": "users.store", "summary": "Store a newly created resource in storage", "tags": [ "User" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreUserRequest" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "User created successfully" ] }, "data": { "$ref": "#/components/schemas/UserResource" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/v1/users/{id}": { "get": { "operationId": "users.show", "summary": "Display the specified resource", "tags": [ "User" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "User retrieved successfully" ] }, "data": { "$ref": "#/components/schemas/UserResource" } }, "required": [ "success", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "put": { "operationId": "users.update", "summary": "Update the specified resource in storage", "tags": [ "User" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "User updated successfully" ] }, "data": { "$ref": "#/components/schemas/UserResource" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "delete": { "operationId": "users.destroy", "summary": "Remove the specified resource from storage", "tags": [ "User" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "User deleted successfully" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "You cannot delete yourself" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/v1/users/bulk-delete": { "delete": { "operationId": "users.bulk-delete", "summary": "Bulk delete users", "tags": [ "User" ], "parameters": [ { "name": "ids", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "integer" }, "minItems": 1 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" }, "data": { "type": "object", "properties": { "deleted_count": { "type": "string" } }, "required": [ "deleted_count" ] } }, "required": [ "success", "message", "data" ] } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "enum": [ "You cannot delete yourself" ] }, "data": { "type": "null" } }, "required": [ "success", "message", "data" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } } }, "components": { "schemas": { "ActionLogResource": { "type": "object", "properties": { "id": { "type": "integer" }, "user_id": { "type": "string" }, "action_type": { "type": "string" }, "description": { "type": "string" }, "model_type": { "type": "string" }, "model_id": { "type": "string" }, "ip_address": { "type": "string" }, "user_agent": { "type": "string" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user": { "$ref": "#/components/schemas/UserResource" } }, "required": [ "id", "user_id", "action_type", "description", "model_type", "model_id", "ip_address", "user_agent", "created_at", "updated_at" ], "title": "ActionLogResource" }, "ModuleResource": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "alias": { "type": "string" }, "description": { "type": "string" }, "keywords": { "type": "string" }, "active": { "type": "string" }, "order": { "type": "string" }, "path": { "type": "string" }, "version": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "id", "name", "alias", "description", "keywords", "active", "order", "path", "version", "created_at", "updated_at" ], "title": "ModuleResource" }, "PermissionResource": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "guard_name": { "type": "string" }, "group_name": { "type": [ "string", "null" ] }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "id", "name", "guard_name", "group_name", "created_at", "updated_at" ], "title": "PermissionResource" }, "PostResource": { "type": "object", "properties": { "id": { "type": "integer" }, "title": { "type": "string" }, "slug": { "type": "string" }, "content": { "type": [ "string", "null" ] }, "excerpt": { "type": [ "string", "null" ] }, "featured_image": { "type": [ "string", "null" ] }, "post_type": { "type": "string" }, "status": { "type": "string" }, "published_at": { "type": [ "string", "null" ], "format": "date-time" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "author": { "$ref": "#/components/schemas/UserResource" }, "terms": { "type": "array", "items": { "$ref": "#/components/schemas/TermResource" } }, "meta": { "type": "string" } }, "required": [ "id", "title", "slug", "content", "excerpt", "featured_image", "post_type", "status", "published_at", "created_at", "updated_at" ], "title": "PostResource" }, "RoleResource": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "guard_name": { "type": "string" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "permissions": { "type": "string" }, "users_count": { "type": "string" } }, "required": [ "id", "name", "guard_name", "created_at", "updated_at" ], "title": "RoleResource" }, "SettingResource": { "type": "object", "properties": { "id": { "type": "integer" }, "key": { "type": "string" }, "value": { "type": "string" }, "description": { "type": "string" }, "type": { "type": "string" }, "group": { "type": "string" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "id", "key", "value", "description", "type", "group", "created_at", "updated_at" ], "title": "SettingResource" }, "StorePostRequest": { "type": "object", "properties": { "title": { "type": "string", "maxLength": 255 }, "slug": { "type": [ "string", "null" ], "maxLength": 255 }, "content": { "type": [ "string", "null" ] }, "excerpt": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "publish", "pending", "future", "private" ] }, "featured_image": { "type": [ "string", "null" ], "format": "binary", "contentMediaType": "application/octet-stream", "maxLength": 5120 }, "parent_id": { "type": [ "integer", "null" ] }, "published_at": { "type": [ "string", "null" ], "format": "date-time" }, "meta_keys": { "type": "object" }, "meta_values": { "type": "object" }, "meta_types": { "type": "object" }, "meta_default_values": { "type": "object" } }, "required": [ "title", "status" ], "title": "StorePostRequest" }, "StoreRoleRequest": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 100 }, "permissions": { "type": "array", "items": { "type": "string" }, "minItems": 1 } }, "required": [ "name", "permissions" ], "title": "StoreRoleRequest" }, "StoreTermRequest": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 255 }, "slug": { "type": [ "string", "null" ], "maxLength": 255 }, "description": { "type": [ "string", "null" ] }, "parent_id": { "type": [ "integer", "null" ] }, "post_type": { "type": [ "string", "null" ] }, "post_id": { "type": [ "number", "null" ] } }, "required": [ "name" ], "title": "StoreTermRequest" }, "StoreUserRequest": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 50 }, "email": { "type": "string", "format": "email" }, "username": { "type": "string", "maxLength": 100 }, "password": { "type": "string", "minLength": 6 }, "password_confirmation": { "type": "string", "minLength": 6 } }, "required": [ "name", "email", "username", "password", "password_confirmation" ], "title": "StoreUserRequest" }, "TaskRequest": { "type": "object", "properties": { "title": { "type": "string", "maxLength": 255 }, "description": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "pending", "in_progress", "completed" ] }, "assigned_to": { "type": [ "integer", "null" ] }, "priority": { "type": [ "string", "null" ], "enum": [ "low", "medium", "high" ] } }, "required": [ "title", "status" ], "title": "TaskRequest" }, "Term": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "slug": { "type": "string" }, "taxonomy": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "featured_image": { "type": [ "string", "null" ] }, "parent_id": { "type": [ "integer", "null" ] }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "id", "name", "slug", "taxonomy", "description", "featured_image", "parent_id", "created_at", "updated_at" ], "title": "Term" }, "TermResource": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "slug": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "parent_id": { "type": [ "integer", "null" ] }, "taxonomy": { "type": "string" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "posts_count": { "type": "string" }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/TermResource" } }, "parent": { "$ref": "#/components/schemas/TermResource" } }, "required": [ "id", "name", "slug", "description", "parent_id", "created_at", "updated_at" ], "title": "TermResource" }, "UpdatePostRequest": { "type": "object", "properties": { "title": { "type": "string", "maxLength": 255 }, "slug": { "type": [ "string", "null" ], "maxLength": 255 }, "content": { "type": [ "string", "null" ] }, "excerpt": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "draft", "publish", "pending", "future", "private" ] }, "featured_image": { "type": [ "string", "null" ], "format": "binary", "contentMediaType": "application/octet-stream", "maxLength": 5120 }, "parent_id": { "type": [ "integer", "null" ] }, "published_at": { "type": [ "string", "null" ], "format": "date-time" }, "remove_featured_image": { "type": [ "boolean", "null" ] }, "meta_keys": { "type": "object" }, "meta_values": { "type": "object" }, "meta_types": { "type": "object" }, "meta_default_values": { "type": "object" } }, "required": [ "title", "status" ], "title": "UpdatePostRequest" }, "UpdateRoleRequest": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 100 }, "permissions": { "type": "array", "items": { "type": "string" }, "minItems": 1 } }, "required": [ "name", "permissions" ], "title": "UpdateRoleRequest" }, "UpdateTermRequest": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 255 }, "slug": { "type": [ "string", "null" ], "maxLength": 255 }, "description": { "type": [ "string", "null" ] }, "parent_id": { "type": [ "integer", "null" ] } }, "required": [ "name" ], "title": "UpdateTermRequest" }, "UpdateUserRequest": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 50 }, "email": { "type": "string", "format": "email" }, "username": { "type": "string", "maxLength": 100 }, "password": { "type": "string", "minLength": 6 }, "password_confirmation": { "type": "string", "minLength": 6 } }, "required": [ "name", "email", "username", "password", "password_confirmation" ], "title": "UpdateUserRequest" }, "UserResource": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "email": { "type": "string" }, "username": { "type": "string" }, "email_verified_at": { "type": [ "string", "null" ], "format": "date-time" }, "avatar": { "type": "string" }, "status": { "type": "string" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "roles": { "type": "array", "items": { "$ref": "#/components/schemas/RoleResource" } }, "permissions": { "type": "string" } }, "required": [ "id", "name", "email", "username", "email_verified_at", "avatar", "status", "created_at", "updated_at" ], "title": "UserResource" } }, "responses": { "ValidationException": { "description": "Validation error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Errors overview." }, "errors": { "type": "object", "description": "A detailed description of each field that failed validation.", "additionalProperties": { "type": "array", "items": { "type": "string" } } } }, "required": [ "message", "errors" ] } } } }, "AuthenticationException": { "description": "Unauthenticated", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Error overview." } }, "required": [ "message" ] } } } }, "ModelNotFoundException": { "description": "Not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Error overview." } }, "required": [ "message" ] } } } } } } }