GreenArrow Engine Configuration API
- Table of Contents
- Authentication
- Return Values
- Using curl
This is the documentation for the GreenArrow Engine Configuration API. If you have additional questions about the API or feel that you’ve encountered a bug, please don’t hesitate to contact us at our support address.
Interactions with this API are accomplished over HTTP. On POST and PUT requests, JSON is expected as the body of the request. All API calls reply with JSON.
Authentication
HTTP basic authentication is used. You should use a username and password that is authorized to log in to GreenArrow Engine’s web interface.
Return Values
All responses from the API will include the following keys.
success
boolean |
Returns |
data
hash |
The If there is an error or if the endpoint returns no data, |
error_code
string |
If |
error_messages
array of strings |
If |
Using curl
Throughout this section, we include non-application specific examples of API calls.
curl
can be a useful debugging tool. The following example demonstrates how to create a new Throttling Template using curl
:
cat << 'EOT' > /tmp/body.json
{
"throttling_template": {
"name": "Example Throttling template",
"rules": [
{
"domains": [
"example-2.com",
"example-1.com"
],
"throttle_program": {
"id": 1,
"name": "this name doesn't exist"
},
"max_concurrent_connections": 2,
"max_messages_per_hour": 0
},
{
"domains": [
"example-6.com",
"example-7.com"
],
"throttle_program": {
"name": "test 2"
},
"max_concurrent_connections": 0,
"max_messages_per_hour": 500
}
],
"default": {
"max_concurrent_connections": 1,
"max_messages_per_hour": 60
}
}
}
curl --user username:password -H "Content-Type: application/json" -X POST --data @/tmp/body.json https://example.com/ga/api/v3/eng/throttling_templates
See the Throttling Templates page for more details on the specific parameters being passed in the above example.