Comprehensive reference for integrating with Omniconnect API
Omnimetic APIs are organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Currently our Omnimetic APIs works with production mode only but soon we will be offering sandbox where you can test our APIs without affecting your live data. The API key you use to authenticate the request help us to determine API call source and provide better support.
* By default, the Omnimetic API Docs demonstrate using curl to interact with the API over HTTP.
Omnimetic uses access token generated against API Keys to authenticate requests. You can view and manage your API keys in the Omnimetic Console.
Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
Omnimetic token has a one-hour active life, and will need to be replaced after one hour of inactivity. Please note that both client id and secret key need to be provided to indicate you want to authenticate.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail.
$curl https://api.omnimetic.com/access-token-X POST \-d clientId = 57d34dfb-1754-4d1e-9cc2-66387bd5f10f \-d secret = 9ffa9d1429eccdf28e87b7224c434af74fc \
Clients can download utility data for any connected utility service account using - /accounts/:accountId/utility-service-accounts/:utilityServiceAccountId/download-data
accountId "&" utilityServiceAccountId - Recieved during successful account connection through OmniConnect SDK.
To authenticate your API request, you need to pass access token genereated through authentication API via bearer auth, use -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ hY2NvdW50SWQiOiI2MTcxN2Y5YWE4MTdkND AwMTY1Y2M4NWEiLCJpYXQiOjE2MzcxNjY5NjQ sImV4cCI6MTYzNzI1MzM2NH0.B46vxtmf-21bc_QL0W28Y_ PKWm13V GLk6IS1wpfGtfs".
$ curl https://api.omnimetic.com/accounts/:accountId/
download-data-X GET \-H "Authorization: BearereyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50SW
Omnimetic uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted). Codes in the 5xx range indicate an error with Omnimetic's servers.
200 - OK Everything worked as expected.400 - Bad request Unacceptable request, often due to missing a required parameter.401 - Unauthorized Unauthorized access or invalid token404 - Not Found The requested resource doesn't exist.500 - Server Error Something went wrong on Omnimetic's end.