List NAT Gateway Rules
Perform a GET request to retrieve all rules configured for a specific NAT gateway, including those that translate traffic from internal networks to public IP addresses.
Endpoint
https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/natgateways/{natGatewayId}/rules
Request
curl --location \
--request GET 'https://api.ionos.com/cloudapi/v6/datacenters/15f67991-0f51-4efc-a8ad-ef1fb31a480c/natgateways/d8fbc197-d892-48b1-b8e5-e9b8c700abe2/rules' \
--header 'Authorization: Bearer $IONOS_TOKEN'Parameters
The following table lists the path parameters:
Path Parameters
Required
Type
Description
datacenterId
Yes
string
The unique ID of the data center.
natGatewayId
Yes
string
The unique ID of the NAT Gateway.
The following table lists the query parameters:
Query Parameters
Required
Type
Description
Default
pretty
No
boolean
Formats the JSON response with indentations and new lines for readability.
true
depth
No
integer
Specifies the level of detail for response objects: - depth=0: Returns only direct properties (excludes children). - depth=1: Returns direct properties and child references. - depth=2: Returns direct properties and child properties. - depth=3: Recursively returns properties of children and their descendants.
0
offset
No
integer
Starts the response at a specific element index for pagination. Use with limit for pagination.
0
limit
No
integer
Sets the maximum number of elements to return per page. Use with offset for pagination.
1000
Include the following mandatory fields in the request header to authenticate your requests:
Header Parameters
Required
Type
Description
Authorization
Yes
string
Use a Bearer token to authenticate requests through a JSON Web Token (JWT).
Response
A 200 OK response indicates that the NAT Gateway rules are successfully listed. Each rule includes its configuration details such as name, type, protocol, IP addresses, and port ranges.
Last updated
Was this helpful?