mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
523 lines
6.7 KiB
Plaintext
523 lines
6.7 KiB
Plaintext
---
|
|
title: project
|
|
full: true
|
|
---
|
|
|
|
import { Root, API, APIInfo, APIExample, Responses, Response, ResponseTypes, ExampleResponse, TypeScriptResponse, Property, ObjectCollapsible, Requests, Request } from "fumadocs-ui/components/api";
|
|
|
|
<Root>
|
|
|
|
<API>
|
|
|
|
<APIInfo method={"POST"} route={"/project.create"}>
|
|
|
|
## project-create
|
|
|
|
### Authorization
|
|
|
|
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
|
|
|
|
In: `header`
|
|
|
|
</Property>
|
|
|
|
### Request Body
|
|
|
|
<Property name={"name"} type={"string"} required={true} deprecated={undefined}>
|
|
|
|
<span>Minimum length: `1`</span>
|
|
|
|
</Property>
|
|
|
|
<Property name={"description"} type={"string | null"} required={false} deprecated={undefined}>
|
|
|
|
</Property>
|
|
|
|
| Status code | Description |
|
|
| ----------- | ----------- |
|
|
| `200` | Successful response |
|
|
| `default` | Error response |
|
|
|
|
</APIInfo>
|
|
|
|
<APIExample>
|
|
|
|
<Requests items={["cURL","JavaScript"]}>
|
|
|
|
<Request value={"cURL"}>
|
|
|
|
```bash
|
|
curl -X POST "http://localhost:3000/api/project.create" \
|
|
-d '{
|
|
"name": "string",
|
|
"description": "string"
|
|
}'
|
|
```
|
|
|
|
</Request>
|
|
|
|
<Request value={"JavaScript"}>
|
|
|
|
```js
|
|
fetch("http://localhost:3000/api/project.create", {
|
|
method: "POST"
|
|
});
|
|
```
|
|
|
|
</Request>
|
|
|
|
</Requests>
|
|
|
|
<Responses items={["default"]}>
|
|
|
|
<Response value={"default"}>
|
|
|
|
<ResponseTypes>
|
|
|
|
<ExampleResponse>
|
|
|
|
```json
|
|
{
|
|
"message": "string",
|
|
"code": "string",
|
|
"issues": [
|
|
{
|
|
"message": "string"
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
</ExampleResponse>
|
|
|
|
<TypeScriptResponse>
|
|
|
|
```ts
|
|
export interface Response {
|
|
message: string;
|
|
code: string;
|
|
issues?: {
|
|
message: string;
|
|
}[];
|
|
}
|
|
```
|
|
|
|
</TypeScriptResponse>
|
|
|
|
</ResponseTypes>
|
|
|
|
</Response>
|
|
|
|
</Responses>
|
|
|
|
</APIExample>
|
|
|
|
</API>
|
|
|
|
<API>
|
|
|
|
<APIInfo method={"GET"} route={"/project.one"}>
|
|
|
|
## project-one
|
|
|
|
### Authorization
|
|
|
|
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
|
|
|
|
In: `header`
|
|
|
|
</Property>
|
|
|
|
### Query Parameters
|
|
|
|
<Property name={"projectId"} type={"string"} required={true} deprecated={false}>
|
|
|
|
<span>Minimum length: `1`</span>
|
|
|
|
</Property>
|
|
|
|
| Status code | Description |
|
|
| ----------- | ----------- |
|
|
| `200` | Successful response |
|
|
| `default` | Error response |
|
|
|
|
</APIInfo>
|
|
|
|
<APIExample>
|
|
|
|
<Requests items={["cURL","JavaScript"]}>
|
|
|
|
<Request value={"cURL"}>
|
|
|
|
```bash
|
|
curl -X GET "http://localhost:3000/api/project.one?projectId=string"
|
|
```
|
|
|
|
</Request>
|
|
|
|
<Request value={"JavaScript"}>
|
|
|
|
```js
|
|
fetch("http://localhost:3000/api/project.one?projectId=string", {
|
|
method: "GET"
|
|
});
|
|
```
|
|
|
|
</Request>
|
|
|
|
</Requests>
|
|
|
|
<Responses items={["default"]}>
|
|
|
|
<Response value={"default"}>
|
|
|
|
<ResponseTypes>
|
|
|
|
<ExampleResponse>
|
|
|
|
```json
|
|
{
|
|
"message": "string",
|
|
"code": "string",
|
|
"issues": [
|
|
{
|
|
"message": "string"
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
</ExampleResponse>
|
|
|
|
<TypeScriptResponse>
|
|
|
|
```ts
|
|
export interface Response {
|
|
message: string;
|
|
code: string;
|
|
issues?: {
|
|
message: string;
|
|
}[];
|
|
}
|
|
```
|
|
|
|
</TypeScriptResponse>
|
|
|
|
</ResponseTypes>
|
|
|
|
</Response>
|
|
|
|
</Responses>
|
|
|
|
</APIExample>
|
|
|
|
</API>
|
|
|
|
<API>
|
|
|
|
<APIInfo method={"GET"} route={"/project.all"}>
|
|
|
|
## project-all
|
|
|
|
### Authorization
|
|
|
|
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
|
|
|
|
In: `header`
|
|
|
|
</Property>
|
|
|
|
| Status code | Description |
|
|
| ----------- | ----------- |
|
|
| `200` | Successful response |
|
|
| `default` | Error response |
|
|
|
|
</APIInfo>
|
|
|
|
<APIExample>
|
|
|
|
<Requests items={["cURL","JavaScript"]}>
|
|
|
|
<Request value={"cURL"}>
|
|
|
|
```bash
|
|
curl -X GET "http://localhost:3000/api/project.all"
|
|
```
|
|
|
|
</Request>
|
|
|
|
<Request value={"JavaScript"}>
|
|
|
|
```js
|
|
fetch("http://localhost:3000/api/project.all", {
|
|
method: "GET"
|
|
});
|
|
```
|
|
|
|
</Request>
|
|
|
|
</Requests>
|
|
|
|
<Responses items={["default"]}>
|
|
|
|
<Response value={"default"}>
|
|
|
|
<ResponseTypes>
|
|
|
|
<ExampleResponse>
|
|
|
|
```json
|
|
{
|
|
"message": "string",
|
|
"code": "string",
|
|
"issues": [
|
|
{
|
|
"message": "string"
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
</ExampleResponse>
|
|
|
|
<TypeScriptResponse>
|
|
|
|
```ts
|
|
export interface Response {
|
|
message: string;
|
|
code: string;
|
|
issues?: {
|
|
message: string;
|
|
}[];
|
|
}
|
|
```
|
|
|
|
</TypeScriptResponse>
|
|
|
|
</ResponseTypes>
|
|
|
|
</Response>
|
|
|
|
</Responses>
|
|
|
|
</APIExample>
|
|
|
|
</API>
|
|
|
|
<API>
|
|
|
|
<APIInfo method={"POST"} route={"/project.remove"}>
|
|
|
|
## project-remove
|
|
|
|
### Authorization
|
|
|
|
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
|
|
|
|
In: `header`
|
|
|
|
</Property>
|
|
|
|
### Request Body
|
|
|
|
<Property name={"projectId"} type={"string"} required={true} deprecated={undefined}>
|
|
|
|
<span>Minimum length: `1`</span>
|
|
|
|
</Property>
|
|
|
|
| Status code | Description |
|
|
| ----------- | ----------- |
|
|
| `200` | Successful response |
|
|
| `default` | Error response |
|
|
|
|
</APIInfo>
|
|
|
|
<APIExample>
|
|
|
|
<Requests items={["cURL","JavaScript"]}>
|
|
|
|
<Request value={"cURL"}>
|
|
|
|
```bash
|
|
curl -X POST "http://localhost:3000/api/project.remove" \
|
|
-d '{
|
|
"projectId": "string"
|
|
}'
|
|
```
|
|
|
|
</Request>
|
|
|
|
<Request value={"JavaScript"}>
|
|
|
|
```js
|
|
fetch("http://localhost:3000/api/project.remove", {
|
|
method: "POST"
|
|
});
|
|
```
|
|
|
|
</Request>
|
|
|
|
</Requests>
|
|
|
|
<Responses items={["default"]}>
|
|
|
|
<Response value={"default"}>
|
|
|
|
<ResponseTypes>
|
|
|
|
<ExampleResponse>
|
|
|
|
```json
|
|
{
|
|
"message": "string",
|
|
"code": "string",
|
|
"issues": [
|
|
{
|
|
"message": "string"
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
</ExampleResponse>
|
|
|
|
<TypeScriptResponse>
|
|
|
|
```ts
|
|
export interface Response {
|
|
message: string;
|
|
code: string;
|
|
issues?: {
|
|
message: string;
|
|
}[];
|
|
}
|
|
```
|
|
|
|
</TypeScriptResponse>
|
|
|
|
</ResponseTypes>
|
|
|
|
</Response>
|
|
|
|
</Responses>
|
|
|
|
</APIExample>
|
|
|
|
</API>
|
|
|
|
<API>
|
|
|
|
<APIInfo method={"POST"} route={"/project.update"}>
|
|
|
|
## project-update
|
|
|
|
### Authorization
|
|
|
|
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
|
|
|
|
In: `header`
|
|
|
|
</Property>
|
|
|
|
### Request Body
|
|
|
|
<Property name={"name"} type={"string"} required={true} deprecated={undefined}>
|
|
|
|
<span>Minimum length: `1`</span>
|
|
|
|
</Property>
|
|
|
|
<Property name={"description"} type={"string | null"} required={false} deprecated={undefined}>
|
|
|
|
</Property>
|
|
|
|
<Property name={"projectId"} type={"string"} required={true} deprecated={undefined}>
|
|
|
|
<span>Minimum length: `1`</span>
|
|
|
|
</Property>
|
|
|
|
| Status code | Description |
|
|
| ----------- | ----------- |
|
|
| `200` | Successful response |
|
|
| `default` | Error response |
|
|
|
|
</APIInfo>
|
|
|
|
<APIExample>
|
|
|
|
<Requests items={["cURL","JavaScript"]}>
|
|
|
|
<Request value={"cURL"}>
|
|
|
|
```bash
|
|
curl -X POST "http://localhost:3000/api/project.update" \
|
|
-d '{
|
|
"name": "string",
|
|
"description": "string",
|
|
"projectId": "string"
|
|
}'
|
|
```
|
|
|
|
</Request>
|
|
|
|
<Request value={"JavaScript"}>
|
|
|
|
```js
|
|
fetch("http://localhost:3000/api/project.update", {
|
|
method: "POST"
|
|
});
|
|
```
|
|
|
|
</Request>
|
|
|
|
</Requests>
|
|
|
|
<Responses items={["default"]}>
|
|
|
|
<Response value={"default"}>
|
|
|
|
<ResponseTypes>
|
|
|
|
<ExampleResponse>
|
|
|
|
```json
|
|
{
|
|
"message": "string",
|
|
"code": "string",
|
|
"issues": [
|
|
{
|
|
"message": "string"
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
</ExampleResponse>
|
|
|
|
<TypeScriptResponse>
|
|
|
|
```ts
|
|
export interface Response {
|
|
message: string;
|
|
code: string;
|
|
issues?: {
|
|
message: string;
|
|
}[];
|
|
}
|
|
```
|
|
|
|
</TypeScriptResponse>
|
|
|
|
</ResponseTypes>
|
|
|
|
</Response>
|
|
|
|
</Responses>
|
|
|
|
</APIExample>
|
|
|
|
</API>
|
|
|
|
</Root> |