<< Click to Display Table of Contents >> Navigation: »No topics above this level« API usage |
All APIs documented in this guide must be called in an authenticated way. To authenticate, you need your API client ID (your company ID) and key (clientSecret). These can be obtained on your company settings page or through Cameyo support:
Calls in this guide are made through HTTPS GET method, and can hence be easily integrated with other systems.
Most APIs have the following syntax:
https://api.cameyo.com/topic/resource-id/action?clientId=your-client-id&clientSecret=your-client-secret
Resource IDs are GUIDs for servers, users and user groups, and numeric for apps.
The API provides two ways to authenticate. Both use the company ID and the API client secret. You can either use those as username and password in an basic HTTP authentication or use clientId and clientSecret HTTP parameters.
For basic HTTP authentication you set the Authorization header to "Basic " + base64(your-client-id + ":" + your-client-secret).
An example: you would like to stop a Cameyo server whose identifier is d54aeacb-dfb4-4977-8434-fcd56c6dab3b, assuming your API client ID is 4ba629d4-0f44-4e03-8251-5d35de66e48b and your API secret is jxdwY3krE5qypru5QVvxYhmbzTAw3tcAty5pF
You can use basic authentication e.g. with curl:
curl -u "4ba629d4-0f44-4e03-8251-5d35de66e48b:jxdwY3krE5qypru5QVvxYhmbzTAw3tcAty5pF" https://api.cameyo.com/servers/d54aeacb-dfb4-4977-8434-fcd56c6dab3b/stop
Or you can use this syntax:
https://api.cameyo.com/servers/d54aeacb-dfb4-4977-8434-fcd56c6dab3b/stop?clientId=4ba629d4-0f44-4e03-8251-5d35de66e48b&clientSecret=jxdwY3krE5qypru5QVvxYhmbzTAw3tcAty5pF
In both cases additional parameters can be passed to the URL as standard HTTP parameters, and are specific to each API.