--- 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` | 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 }' ``` ```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; }[]; } ``` ## admin-cleanGithubApp ### Authorization "} required={true}> In: `header` | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X POST "http://localhost:3000/api/admin.cleanGithubApp" ``` ```js fetch("http://localhost:3000/api/admin.cleanGithubApp", { method: "POST" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## admin-getRepositories ### Authorization "} required={true}> In: `header` | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X GET "http://localhost:3000/api/admin.getRepositories" ``` ```js fetch("http://localhost:3000/api/admin.getRepositories", { method: "GET" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## admin-getBranches ### Authorization "} required={true}> In: `header` ### Query Parameters Minimum length: `1` Minimum length: `1` | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X GET "http://localhost:3000/api/admin.getBranches?repo=string&owner=string" ``` ```js fetch("http://localhost:3000/api/admin.getBranches?repo=string&owner=string", { method: "GET" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ``` ## admin-haveGithubConfigured ### Authorization "} required={true}> In: `header` | Status code | Description | | ----------- | ----------- | | `200` | Successful response | | `default` | Error response | ```bash curl -X GET "http://localhost:3000/api/admin.haveGithubConfigured" ``` ```js fetch("http://localhost:3000/api/admin.haveGithubConfigured", { method: "GET" }); ``` ```json { "message": "string", "code": "string", "issues": [ { "message": "string" } ] } ``` ```ts export interface Response { message: string; code: string; issues?: { message: string; }[]; } ```