API Documentation

A documentation for developer

SSH Key

POST Add ssh key

HTTP Request

POST https://manage.runcloud.io/base-api/servers/<server.id>/sshcredentials

Arguments

Parameters Required Description
label YES Label for the SSH Key
user YES System User username that you wanted to install this public SSH Key
publicKey YES SSH Public Key

Request

curl -X POST "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/sshcredentials" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "label": "my-computer-runcloud",
        "user": "runcloud",
        "publicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCbVgJA1M1CLAgqBFz68+2yOIuXyY+yx+YETLJEWju4kxn7/PyzeIDK3kaKa4Z0FSxga0YF7Y3dQuchtufTedh8LdT8/PyEspWdC0r9dVfMpfAC7z5hL+er8HsHv2s8Guh52LQHmbW9H17dJBdoeNQyhbzlsJTm12/9fA04tHMOiZMcPtFwDr9YnXWqotyRf5DB7HO3U8PdrHpna/IoqH0Hh1nu7v9kOu52iAtV2BAdqOn+9UMKnGNT0VUZAT+AF/eOiBmZ4V49n1eQOhydkqR82l1BJeL5MwUBtqD+JrJiesRqL0ILj4l3n9zy2VDwD4BhlD0XNxwTZsjmCTBL2xir fikri@my-computer"
    }'

Response

{
    "message": "Successfully added SSH Key my-computer-runcloud",
    "redirect": "\/servers\/yO4VAbX2BkNz\/sshcredentials"
}

GET List SSH keys

HTTP Request

GET https://manage.runcloud.io/base-api/servers/<server.id>/sshcredentials

Arguments

Parameters Required Description
page NO Page number of the resources
search NO Searching string if you wanted to search from list of ssh key

Request

curl -X GET "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/sshcredentials?page=1" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"

Response

{
    "data": [
        {
            "id": "OGv82zb25XLm",
            "label": "my-computer-runcloud",
            "user": "runcloud",
            "excerpt": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCbVgJA1M1CLA...",
            "publicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCbVgJA1M1CLAgqBFz68+2yOIuXyY+yx+YETLJEWju4kxn7\/PyzeIDK3kaKa4Z0FSxga0YF7Y3dQuchtufTedh8LdT8\/PyEspWdC0r9dVfMpfAC7z5hL+er8HsHv2s8Guh52LQHmbW9H17dJBdoeNQyhbzlsJTm12\/9fA04tHMOiZMcPtFwDr9YnXWqotyRf5DB7HO3U8PdrHpna\/IoqH0Hh1nu7v9kOu52iAtV2BAdqOn+9UMKnGNT0VUZAT+AF\/eOiBmZ4V49n1eQOhydkqR82l1BJeL5MwUBtqD+JrJiesRqL0ILj4l3n9zy2VDwD4BhlD0XNxwTZsjmCTBL2xir fikri@my-computer",
            "_links": {
                "delete": {
                    "method": "delete",
                    "link": "\/api\/servers\/yO4VAbX2BkNz\/sshcredentials\/OGv82zb25XLm"
                }
            }
        }
    ],
    "meta": {
        "pagination": {
            "total": 1,
            "count": 1,
            "per_page": 15,
            "current_page": 1,
            "total_pages": 1,
            "links": []
        }
    }
}

GET SSH key object

HTTP Request

GET https://manage.runcloud.io/base-api/servers/<server.id>/sshcredentials/<key.id>

Request

curl -X GET "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/sshcredentials/OGv82zb25XLm" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"

Response

{
    "id": "OGv82zb25XLm",
    "label": "my-computer-runcloud",
    "user": "runcloud",
    "excerpt": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCbVgJA1M1CLA...",
    "publicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCbVgJA1M1CLAgqBFz68+2yOIuXyY+yx+YETLJEWju4kxn7\/PyzeIDK3kaKa4Z0FSxga0YF7Y3dQuchtufTedh8LdT8\/PyEspWdC0r9dVfMpfAC7z5hL+er8HsHv2s8Guh52LQHmbW9H17dJBdoeNQyhbzlsJTm12\/9fA04tHMOiZMcPtFwDr9YnXWqotyRf5DB7HO3U8PdrHpna\/IoqH0Hh1nu7v9kOu52iAtV2BAdqOn+9UMKnGNT0VUZAT+AF\/eOiBmZ4V49n1eQOhydkqR82l1BJeL5MwUBtqD+JrJiesRqL0ILj4l3n9zy2VDwD4BhlD0XNxwTZsjmCTBL2xir fikri@my-computer",
    "_links": {
        "delete": {
            "method": "delete",
            "link": "\/api\/servers\/yO4VAbX2BkNz\/sshcredentials\/OGv82zb25XLm"
        }
    }
}

DELETE Delete SSH key

HTTP Request

DELETE https://manage.runcloud.io/base-api/servers/<server.id>/sshcredentials/<key.id>

Arguments

Parameters Required Description
label YES Label for the SSH Key

Request

curl -X DELETE "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/sshcredentials/OGv82zb25XLm" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "label": "my-computer-runcloud"
    }'

Response

{
    "message": "Successfully deleted public key my-computer-runcloud"
}