MENU

# Introduction

VitoDeploy's API documentation.

Base URL: `https://your-vito-url`

This documentation aims to provide all the information you need to work with our API.

As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile). You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).

# Authenticating requests

To authenticate requests, include an `Authorization` header with the value `"Bearer YOUR-API-KEY"`.

All authenticated endpoints are marked with a `requires authentication` badge in the documentation below.

You can retrieve your token by visiting here

# cron-jobs

## list

requires authentication

Get all cron jobs.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/servers/3/cron-jobs" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/cron-jobs';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/cron-jobs"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "data": [
            {
                "id": null,
                "server_id": null,
                "command": "ls -la",
                "user": "root",
                "frequency": "* * * * *",
                "status": "ready",
                "created_at": null,
                "updated_at": null
            },
            {
                "id": null,
                "server_id": null,
                "command": "ls -la",
                "user": "root",
                "frequency": "* * * * *",
                "status": "ready",
                "created_at": null,
                "updated_at": null
            }
        ],
        "links": {
            "first": "/?page=1",
            "last": "/?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "links": [
                {
                    "url": null,
                    "label": "&laquo; Previous",
                    "active": false
                },
                {
                    "url": "/?page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next &raquo;",
                    "active": false
                }
            ],
            "path": "/",
            "per_page": 25,
            "to": 2,
            "total": 2
        }
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/servers/{server_id}/cron-jobs`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

## create

requires authentication

Create a new cron job.

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/servers/3/cron-jobs" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json" \
        --data "{
        \"command\": \"qui\",
        \"user\": \"root\",
        \"frequency\": \"* * * * *\"
    }"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/cron-jobs';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'json' => [
                'command' => 'qui',
                'user' => 'root',
                'frequency' => '* * * * *',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/cron-jobs"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "command": "qui",
        "user": "root",
        "frequency": "* * * * *"
    };

    fetch(url, {
        method: "POST",
        headers,
        body: JSON.stringify(body),
    }).then(response => response.json());

> Example response (200):

    {
        "id": null,
        "server_id": null,
        "command": "ls -la",
        "user": "root",
        "frequency": "* * * * *",
        "status": "ready",
        "created_at": null,
        "updated_at": null
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/servers/{server_id}/cron-jobs`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

#### Body Parameters

`command` string

Example: `qui`

`user` string

Example: `root`

Must be one of:

- `root`
- `vito`

`frequency` string

Frequency of the cron job. Example: `* * * * *`

## show

requires authentication

Get a cron job by ID.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/servers/3/cron-jobs/5" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/cron-jobs/5';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/cron-jobs/5"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "id": null,
        "server_id": null,
        "command": "ls -la",
        "user": "root",
        "frequency": "* * * * *",
        "status": "ready",
        "created_at": null,
        "updated_at": null
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`cronJob_id` integer

The ID of the cronJob. Example: `5`

## delete

requires authentication

Delete cron job.

> Example request:

    curl --request DELETE \
        "https://your-vito-url/api/projects/1/servers/3/cron-jobs/5" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/cron-jobs/5';
    $response = $client->delete(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/cron-jobs/5"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

DELETE `api/projects/{project_id}/servers/{server_id}/cron-jobs/{cronJob_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`cronJob_id` integer

The ID of the cronJob. Example: `5`

# database-users

## list

requires authentication

Get all database users.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/servers/3/database-users" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/database-users';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/database-users"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "data": [
            {
                "id": null,
                "server_id": null,
                "username": "nyasia68",
                "databases": [],
                "host": "%",
                "status": null,
                "created_at": null,
                "updated_at": null
            },
            {
                "id": null,
                "server_id": null,
                "username": "madyson20",
                "databases": [],
                "host": "%",
                "status": null,
                "created_at": null,
                "updated_at": null
            }
        ],
        "links": {
            "first": "/?page=1",
            "last": "/?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "links": [
                {
                    "url": null,
                    "label": "&laquo; Previous",
                    "active": false
                },
                {
                    "url": "/?page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next &raquo;",
                    "active": false
                }
            ],
            "path": "/",
            "per_page": 25,
            "to": 2,
            "total": 2
        }
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/servers/{server_id}/database-users`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

## create

requires authentication

Create a new database user.

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/servers/3/database-users" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json" \
        --data "{
        \"username\": \"dignissimos\",
        \"password\": \"OK+XEG2)\",
        \"host\": \"%\"
    }"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/database-users';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'json' => [
                'username' => 'dignissimos',
                'password' => 'OK+XEG2)',
                'host' => '%',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/database-users"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "username": "dignissimos",
        "password": "OK+XEG2)",
        "host": "%"
    };

    fetch(url, {
        method: "POST",
        headers,
        body: JSON.stringify(body),
    }).then(response => response.json());

> Example response (200):

    {
        "id": null,
        "server_id": null,
        "username": "amya.nitzsche",
        "databases": [],
        "host": "%",
        "status": null,
        "created_at": null,
        "updated_at": null
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/servers/{server_id}/database-users`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

#### Body Parameters

`username` string

Example: `dignissimos`

`password` string

Example: `OK+XEG2)`

`host` string

Host, if it is a remote user. Example: `%`

## show

requires authentication

Get a database user by ID.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/servers/3/database-users/4" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/database-users/4';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/database-users/4"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "id": null,
        "server_id": null,
        "username": "bergstrom.ericka",
        "databases": [],
        "host": "%",
        "status": null,
        "created_at": null,
        "updated_at": null
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`databaseUser_id` integer

The ID of the databaseUser. Example: `4`

## link

requires authentication

Link to databases

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/servers/3/database-users/4/link" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json" \
        --data "{
        \"databases\": \"accusantium\"
    }"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/database-users/4/link';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'json' => [
                'databases' => 'accusantium',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/database-users/4/link"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "databases": "accusantium"
    };

    fetch(url, {
        method: "POST",
        headers,
        body: JSON.stringify(body),
    }).then(response => response.json());

> Example response (200):

    {
        "id": null,
        "server_id": null,
        "username": "fmurray",
        "databases": [],
        "host": "%",
        "status": null,
        "created_at": null,
        "updated_at": null
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}/link`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`databaseUser_id` integer

