Routes API
- Table of Contents
- Overview
- Attributes
- Get a List of Routes
- Get a Single Route
- Create a Route
- Update a Route
- Delete a Route
This feature is only available on GreenArrow CloudMTA.
Overview
Routes provide a way to manage groups of IP addresses and their associated routing rules for email delivery. When a Route is created, it automatically provisions IP addresses from GreenArrow Cloud and creates a Routing Rule that directs mail through those IPs.
Attributes
The following are the configurable attributes defined for Routes.
|
route
hash /required
|
|||||||||||||||||||||||
- The recommended daily volume and delivery rate fields are totals across all recipient domains and assume a normal blend of recipient domains. This means that if you send an entire daily volume of emails to a single recipient domain or a larger than normal percentage to a particular recipient domain, then the Route will overflow before these limits are reached. This is because the the underlying mechanics of the limits are per-recipient domain.
Get a List of Routes
GET /ga/api/v3/eng/routes
Parameters
The following parameters are valid for the above endpoint.
|
page
integer /optional |
The page number from which to retrieve. Page numbering starts at |
|
page_token
string /optional |
The |
|
name
string /optional |
Filter routes by name. This performs a case-insensitive substring match, so |
Response
The response will contain a list of Routes in the following format.
|
routes
array of hashes |
Each hash contains all of the attributes listed in the Attributes section. |
||||||||||
|
pagination
hash
|
|||||||||||
Example
GET /ga/api/v3/eng/routes
HTTP/1.1 200 OK
{
"routes": [
{
"id": 1,
"name": "my-route",
"requested_target_daily_volume": 50000,
"recommended_max_daily_volume": 25000,
"recommended_max_delivery_rate_per_hour": 10000,
"overflow_route": null,
"routing_rule": {
"id": 42,
"name": "my-route R1"
}
}
],
"pagination": {
"page": 0,
"per_page": 100,
"num_pages": 1,
"num_records": 1,
"next_page_token": null
}
}
Get a Single Route
GET /ga/api/v3/eng/routes/{id}
Example
GET /ga/api/v3/eng/routes/1
HTTP/1.1 200 OK
{
"route": {
"id": 1,
"name": "my-route",
"requested_target_daily_volume": 50000,
"recommended_max_daily_volume": 25000,
"recommended_max_delivery_rate_per_hour": 10000,
"overflow_route": null,
"routing_rule": {
"id": 42,
"name": "my-route R1"
}
}
}
Create a Route
POST /ga/api/v3/eng/routes
Parameters
See the Attributes section for valid parameters.
Example
POST /ga/api/v3/eng/routes
{
"route": {
"name": "new-route",
"requested_target_daily_volume": 50000
}
}
HTTP/1.1 200 OK
{
"route": {
"id": 2,
"name": "new-route",
"requested_target_daily_volume": 50000,
"recommended_max_daily_volume": 25000,
"recommended_max_delivery_rate_per_hour": 10000,
"overflow_route": null,
"routing_rule": {
"id": 43,
"name": "new-route R2"
}
}
}
Update a Route
PUT /ga/api/v3/eng/routes/{id}
Parameters
See the Attributes section for valid parameters.
Example
PUT /ga/api/v3/eng/routes/1
{
"route": {
"name": "renamed-route",
"requested_target_daily_volume": 75000
}
}
HTTP/1.1 200 OK
{
"route": {
"id": 1,
"name": "renamed-route",
"requested_target_daily_volume": 75000,
"recommended_max_daily_volume": 25000,
"recommended_max_delivery_rate_per_hour": 10000,
"overflow_route": null,
"routing_rule": {
"id": 42,
"name": "renamed-route R1"
}
}
}
Delete a Route
Deleting a Route performs the following actions:
- Redirects the Routing Rule to send all email to the “dump from queue” relay server.
- Removes the IP addresses for that route from GreenArrow.
DELETE /ga/api/v3/eng/routes/{id}
Example
DELETE /ga/api/v3/eng/routes/1
HTTP/1.1 200 OK
{
"success": true
}
