Skip to main content

Getting Started

All Akinon API responses are formatted in JSON. API is served over HTTPS to ensure data privacy, unencrypted HTTP is not supported.

Base URL : https://{omnitron_url}/api/i1/

{omnitron_url} is the domain name of a customer's Omnitron. For example, akinon.omnitron.net

Akinon Omnitron API and its other products use your Omnitron account for authentication. If you don't have an account yet, you can get in touch with a partner manager for Akinon Omnitron Account.

API Authentication

All requests to Akinon's REST API need to be authenticated. To begin using the Akinon APIs, you will need to generate an API key with Login API. All other requests should be sent with the token response from the API key generated by Login API.

NOTE: Make sure that Content-Type:application/json is in the header of each request.

ParameterData TypeDescription
usernamestring Akinon Omnitron Username
passwordstring Akinon Omnitron Password

Request POST

You need to issue an HTTPS POST to a login url in order to get an API key.

Content_Type header represents the response type.

Body requests must contain a username and a password.

import requests
import json
url = "https://{customer_api_url}/api/i1/auth/login/"
headers = {
'Content-Type': 'application/json'
}
data = {
'username': 'Omnitron Username',
'password': 'Omnitron Password'
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.text)

Response

The response returns an API key. This key is required to be used in other resources. The return key must be added in headers of any requests as Authorization: Token {}.format(api_token).

{
"key": "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"
}

Resource Properties are in Python format:

ParameterData TypeDescription
key string The API key of the customer account