Deprecation Notice - RunCloud API Beta is deprecated effective 31 May 2019. New API will be released and it's not backward compatible.

SSH Key

Add ssh key

Arguments
ParametersRequiredDescription
labelYESLabel for the SSH Key
userYESSystem User username that you wanted to install this public SSH Key
publicKeyYESSSH Public Key

POST /servers/<server.id>/sshcredentials

HTTP Request
POST https://manage.runcloud.io/base-api/servers/<server.id>/sshcredentials
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 <public-key>"
    }'
Response
{
	"message": "Successfully added SSH Key my-computer-runcloud",
	"redirect": "/servers/yO4VAbX2BkNz/sshcredentials"
}

List SSH keys

Arguments
ParametersRequiredDescription
pageNOPage number of the resources
searchNOSearching string if you wanted to search from list of ssh key

GET /servers/<server.id>/sshcredentials

HTTP Request
GET https://manage.runcloud.io/base-api/servers/<server.id>/sshcredentials
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 <public-key>",
			"_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": []
		}
	}
}

SSH key object

GET //servers/<server.id>/sshcredentials/<key.id>

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 <public-key>",
	"_links": {
		"delete": {
			"method": "delete",
			"link": "/api/servers/yO4VAbX2BkNz/sshcredentials/OGv82zb25XLm"
		}
	}
}

Delete SSH key

Arguments
ParametersRequiredDescription
labelYESLabel for the SSH Key

DELETE /servers/<server.id>/sshcredentials/<key.id>

HTTP Request
DELETE https://manage.runcloud.io/base-api/servers/<server.id>/sshcredentials/<key.id>
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"
}