API Documentation

A documentation for developer

System User

POST Create system user

HTTP Request

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

Arguments

Parameters Required Description
username YES Username of the user that you wanted to create
password NO Password for the created user
verifyPassword If "password" is set Must be same as "password"

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"
}

GET List system users

HTTP Request

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

Arguments

Parameters Required Description
page NO Page number
username NO Username of user that you wanted to search

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 AAAAB3NzaC1yc2EAAAADAQABAAABAQDB5Wo5f2yClaO1OfhpPINQ3+mRwZ0XJKVe\/7NdF3KGUaJZT0ZZePIgtBuvrPzNdb+ehl917ZQ5ba6\/Z2uD+d2vKnLX7wifvLUdNVpmhVguZ9JME30rOUeEVXroWIeKz4LlVotyzW9Rq8wGlG\/S6c8Mw6LtVvir0vyXaegnaijsmTrASWUpAVKbp2tJUmjWKY3mwmBx6h7Zk0keKMuP8ok5IGtmnti5LehMC2xgX13\/NhOJ+nBlB8hFv0hKI8rn9gDorvR+UHyQQoef61Td5JJ8zC4Uxz149BAVXCsBUZ8x7eeJmjWkC7ipuGihRyux9y4N6r6ACbEbtXs1FbignPcN GIT Deployment Key for user aisyah. Server ARunCloudDev",
            "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 AAAAB3NzaC1yc2EAAAADAQABAAABAQCbVgJA1M1CLAgqBFz68+2yOIuXyY+yx+YETLJEWju4kxn7\/PyzeIDK3kaKa4Z0FSxga0YF7Y3dQuchtufTedh8LdT8\/PyEspWdC0r9dVfMpfAC7z5hL+er8HsHv2s8Guh52LQHmbW9H17dJBdoeNQyhbzlsJTm12\/9fA04tHMOiZMcPtFwDr9YnXWqotyRf5DB7HO3U8PdrHpna\/IoqH0Hh1nu7v9kOu52iAtV2BAdqOn+9UMKnGNT0VUZAT+AF\/eOiBmZ4V49n1eQOhydkqR82l1BJeL5MwUBtqD+JrJiesRqL0ILj4l3n9zy2VDwD4BhlD0XNxwTZsjmCTBL2xir GIT Deployment Key for user runcloud. Server ARunCloudRumah",
            "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": []
        }
    }
}

GET System user object

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"
        }
    }
}

PATCH Change password

HTTP Request

PATCH https://manage.runcloud.io/base-api/servers/<server.id>/users/<user.id>

Arguments

Parameters Required Description
password YES Password for user
verifyPassword YES Must be same as "password"

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 Delete system user

HTTP Request

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

Arguments

Parameters Required Description
username YES Username of the system user

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"
}