Accounts-account-email-domain-blackwhitelist:GET

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
m (1 revision: Release 103)
m (1 revision: Release 109)
 
(One intermediate revision by one user not shown)
Line 59: Line 59:
  
 
; address - ''string''
 
; address - ''string''
: The address of the black/whitelisted mailbox.
+
: The address of the black/whitelisted mailbox or domain.
  
 
; links - ''list''
 
; links - ''list''
Line 77: Line 77:
  
 
{
 
{
   "totalCount": 3,  
+
   "totalCount": 4,  
 
   "list": [
 
   "list": [
 
       {
 
       {
Line 90: Line 90:
 
         "type": "B",  
 
         "type": "B",  
 
         "address": "mb3-black@somedomain.com"
 
         "address": "mb3-black@somedomain.com"
 +
      },
 +
      {
 +
        "type": "B",
 +
        "address": "@sometestdomain.com"
 
       }
 
       }
 
   ],
 
   ],
Line 205: Line 209:
  
 
{
 
{
   "totalCount": 3,  
+
   "totalCount": 4,  
 
   "list": [
 
   "list": [
 
       {
 
       {
Line 218: Line 222:
 
         "type": "W",  
 
         "type": "W",  
 
         "address": "mb1-white@somedomain.com"
 
         "address": "mb1-white@somedomain.com"
 +
      },
 +
      {
 +
        "type": "B",
 +
        "address": "@sometestdomain.com"
 
       }
 
       }
 
   ],   
 
   ],   

Latest revision as of 13:14, 24 July 2015

[edit] GET /accounts/{account}/email/{domain}/blackwhitelist

Retrieves a list of all addresses included in black/white list for a specific domain

Contents


[edit] Request

GET /accounts/{account}/email/{domain}/blackwhitelist

[edit] URI Parameters

account - string
domain - string

[edit] Request Headers

Authorization - HTTP Authorization header [1]
The Authentication credentials of the client application.
Content-Type
Required. Set this header to application/json; charset=UTF-8

[edit] Response

[edit] Status Code

200 OK
Success
401 Unauthorized
The supplied credentials are invalid or do not provide permissions for this operation.
404 Not Found
The domain name does not exist.

[edit] Response Body

{
   "totalCount": {totalCount}, 
   "list": [
      {
         "type": "{type}", 
         "address": "{address}"
      }
   ],
   "links": [
      {
         "href": "{href}",
         "rel": "{rel}"
      }
   ]
}
 


[edit] Parameters

totalCount - int
The total count of addresses included in black/white list
type - string
Type of address included in black/white list. Possible values are "W" or "B". "W" means the mailbox is included in "whitelist", "B" - included in "blacklist".
address - string
The address of the black/whitelisted mailbox or domain.
links - list
Hypermedia to the get black/whitelisted addresses

[edit] Examples

[edit] Get all addresses included in black/white list

Request

GET /accounts/account-number/email/test.com/blackwhitelist
 

Response

200 OK

{
   "totalCount": 4, 
   "list": [
      {
         "type": "W", 
         "address": "mb1-white@somedomain.com"
      }, 
      {
         "type": "B", 
         "address": "mb2-black@domain.com"
      },
      {
         "type": "B", 
         "address": "mb3-black@somedomain.com"
      },
      {
         "type": "B", 
         "address": "@sometestdomain.com"
      }
   ],
   "links": [
        {
            "href": "{{APIBaseURL}}/accounts/account-number/email/test.com/blackwhitelist",
            "rel": "self"
        }
    ]
}
 

[edit] Get filtered list by address

Request

GET /accounts/account-number/email/test.com/blackwhitelist?filterAddress=*somedomain.com*
 

Response

200 OK

{
   "totalCount": 2, 
   "list": [
      {
         "type": "W", 
         "address": "mb1-white@somedomain.com"
      },
      {
         "type": "B", 
         "address": "mb3-black@somedomain.com"
      }
   ],
   "links": [
        {
            "href": "{{APIBaseURL}}/accounts/account-number/email/test.com/blackwhitelist?filterAddress=*somedomain.com*",
            "rel": "self"
        }
    ]
}
 

[edit] Get filtered list by type

Request

GET /accounts/account-number/email/test.com/blackwhitelist?filterType=W
 

Response

200 OK

{
   "totalCount": 1, 
   "list": [
      {
         "type": "W", 
         "address": "mb1-white@somedomain.com"
      }
   ],
   "links": [
        {
            "href": "{{APIBaseURL}}/accounts/account-number/email/test.com/blackwhitelist?filterType=W",
            "rel": "self"
        }
    ]
}
 

[edit] Paginated request

Request

GET /accounts/account-number/email/test.com/blackwhitelist?pageSize=2&page=1
 

Response

200 OK

{
   "totalCount": 2, 
   "list": [
      {
         "type": "W", 
         "address": "mb1-white@somedomain.com"
      },
      {
         "type": "B", 
         "address": "mb2-white@domain.com"
      }
   ],   
   "links": [
        {
            "href": "{{APIBaseURL}}/accounts/account-number/email/test.com/blackwhitelist?pageSize=2&page=2",
            "rel": "next"
        },
        {
            "href": "{{APIBaseURL}}/accounts/account-number/email/test.com/blackwhitelist?pageSize=2&page=2",
            "rel": "last"
        }
    ]
}
 

[edit] Sorted request

Request

GET /accounts/account-number/email/test.com/blackwhitelist?sortField=address&sortOrder=desc
 

Response

200 OK

{
   "totalCount": 4, 
   "list": [
      {
         "type": "B", 
         "address": "mb3-black@somedomain.com"
      },
      {
         "type": "B", 
         "address": "mb2-black@domain.com"
      },
      {
         "type": "W", 
         "address": "mb1-white@somedomain.com"
      },
      {
         "type": "B", 
         "address": "@sometestdomain.com"
      }
   ],   
   "links": [
        {
            "href": "{{APIBaseURL}}/accounts/account-number/email/test.com/blackwhitelist?sortField=address&sortOrder=desc",
            "rel": "self"
        }
    ]
}
 


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox