Port Configuration
API Gateway provides the capability to manage port configurations. Each port is associated with a specific type of protocol, HTTP or HTTPS. In addition to these port types, API Gateway also supports the external port, the internal listener port, and the WebSocket listener port. You can specify one or more HTTP or HTTPS ports on which the API Gateway Admin APIs and the deployed APIs are available for consumption. By default, they are available on the primary HTTP port.
API Gateway provides the following REST API and the resources to manage port configuration:
GET /rest/apigateway/ports: Retrieves all port configurations.
POST /rest/apigateway/ports: Creates new port configuration.
PUT /rest/apigateway/ports: Updates an existing port configuration.
DELETE /rest/apigateway/ports: Deletes a port configuration.
GET /rest/apigateway/ports/primary: Retrieves the definition of the primary port.
PUT /rest/apigateway/ports/primary: Sets the primary port to the specified existing port configuration.
PUT /rest/apigateway/ports/enable: Enables the specified port configuration. Only enabled ports can be contacted and can handle server requests.
PUT /rest/apigateway/ports/disable: Disables the specified port configuration. A disabled port cannot be contacted.
GET /rest/apigateway/ports/{listenerKey}: Retrieves the API Gateway port configuration for the specified listener key.
GET /rest/apigateway/ports/{listenerKey}/accessMode: Retrieves the access mode of the API Gateway port configuration for the specified listener key.
POST /rest/apigateway/ports/{listenerKey}/accessMode: Creates an access mode type for the API Gateway port configuration for the specified listener key. You can set the access mode for a port to deny or allow.
PUT /rest/apigateway/ports/{listenerKey}/accessMode: Updates the access mode services of the API Gateway port configuration for the specified listener key. If you want to restrict the allow list, you have to add a PUT call after the POST call.
GET /rest/apigateway/ports/{listenerKey}/ipAccessMode: Retrieves the IP access mode of the API Gateway port configuration for the specified listener key.
POST /rest/apigateway/ports/{listenerKey}/ipAccessMode: Creates the IP access mode type for the API Gateway port configuration for the specified listener key. You can set the IP access mode for a port to deny or allow.
PUT /rest/apigateway/ports/{listenerKey}/ipAccessMode: Updates the IP access mode host list of the API Gateway port configuration for the specified listener key. If you want to restrict the allow list, you have to add a PUT call after the POST call.