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

System User

Create system user

Arguments
usernamerequiredUsername of the user that you wanted to create
passwordoptionalPassword for the created user
verifyPasswordIf "password" is setMust be same as "password"

POST /servers/<server.id>/users

HTTP Request
POST https://manage.runcloud.io/base-api/servers/<server.id>/users
Request
curl -X POST "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/users" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "username": "sitiaisyah",
        "password": "this!$myS3cur3p4s$w0rd",
        "verifyPassword": "this!$myS3cur3p4s$w0rd"
    }'
Response
{
	"message": "Successfully created new user sitiaisyah.",
	"redirect": "/servers/yO4VAbX2BkNz/users"
}

List system users

Arguments
pageoptionalPage number
usernameoptionalUsername of user that you wanted to search

POST /servers/<server.id>/users

HTTP Request
GET https://manage.runcloud.io/base-api/servers/<server.id>/users
Request
curl -X GET "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/users?page=1" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
Response
{
	"data": [
		{
			"id": "g704AYp0lmNo",
			"username": "aisyah",
			"sshPublic": "ssh-rsa <public-key>",
			"deleteable": true,
			"_links": {
				"generateDeploymentKey": {
					"method": "post",
					"link": "/api/servers/yO4VAbX2BkNz/deploymentkey/g704AYp0lmNo"
				},
				"update": {
					"method": "patch",
					"link": "/api/servers/yO4VAbX2BkNz/users/g704AYp0lmNo"
				},
				"delete": {
					"method": "delete",
					"link": "/api/servers/yO4VAbX2BkNz/users/g704AYp0lmNo"
				}
			}
		},
		{
			"id": "g704AY0lmNo6",
			"username": "root",
			"sshPublic": null,
			"deleteable": false,
			"_links": {
				"generateDeploymentKey": {
					"method": "post",
					"link": "/api/servers/yO4VAbX2BkNz/deploymentkey/g704AY0lmNo6"
				},
				"update": {
					"method": "patch",
					"link": "/api/servers/yO4VAbX2BkNz/users/g704AY0lmNo6"
				},
				"delete": {
					"method": "delete",
					"link": "/api/servers/yO4VAbX2BkNz/users/g704AY0lmNo6"
				}
			}
		},
		{
			"id": "LR6YA0XA71P8",
			"username": "runcloud",
			"sshPublic": "ssh-rsa <public-key>",
			"deleteable": false,
			"_links": {
				"generateDeploymentKey": {
					"method": "post",
					"link": "/api/servers/yO4VAbX2BkNz/deploymentkey/LR6YA0XA71P8"
				},
				"update": {
					"method": "patch",
					"link": "/api/servers/yO4VAbX2BkNz/users/LR6YA0XA71P8"
				},
				"delete": {
					"method": "delete",
					"link": "/api/servers/yO4VAbX2BkNz/users/LR6YA0XA71P8"
				}
			}
		},
		{
			"id": "9QgMAk7xAqwm",
			"username": "sitiaisyah",
			"sshPublic": null,
			"deleteable": true,
			"_links": {
				"generateDeploymentKey": {
					"method": "post",
					"link": "/api/servers/yO4VAbX2BkNz/deploymentkey/9QgMAk7xAqwm"
				},
				"update": {
					"method": "patch",
					"link": "/api/servers/yO4VAbX2BkNz/users/9QgMAk7xAqwm"
				},
				"delete": {
					"method": "delete",
					"link": "/api/servers/yO4VAbX2BkNz/users/9QgMAk7xAqwm"
				}
			}
		}
	],
	"meta": {
		"pagination": {
			"total": 4,
			"count": 4,
			"per_page": 20,
			"current_page": 1,
			"total_pages": 1,
			"links": []
		}
	}
}

System user object

GET /servers/<server.id>/users/<user.id>

HTTP Request
GET https://manage.runcloud.io/base-api/servers/<server.id>/users/<user.id>
Request
curl -X GET "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/users/9QgMAk7xAqwm" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
Response
{
	"id": "9QgMAk7xAqwm",
	"username": "sitiaisyah",
	"sshPublic": null,
	"deleteable": true,
	"_links": {
		"generateDeploymentKey": {
			"method": "post",
			"link": "/api/servers/yO4VAbX2BkNz/deploymentkey/9QgMAk7xAqwm"
		},
		"update": {
			"method": "patch",
			"link": "/api/servers/yO4VAbX2BkNz/users/9QgMAk7xAqwm"
		},
		"delete": {
			"method": "delete",
			"link": "/api/servers/yO4VAbX2BkNz/users/9QgMAk7xAqwm"
		}
	}
}

Change password

Arguments
passwordrequiredPassword for user
verifyPasswordrequiredMust be same as "password"

POST /servers/<server.id>/users/<user.id>

HTTP Request
PATCH https://manage.runcloud.io/base-api/servers/<server.id>/users/<user.id>
Request
curl -X PATCH "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/users/9QgMAk7xAqwm" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "password": "this!$myS3cur3p4s$w0rd2",
        "verifyPassword": "this!$myS3cur3p4s$w0rd2"
    }'
Response
{
	"message": "Successfully updated password for sitiaisyah",
	"redirect": "/servers/yO4VAbX2BkNz/users"
}

Delete system user

Arguments
usernamerequiredUsername of the system user

DELETE /servers/<server.id>/users/<user.id>

HTTP Request
DELETE https://manage.runcloud.io/base-api/servers/<server.id>/users/<user.id>
Request
curl -X DELETE "https://manage.runcloud.io/base-api/servers/yO4VAbX2BkNz/users/9QgMAk7xAqwm" \
    -u YOUR_API_KEY:YOUR_API_SECRET \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    --data '{
        "username": "sitiaisyah"
    }'
Response
{
	"message": "Successfully deleted user sitiaisyah"
}