Every Bytemark customer should have a username, and only one username. If you need to create new users for an existing account please contact support. This API currently allows only allows you to update your SSH keys.
Endpoints
These are relative to https://uk0.bigv.io
GET /users
GET /users/{user-id}
PUT /users/{user-id}
- Replace
{user-id}
with a user id or username.
Attributes
id
– Unique id for this user (numeric).username
– Unique username for this user – must only contain letters or numbers.authorized_keys
– SSH public keys.
Username can not be updated, and will be ignored in any PUT
requests.
Be careful with authorized_keys
as it’s just a string. When updating this field, ensure that existing keys are present when supplying an updated string.
Examples
All Users
Request
GET /users
Curl
curl -H "Content-type: application/json" \
-H "Authorization: Bearer {session-id}" \
https://uk0.bigv.io/users
Response
[
{
"authorized_keys": "ssh-rsa ... ",
"id": 1,
"username": "myusername"
}
]
Single User
Request
GET /users/ID
GET /users/myusername
Curl
curl -H "Content-type: application/json" \
-H "Authorization: Bearer {session-id}" \
https://uk0.bigv.io/users/myusername
Response
{
"authorized_keys": "ssh-rsa ... ",
"id": 1,
"username": "myusername"
}
Update User
Request
PUT /users/ID
Curl
curl -H "Content-type: application/json" \
-H "Authorization: Bearer {session-id}" \
-X PUT \
-d '{"authorized_keys":"ssh-rsa AAAA..." }' \
https://uk0.bigv.io/users/myusername
Response (success: 200)
{
"id": 1,
"username": "myusername",
"authorized_keys": "mynewkey"
}