Git repository

Install git repository

Install a git repository.

POST /api/site/{id}/repository

You can get source provider list here. You can manage all your source providers on your account.

Parameters :

Parameter Description
name The repository name.
branch The repository branch.
source_provider_id Source provider ID (Optional).
atomic Enable atomic deployment: true or false (Optional).

Example request :

curl "https://cloud.boxydev.com/api/site/1/repository" \
    -H "Authorization: Bearer {token}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -d '{
        "name": "vendor/project",
        "branch": "master",
        "source_provider_id": 1
    }'

Example response :

{
    "id": 1,
    "domain": "website.com",
    "test_domain": null,
    "wildcard": false,
    "aliases": null,
    "directory": "/www",
    "published": false,
    "user": "cloud",
    "status": "installed",
    "type": "laravel",
    "application": null,
    "repository": {
        "name": "vendor/project",
        "branch": "master",
        "status": "installed"
    },
    "deployment_script": null,
    "build_script": null,
    "activate_script": null,
    "atomic": false,
    "php_version": "8.1",
    "server_id": 1,
    "created_at": "2022-08-17T18:10:37.000000Z",
    "secure": false,
    "hook_url": "...",
    "last_deployment": {
        "id": 1,
        "type": "manual",
        "branch": "main",
        "commit": {
            "hash": "1234",
            "author": "Matthieu Mota",
            "avatar": "https://avatars.githubusercontent.com/u/2427947?v=4",
            "message": "Commit",
            "url": "https://github.com/vendor/repository/commit/1234"
        },
        "output": "From github.com:vendor/repository\n * branch            main       -> FETCH_HEAD\nAlready up to date.",
        "status": "finished",
        "site_id": 1,
        "started_at": "2022-09-09T19:58:12.000000Z",
        "ended_at": "2022-09-09T19:58:31.000000Z"
    },
    "balancing_method": null,
    "tags": []
}

Update git repository

Update a git repository.

PUT /api/site/{id}/repository

Parameters :

Parameter Description
name The repository name.
branch The repository branch.
source_provider_id Source provider ID.

Example request :

curl -X PUT "https://cloud.boxydev.com/api/site/1/repository" \
    -H "Authorization: Bearer {token}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -d '{
        "name": "vendor/project",
        "branch": "master",
        "source_provider_id": 1
    }'

Example response :

{
    "id": 1,
    "domain": "website.com",
    "test_domain": null,
    "wildcard": false,
    "aliases": null,
    "directory": "/www",
    "published": false,
    "user": "cloud",
    "status": "installed",
    "type": "laravel",
    "application": null,
    "repository": {
        "name": "vendor/project",
        "branch": "master",
        "status": "installed"
    },
    "deployment_script": null,
    "build_script": null,
    "activate_script": null,
    "atomic": false,
    "php_version": "8.1",
    "server_id": 1,
    "created_at": "2022-08-17T18:10:37.000000Z",
    "secure": false,
    "hook_url": "...",
    "last_deployment": {
        "id": 1,
        "type": "manual",
        "branch": "main",
        "commit": {
            "hash": "1234",
            "author": "Matthieu Mota",
            "avatar": "https://avatars.githubusercontent.com/u/2427947?v=4",
            "message": "Commit",
            "url": "https://github.com/vendor/repository/commit/1234"
        },
        "output": "From github.com:vendor/repository\n * branch            main       -> FETCH_HEAD\nAlready up to date.",
        "status": "finished",
        "site_id": 1,
        "started_at": "2022-09-09T19:58:12.000000Z",
        "ended_at": "2022-09-09T19:58:31.000000Z"
    },
    "balancing_method": null,
    "tags": []
}

Uninstall git repository

Uninstall a git repository.

DELETE /api/site/{id}/repository

Example request :

curl -X DELETE "https://cloud.boxydev.com/api/site/1/repository" \
    -H "Authorization: Bearer {token}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json"

Create deploy key

Create a deploy key.

POST /api/site/{id}/key

Example request :

curl -X POST "https://cloud.boxydev.com/api/site/1/key" \
    -H "Authorization: Bearer {token}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json"

Example response :

{
    "public_key": "ssh-rsa ... [email protected]\n"
}

Delete deploy key

Delete a deploy key.

DELETE /api/site/{id}/key

Example request :

curl -X DELETE "https://cloud.boxydev.com/api/site/1/key" \
    -H "Authorization: Bearer {token}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json"