Atmos Cloud API: Tunnels
The Atmos Cloud API allows administrators to have programmatic control over tunnels. Click here to learn more about generating an API token.
NOTE
This is a limited release feature. For more information contact Axis Security Support: [email protected]
Create a new tunnel
The management API allows administrators to create new tunnel.
Request Details
- Request URL: “admin-api.axissecurity.com/api/v1/tunnels”
- Request Method: POST
- Request Headers: Authorization: “Bearer {API Token}”
- Request Body (JSON):
| Field | Type | Description |
|---|---|---|
| Name | Mandatory | The tunnel name |
| AuthenticationID | Mandatory | Authentication ID. Value must be a valid email or IP address. |
| AuthenticationPSK | Mandatory | Authentication PSK. Value must be at least 8 characters. |
| LocationID | Mandatory | The ID of the associated location |
NOTE
The ID parameter is NOT required when adding a new tunnel via the API
Request Format:
{
"name":"Chicago IPSec1",
"authenticationID":"<email>",
"authenticationPSK":"<secret>",
"locationID":"d88fc23a-59a1-476a-a62e-a51ff3543fe7"
}
Successful Response Format:
{
"id":"6ee0bd21-4f50-454a-9f75-82f6933d54b0",
"name":"Chicago IPSec1",
"authenticationID":"<email>",
"locationID":"d88fc23a-59a1-476a-a62e-a51ff3543fe7"
}
Response Codes:
| Code | Description |
|---|---|
| 201 | Tunnel created successfully |
| 400 | Bad request |
| 401 | Unauthorized access. Make sure the API token includes writing permissions. Click here for more information. |
| 409 | Conflict - Tunnel already exists with the same name or AuthenticatedID is already in use |
| 500 | Internal server error |
Get the details of an existing tunnel
To get the details of an existing tunnel, the tunnel ID should be added to the request URL.
Request Details
- Request URL: “admin-api.axissecurity.com/api/v1/tunnels/<tunnel ID>”
- Request Method: GET
- Request Headers: Authorization: “Bearer {API Token}”
- Request Body: empty
Successful Response Format:
{
"id":"6ee0bd21-4f50-454a-9f75-82f6933d54b0",
"name":"Chicago IPSec1",
"authenticationID":"<email>",
"locationID":"d88fc23a-59a1-476a-a62e-a51ff3543fe7"
}
Response Codes:
| Code | Description |
|---|---|
| 200 | Tunnel information retrieved successfully |
| 400 | Bad request |
| 401 | Unauthorized access. Make sure the API token includes writing permissions. Click here for more information. |
| 404 | Tunnel not found |
| 500 | Internal server error |
Get a list of existing tunnels
Request Details
- Request URL: “admin-api.axissecurity.com/api/v1/tunnels?pageSize=100&pageNumber=1”
- Request Method: GET
- Request Headers: Authorization: “Bearer {API Token}”
- Query params:
| Query Param | Description |
|---|---|
| PageSize | Specify the maximum number of tunnels to retrieve. |
| PageNumber | Page number 1 will retrieve the first tunnels. |
Successful Response Format:
{
"pageNumber":1,
"pageSize":100,
"firstPage":"<URL to retrieve first page>",
"lastPage":"<URL to retrieve last page>",
"totalPages":1,
"totalRecords":50,
"nextPage":"<URL to retrieve next page>",
"previousPage":"<URL to retrieve previous page>",
"data":[
{
"id":"6ee0bd21-4f50-454a-9f75-82f6933d54b0",
"name":"Chicago IPSec1",
"authenticationID":"<email>",
"locationID":"d88fc23a-59a1-476a-a62e-a51ff3543fe7"
}
]
}
Response Codes:
| Code | Description |
|---|---|
| 200 | Tunnel retrieved successfully |
| 400 | Bad request |
| 401 | Unauthorized access. Make sure the API token includes writing permissions. Click here for more information. |
| 500 | Internal server error |
Update an existing tunnel
To update an existing tunnel, the tunnel's ID should be added to the request URL.
A successful response will return a 204 response with the tunnel details.
Request Details:
Request URL: “admin-api.axissecurity.com/api/v1/tunnels/<tunnel ID>”
Request Method: PUT
Request Headers: Authorization: “Bearer {API Token}”
Request Format:
{
"name":"<new name>",
"authenticationID":"<new email>",
"AuthenticationPSK":"<new secret>",
"locationID":"<new location id>"
}
Successful Response Format:
{
"id":"6ee0bd21-4f50-454a-9f75-82f6933d54b0",
"name":"<new tunnel name>",
"authenticationID":"<new email>",
"AuthenticationPSK":"<new secret>",
"locationID":"<new location id>"
}
Response Codes:
| Code | Description |
|---|---|
| 204 | Tunnel updated successfully |
| 400 | Bad request |
| 401 | Unauthorized access. Make sure the API token includes writing permissions. Click here for more information. |
| 404 | Tunnel not found |
| 500 | Internal server error |
Delete a tunnel
To delete an existing tunnel, the tunnel's ID should be added to the request URL.
A successful response will return a 204 response with an empty body.
Request Details
- Request URL: “admin-api.axissecurity.com/api/v1/tunnels/<tunnel ID>”
- Request Method: Delete
- Request Headers: Authorization: “Bearer {API Token}”
- Request Body: empty
Response Codes:
| Code | Description |
|---|---|
| 204 | Tunnel deleted successfully |
| 400 | Bad request |
| 401 | Unauthorized access. Make sure the API token includes writing permissions. Click here for more information. |
| 404 | Tunnel not found |
| 500 | Internal server error |
Get the status of an existing tunnel
To get a tunnel's status, the tunnel's ID should be added to the request URL.
Request Details
- Request URL: “admin-api.axissecurity.com/api/v1/tunnels/<tunnel ID>/status”
- Request Method: GET
- Request Headers: Authorization: “Bearer {API Token}”
- Request Body: empty
Tunnel Statuses
| Connected | Tunnel is forwarding traffic |
| Disconnected | Tunnel isn't forwarding traffic |
Updated over 1 year ago
