Your Hyperglance deployment hosts a REST API that you can use to interact with your data.
REST API Reference Documentation
You can find latest version of the REST API reference documentation at api.hyperglance.com, or you can access a version of the documentation that corresponds with the version of your local Hyperglance deployment by visiting https://[ReplaceWithHyperglanceIpAddress]/hgapi/docs/
Documentation on how to authenticate with the REST API is here.
OpenAPI Specification & Language SDK Bindings
We use V3 of the OpenAPI specifications to document the Hyperglance API. You can take the Hyperglance specification JSON and auto-generate client APIs for your preferred programming language using tools such as Swagger or OpenAPIGenerator.
You do not have to generate language bindings however, you can simply use any standard web requests library available in your preferred language and issue GET/PUT/POST/DELETE calls that way.
Generating an API Key
- Visit Settings > API Keys (or type: https://YOUR HYPERGLANCE IP/settings/api into the browser)
- Click 'Create API Key'
- Provide a unique key identifier that will act like a public-key / username. Also provide some descriptive text to document what the key is for:
- Click the Create button to generate the private API Key:
- Make a note of this and keep it safe, it is not possible to recover this later.
- Keep your API safe and do not share it - treat it like a password.
- Your API key is used to authenticate against the Hyperglance API.
Get Started With A Simple Example
If you have curl installed locally on your computer (Windows users should try using git-bash or WSL2) it is easy to test out the API.
1) Make sure Hyperglance is running and has ingested resources.
2) Issue the following curl command, just make sure to set your API key name and secret accordingly.
curl -fk https://10.0.0.1/hgapi/network \
--user my-api-user:77415974-1b16-4ee8-af98-6be979611158
Find more CURL examples on our Github repo.
More API Samples & Examples
Check out our Github repository of samples.
There you can find examples for CURL, Python or Postman.