API keys can be used to give other systems access to the servers on your account. This can be useful for container orchestration and automation.
Panel
Adding an API Key
- Head over to panel.bytemark.co.uk/api-keys
- Click Add API Key and give it a label and an expiration
- Click Add API Key again and make note of the key. We encrypt the key immediately so you will need to keep this copy safely.
Granting Privileges
- Click on the privileges button beside the relevant key.
- Select the appropriate level of access:
- Server console access: Allow the key to login to servers
- Server admin: Allow the key to modify the server, as well as access the console
- Group admin: Allow the key to create, modify and delete servers within a group
- Select the appropriate group or server from the list and click add privilege
Bytemark Client
To create an API key from the command line, use the command:
bytemark add api key your-key-label
This will create a permanent API key with no privileges. Use the --expires-at flag to give the key an expiry date.
To grant the key privileges at the same time, include any of the following flags:
--account-admin account-name --group group-name --server server-name
Privileges can also be added using the command:
bytemark grant privilege --api-key-id <key id>