Operia - How To Build An API Call
Operia - How To Build An API Call
There are many web targets that are supported using this API.
Find the URL that you’re interested in and add any needed parameters
https://www.example.com?paramter=value¶mter2=value2
To show daily statistics for the last 30 days, use one of the following similar
urls:
https://run.operia.io/__KEY__/statistics
https://run.operia.io/__KEY__/statistics/daily
https://run.operia.io/__KEY__/statistics/daily/30
To specify another amount of days, either change it in the last url, or add
the ?days=XX parameter to any of the urls:
https://run.operia.io/__KEY__/statistics/daily/60
https://run.operia.io/__KEY__/statistics?days=60
To show monthly statistics for the last 12 months, use one of the following
similar urls:
https://run.operia.io/__KEY__/statistics/monthly
https://run.operia.io/__KEY__/statistics/monthly/12
https://run.operia.io/__KEY__/statistics/monthly/24
https://run.operia.io/__KEY__/statistics/monthly?months=24
Errors
On failure, the response status code will be in the range of 4xx-5xx and
the error string will be returned as the response body.
No credits 402
Request Timeout: 500
Request Failed: 500
Invalid URL: 400
How to protect your API key
Since (most) requests to the API are performed using the HTTP GET method
to a URL which includes your KEY, it’s relatively easy to expose it to
unwanted parties. You should be aware of this when sharing constructed
API links with peers.
If you believe your key has been compromised, please contact us right
away and we will send you a new key.