Files
dokploy/apps/docs/content/docs/api/reference-api/reference-bitbucket.mdx
2024-09-01 23:11:17 -06:00

779 lines
11 KiB
Plaintext

---
title: bitbucket
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={"/bitbucket.create"}>
## bitbucket-create
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Request Body
<Property name={"bitbucketId"} type={"string"} required={false} deprecated={undefined}>
</Property>
<Property name={"bitbucketUsername"} type={"string"} required={false} deprecated={undefined}>
</Property>
<Property name={"appPassword"} type={"string"} required={false} deprecated={undefined}>
</Property>
<Property name={"bitbucketWorkspaceName"} type={"string"} required={false} deprecated={undefined}>
</Property>
<Property name={"gitProviderId"} type={"string"} required={false} deprecated={undefined}>
</Property>
<Property name={"authId"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"name"} 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/bitbucket.create" \
-d '{
"bitbucketId": "string",
"bitbucketUsername": "string",
"appPassword": "string",
"bitbucketWorkspaceName": "string",
"gitProviderId": "string",
"authId": "string",
"name": "string"
}'
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/bitbucket.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={"/bitbucket.one"}>
## bitbucket-one
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Query Parameters
<Property name={"bitbucketId"} 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/bitbucket.one?bitbucketId=string"
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/bitbucket.one?bitbucketId=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={"/bitbucket.bitbucketProviders"}>
## bitbucket-bitbucketProviders
### 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/bitbucket.bitbucketProviders"
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/bitbucket.bitbucketProviders", {
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={"/bitbucket.getBitbucketRepositories"}>
## bitbucket-getBitbucketRepositories
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Query Parameters
<Property name={"bitbucketId"} 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/bitbucket.getBitbucketRepositories?bitbucketId=string"
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/bitbucket.getBitbucketRepositories?bitbucketId=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={"/bitbucket.getBitbucketBranches"}>
## bitbucket-getBitbucketBranches
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Query Parameters
<Property name={"owner"} type={"string"} required={true} deprecated={false}>
</Property>
<Property name={"repo"} type={"string"} required={true} deprecated={false}>
</Property>
<Property name={"bitbucketId"} type={"string"} required={false} deprecated={false}>
</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/bitbucket.getBitbucketBranches?owner=string&repo=string&bitbucketId=string"
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/bitbucket.getBitbucketBranches?owner=string&repo=string&bitbucketId=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={"POST"} route={"/bitbucket.testConnection"}>
## bitbucket-testConnection
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Request Body
<Property name={"bitbucketId"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"bitbucketUsername"} type={"string"} required={false} deprecated={undefined}>
</Property>
<Property name={"workspaceName"} type={"string"} 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/bitbucket.testConnection" \
-d '{
"bitbucketId": "string",
"bitbucketUsername": "string",
"workspaceName": "string"
}'
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/bitbucket.testConnection", {
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={"/bitbucket.update"}>
## bitbucket-update
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Request Body
<Property name={"bitbucketId"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"bitbucketUsername"} type={"string"} required={false} deprecated={undefined}>
</Property>
<Property name={"appPassword"} type={"string | null"} required={false} deprecated={undefined}>
</Property>
<Property name={"bitbucketWorkspaceName"} type={"string"} required={false} deprecated={undefined}>
</Property>
<Property name={"gitProviderId"} type={"string"} required={true} deprecated={undefined}>
</Property>
<Property name={"name"} 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/bitbucket.update" \
-d '{
"bitbucketId": "string",
"bitbucketUsername": "string",
"appPassword": "string",
"bitbucketWorkspaceName": "string",
"gitProviderId": "string",
"name": "string"
}'
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/bitbucket.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>