Our Application Programming Interface (API) is a way of communicating with OMIQ via code or command line interface to perform tasks, interact with files, and display information without clicking on buttons in the browser/interacting with the graphical user interface (GUI).
OMIQ is built entirely on a RESTful JSON API and any graphical element that a traditional user sees in the browser goes on to call an API element so every task that's visible to GUI users is available via the API. However, there are additional calls the API can make beyond the visible elements in the browser.
To maintain security, all requests to the OMIQ API must be accompanied by an auth token. This token must be provided to the omiq_api package for it to function properly. You can generate a short-term token by logging into OMIQ. This will associate an auth token with your user profile. To retrieve it, navigate to your profile page. You should see the current URL ends in /profile. Append ?token=true to this such that the URL ends in /profile?token=true . Submit this URL and the page will refresh to show your current auth token. Click the button to copy it to your clipboard for use in the Python authentication
step. The auth token will expire after a set amount of time (usually 8 hours, but it may be different for your particular OMIQ installation) and this token retrieval process will have to be repeated.
For long running service accounts set up for things like automatically transferring data, pulling stats, or other maintenance tasks, there is a method available to use a permanent secret key. This makes it so auth tokens never need to be manually retrieved. To get a secret key file you must request it from OMIQ staff. You will be provided with a special JSON text file that will need to be accessible to the omiq_api package on the computer system it’s running on. If your secret keys are associated with a service account, keep in mind that the actions performed by this account will be attributed to this account. This account cannot log in to OMIQ. It can only interact with the API. If you need to validate operations done by this account, you will need to do so by API, or make sure to have the account share with your user account. Service accounts are typically associated with single tenant servers and as such will not count against the user/license cap for that particular server.
As there are an incredible number of endpoints with the OMIQ API, not every single one is described in the documentation so please communicate with the support team (support@omiq.ai) to describe the desired behavior and we can likely help with both the structure and syntax when developing a specific script or workflow to ensure the code is efficient and clean.
To get started with the API, please contact support for the API Python Guide pdf and the latest version of our Python package (1.9).