IP Addresses API
- Table of Contents
- Overview
- Attributes
- IP Addresses
- Throttling Rules
Overview
IP Addresses contain two sets of Throttling Rules. The Throttling Rules provided by the Throttling Template can be overridden by rules on the IP Address record. Each Throttling Rule contains a list of domains to which it applies.
When email is delivered, the Throttling Template and IP Address rules are combined to determine what throttling limits are applied.
Attributes
ip_address
hash
|
IP Addresses
Get a List of IP Addresses
GET /ga/api/v3/eng/ip_addresses
GET /ga/api/v3/eng/ip_addresses?page={page}
GET /ga/api/v3/eng/ip_addresses?page_token={page_token}
Parameters
page
integer /optional |
The page number to retrieve. Page numbering starts at |
page_token
string /optional |
The |
name
string /optional |
Match only IP Addresses whose name matches (case-insensitively) the given value. |
ip
string /optional |
Match only IP Addresses whose IP matches the given value. |
hostname
string /optional |
Match only IP Addresses whose hostname matches (case-insensitively) the given value. |
Response
ip_addresses
array of hashes
|
|||||||||||
pagination
hash
|
Example
GET /ga/api/v3/eng/ip_addresses
HTTP/1.1 200 OK
{
"success": true,
"data": {
"ip_addresses": [
{
"id": 2,
"name": "ipaddr-1"
},
{
"id": 3,
"name": "ipaddr-2"
},
{
"id": 5,
"name": "ipaddr-3"
}
],
"pagination": {
"page": 0,
"per_page": 100,
"num_pages": 1,
"num_records": 3,
"next_page_token": null
}
},
"error_code": null,
"error_messages": null
}
Get Details on a Single IP Address
GET /ga/api/v3/eng/ip_addresses/{id}
Response
ip_address
hash |
The attributes for this hash are defined in the Attributes section of this document. |
Example
GET /ga/api/v3/eng/ip_addresses/12
HTTP/1.1 200 OK
{
"success": true,
"data": {
"ip_address": {
"id": 12,
"name": "ipaddr-1",
"ip": "10.0.0.28",
"hostname": "hostname-28.com",
"delivery_paused": false,
"redirect": null,
"throttling_template": {
"id": 3,
"name": "Basic Throttling Template"
},
"rules": [
{
"id": 11,
"domains": [
"ip1-domain1.com",
"ip1-domain2.com"
],
"max_concurrent_connections": 2,
"max_messages_per_hour": 70,
"throttle_program": null
},
{
"id": 12,
"domains": [
"ip1-domain3.com",
"ip1-domain4.com"
],
"max_concurrent_connections": 0,
"max_messages_per_hour": 20,
"throttle_program": null
}
],
"default": {
"max_concurrent_connections": null,
"max_messages_per_hour": null
}
}
},
"error_code": null,
"error_messages": null
}
Create an IP Address
POST /ga/api/v3/eng/ip_addresses
Payload
The JSON data sent to this endpoint should contain an object as described in the Attributes section of this page.
All required fields must be present. Do not specify read-only fields.
Response
The response will include an ip_address
key containing the full IP Address
record as defined in IP Address Attributes.
Example
POST /ga/api/v3/eng/ip_addresses
{
"ip_address": {
"name": "ipaddr-4",
"ip": "127.0.0.9",
"hostname": "new-ip-example.com",
"throttling_template": {
"name": "Basic Throttling Template"
},
"delivery_paused": true,
"redirect": {
"id": 21
},
"rules": [
{
"domains": [
"example-2.com",
"example-1.com"
],
"max_concurrent_connections": 2,
"max_messages_per_hour": 0,
"throttle_program": {
"id": 1,
"name": "this name doesn't exist"
}
},
{
"domains": [
"example-6.com",
"example-7.com"
],
"max_concurrent_connections": 0,
"max_messages_per_hour": 500,
"throttle_program": {
"name": "Automatic Backoff"
}
}
],
"default": {
"max_concurrent_connections": 1,
"max_messages_per_hour": null
}
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"ip_address": {
"id": 22,
"name": "ipaddr-4",
"ip": "127.0.0.9",
"hostname": "new-ip-example.com",
"delivery_paused": true,
"redirect": {
"type": "relay_server",
"id": 21,
"name": "relay-1"
},
"throttling_template": {
"id": 4,
"name": "Basic Throttling Template"
},
"rules": [
{
"id": 17,
"domains": [
"example-2.com",
"example-1.com"
],
"max_concurrent_connections": 2,
"max_messages_per_hour": 0,
"throttle_program": {
"id": 1,
"name": "Automatic Backoff"
}
},
{
"id": 18,
"domains": [
"example-6.com",
"example-7.com"
],
"max_concurrent_connections": 0,
"max_messages_per_hour": 500,
"throttle_program": {
"id": 1,
"name": "Automatic Backoff"
}
}
],
"default": {
"max_concurrent_connections": 1,
"max_messages_per_hour": null
}
}
},
"error_code": null,
"error_messages": null
}
Update an IP Address
PUT /ga/api/v3/eng/ip_addresses/{id}
Payload
The payload to this endpoint is the same as described in the Attributes section of this page, with the exceptions described below.
throttling_template
hash /required The data may contain a mixture of required and optional fields. Do not specify read-only fields. Exceptions:
|
Response
The response will include an ip_address
key containing the full IP Address
record as defined in IP Address Attributes.
Example
PUT /ga/api/v3/eng/ip_addresses/23
{
"ip_address": {
"name": "ipaddr-new-name",
"rules_new": [
{
"domains": [
"new-rule-domain.com"
],
"max_concurrent_connections": 7,
"max_messages_per_hour": 1056
}
]
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"ip_address": {
"id": 23,
"name": "ipaddr-new-name",
"ip": "10.0.0.34",
"hostname": "hostname-34.com",
"delivery_paused": false,
"redirect": null,
"throttling_template": {
"id": 5,
"name": "Basic Throttling Template"
},
"rules": [
{
"id": 21,
"domains": [
"ip1-domain1.com",
"ip1-domain2.com"
],
"max_concurrent_connections": 2,
"max_messages_per_hour": 70,
"throttle_program": null
},
{
"id": 22,
"domains": [
"ip1-domain3.com",
"ip1-domain4.com"
],
"max_concurrent_connections": 0,
"max_messages_per_hour": 20,
"throttle_program": null
},
{
"id": 23,
"domains": [
"new-rule-domain.com"
],
"max_concurrent_connections": 7,
"max_messages_per_hour": 1056,
"throttle_program": null
}
],
"default": {
"max_concurrent_connections": null,
"max_messages_per_hour": null
}
}
},
"error_code": null,
"error_messages": null
}
Delete an IP Address
DELETE /ga/api/v3/eng/ip_addresses/{id}
IP Addresses that are currently used by other records may not be deleted. Use the VirtualMTAs API to get a list of such records.
References made to IP Addresses from GreenArrow Studio will not prevent deletion of the IP Address, but may in the future. Deleting an IP Address that is used in GreenArrow Studio by a scheduled/in-progress campaign will cause the campaign to either not send or send with the Default Virtual MTA.
Response
The response is a standard success or error response.
Example
DELETE /ga/api/v3/eng/ip_addresses/46
HTTP/1.1 200 OK
{
"success": true,
"data": {
},
"error_code": null,
"error_messages": null
}
Throttling Rules
Create a Throttling Rule
POST /ga/api/v3/eng/ip_addresses/{ip_address_id}/throttling_rules
Parameters
ip_address_id
integer /required |
The |
Payload
throttling_rule
hash /required |
The structure of this hash is the same as the entries defined in the
All required fields must be present. Do not specify read-only fields. |
Response
The response will include a throttling_rule
key containing a hash that uses
the structure defined in the IP Address Attributes.
Example
POST /ga/api/v3/eng/ip_addresses/2/throttling_rules
{
"throttling_rule": {
"domains": [
"new-domain-1.com",
"new-domain-2.com"
],
"throttle_program": {
"name": "Automatic Backoff"
},
"max_concurrent_connections": 7,
"max_messages_per_hour": 9
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"throttling_rule": {
"id": 3,
"domains": [
"new-domain-1.com",
"new-domain-2.com"
],
"max_concurrent_connections": 7,
"max_messages_per_hour": 9,
"throttle_program": {
"id": 4,
"name": "Automatic Backoff"
}
}
},
"error_code": null,
"error_messages": null
}
Update a Throttling Rule
PUT /ga/api/v3/eng/ip_addresses/{ip_address_id}/throttling_rules/{rule_id}
ip_address_id
integer /required |
The |
rule_id
integer /required |
The |
Payload
throttling_rule
hash /required |
The structure of this hash is the same as the entries defined in the
|
Response
The response will include an ip_address
key containing the full IP Address
record as defined in IP Address Attributes.
Example
PUT /ga/api/v3/eng/ip_addresses/4/throttling_rules/4
{
"throttling_rule": {
"domains": [
"new-domain-1.com",
"new-domain-2.com"
],
"max_concurrent_connections": 7,
"max_messages_per_hour": 9
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"throttling_rule": {
"id": 4,
"domains": [
"new-domain-1.com",
"new-domain-2.com"
],
"max_concurrent_connections": 7,
"max_messages_per_hour": 9,
"throttle_program": null
}
},
"error_code": null,
"error_messages": null
}
Delete a Throttling Rule
Use this endpoint to remove a rule from an IP Address.
DELETE /ga/api/v3/eng/ip_addresses/{ip_address_id}/throttling_rules/{rule_id}
ip_address_id
integer /required |
The |
rule_id
integer /required |
The |
Example
DELETE /ga/api/v3/eng/ip_addresses/14/throttling_rules/14
HTTP/1.1 200 OK
{
"success": true,
"data": {
},
"error_code": null,
"error_messages": null
}