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):
FieldTypeDescription
NameMandatoryThe tunnel name
AuthenticationIDMandatoryAuthentication ID. Value must be a valid email or IP address.
AuthenticationPSKMandatoryAuthentication PSK. Value must be at least 8 characters.
LocationIDMandatoryThe 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:

CodeDescription
201Tunnel created successfully
400Bad request
401Unauthorized access. Make sure the API token includes writing permissions. Click here for more information.
409Conflict - Tunnel already exists with the same name or AuthenticatedID is already in use
500Internal 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:

CodeDescription
200Tunnel information retrieved successfully
400Bad request
401Unauthorized access. Make sure the API token includes writing permissions. Click here for more information.
404Tunnel not found
500Internal 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 ParamDescription
PageSizeSpecify the maximum number of tunnels to retrieve.
PageNumberPage 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:

CodeDescription
200Tunnel retrieved successfully
400Bad request
401Unauthorized access. Make sure the API token includes writing permissions. Click here for more information.
500Internal 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:

CodeDescription
204Tunnel updated successfully
400Bad request
401Unauthorized access. Make sure the API token includes writing permissions. Click here for more information.
404Tunnel not found
500Internal 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:

CodeDescription
204Tunnel deleted successfully
400Bad request
401Unauthorized access. Make sure the API token includes writing permissions. Click here for more information.
404Tunnel not found
500Internal 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

ConnectedTunnel is forwarding traffic
DisconnectedTunnel isn't forwarding traffic