A set of web API endpoints that are to be disclosed to partners or the public are presented in this document. The main objective of this initial version of public API is to allow user programs to manage projects and to access the latest action recommendations.
A user’s program should send HTTP requests to Glasshat’s 17 API endpoints via either the GET or POST methods.
/account/0/clients
./task/{task_id}/get
./task/{task_id}/update
.Content-Type application/x-www-form-urlencoded
)Content-Type: application/json
). Please note, if a parameter is given in a query string or as form variable, and the parameter value itself is a JSON object, then the value must be serialised into a unquoted string.apikey
(String) API licence key provided by Glasshat
All requests are stateless, i.e. there is no login session. Every request must provide the 32-character license key issued by Glasshat.
All endpoints return a JSON object Content-Type: application/json
.
Code_ | Description |
---|---|
200 | OK. |
400 | Request parameters contain invalid data. (NEW) |
402 | Account allowance exceeded. Contact Glasshat support to discuss upgrade options… (NEW) |
403 | License key is invalid, expired or disabled. |
404 | Endpoint does not exist. |
404 | Item is not found. (NEW) |
409 | Item to be created exists. Use a different name. (NEW) |
429 | Too many requests for given Glasshat API licence key. Try again later. |
The below is a JSON example of an error response.
{
errors: (Object) One or more error names and error messages.
{
no_license: (String) API licence key invalid, expired or disabled. (HTTP 403)
too_many_requests: (String) Rate limited, try again later. (HTTP 429)
invalid_parameter: (String) Request parameters contain errors. (HTTP 400)
too_many_items: (String) Account allowance exceeded. Upgrade to higher price package. (HTTP 402) (NEW)
client_exists: (String) Client name exists in the account. (HTTP 409)
project_exists: (String) Project name exists in the client. (HTTP 409)
no_client: (String) Client ID not found. (HTTP 404)
no_project: (String) Project ID not found. (HTTP 404)
no_task: (String) Action ID not found. (HTTP 404)
}
}