API calls that return a large number of results can be broken up into pages that contain multiple groups of results. In order to retrieve all of your data, you can make multiple API calls with varied paging parameters to collect and group all of the data together.
Paging is accomplished through two query parameters: page
and size
. Note that using paging is optional. If you do not specify the page
and size
parameters, then the defaults will be used.
Query Parameter | Description | Default Value | Minimum Value | Maximum Value |
---|---|---|---|---|
page | The current page to return. | 0 | 0 | 100 |
size | The number of results to return. | 10 | 1 | 100 |
Example
The following example returns all the domains under an account for Email Gateway Defense.
Sample Request
curl -X GET "https://api.barracudanetworks.com/beta/accounts/{account_id}/ess/domains" \
--header "Authorization: Bearer {access_token}"
Sample Response
{
"resultsCount": 4,
"pageNum": 0,
"itemsTotal": 4,
"pagesTotal": 1,
"results": [
{
"domainId": 4,
"domainName": "address.com",
"status": "VERIFIED",
"type": "ESS",
},
{
"domainId": 491,
"domainName": "addresstest.com",
"status": "VERIFIED",
"type": "ESS",
},
{
"domainId": 2346,
"domainName": "barracudaemailsecurity.com",
"status": "VERIFIED",
"type": "ESS",
},
{
"domainId": 1000,
"domainName": "spamqa.net",
"status": "VERIFIED",
"type": "ESS",
}
]
}
The following example returns 2 (size
) results from page 0 (page
) for the list of domains under an account for Email Gateway Defense.
Sample Request
curl -X GET "https://api.barracudanetworks.com/beta/accounts/{account_id}/ess/domains?page=0&size=2" \
--header "Authorization: Bearer {access_token}"
Sample Response
{
"resultsCount": 2,
"pageNum": 0,
"itemsTotal": 4,
"pagesTotal": 2,
"results": [
{
"domainId": 4,
"domainName": "address.com",
"status": "VERIFIED",
"type": "ESS"
},
{
"domainId": 491,
"domainName": "addresstest.com",
"status": "VERIFIED",
"type": "ESS"
}
]
}