The ID of the databaseUser. Example: `4`

#### Body Parameters

`databases` string

Array of database names to link to the user. Example: `accusantium`

## delete

requires authentication

Delete database user.

> Example request:

    curl --request DELETE \
        "https://your-vito-url/api/projects/1/servers/3/database-users/4" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/database-users/4';
    $response = $client->delete(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/database-users/4"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

DELETE `api/projects/{project_id}/servers/{server_id}/database-users/{databaseUser_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`databaseUser_id` integer

The ID of the databaseUser. Example: `4`

# databases

## list

requires authentication

Get all databases.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/servers/3/databases" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/databases';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/databases"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "data": [
            {
                "id": null,
                "server_id": null,
                "name": "clockman",
                "status": "ready",
                "created_at": null,
                "updated_at": null
            },
            {
                "id": null,
                "server_id": null,
                "name": "wvonrueden",
                "status": "ready",
                "created_at": null,
                "updated_at": null
            }
        ],
        "links": {
            "first": "/?page=1",
            "last": "/?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "links": [
                {
                    "url": null,
                    "label": "&laquo; Previous",
                    "active": false
                },
                {
                    "url": "/?page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next &raquo;",
                    "active": false
                }
            ],
            "path": "/",
            "per_page": 25,
            "to": 2,
            "total": 2
        }
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/servers/{server_id}/databases`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

## create

requires authentication

Create a new database.

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/servers/3/databases" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json" \
        --data "{
        \"name\": \"nesciunt\"
    }"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/databases';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'json' => [
                'name' => 'nesciunt',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/databases"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "name": "nesciunt"
    };

    fetch(url, {
        method: "POST",
        headers,
        body: JSON.stringify(body),
    }).then(response => response.json());

> Example response (200):

    {
        "id": null,
        "server_id": null,
        "name": "johanna76",
        "status": "ready",
        "created_at": null,
        "updated_at": null
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/servers/{server_id}/databases`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

#### Body Parameters

`name` string

Example: `nesciunt`

## show

requires authentication

Get a database by ID.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/servers/3/databases/6" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/databases/6';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/databases/6"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "id": null,
        "server_id": null,
        "name": "chloe.huel",
        "status": "ready",
        "created_at": null,
        "updated_at": null
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/servers/{server_id}/databases/{id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`id` integer

The ID of the database. Example: `6`

## delete

requires authentication

Delete database.

> Example request:

    curl --request DELETE \
        "https://your-vito-url/api/projects/1/servers/3/databases/6" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/databases/6';
    $response = $client->delete(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/databases/6"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

DELETE `api/projects/{project_id}/servers/{server_id}/databases/{database_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`database_id` integer

The ID of the database. Example: `6`

# firewall-rules

## list

requires authentication

Get all firewall rules.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/servers/3/firewall-rules" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/firewall-rules';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/firewall-rules"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "data": [
            {
                "id": null,
                "server_id": null,
                "type": "allow",
                "protocol": "tcp",
                "port": 18074,
                "source": "189.27.156.82",
                "mask": 24,
                "note": "test",
                "status": null,
                "created_at": null,
                "updated_at": null
            },
            {
                "id": null,
                "server_id": null,
                "type": "allow",
                "protocol": "tcp",
                "port": 41088,
                "source": "86.177.121.87",
                "mask": 24,
                "note": "test",
                "status": null,
                "created_at": null,
                "updated_at": null
            }
        ],
        "links": {
            "first": "/?page=1",
            "last": "/?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "links": [
                {
                    "url": null,
                    "label": "&laquo; Previous",
                    "active": false
                },
                {
                    "url": "/?page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next &raquo;",
                    "active": false
                }
            ],
            "path": "/",
            "per_page": 25,
            "to": 2,
            "total": 2
        }
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/servers/{server_id}/firewall-rules`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

## create

requires authentication

Create a new firewall rule.

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/servers/3/firewall-rules" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json" \
        --data "{
        \"type\": \"allow\",
        \"protocol\": \"udp\",
        \"port\": \"voluptates\",
        \"source\": \"saepe\",
        \"mask\": \"0\"
    }"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/firewall-rules';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'json' => [
                'type' => 'allow',
                'protocol' => 'udp',
                'port' => 'voluptates',
                'source' => 'saepe',
                'mask' => '0',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/firewall-rules"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "type": "allow",
        "protocol": "udp",
        "port": "voluptates",
        "source": "saepe",
        "mask": "0"
    };

    fetch(url, {
        method: "POST",
        headers,
        body: JSON.stringify(body),
    }).then(response => response.json());

> Example response (200):

    {
        "id": null,
        "server_id": null,
        "type": "allow",
        "protocol": "tcp",
        "port": 61992,
        "source": "47.222.76.48",
        "mask": 24,
        "note": "test",
        "status": null,
        "created_at": null,
        "updated_at": null
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/servers/{server_id}/firewall-rules`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

#### Body Parameters

`type` string

Example: `allow`

Must be one of:

- `allow`
- `deny`

`protocol` string

Example: `udp`

Must be one of:

- `tcp`
- `udp`

`port` string

Example: `voluptates`

`source` string

Example: `saepe`

`mask` string

Mask for source IP. Example: `0`

## show

requires authentication

Get a firewall rule by ID.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/servers/3/firewall-rules/7" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/firewall-rules/7';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/firewall-rules/7"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "id": null,
        "server_id": null,
        "type": "allow",
        "protocol": "tcp",
        "port": 43107,
        "source": "135.73.216.16",
        "mask": 24,
        "note": "test",
        "status": null,
        "created_at": null,
        "updated_at": null
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`firewallRule_id` integer

The ID of the firewallRule. Example: `7`

## delete

requires authentication

Delete firewall rule.

> Example request:

    curl --request DELETE \
        "https://your-vito-url/api/projects/1/servers/3/firewall-rules/7" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/firewall-rules/7';
    $response = $client->delete(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/firewall-rules/7"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

DELETE `api/projects/{project_id}/servers/{server_id}/firewall-rules/{firewallRule_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`firewallRule_id` integer

The ID of the firewallRule. Example: `7`

# general

## health-check

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/health" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/health';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/health"
    );

    const headers = {
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

Show headers

    cache-control: no-cache, private
    content-type: application/json
    x-ratelimit-limit: 60
    x-ratelimit-remaining: 59
    access-control-allow-origin: *

    {
        "success": true,
        "version": "2.0.0"
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/health`

#### Headers

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

# projects

## list

requires authentication

Get all projects.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "data": [
            {
                "id": 29,
                "name": "Zachary Lueilwitz",
                "created_at": "2024-11-01T15:40:48.000000Z",
                "updated_at": "2024-11-01T15:40:48.000000Z"
            },
            {
                "id": 30,
                "name": "Mrs. Kiarra Heller IV",
                "created_at": "2024-11-01T15:40:48.000000Z",
                "updated_at": "2024-11-01T15:40:48.000000Z"
            }
        ],
        "links": {
            "first": "/?page=1",
            "last": "/?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "links": [
                {
                    "url": null,
                    "label": "&laquo; Previous",
                    "active": false
                },
                {
                    "url": "/?page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next &raquo;",
                    "active": false
                }
            ],
            "path": "/",
            "per_page": 25,
            "to": 2,
            "total": 2
        }
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

## create

requires authentication

Create a new project.

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json" \
        --data "{
        \"name\": \"quos\"
    }"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'json' => [
                'name' => 'quos',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "name": "quos"
    };

    fetch(url, {
        method: "POST",
        headers,
        body: JSON.stringify(body),
    }).then(response => response.json());

