--- title: admin full: true --- import { Root, API, APIInfo, APIExample, Responses, Response, ResponseTypes, ExampleResponse, TypeScriptResponse, Property, ObjectCollapsible, Requests, Request } from "fumadocs-ui/components/api"; ## admin-one ### Authorization "} required={true}> In: `header` | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X GET "http://localhost:3000/api/admin.one" ``` ```js fetch("http://localhost:3000/api/admin.one", { method: "GET" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## admin-createUserInvitation ### Authorization "} required={true}> In: `header` ### Request Body Format: `"email"` | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/admin.createUserInvitation" \ -d '{ "email": "user@example.com" }' ``` ```js fetch("http://localhost:3000/api/admin.createUserInvitation", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## admin-removeUser ### Authorization "} required={true}> In: `header` ### Request Body Minimum length: `1` | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/admin.removeUser" \ -d '{ "authId": "string" }' ``` ```js fetch("http://localhost:3000/api/admin.removeUser", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## admin-getUserByToken ### Authorization "} required={true}> In: `header` ### Query Parameters Minimum length: `1` | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X GET "http://localhost:3000/api/admin.getUserByToken?token=string" ``` ```js fetch("http://localhost:3000/api/admin.getUserByToken?token=string", { method: "GET" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## admin-assignPermissions ### Authorization "} required={true}> In: `header` ### Request Body Minimum length: `1` "} required={true} deprecated={undefined}> "} required={true} deprecated={undefined}> | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/admin.assignPermissions" \ -d '{ "userId": "string", "canCreateProjects": true, "canCreateServices": true, "canDeleteProjects": true, "canDeleteServices": true, "accesedProjects": [ "string" ], "accesedServices": [ "string" ], "canAccessToTraefikFiles": true, "canAccessToDocker": true, "canAccessToAPI": true, "canAccessToSSHKeys": true, "canAccessToGitProviders": true }' ``` ```js fetch("http://localhost:3000/api/admin.assignPermissions", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ```