The NovoServe public API enables our customers to perform common actions on their servers in an automated way, instead of manually through our portal. A few examples of actions that are possible through the API:
● Powering down/up of servers;
● Obtaining bandwidth usage information;
● Getting access to the IPMI interface;
● Mounting virtual media such as ISOs;
● Updating the networking 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 function documentation
Swagger documentation is available for each individual API function. Currently, this documentation is only available to customers who are logged in on our portal, but we will make it publicly available soon.
Example code for a simple API call in several common programming languages can be found in our novoserve/public-api-docs ( https://github.com/novoserve/public-api-docs) repository.
The example code repository also contains a ready-to-use Python library that wraps the API functions in Python functions. We do not provide such a library for other languages than Python, but the Python implementation should provide a good starting point for porting such functionality to other languages.
Our current API version is the first publicly available version. And although we strive for a stable set of API functions and features, there is always a chance that we will have to change some of the public API features in future versions - should we need to address unforeseen issues. Naturally, any changes in our API will be documented and communicated to our customers.
Getting started with the NovoServe API?
It’s easy! Follow these steps:
- 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.
- Take a look at the example code (https://github.com/novoserve/public-api-docs) and start making API requests in the programming language of your choice.