> Example response (200):

    {
        "id": 29,
        "name": "Hershel Spinka",
        "created_at": "2024-11-01T15:40:48.000000Z",
        "updated_at": "2024-11-01T15:40:48.000000Z"
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### Body Parameters

`name` string

The name of the project. Example: `quos`

## show

requires authentication

Get a project by ID.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "id": 29,
        "name": "Emery Kiehn",
        "created_at": "2024-11-01T15:40:48.000000Z",
        "updated_at": "2024-11-01T15:40:48.000000Z"
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`id` integer

The ID of the project. Example: `1`

## update

requires authentication

Update project.

> Example request:

    curl --request PUT \
        "https://your-vito-url/api/projects/1" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json" \
        --data "{
        \"name\": \"ut\"
    }"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1';
    $response = $client->put(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'json' => [
                'name' => 'ut',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "name": "ut"
    };

    fetch(url, {
        method: "PUT",
        headers,
        body: JSON.stringify(body),
    }).then(response => response.json());

> Example response (200):

    {
        "id": 29,
        "name": "Mable Prohaska",
        "created_at": "2024-11-01T15:40:48.000000Z",
        "updated_at": "2024-11-01T15:40:48.000000Z"
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

PUT `api/projects/{id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`id` integer

The ID of the project. Example: `1`

#### Body Parameters

`name` string

The name of the project. Example: `ut`

## delete

requires authentication

Delete project.

> Example request:

    curl --request DELETE \
        "https://your-vito-url/api/projects/1" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1';
    $response = $client->delete(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

DELETE `api/projects/{project_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

# server-providers

## list

requires authentication

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/server-providers" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/server-providers';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/server-providers"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "data": [
            {
                "id": 2,
                "project_id": null,
                "global": true,
                "name": "dolor",
                "provider": "digitalocean",
                "created_at": "2024-11-01T15:40:48.000000Z",
                "updated_at": "2024-11-01T15:40:48.000000Z"
            },
            {
                "id": 3,
                "project_id": null,
                "global": true,
                "name": "enim",
                "provider": "digitalocean",
                "created_at": "2024-11-01T15:40:48.000000Z",
                "updated_at": "2024-11-01T15:40:48.000000Z"
            }
        ],
        "links": {
            "first": "/?page=1",
            "last": "/?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "links": [
                {
                    "url": null,
                    "label": "&laquo; Previous",
                    "active": false
                },
                {
                    "url": "/?page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next &raquo;",
                    "active": false
                }
            ],
            "path": "/",
            "per_page": 25,
            "to": 2,
            "total": 2
        }
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/server-providers`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

## create

requires authentication

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/server-providers" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json" \
        --data "{
        \"provider\": \"autem\",
        \"name\": \"enim\",
        \"token\": \"culpa\",
        \"key\": \"sit\",
        \"secret\": \"voluptates\"
    }"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/server-providers';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'json' => [
                'provider' => 'autem',
                'name' => 'enim',
                'token' => 'culpa',
                'key' => 'sit',
                'secret' => 'voluptates',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/server-providers"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "provider": "autem",
        "name": "enim",
        "token": "culpa",
        "key": "sit",
        "secret": "voluptates"
    };

    fetch(url, {
        method: "POST",
        headers,
        body: JSON.stringify(body),
    }).then(response => response.json());

> Example response (200):

    {
        "id": 2,
        "project_id": null,
        "global": true,
        "name": "eligendi",
        "provider": "aws",
        "created_at": "2024-11-01T15:40:48.000000Z",
        "updated_at": "2024-11-01T15:40:48.000000Z"
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/server-providers`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

#### Body Parameters

`provider` string

The provider (aws, linode, hetzner, digitalocean, vultr, ...) Example: `autem`

`name` string

The name of the server provider. Example: `enim`

`token` string

The token if provider requires api token Example: `culpa`

`key` string

The key if provider requires key Example: `sit`

`secret` string

The secret if provider requires key Example: `voluptates`

## show

requires authentication

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/server-providers/1" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/server-providers/1';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/server-providers/1"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "id": 2,
        "project_id": null,
        "global": true,
        "name": "architecto",
        "provider": "digitalocean",
        "created_at": "2024-11-01T15:40:48.000000Z",
        "updated_at": "2024-11-01T15:40:48.000000Z"
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/server-providers/{serverProvider_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`serverProvider_id` integer

The ID of the serverProvider. Example: `1`

## update

requires authentication

> Example request:

    curl --request PUT \
        "https://your-vito-url/api/projects/1/server-providers/1" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json" \
        --data "{
        \"name\": \"minus\",
        \"global\": false
    }"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/server-providers/1';
    $response = $client->put(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'json' => [
                'name' => 'minus',
                'global' => false,
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/server-providers/1"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "name": "minus",
        "global": false
    };

    fetch(url, {
        method: "PUT",
        headers,
        body: JSON.stringify(body),
    }).then(response => response.json());

> Example response (200):

    {
        "id": 2,
        "project_id": null,
        "global": true,
        "name": "reiciendis",
        "provider": "hetzner",
        "created_at": "2024-11-01T15:40:48.000000Z",
        "updated_at": "2024-11-01T15:40:48.000000Z"
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

PUT `api/projects/{project_id}/server-providers/{serverProvider_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`serverProvider_id` integer

The ID of the serverProvider. Example: `1`

#### Body Parameters

`name` string

The name of the server provider. Example: `minus`

`global` string

Accessible in all projects Example: `false`

Must be one of:

- `1`
- ``

## delete

requires authentication

> Example request:

    curl --request DELETE \
        "https://your-vito-url/api/projects/1/server-providers/1" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/server-providers/1';
    $response = $client->delete(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/server-providers/1"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

DELETE `api/projects/{project_id}/server-providers/{serverProvider_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`serverProvider_id` integer

The ID of the serverProvider. Example: `1`

# servers

## list

requires authentication

Get all servers in a project.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/servers" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "data": [
            {
                "id": null,
                "project_id": null,
                "user_id": null,
                "provider_id": null,
                "name": "Dorthy Toy",
                "ssh_user": "vito",
                "ip": "172.132.95.155",
                "local_ip": "118.57.197.65",
                "port": 22,
                "os": "ubuntu_22",
                "type": "regular",
                "type_data": null,
                "provider": "custom",
                "provider_data": null,
                "public_key": "test",
                "status": "ready",
                "auto_update": null,
                "available_updates": 0,
                "security_updates": null,
                "progress": 100,
                "progress_step": null,
                "updates": null,
                "last_update_check": null,
                "created_at": null,
                "updated_at": null
            },
            {
                "id": null,
                "project_id": null,
                "user_id": null,
                "provider_id": null,
                "name": "Carrie Sporer",
                "ssh_user": "vito",
                "ip": "184.242.162.173",
                "local_ip": "135.244.50.22",
                "port": 22,
                "os": "ubuntu_22",
                "type": "regular",
                "type_data": null,
                "provider": "custom",
                "provider_data": null,
                "public_key": "test",
                "status": "ready",
                "auto_update": null,
                "available_updates": 0,
                "security_updates": null,
                "progress": 100,
                "progress_step": null,
                "updates": null,
                "last_update_check": null,
                "created_at": null,
                "updated_at": null
            }
        ],
        "links": {
            "first": "/?page=1",
            "last": "/?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "links": [
                {
                    "url": null,
                    "label": "&laquo; Previous",
                    "active": false
                },
                {
                    "url": "/?page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next &raquo;",
                    "active": false
                }
            ],
            "path": "/",
            "per_page": 25,
            "to": 2,
            "total": 2
        }
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/servers`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

## create

requires authentication

Create a new server.

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/servers" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json" \
        --data "{
        \"provider\": \"et\",
        \"server_provider\": \"digitalocean\",
        \"region\": \"inventore\",
        \"plan\": \"atque\",
        \"ip\": \"quam\",
        \"port\": \"nemo\",
        \"name\": \"perspiciatis\",
        \"os\": \"similique\",
        \"type\": \"regular\",
        \"webserver\": \"none\",
        \"database\": \"none\",
        \"php\": \"8.1\"
    }"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'json' => [
                'provider' => 'et',
                'server_provider' => 'digitalocean',
                'region' => 'inventore',
                'plan' => 'atque',
                'ip' => 'quam',
                'port' => 'nemo',
                'name' => 'perspiciatis',
                'os' => 'similique',
                'type' => 'regular',
                'webserver' => 'none',
                'database' => 'none',
                'php' => '8.1',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "provider": "et",
        "server_provider": "digitalocean",
        "region": "inventore",
        "plan": "atque",
        "ip": "quam",
        "port": "nemo",
        "name": "perspiciatis",
        "os": "similique",
        "type": "regular",
        "webserver": "none",
        "database": "none",
        "php": "8.1"
    };

    fetch(url, {
        method: "POST",
        headers,
        body: JSON.stringify(body),
    }).then(response => response.json());

> Example response (200):

    {
        "id": null,
        "project_id": null,
        "user_id": null,
        "provider_id": null,
        "name": "Flo Beer PhD",
        "ssh_user": "vito",
        "ip": "168.238.14.230",
        "local_ip": "40.232.73.41",
        "port": 22,
        "os": "ubuntu_22",
        "type": "regular",
        "type_data": null,
        "provider": "custom",
        "provider_data": null,
        "public_key": "test",
        "status": "ready",
        "auto_update": null,
        "available_updates": 0,
        "security_updates": null,
        "progress": 100,
        "progress_step": null,
        "updates": null,
        "last_update_check": null,
        "created_at": null,
        "updated_at": null
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/servers`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

#### Body Parameters

`provider` string

The server provider type Example: `et`

`server_provider` string

If the provider is not custom, the ID of the server provider profile Example: `digitalocean`

Must be one of:

- `custom`
- `hetzner`
- `digitalocean`
- `linode`
- `vultr`

`region` string

Provider region if the provider is not custom Example: `inventore`

`plan` string

Provider plan if the provider is not custom Example: `atque`

`ip` string

SSH IP address if the provider is custom Example: `quam`

`port` string

SSH Port if the provider is custom Example: `nemo`

`name` string

The name of the server. Example: `perspiciatis`

`os` string

The os of the server Example: `similique`

`type` string

Server type Example: `regular`

Must be one of:

- `regular`
- `database`

`webserver` string

Web server Example: `none`

Must be one of:

- `none`
- `nginx`

`database` string

Database Example: `none`

Must be one of:

- `none`
- `mysql57`
- `mysql80`
- `mariadb103`
- `mariadb104`
- `mariadb103`
- `postgresql12`
- `postgresql13`
- `postgresql14`
- `postgresql15`
- `postgresql16`

`php` string

PHP version Example: `8.1`

Must be one of:

- `7.0`
- `7.1`
- `7.2`
- `7.3`
- `7.4`
- `8.0`
- `8.1`
- `8.2`
- `8.3`

## show

requires authentication

Get a server by ID.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/servers/3" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "id": null,
        "project_id": null,
        "user_id": null,
        "provider_id": null,
        "name": "Stephany Ankunding",
        "ssh_user": "vito",
        "ip": "145.28.94.46",
        "local_ip": "69.133.44.100",
        "port": 22,
        "os": "ubuntu_22",
        "type": "regular",
        "type_data": null,
        "provider": "custom",
        "provider_data": null,
        "public_key": "test",
        "status": "ready",
        "auto_update": null,
        "available_updates": 0,
        "security_updates": null,
        "progress": 100,
        "progress_step": null,
        "updates": null,
        "last_update_check": null,
        "created_at": null,
        "updated_at": null
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/servers/{id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`id` integer

The ID of the server. Example: `3`

## reboot

requires authentication

Reboot a server.

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/servers/3/reboot" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/reboot';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/reboot"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "POST",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/servers/{server_id}/reboot`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

## upgrade

requires authentication

Upgrade server.

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/servers/3/upgrade" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/upgrade';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/upgrade"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "POST",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/servers/{server_id}/upgrade`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

## delete

requires authentication

Delete server.

> Example request:

    curl --request DELETE \
        "https://your-vito-url/api/projects/1/servers/3" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3';
    $response = $client->delete(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

DELETE `api/projects/{project_id}/servers/{server_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

# services

## list

requires authentication

Get all services.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/servers/3/services" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/services';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/services"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "data": [
            {
                "id": null,
                "server_id": null,
                "type": null,
                "type_data": null,
                "name": null,
                "version": null,
                "unit": null,
                "status": null,
                "is_default": null,
                "created_at": null,
                "updated_at": null
            },
            {
                "id": null,
                "server_id": null,
                "type": null,
                "type_data": null,
                "name": null,
                "version": null,
                "unit": null,
                "status": null,
                "is_default": null,
                "created_at": null,
                "updated_at": null
            }
        ],
        "links": {
            "first": "/?page=1",
            "last": "/?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "links": [
                {
                    "url": null,
                    "label": "&laquo; Previous",
                    "active": false
                },
                {
                    "url": "/?page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next &raquo;",
                    "active": false
                }
            ],
            "path": "/",
            "per_page": 25,
            "to": 2,
            "total": 2
        }
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/servers/{server_id}/services`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

## show

requires authentication

Get a service by ID.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/servers/3/services/27" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/services/27';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/services/27"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "id": null,
        "server_id": null,
        "type": null,
        "type_data": null,
        "name": null,
        "version": null,
        "unit": null,
        "status": null,
        "is_default": null,
        "created_at": null,
        "updated_at": null
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/servers/{server_id}/services/{id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`id` integer

The ID of the service. Example: `27`

## start

requires authentication

Start service.

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/servers/3/services/27/start" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/services/27/start';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/services/27/start"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "POST",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/servers/{server_id}/services/{service_id}/start`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`service_id` integer

The ID of the service. Example: `27`

## stop

requires authentication

Stop service.

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/servers/3/services/27/stop" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/services/27/stop';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/services/27/stop"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "POST",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/servers/{server_id}/services/{service_id}/stop`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`service_id` integer

The ID of the service. Example: `27`

## restart

requires authentication

Restart service.

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/servers/3/services/27/restart" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/services/27/restart';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/services/27/restart"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "POST",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/servers/{server_id}/services/{service_id}/restart`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`service_id` integer

The ID of the service. Example: `27`

## enable

requires authentication

Enable service.

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/servers/3/services/27/enable" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/services/27/enable';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/services/27/enable"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "POST",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/servers/{server_id}/services/{service_id}/enable`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`service_id` integer

The ID of the service. Example: `27`

## disable

requires authentication

Disable service.

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/servers/3/services/27/disable" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/services/27/disable';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/services/27/disable"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "POST",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/servers/{server_id}/services/{service_id}/disable`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`service_id` integer

The ID of the service. Example: `27`

## delete

requires authentication

Delete service.

> Example request:

    curl --request DELETE \
        "https://your-vito-url/api/projects/1/servers/3/services/27" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/services/27';
    $response = $client->delete(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/services/27"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

DELETE `api/projects/{project_id}/servers/{server_id}/services/{service_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`service_id` integer

The ID of the service. Example: `27`

# sites

## list

requires authentication

Get all sites.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/servers/3/sites" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/sites';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/sites"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "data": [
            {
                "id": null,
                "server_id": null,
                "source_control_id": null,
                "type": "laravel",
                "type_data": null,
                "domain": "test.com",
                "aliases": null,
                "web_directory": "/",
                "path": "/home",
                "php_version": "8.2",
                "repository": null,
                "branch": "main",
                "status": "ready",
                "port": null,
                "progress": 100,
                "created_at": null,
                "updated_at": null
            },
            {
                "id": null,
                "server_id": null,
                "source_control_id": null,
                "type": "laravel",
                "type_data": null,
                "domain": "test.com",
                "aliases": null,
                "web_directory": "/",
                "path": "/home",
                "php_version": "8.2",
                "repository": null,
                "branch": "main",
                "status": "ready",
                "port": null,
                "progress": 100,
                "created_at": null,
                "updated_at": null
            }
        ],
        "links": {
            "first": "/?page=1",
            "last": "/?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "links": [
                {
                    "url": null,
                    "label": "&laquo; Previous",
                    "active": false
                },
                {
                    "url": "/?page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next &raquo;",
                    "active": false
                }
            ],
            "path": "/",
            "per_page": 25,
            "to": 2,
            "total": 2
        }
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/servers/{server_id}/sites`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

## create

requires authentication

Create a new site.

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/servers/3/sites" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json" \
        --data "{
        \"type\": \"wordpress\",
        \"domain\": \"quo\",
        \"aliases\": [
            \"dolorum\"
        ],
        \"php_version\": \"7.4\",
        \"web_directory\": \"public\",
        \"source_control\": \"explicabo\",
        \"repository\": \"organization\\/repository\",
        \"branch\": \"main\",
        \"composer\": true,
        \"version\": \"5.2.1\"
    }"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/sites';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'json' => [
                'type' => 'wordpress',
                'domain' => 'quo',
                'aliases' => [
                    'dolorum',
                ],
                'php_version' => '7.4',
                'web_directory' => 'public',
                'source_control' => 'explicabo',
                'repository' => 'organization/repository',
                'branch' => 'main',
                'composer' => true,
                'version' => '5.2.1',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/sites"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "type": "wordpress",
        "domain": "quo",
        "aliases": [
            "dolorum"
        ],
        "php_version": "7.4",
        "web_directory": "public",
        "source_control": "explicabo",
        "repository": "organization\/repository",
        "branch": "main",
        "composer": true,
        "version": "5.2.1"
    };

    fetch(url, {
        method: "POST",
        headers,
        body: JSON.stringify(body),
    }).then(response => response.json());

> Example response (200):

    {
        "id": null,
        "server_id": null,
        "source_control_id": null,
        "type": "laravel",
        "type_data": null,
        "domain": "test.com",
        "aliases": null,
        "web_directory": "/",
        "path": "/home",
        "php_version": "8.2",
        "repository": null,
        "branch": "main",
        "status": "ready",
        "port": null,
        "progress": 100,
        "created_at": null,
        "updated_at": null
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/servers/{server_id}/sites`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

#### Body Parameters

`type` string

Example: `wordpress`

Must be one of:

- `php`
- `php-blank`
- `phpmyadmin`
- `laravel`
- `wordpress`

`domain` string

Example: `quo`

`aliases` string[]
`php_version` string

One of the installed PHP Versions Example: `7.4`

`web_directory` string

Required for PHP and Laravel sites Example: `public`

`source_control` string

Source control ID, Required for Sites which support source control Example: `explicabo`

`repository` string

Repository, Required for Sites which support source control Example: `organization/repository`

`branch` string

Branch, Required for Sites which support source control Example: `main`

`composer` boolean `true` `false`

Run composer if site supports composer Example: `true`

`version` string

Version, if the site type requires a version like PHPMyAdmin Example: `5.2.1`

## show

requires authentication

Get a site by ID.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/servers/3/sites/8" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/sites/8';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/sites/8"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "id": null,
        "server_id": null,
        "source_control_id": null,
        "type": "laravel",
        "type_data": null,
        "domain": "test.com",
        "aliases": null,
        "web_directory": "/",
        "path": "/home",
        "php_version": "8.2",
        "repository": null,
        "branch": "main",
        "status": "ready",
        "port": null,
        "progress": 100,
        "created_at": null,
        "updated_at": null
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/servers/{server_id}/sites/{id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`id` integer

The ID of the site. Example: `8`

## delete

requires authentication

Delete site.

> Example request:

    curl --request DELETE \
        "https://your-vito-url/api/projects/1/servers/3/sites/8" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/sites/8';
    $response = $client->delete(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/sites/8"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

DELETE `api/projects/{project_id}/servers/{server_id}/sites/{site_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`site_id` integer

The ID of the site. Example: `8`

# source-controls

## list

requires authentication

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/source-controls" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/source-controls';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/source-controls"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "data": [
            {
                "id": 5,
                "project_id": null,
                "global": true,
                "name": "Jaiden Kling",
                "provider": "github",
                "created_at": "2024-11-01T15:40:48.000000Z",
                "updated_at": "2024-11-01T15:40:48.000000Z"
            },
            {
                "id": 6,
                "project_id": null,
                "global": true,
                "name": "Ms. Brianne Bosco",
                "provider": "github",
                "created_at": "2024-11-01T15:40:48.000000Z",
                "updated_at": "2024-11-01T15:40:48.000000Z"
            }
        ],
        "links": {
            "first": "/?page=1",
            "last": "/?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "links": [
                {
                    "url": null,
                    "label": "&laquo; Previous",
                    "active": false
                },
                {
                    "url": "/?page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next &raquo;",
                    "active": false
                }
            ],
            "path": "/",
            "per_page": 25,
            "to": 2,
            "total": 2
        }
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/source-controls`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

## create

requires authentication

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/source-controls" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json" \
        --data "{
        \"provider\": \"bitbucket\",
        \"name\": \"eos\",
        \"token\": \"et\",
        \"url\": \"https:\\/\\/lueilwitz.com\\/nostrum-et-porro-atque-sint.html\",
        \"username\": \"consectetur\",
        \"password\": \"PL.P?{06\\\\ECi0\"
    }"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/source-controls';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'json' => [
                'provider' => 'bitbucket',
                'name' => 'eos',
                'token' => 'et',
                'url' => 'https://lueilwitz.com/nostrum-et-porro-atque-sint.html',
                'username' => 'consectetur',
                'password' => 'PL.P?{06\\ECi0',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/source-controls"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "provider": "bitbucket",
        "name": "eos",
        "token": "et",
        "url": "https:\/\/lueilwitz.com\/nostrum-et-porro-atque-sint.html",
        "username": "consectetur",
        "password": "PL.P?{06\\ECi0"
    };

    fetch(url, {
        method: "POST",
        headers,
        body: JSON.stringify(body),
    }).then(response => response.json());

> Example response (200):

    {
        "id": 5,
        "project_id": null,
        "global": true,
        "name": "Toby Parker",
        "provider": "github",
        "created_at": "2024-11-01T15:40:48.000000Z",
        "updated_at": "2024-11-01T15:40:48.000000Z"
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/source-controls`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

#### Body Parameters

`provider` string

The provider Example: `bitbucket`

Must be one of:

- `gitlab`
- `github`
- `bitbucket`

`name` string

The name of the storage provider. Example: `eos`

`token` string

The token if provider requires api token Example: `et`

`url` string

The URL if the provider is Gitlab and it is self-hosted Example: `https://lueilwitz.com/nostrum-et-porro-atque-sint.html`

`username` string

The username if the provider is Bitbucket Example: `consectetur`

`password` string

The password if the provider is Bitbucket Example: `PL.P?{06\ECi0`

## show

requires authentication

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/source-controls/3" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/source-controls/3';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/source-controls/3"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "id": 5,
        "project_id": null,
        "global": true,
        "name": "Prof. Bartholome Graham IV",
        "provider": "github",
        "created_at": "2024-11-01T15:40:48.000000Z",
        "updated_at": "2024-11-01T15:40:48.000000Z"
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/source-controls/{sourceControl_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`sourceControl_id` integer

The ID of the sourceControl. Example: `3`

## update

requires authentication

> Example request:

    curl --request PUT \
        "https://your-vito-url/api/projects/1/source-controls/3" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json" \
        --data "{
        \"name\": \"quaerat\",
        \"token\": \"consectetur\",
        \"url\": \"http:\\/\\/www.hudson.biz\\/rerum-voluptatem-debitis-accusamus\",
        \"username\": \"voluptatem\",
        \"password\": \"\\\\p\\/el>)3#~E?kI\",
        \"global\": false
    }"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/source-controls/3';
    $response = $client->put(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'json' => [
                'name' => 'quaerat',
                'token' => 'consectetur',
                'url' => 'http://www.hudson.biz/rerum-voluptatem-debitis-accusamus',
                'username' => 'voluptatem',
                'password' => '\\p/el>)3#~E?kI',
                'global' => false,
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/source-controls/3"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "name": "quaerat",
        "token": "consectetur",
        "url": "http:\/\/www.hudson.biz\/rerum-voluptatem-debitis-accusamus",
        "username": "voluptatem",
        "password": "\\p\/el>)3#~E?kI",
        "global": false
    };

    fetch(url, {
        method: "PUT",
        headers,
        body: JSON.stringify(body),
    }).then(response => response.json());

> Example response (200):

    {
        "id": 5,
        "project_id": null,
        "global": true,
        "name": "Cicero Smitham",
        "provider": "github",
        "created_at": "2024-11-01T15:40:48.000000Z",
        "updated_at": "2024-11-01T15:40:48.000000Z"
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

PUT `api/projects/{project_id}/source-controls/{sourceControl_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`sourceControl_id` integer

The ID of the sourceControl. Example: `3`

#### Body Parameters

`name` string

The name of the storage provider. Example: `quaerat`

`token` string

The token if provider requires api token Example: `consectetur`

`url` string

The URL if the provider is Gitlab and it is self-hosted Example: `http://www.hudson.biz/rerum-voluptatem-debitis-accusamus`

`username` string

The username if the provider is Bitbucket Example: `voluptatem`

`password` string

The password if the provider is Bitbucket Example: `\p/el>)3#~E?kI`

`global` string

Accessible in all projects Example: `false`

Must be one of:

- `1`
- ``

## delete

requires authentication

> Example request:

    curl --request DELETE \
        "https://your-vito-url/api/projects/1/source-controls/3" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/source-controls/3';
    $response = $client->delete(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/source-controls/3"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

DELETE `api/projects/{project_id}/source-controls/{sourceControl_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`sourceControl_id` integer

The ID of the sourceControl. Example: `3`

# ssh-keys

## list

requires authentication

Get all ssh keys.

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/servers/3/ssh-keys" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/ssh-keys';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/ssh-keys"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "data": [
            {
                "id": null,
                "user": null,
                "name": "Dr. Reanna Braun",
                "created_at": null,
                "updated_at": null
            },
            {
                "id": null,
                "user": null,
                "name": "Norene Fritsch",
                "created_at": null,
                "updated_at": null
            }
        ],
        "links": {
            "first": "/?page=1",
            "last": "/?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "links": [
                {
                    "url": null,
                    "label": "&laquo; Previous",
                    "active": false
                },
                {
                    "url": "/?page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next &raquo;",
                    "active": false
                }
            ],
            "path": "/",
            "per_page": 25,
            "to": 2,
            "total": 2
        }
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/servers/{server_id}/ssh-keys`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

## create

requires authentication

Deploy ssh key to server.

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/servers/3/ssh-keys" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json" \
        --data "{
        \"key_id\": \"vero\",
        \"name\": \"voluptates\",
        \"public_key\": \"dolor\"
    }"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/ssh-keys';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'json' => [
                'key_id' => 'vero',
                'name' => 'voluptates',
                'public_key' => 'dolor',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/ssh-keys"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "key_id": "vero",
        "name": "voluptates",
        "public_key": "dolor"
    };

    fetch(url, {
        method: "POST",
        headers,
        body: JSON.stringify(body),
    }).then(response => response.json());

> Example response (200):

    {
        "id": null,
        "user": null,
        "name": "Sophia D'Amore",
        "created_at": null,
        "updated_at": null
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/servers/{server_id}/ssh-keys`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

#### Body Parameters

`key_id` string

The ID of the key. Example: `vero`

`name` string

Key name, required if key_id is not provided. Example: `voluptates`

`public_key` string

Public Key, required if key_id is not provided. Example: `dolor`

## delete

requires authentication

Delete ssh key from server.

> Example request:

    curl --request DELETE \
        "https://your-vito-url/api/projects/1/servers/3/ssh-keys/4" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/servers/3/ssh-keys/4';
    $response = $client->delete(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/servers/3/ssh-keys/4"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

DELETE `api/projects/{project_id}/servers/{server_id}/ssh-keys/{sshKey_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`server_id` integer

The ID of the server. Example: `3`

`sshKey_id` integer

The ID of the sshKey. Example: `4`

# storage-providers

## list

requires authentication

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/storage-providers" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/storage-providers';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/storage-providers"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "data": [
            {
                "id": 3,
                "project_id": null,
                "global": true,
                "name": "et",
                "provider": "local",
                "created_at": "2024-11-01T15:40:48.000000Z",
                "updated_at": "2024-11-01T15:40:48.000000Z"
            },
            {
                "id": 4,
                "project_id": null,
                "global": true,
                "name": "sed",
                "provider": "local",
                "created_at": "2024-11-01T15:40:48.000000Z",
                "updated_at": "2024-11-01T15:40:48.000000Z"
            }
        ],
        "links": {
            "first": "/?page=1",
            "last": "/?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "links": [
                {
                    "url": null,
                    "label": "&laquo; Previous",
                    "active": false
                },
                {
                    "url": "/?page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next &raquo;",
                    "active": false
                }
            ],
            "path": "/",
            "per_page": 25,
            "to": 2,
            "total": 2
        }
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/storage-providers`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

## create

requires authentication

> Example request:

    curl --request POST \
        "https://your-vito-url/api/projects/1/storage-providers" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json" \
        --data "{
        \"provider\": \"quod\",
        \"name\": \"commodi\",
        \"token\": \"ipsum\",
        \"key\": \"ratione\",
        \"secret\": \"iste\"
    }"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/storage-providers';
    $response = $client->post(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'json' => [
                'provider' => 'quod',
                'name' => 'commodi',
                'token' => 'ipsum',
                'key' => 'ratione',
                'secret' => 'iste',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/storage-providers"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "provider": "quod",
        "name": "commodi",
        "token": "ipsum",
        "key": "ratione",
        "secret": "iste"
    };

    fetch(url, {
        method: "POST",
        headers,
        body: JSON.stringify(body),
    }).then(response => response.json());

> Example response (200):

    {
        "id": 3,
        "project_id": null,
        "global": true,
        "name": "est",
        "provider": "dropbox",
        "created_at": "2024-11-01T15:40:48.000000Z",
        "updated_at": "2024-11-01T15:40:48.000000Z"
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

POST `api/projects/{project_id}/storage-providers`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

#### Body Parameters

`provider` string

The provider (aws, linode, hetzner, digitalocean, vultr, ...) Example: `quod`

`name` string

The name of the storage provider. Example: `commodi`

`token` string

The token if provider requires api token Example: `ipsum`

`key` string

The key if provider requires key Example: `ratione`

`secret` string

The secret if provider requires key Example: `iste`

## show

requires authentication

> Example request:

    curl --request GET \
        --get "https://your-vito-url/api/projects/1/storage-providers/1" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/storage-providers/1';
    $response = $client->get(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/storage-providers/1"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers,
    }).then(response => response.json());

> Example response (200):

    {
        "id": 3,
        "project_id": null,
        "global": true,
        "name": "officia",
        "provider": "ftp",
        "created_at": "2024-11-01T15:40:48.000000Z",
        "updated_at": "2024-11-01T15:40:48.000000Z"
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

GET `api/projects/{project_id}/storage-providers/{storageProvider_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`storageProvider_id` integer

The ID of the storageProvider. Example: `1`

## update

requires authentication

> Example request:

    curl --request PUT \
        "https://your-vito-url/api/projects/1/storage-providers/1" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json" \
        --data "{
        \"name\": \"iusto\",
        \"global\": true
    }"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/storage-providers/1';
    $response = $client->put(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
            'json' => [
                'name' => 'iusto',
                'global' => true,
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/storage-providers/1"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "name": "iusto",
        "global": true
    };

    fetch(url, {
        method: "PUT",
        headers,
        body: JSON.stringify(body),
    }).then(response => response.json());

> Example response (200):

    {
        "id": 3,
        "project_id": null,
        "global": true,
        "name": "rerum",
        "provider": "ftp",
        "created_at": "2024-11-01T15:40:48.000000Z",
        "updated_at": "2024-11-01T15:40:48.000000Z"
    }

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

PUT `api/projects/{project_id}/storage-providers/{storageProvider_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`storageProvider_id` integer

The ID of the storageProvider. Example: `1`

#### Body Parameters

`name` string

The name of the storage provider. Example: `iusto`

`global` string

Accessible in all projects Example: `true`

Must be one of:

- `1`
- ``

## delete

requires authentication

> Example request:

    curl --request DELETE \
        "https://your-vito-url/api/projects/1/storage-providers/1" \
        --header "Authorization: Bearer YOUR-API-KEY" \
        --header "Content-Type: application/json" \
        --header "Accept: application/json"

    $client = new \GuzzleHttp\Client();
    $url = 'https://your-vito-url/api/projects/1/storage-providers/1';
    $response = $client->delete(
        $url,
        [
            'headers' => [
                'Authorization' => 'Bearer YOUR-API-KEY',
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
            ],
        ]
    );
    $body = $response->getBody();
    print_r(json_decode((string) $body));

    const url = new URL(
        "https://your-vito-url/api/projects/1/storage-providers/1"
    );

    const headers = {
        "Authorization": "Bearer YOUR-API-KEY",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers,
    }).then(response => response.json());

> Example response (204):

    Empty response

> Received response:

> Request failed with error:

    Tip: Check that you're properly connected to the network.
    If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
    You can check the Dev Tools console for debugging information.

### Request

DELETE `api/projects/{project_id}/storage-providers/{storageProvider_id}`

#### Headers

`Authorization`

Example: `Bearer YOUR-API-KEY`

`Content-Type`

Example: `application/json`

`Accept`

Example: `application/json`

#### URL Parameters

`project_id` integer

The ID of the project. Example: `1`

`storageProvider_id` integer

The ID of the storageProvider. Example: `1`