The NovoServe public API enables our customers to perform common actions on their servers in an automated way, instead of manually through our portal.
Here are a few examples of actions that are possible through the API:
- Powering servers on and off.
- Obtaining bandwidth usage information.
- Getting access to the IPMI interface.
- Mounting virtual media such as ISOs.
- Updating the network configuration.
The API is built using common standards and protocols and is therefore usable from nearly any mainstream programming language.
The technical details
The NovoServe public API is designed as a JSON REST API.
Authentication and authorization are done through API keys, which can be managed through our portal.
These API credentials are required for each request using HTTP basic authentication, as there is no concept of an API session.
API access is also limited to registered client IPs only: besides creating an API key in the portal, the IP address of any system that will be making API requests should also be registered there.
The API is only available on a secure HTTPS (TLS) connection.
API keys are linked to the customer account that created them: the API key can only be used to manage servers in the account that created the key.
The API currently has a rate limit of five requests per second to prevent abuse.
This should not be an issue when it comes to regular use.
API documentation
OpenAPI documentation is available for each individual API function.
This documentation can be found here.
Code examples
Example code for a simple API call in several common programming languages can be found in our novoserve/public-api-docs repository.
Generating API credentials
Follow these steps to generate a new set of API credentials:
- Log in to the NovoServe customer portal.
- Navigate to 'API Management' using the 'Shortcuts' menu on the bottom left side.
- Click on 'Create API key' in the menu on the left-hand side of the page.
- Create a description and fill out the (public) IP addresses that are allowed to make requests using this key.
- Your newly created API key and secret will be shown. Write these down in a secure location, since the secret will not be retrievable afterward.
- After retrieving your API key and secret, you can log out of the portal.
To test your newly generated credentials, you can execute the following cURL command (make sure to replace the key and secret placeholders with your own):
curl https://api.novoserve.com/v0/servers -u key:secret
This should return a list of the servers that belong to your account.
Now that you have successfully taken the first steps toward using our API, take a look at our API documentation or our code examples and start making API requests in the programming language of your choice.