Ensure Gateway
The command ensures the Gateway with the provided ID is created or modified. The full Gateway must be provided to ensure (either update or create) the Gateway. Non-present data will only be filled with defaults or left empty, but previous values will not be taken into consideration.
To ensure the Gateway, you need to use the following PUT
request:
PUT /gateways/{apigatewayId}
Request
curl -X 'PUT' \
'https://apigateway.de-txl.ionos.com/gateways/0620c174-dd3c-5eb4-87c8-e2b516553a00' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"metadata": {},
"properties": {
"name": "APIGateway 1",
"logs": false,
"metrics": false,
"customDomains": [
{
"name": "api.example.com",
"certificateId": "5a029f4a-72e5-11ec-90d6-0242ac120003"
}
]
}
}'
Response
200 Gateway successfully updated
{
"id": "0620c174-dd3c-5eb4-87c8-e2b516553a00",
"type": "gateway",
"href": "/gateways/0620c174-dd3c-5eb4-87c8-e2b516553a00",
"metadata": {
"createdDate": "2020-12-10T13:37:50+01:00",
"createdBy": "[email protected]",
"createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedDate": "2020-12-11T13:37:50+01:00",
"lastModifiedBy": "[email protected]",
"lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
"status": "AVAILABLE",
"statusMessage": null,
"publicEndpoint": "jf8u4tgr73sd-ag.87uhr654gq90.apigateway.de-txl.ionos.com"
},
"properties": {
"name": "APIGateway 1",
"logs": false,
"metrics": false,
"customDomains": [
{
"name": "api.example.com",
"certificateId": "5a029f4a-72e5-11ec-90d6-0242ac120003"
}
]
}
}
201 Gateway successfully ensured
{
"id": "0620c174-dd3c-5eb4-87c8-e2b516553a00",
"type": "gateway",
"href": "/gateways/0620c174-dd3c-5eb4-87c8-e2b516553a00",
"metadata": {
"createdDate": "2020-12-10T13:37:50+01:00",
"createdBy": "[email protected]",
"createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"lastModifiedDate": "2020-12-11T13:37:50+01:00",
"lastModifiedBy": "[email protected]",
"lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
"resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
"status": "AVAILABLE",
"statusMessage": null,
"publicEndpoint": "jf8u4tgr73sd-ag.87uhr654gq90.apigateway.de-txl.ionos.com"
},
"properties": {
"name": "APIGateway 1",
"logs": false,
"metrics": false,
"customDomains": [
{
"name": "api.example.com",
"certificateId": "5a029f4a-72e5-11ec-90d6-0242ac120003"
}
]
}
}
Last updated
Was this helpful?