Accounts-account-email-domain-usernames-mailboxName-blackwhitelist:GET

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
 
m (1 revision: Release 109)
 
(2 intermediate revisions by 2 users not shown)
Line 58: Line 58:
  
 
; type - ''string''
 
; 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".
+
: Type of address included in black/white list. Possible values are "W" or "B". "W" means the adrress is included in "whitelist", "B" - included in "blacklist".
  
 
; 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 79: Line 79:
  
 
{
 
{
   "totalCount": 3,  
+
   "totalCount": 4,  
 
   "list": [
 
   "list": [
 
       {
 
       {
Line 92: Line 92:
 
         "type": "B",  
 
         "type": "B",  
 
         "address": "mb3-black@somedomain.com"
 
         "address": "mb3-black@somedomain.com"
 +
      },
 +
      {
 +
        "type": "B",
 +
        "address": "@sometestdomain.com"
 
       }
 
       }
 
   ],
 
   ],
Line 207: Line 211:
  
 
{
 
{
   "totalCount": 3,  
+
   "totalCount": 4,  
 
   "list": [
 
   "list": [
 
       {
 
       {
Line 220: Line 224:
 
         "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}/usernames/{mailbox}/blackwhitelist

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

Contents


[edit] Request

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

[edit] URI Parameters

account - string
domain - string
mailbox - 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 or the mailbox 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 adrress 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/usernames/test/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/usernames/test/blackwhitelist",
            "rel": "self"
        }
    ]
}
 

[edit] Get filtered list by address

Request

GET /accounts/account-number/email/test.com/usernames/test/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/usernames/test/blackwhitelist?filterAddress=*somedomain.com*",
            "rel": "self"
        }
    ]
}
 

[edit] Get filtered list by type

Request

GET /accounts/account-number/email/test.com/usernames/test/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/usernames/test/blackwhitelist?filterType=W",
            "rel": "self"
        }
    ]
}
 

[edit] Paginated request

Request

GET /accounts/account-number/email/test.com/usernames/test/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/usernames/test/blackwhitelist?pageSize=2&page=2",
            "rel": "next"
        },
        {
            "href": "{{APIBaseURL}}/accounts/account-number/email/test.com/usernames/test/blackwhitelist?pageSize=2&page=2",
            "rel": "last"
        }
    ]
}
 

[edit] Sorted request

Request

GET /accounts/account-number/email/test.com/usernames/test/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/usernames/test/blackwhitelist?sortField=address&sortOrder=desc",
            "rel": "self"
        }
    ]
}
 


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox