Generate a script to install the gateway instance by Docker Compose
GET /api/gateway_groups/{gateway_group_id}/deployment/docker-compose
GET /api/gateway_groups/{gateway_group_id}/deployment/docker-composeInteractive request editor loads with JavaScript.
In: header
Path Parameters
Gateway group ID.
1 <= lengthQuery Parameters
The IP address of the control plane.
1 <= lengthThe validity period of the certificate in days.
1 <= value <= 109503650Docker image.
1 <= lengthThe HTTP port of the gateway.
9080The HTTPS port of the gateway.
9443The name of the docker compose container and service.
1 <= length"api7-ee-3-gateway"Additional docker run arguments.
Response Body
text/plain
application/json
curl -X GET "$API_BASE_URL/api/gateway_groups/86fb9981-d9d2-4555-9df8-91ae92129335/deployment/docker-compose?image=api7%2Fapi7-ee-3-gateway&extra_args%5B%5D=a%3Db&extra_args%5B%5D=c%3Dd"Successfully generated the Docker Compose configuration for data plane installation.
"services:\n gateway:\n image: api7/api7-ee-3-gateway:latest\n container_name: gateway\n hostname: gateway\n restart: always\n ports:\n - \"9080:9080\"\n - \"9443:9443\"\n environment:\n API7_DP_MANAGER_ENDPOINTS: '[\"https://12.12.123.123:31344\"]'\n API7_GATEWAY_GROUP_SHORT_ID: \"oybqauztthfao\"\n API7_DP_MANAGER_SNI: \"api7ee3-dp-manager\"\n API7_DP_MANAGER_CERT: |\n -----BEGIN CERTIFICATE-----\n MIIBhjCCATigAwIBAgICBAAwBQYDK2VwMEQxCzAJBgNVBAYTAlVTMRMwEQYDVQQI\n ...\n -----END CERTIFICATE-----\n\n API7_DP_MANAGER_KEY: |\n -----BEGIN PRIVATE KEY-----\n ...\n -----END PRIVATE KEY-----\n\n API7_CONTROL_PLANE_CA: |\n -----BEGIN CERTIFICATE-----\n MIIBdTCCASegAwIBAgIQVXqTFu/hH4caZptKdGp04zAFBgMrZXAwRDELMAkGA1UE\n ...\n -----END CERTIFICATE-----\n"Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.
{
"value": {},
"error_msg": "error message"
}Complete operation details and schema variants
GET /api/gateway_groups/{gateway_group_id}/deployment/docker-compose
Generate a script to install the gateway instance by Docker Compose
IAM Action: gateway:CreateGatewayInstance, Resource: arn:api7:gateway:gatewaygroup/%s
Parameters
dp_manager_address(query, string, optional):gateway_group_id(path, string, required): Gateway group ID.validity_period(query, integer, optional):image(query, string, optional): Docker image.http_port(query, integer, optional): The HTTP port of the gateway.https_port(query, integer, optional): The HTTPS port of the gateway.name(query, string, optional): The name of the docker compose container and service.extra_args[](query, array, optional): Additional docker run arguments.
Responses
200: Successfully generated the Docker Compose configuration for data plane installation.400: Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.value(object, optional): The specific resource.error_msg(string, optional): The error message.
cURL
curl -X GET '$API_BASE_URL/api/gateway_groups/{gateway_group_id}/deployment/docker-compose'