Prerequisites
The following are required before you can access the API:
- A Barracuda Cloud Control (BCC) account user credentials. If you do not already have a Barracuda Cloud Control account, see Create a Barracuda Cloud Control Account.
- A Client ID and Client Secret from a registered application in the Barracuda Token Service. For instructions, see Registering your Application in the Barracuda Token Service.
- An access token to make API requests. To create an access token, see Obtaining an Access Token.
Tools for interacting with the API
cURL
cURL is a command line tool for transferring data from or to a remote server via URLs. cURL is pre-installed on many UNIX/Linux platforms and newer Windows platforms. Type curl -V
in your favorite shell to see if the tool is installed.
Examples in the endpoint references use cURL commands to send HTTP requests to access, create, and manipulate REST resources.
Postman
Postman is a tool that you can use to build and test requests using the Email Gateway Defense APIs. You can download Postman at: https://www.getpostman.com/.
Python
For an example of using the Email Gateway Defense API written in Python, see Example - API Client in Python.
Make API Requests
After you have registered your application with an active Client ID and Client Secret and obtained an access token, you are ready to start creating requests.
Include the URL to the API service for the environment based on your region.
Region | URL |
---|---|
United States (US) | https://api.barracudanetworks.com/ |
United Kingdom (UK) | https://uk.api.barracudanetworks.com/ |
This sample request retrieves a list of accounts for Email Gateway Defense in the US region. You must include your access token in the authorization request header.
curl -X GET "https://api.barracudanetworks.com/beta/accounts/ess" \
--header "Authorization: Bearer {access_token}"
The sample response shows the details for the list of accounts available:
{
"resultsCount": 1,
"pageNum": 0,
"itemsTotal": 1,
"pagesTotal": 1,
"results": [
{
"accountName": "Barracuda Networks Co",
"accountId": "5584599",
"region": "US"
}
]
}
Next Step
See the API Reference to get details of all the HTTP requests available through the Email Gateway Defense REST API.