Skip to content

Gateway

All operations require authentication.

5 operationsv2/publicCloud/project
Agent setup

List gatewaysProduction

GET
/v2/publicCloud/project/{projectId}/gateway

Returns the gateways of the project. Filter by region with the region query parameter.

Path parameters

projectId
required
string

Project ID

Query parameters

region
string

Optional region filter

Headers

X-Pagination-Cursor
string

Pagination cursor

X-Pagination-Size
integer

Pagination size

Response

200Gateway[]successful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the gateway

currentState
read-only
GatewayCurrentState

Current state of the gateway

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the gateway

id
read-only
stringuuid

Unique identifier of the gateway

resourceStatus
read-only
ResourceStatusEnum

Gateway readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
GatewayTargetSpec

Last target specification of the gateway

updatedAt
read-only
stringdate-time

Last update date of the gateway

Example uses projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/gateway \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "description": "string", "externalGateway": { "enabled": true, "model": "2XL" }, "externalIp": "192.0.2.0", "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "status": "ACTIVE", "subnets": [ { "id": "00000000-0000-0000-0000-000000000000" } ] }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "description": "string", "externalGateway": { "enabled": true, "model": "2XL" }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "subnets": [ { "id": "00000000-0000-0000-0000-000000000000" } ] }, "updatedAt": "2024-01-01T12:00:00Z" }]

Get a gatewayProduction

GET
/v2/publicCloud/project/{projectId}/gateway/{gatewayId}

Returns the gateway, including its attached subnets and external IP.

Path parameters

gatewayId
required
stringuuid

Gateway ID

projectId
required
string

Project ID

Response

200Gatewaysuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the gateway

currentState
read-only
GatewayCurrentState

Current state of the gateway

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the gateway

id
read-only
stringuuid

Unique identifier of the gateway

resourceStatus
read-only
ResourceStatusEnum

Gateway readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
GatewayTargetSpec

Last target specification of the gateway

updatedAt
read-only
stringdate-time

Last update date of the gateway

404objectError 404 response

Example uses gatewayId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/gateway/{gatewayId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "description": "string", "externalGateway": { "enabled": true, "model": "2XL" }, "externalIp": "192.0.2.0", "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "status": "ACTIVE", "subnets": [ { "id": "00000000-0000-0000-0000-000000000000" } ] }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "description": "string", "externalGateway": { "enabled": true, "model": "2XL" }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "subnets": [ { "id": "00000000-0000-0000-0000-000000000000" } ] }, "updatedAt": "2024-01-01T12:00:00Z"}

Create a gatewayProduction

POST
/v2/publicCloud/project/{projectId}/gateway

Creates a gateway. An external gateway is required. Subnets can be attached as router interfaces.

Path parameters

projectId
required
string

Project ID

Request body (required)

targetSpec
required
GatewayTargetSpec

Desired target specification for the gateway to create

Response

200Gatewaysuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the gateway

currentState
read-only
GatewayCurrentState

Current state of the gateway

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the gateway

id
read-only
stringuuid

Unique identifier of the gateway

resourceStatus
read-only
ResourceStatusEnum

Gateway readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
GatewayTargetSpec

Last target specification of the gateway

updatedAt
read-only
stringdate-time

Last update date of the gateway

400objectError 400 response
409objectError 409 response

Example uses projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/gateway \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "description": "string", "externalGateway": { "enabled": true, "model": "2XL" }, "externalIp": "192.0.2.0", "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "status": "ACTIVE", "subnets": [ { "id": "00000000-0000-0000-0000-000000000000" } ] }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "description": "string", "externalGateway": { "enabled": true, "model": "2XL" }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "subnets": [ { "id": "00000000-0000-0000-0000-000000000000" } ] }, "updatedAt": "2024-01-01T12:00:00Z"}

Delete a gatewayProduction

DELETE
/v2/publicCloud/project/{projectId}/gateway/{gatewayId}

Deletes the gateway.

Path parameters

gatewayId
required
stringuuid

Gateway ID

projectId
required
string

Project ID

Response

200Gatewaysuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the gateway

currentState
read-only
GatewayCurrentState

Current state of the gateway

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the gateway

id
read-only
stringuuid

Unique identifier of the gateway

resourceStatus
read-only
ResourceStatusEnum

Gateway readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
GatewayTargetSpec

Last target specification of the gateway

updatedAt
read-only
stringdate-time

Last update date of the gateway

404objectError 404 response
409objectError 409 response

Example uses gatewayId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/gateway/{gatewayId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "description": "string", "externalGateway": { "enabled": true, "model": "2XL" }, "externalIp": "192.0.2.0", "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "status": "ACTIVE", "subnets": [ { "id": "00000000-0000-0000-0000-000000000000" } ] }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "description": "string", "externalGateway": { "enabled": true, "model": "2XL" }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "subnets": [ { "id": "00000000-0000-0000-0000-000000000000" } ] }, "updatedAt": "2024-01-01T12:00:00Z"}

Update a gatewayProduction

PUT
/v2/publicCloud/project/{projectId}/gateway/{gatewayId}

Updates the gateway's name, description, external gateway or attached subnets. Location is immutable after creation.

Path parameters

gatewayId
required
stringuuid

Gateway ID

projectId
required
string

Project ID

Request body (required)

checksum
string

Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins).

targetSpec
required
GatewayUpdateTargetSpec

Desired target specification for the gateway

Response

200Gatewaysuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the gateway

currentState
read-only
GatewayCurrentState

Current state of the gateway

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the gateway

id
read-only
stringuuid

Unique identifier of the gateway

resourceStatus
read-only
ResourceStatusEnum

Gateway readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
GatewayTargetSpec

Last target specification of the gateway

updatedAt
read-only
stringdate-time

Last update date of the gateway

400objectError 400 response
404objectError 404 response
409objectError 409 response

Example uses gatewayId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/gateway/{gatewayId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "description": "string", "externalGateway": { "enabled": true, "model": "2XL" }, "externalIp": "192.0.2.0", "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "status": "ACTIVE", "subnets": [ { "id": "00000000-0000-0000-0000-000000000000" } ] }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "description": "string", "externalGateway": { "enabled": true, "model": "2XL" }, "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "subnets": [ { "id": "00000000-0000-0000-0000-000000000000" } ] }, "updatedAt": "2024-01-01T12:00:00Z"}