List Managed NAT Gateways

Retrieve a list of all NAT gateways provisioned in a specific data center using the GET request. The API paginates responses to help you manage large collections of NAT gateways.

Endpoint

https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/natgateways

Request

curl --location \
--request GET 'https://api.ionos.com/cloudapi/v6/datacenters/15f67991-0f51-4efc-a8ad-ef1fb31a480c/natgateways?offset=0&limit=100' \
--header 'Authorization: Bearer $IONOS_TOKEN'

Request parameters

The following table lists the path parameters:

Parameter

Required

Type

Description

Example

datacenterId

Yes

string

The unique ID of the data center.

15f67991-0f51-4efc-a8ad-ef1fb31a480c

Response

A 200 OK response indicates that the NAT Gateways are successfully listed. Each NAT Gateway's id, configuration details, and associated resources are provided in the response.

{
  "id": "natgateways",
  "type": "collection",
  "href": "https://api.ionos.com/cloudapi/v6/datacenters/15f67991-0f51-4efc-a8ad-ef1fb31a480c/natgateways",
  "items": [
    {
      "id": "cb4ac7f1-9e7e-4c97-90f0-f5b6e1a8b9f5",
      "type": "natgateway",
      "href": "https://api.ionos.com/cloudapi/v6/datacenters/15f67991-0f51-4efc-a8ad-ef1fb31a480c/natgateways/cb4ac7f1-9e7e-4c97-90f0-f5b6e1a8b9f5",
      "metadata": {
        "etag": "4506cf970711b0e6ba0c6d7b10b9f872",
        "createdDate": "2024-01-15T13:37:50+00:00",
        "createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "lastModifiedDate": "2024-01-15T13:40:47+00:00",
        "lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "state": "AVAILABLE"
      },
      "properties": {
        "name": "Production NAT Gateway",
        "publicIps": [
          "203.0.113.5",
          "203.0.113.6"
        ],
        "lans": [
          {
            "id": 2,
            "gatewayIps": [
              "10.0.1.1"
            ]
          }
        ]
      },
      "entities": {
        "rules": {
          "id": "cb4ac7f1-9e7e-4c97-90f0-f5b6e1a8b9f5/rules",
          "type": "collection",
          "href": "https://api.ionos.com/cloudapi/v6/datacenters/15f67991-0f51-4efc-a8ad-ef1fb31a480c/natgateways/cb4ac7f1-9e7e-4c97-90f0-f5b6e1a8b9f5/rules"
        },
        "flowlogs": {
          "id": "cb4ac7f1-9e7e-4c97-90f0-f5b6e1a8b9f5/flowlogs",
          "type": "collection",
          "href": "https://api.ionos.com/cloudapi/v6/datacenters/15f67991-0f51-4efc-a8ad-ef1fb31a480c/natgateways/cb4ac7f1-9e7e-4c97-90f0-f5b6e1a8b9f5/flowlogs"
        }
      }
    },
    {
      "id": "a2f6d2e4-5c8e-4b97-82f0-c9b4f1a7c3e2",
      "type": "natgateway",
      "href": "https://api.ionos.com/cloudapi/v6/datacenters/15f67991-0f51-4efc-a8ad-ef1fb31a480c/natgateways/a2f6d2e4-5c8e-4b97-82f0-c9b4f1a7c3e2",
      "metadata": {
        "etag": "7a4f2c850922c1f7ba1d7e8c20a8f973",
        "createdDate": "2024-01-10T09:15:30+00:00",
        "createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "lastModifiedDate": "2024-01-10T09:18:25+00:00",
        "lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
        "state": "AVAILABLE"
      },
      "properties": {
        "name": "Development NAT Gateway",
        "publicIps": [
          "198.51.100.12"
        ],
        "lans": [
          {
            "id": 3,
            "gatewayIps": [
              "192.168.1.1",
              "192.168.1.2"
            ]
          }
        ]
      },
      "entities": {
        "rules": {
          "id": "a2f6d2e4-5c8e-4b97-82f0-c9b4f1a7c3e2/rules",
          "type": "collection",
          "href": "https://api.ionos.com/cloudapi/v6/datacenters/15f67991-0f51-4efc-a8ad-ef1fb31a480c/natgateways/a2f6d2e4-5c8e-4b97-82f0-c9b4f1a7c3e2/rules"
        },
        "flowlogs": {
          "id": "a2f6d2e4-5c8e-4b97-82f0-c9b4f1a7c3e2/flowlogs",
          "type": "collection",
          "href": "https://api.ionos.com/cloudapi/v6/datacenters/15f67991-0f51-4efc-a8ad-ef1fb31a480c/natgateways/a2f6d2e4-5c8e-4b97-82f0-c9b4f1a7c3e2/flowlogs"
        }
      }
    }
  ],
  "offset": 0,
  "limit": 100,
  "_links": {
    "prev": "https://api.ionos.com/cloudapi/v6/datacenters/15f67991-0f51-4efc-a8ad-ef1fb31a480c/natgateways?offset=0&limit=100",
    "self": "https://api.ionos.com/cloudapi/v6/datacenters/15f67991-0f51-4efc-a8ad-ef1fb31a480c/natgateways?offset=0&limit=100",
    "next": "https://api.ionos.com/cloudapi/v6/datacenters/15f67991-0f51-4efc-a8ad-ef1fb31a480c/natgateways?offset=100&limit=100"
  }
}

Last updated

Was this helpful?