GET/users/:id
Get Userusers
Required Parameters
id
integerThe user ID
Get detailed information about a user.
Related Models:User
Request
GET
/users/:idcurl -X GET \
"https://app.cloud66.com/api/3/users/:id" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Response
{
"response": {
"id": 2,
"email": "jim@gmail.com",
"primary_account_id": 2,
"locked": false,
"access_profile": {
"account_profile": {
"can_create_stack": true,
"can_admin_users": false,
"can_payment": false,
"can_add_cloud_key": false,
"can_del_cloud_key": true,
"can_view_acc_notifications": false,
"can_edit_acc_notifications": true,
"can_view_audit": false,
"can_view_docker_img_key": false,
"can_del_ssh_key": false,
"can_edit_personal_token": false,
"can_del_authorized_app": false,
"can_view_custom_env": false,
"can_edit_custom_env": false,
"can_add_developers_app": false,
"can_del_developers_app": false,
"can_edit_git_key": false,
"can_edit_gateway": false,
"default_roles": [
"Viewer"
]
},
"stack_profiles": [
{
"stack_uid": "740f81b98eb847fab0df538ea8780d9d",
"role": "Deployer"
},
{
"stack_uid": "b5f4eaaf56b5768f272ab875d2ba48b1",
"role": "Viewer"
}
]
},
"uses_tfa": false,
"timezone": "UTC",
"has_valid_phone": false,
"developer_program": false,
"github_login": false,
"last_login": "2016-01-28T13:12:16Z",
"devices": [],
"created_at": "2016-01-28T13:12:13Z",
"updated_at": "2016-01-28T13:12:16Z",
"cloud_status": "healthy"
}
}
GET/users
List Usersadmin
Get list of all users in the account.
Request
GET
/userscurl -X GET \
"https://app.cloud66.com/api/3/users" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Response
{
"response": [
{
"id": 1,
"email": "test@cloud66.com",
"primary_account_id": 1,
"locked": false,
"uses_tfa": false,
"timezone": "UTC",
"has_valid_phone": false,
"developer_program": false,
"created_at": "2014-08-29T17:21:25Z",
"updated_at": "2014-08-29T17:21:25Z"
}
],
"count": 1,
"pagination": {
"previous": null,
"next": null,
"current": 1,
"per_page": 30,
"count": 1,
"pages": 1
}
}
POST/users/:id/devices
Add Deviceusers
Required Parameters
id
integerThe user ID
device_type
integerDevice type (1 = iOS, 2 = Android)
sub_type
integerDevice subtype (1 = iPhone, 2 = iPad, 3 = iPod)
token
stringThe token of the device
Add a new device for the user. Note: Android support is not currently available.
Related Models:User
Request
POST
/users/:id/devicescurl -X POST \
"https://app.cloud66.com/api/3/users/:id/devices" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "1",
"device_type": "1",
"sub_type": "1",
"token": "htyukjbnnmshthkr"
}'
Response
{
"response": {
"device_type": 1,
"sub_type": 1,
"token": "mmccdd",
"enabled": true,
"created_at": "2014-09-01 09:15:50 UTC",
"updated_at": "2014-09-01 09:15:50 UTC",
"created_at_iso": "2014-09-01T09:15:50Z",
"updated_at_iso": "2014-09-01T09:15:50Z"
}
}
PUT/users/:id/devices
Update Deviceusers
Required Parameters
id
integerThe user ID
device_type
integerDevice type (1 = iOS, 2 = Android)
sub_type
integerDevice subtype (1 = iPhone, 2 = iPad, 3 = iPod)
token
stringThe token of the device
Update device_type
or sub_type
of a device.
Related Models:User
Request
PUT
/users/:id/devicescurl -X PUT \
"https://app.cloud66.com/api/3/users/:id/devices" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "1",
"device_type": "1",
"sub_type": "1",
"token": "htyukjbnnmshthkr"
}'
PUT/users/:id
Update Useradmin
Required Parameters
id
integerThe user ID
Update user information. Currently only access profile section changes are applied.
Related Models:User
Request
PUT
/users/:idcurl -X PUT \
"https://app.cloud66.com/api/3/users/:id" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "1"
}'
Response
{
"id": 2,
"email": "jim@gmail.com",
"primary_account_id": 2,
"locked": false,
"access_profile": {
"account_profile": {
"can_create_stack": true,
"can_admin_users": false,
"can_payment": false,
"can_add_cloud_key": false,
"can_del_cloud_key": true,
"can_view_acc_notifications": false,
"can_edit_acc_notifications": true,
"can_view_audit": false,
"can_view_docker_img_key": false,
"can_del_ssh_key": false,
"can_edit_personal_token": false,
"can_del_authorized_app": false,
"can_view_custom_env": false,
"can_edit_custom_env": false,
"can_add_developers_app": false,
"can_del_developers_app": false,
"can_edit_git_key": false,
"can_edit_gateway": false,
"default_roles": [
"Viewer"
]
},
"stack_profiles": [
{
"stack_uid": "740f81b98eb847fab0df538ea8780d9d",
"role": "Deployer"
},
{
"stack_uid": "b5f4eaaf56b5768f272ab875d2ba48b1",
"role": "Viewer"
}
]
},
"uses_tfa": false,
"timezone": "UTC",
"has_valid_phone": false,
"developer_program": false,
"github_login": false,
"last_login": "2016-01-28T13:12:16Z",
"devices": [],
"created_at": "2016-01-28T13:12:13Z",
"updated_at": "2016-01-28T13:12:16Z",
"cloud_status": "healthy"
}
DELETE/users/:id/devices/:token
Delete Deviceusers
Required Parameters
id
integerThe user ID
token
stringThe token of the device
Delete a device.
Related Models:User
Request
DELETE
/users/:id/devices/:tokencurl -X DELETE \
"https://app.cloud66.com/api/3/users/:id/devices/:token" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"