Skip to content

Listeners

All operations require authentication.

10 operationsv2/publicCloud/project
Agent setup

List listenersProduction

GET
/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener

Returns the listeners of the load balancer.

Filters

The optional name and protocol query parameters narrow the list. Each one can be repeated (for example ?protocol=HTTP&protocol=HTTPS): repeated values of the same parameter are combined with OR, and different parameters are combined with AND. An unknown protocol value is rejected with a 400 InvalidParameter. The resourceStatus is computed from the live state of each resource, so it is not a filter: a status query parameter is rejected with a 400 InvalidParameter.

Path parameters

loadbalancerId
required
stringuuid

Loadbalancer ID

projectId
required
string

Project ID

Query parameters

name
string[]

Filter by listener name (case-insensitive substring match). Repeatable.

protocol
ListenerProtocolEnum[]

Filter by listener protocol. Repeatable.

ValuesHTTPHTTPSSCTPTCPTERMINATED_HTTPSUDP

Headers

X-Pagination-Cursor
string

Pagination cursor

X-Pagination-Size
integer

Pagination size

Response

200Listener[]successful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the listener

currentState
read-only
ListenerCurrentState

Current state of the listener

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the listener

id
read-only
stringuuid

Unique identifier of the listener

resourceStatus
read-only
ResourceStatusEnum

Listener readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
ListenerTargetSpec

Last target specification of the listener

updatedAt
read-only
stringdate-time

Last update date of the listener

400objectError 400 response

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

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "allowedCidrs": [ "string" ], "connectionLimit": 0, "defaultPool": { "id": "00000000-0000-0000-0000-000000000000" }, "defaultTlsContainerRef": "string", "description": "string", "insertHeaders": { "xForwardedFor": true, "xForwardedPort": true, "xForwardedProto": true, "xSslClientDn": true, "xSslClientHasCert": true, "xSslClientVerify": true }, "name": "string", "operatingStatus": "DEGRADED", "protocol": "HTTP", "protocolPort": 0, "provisioningStatus": "ACTIVE", "sniContainerRefs": [ "string" ], "timeoutClientData": 0, "timeoutMemberConnect": 0, "timeoutMemberData": 0, "timeoutTcpInspect": 0, "tlsVersions": [ "string" ] }, "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": { "allowedCidrs": [ "192.0.2.0/24" ], "connectionLimit": 0, "defaultPool": { "id": "00000000-0000-0000-0000-000000000000" }, "defaultTlsContainerRef": "string", "description": "string", "insertHeaders": { "xForwardedFor": true, "xForwardedPort": true, "xForwardedProto": true, "xSslClientDn": true, "xSslClientHasCert": true, "xSslClientVerify": true }, "name": "string", "protocol": "HTTP", "protocolPort": 0, "sniContainerRefs": [ "string" ], "timeoutClientData": 0, "timeoutMemberConnect": 0, "timeoutMemberData": 0, "timeoutTcpInspect": 0, "tlsVersions": [ "string" ] }, "updatedAt": "2024-01-01T12:00:00Z" }]

Get a listenerProduction

GET
/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener/{listenerId}

Returns the listener, including its default pool and operating status.

Path parameters

listenerId
required
stringuuid

Listener ID

loadbalancerId
required
stringuuid

Loadbalancer ID

projectId
required
string

Project ID

Response

200Listenersuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the listener

currentState
read-only
ListenerCurrentState

Current state of the listener

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the listener

id
read-only
stringuuid

Unique identifier of the listener

resourceStatus
read-only
ResourceStatusEnum

Listener readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
ListenerTargetSpec

Last target specification of the listener

updatedAt
read-only
stringdate-time

Last update date of the listener

404objectError 404 response

Example uses listenerId = 00000000-0000-0000-0000-000000000000, loadbalancerId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener/{listenerId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "allowedCidrs": [ "string" ], "connectionLimit": 0, "defaultPool": { "id": "00000000-0000-0000-0000-000000000000" }, "defaultTlsContainerRef": "string", "description": "string", "insertHeaders": { "xForwardedFor": true, "xForwardedPort": true, "xForwardedProto": true, "xSslClientDn": true, "xSslClientHasCert": true, "xSslClientVerify": true }, "name": "string", "operatingStatus": "DEGRADED", "protocol": "HTTP", "protocolPort": 0, "provisioningStatus": "ACTIVE", "sniContainerRefs": [ "string" ], "timeoutClientData": 0, "timeoutMemberConnect": 0, "timeoutMemberData": 0, "timeoutTcpInspect": 0, "tlsVersions": [ "string" ] }, "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": { "allowedCidrs": [ "192.0.2.0/24" ], "connectionLimit": 0, "defaultPool": { "id": "00000000-0000-0000-0000-000000000000" }, "defaultTlsContainerRef": "string", "description": "string", "insertHeaders": { "xForwardedFor": true, "xForwardedPort": true, "xForwardedProto": true, "xSslClientDn": true, "xSslClientHasCert": true, "xSslClientVerify": true }, "name": "string", "protocol": "HTTP", "protocolPort": 0, "sniContainerRefs": [ "string" ], "timeoutClientData": 0, "timeoutMemberConnect": 0, "timeoutMemberData": 0, "timeoutTcpInspect": 0, "tlsVersions": [ "string" ] }, "updatedAt": "2024-01-01T12:00:00Z"}

Create a listenerProduction

POST
/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener

Creates a listener for a protocol and port, optionally forwarding to a default pool.

Path parameters

loadbalancerId
required
stringuuid

Loadbalancer ID

projectId
required
string

Project ID

Request body (required)

targetSpec
required
ListenerTargetSpec

Desired target specification for the listener to create

Response

200Listenersuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the listener

currentState
read-only
ListenerCurrentState

Current state of the listener

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the listener

id
read-only
stringuuid

Unique identifier of the listener

resourceStatus
read-only
ResourceStatusEnum

Listener readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
ListenerTargetSpec

Last target specification of the listener

updatedAt
read-only
stringdate-time

Last update date of the listener

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

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

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "allowedCidrs": [ "string" ], "connectionLimit": 0, "defaultPool": { "id": "00000000-0000-0000-0000-000000000000" }, "defaultTlsContainerRef": "string", "description": "string", "insertHeaders": { "xForwardedFor": true, "xForwardedPort": true, "xForwardedProto": true, "xSslClientDn": true, "xSslClientHasCert": true, "xSslClientVerify": true }, "name": "string", "operatingStatus": "DEGRADED", "protocol": "HTTP", "protocolPort": 0, "provisioningStatus": "ACTIVE", "sniContainerRefs": [ "string" ], "timeoutClientData": 0, "timeoutMemberConnect": 0, "timeoutMemberData": 0, "timeoutTcpInspect": 0, "tlsVersions": [ "string" ] }, "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": { "allowedCidrs": [ "192.0.2.0/24" ], "connectionLimit": 0, "defaultPool": { "id": "00000000-0000-0000-0000-000000000000" }, "defaultTlsContainerRef": "string", "description": "string", "insertHeaders": { "xForwardedFor": true, "xForwardedPort": true, "xForwardedProto": true, "xSslClientDn": true, "xSslClientHasCert": true, "xSslClientVerify": true }, "name": "string", "protocol": "HTTP", "protocolPort": 0, "sniContainerRefs": [ "string" ], "timeoutClientData": 0, "timeoutMemberConnect": 0, "timeoutMemberData": 0, "timeoutTcpInspect": 0, "tlsVersions": [ "string" ] }, "updatedAt": "2024-01-01T12:00:00Z"}

Delete a listenerProduction

DELETE
/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener/{listenerId}

Deletes the listener.

Path parameters

listenerId
required
stringuuid

Listener ID

loadbalancerId
required
stringuuid

Loadbalancer ID

projectId
required
string

Project ID

Response

200Listenersuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the listener

currentState
read-only
ListenerCurrentState

Current state of the listener

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the listener

id
read-only
stringuuid

Unique identifier of the listener

resourceStatus
read-only
ResourceStatusEnum

Listener readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
ListenerTargetSpec

Last target specification of the listener

updatedAt
read-only
stringdate-time

Last update date of the listener

404objectError 404 response
409objectError 409 response

Example uses listenerId = 00000000-0000-0000-0000-000000000000, loadbalancerId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener/{listenerId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "allowedCidrs": [ "string" ], "connectionLimit": 0, "defaultPool": { "id": "00000000-0000-0000-0000-000000000000" }, "defaultTlsContainerRef": "string", "description": "string", "insertHeaders": { "xForwardedFor": true, "xForwardedPort": true, "xForwardedProto": true, "xSslClientDn": true, "xSslClientHasCert": true, "xSslClientVerify": true }, "name": "string", "operatingStatus": "DEGRADED", "protocol": "HTTP", "protocolPort": 0, "provisioningStatus": "ACTIVE", "sniContainerRefs": [ "string" ], "timeoutClientData": 0, "timeoutMemberConnect": 0, "timeoutMemberData": 0, "timeoutTcpInspect": 0, "tlsVersions": [ "string" ] }, "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": { "allowedCidrs": [ "192.0.2.0/24" ], "connectionLimit": 0, "defaultPool": { "id": "00000000-0000-0000-0000-000000000000" }, "defaultTlsContainerRef": "string", "description": "string", "insertHeaders": { "xForwardedFor": true, "xForwardedPort": true, "xForwardedProto": true, "xSslClientDn": true, "xSslClientHasCert": true, "xSslClientVerify": true }, "name": "string", "protocol": "HTTP", "protocolPort": 0, "sniContainerRefs": [ "string" ], "timeoutClientData": 0, "timeoutMemberConnect": 0, "timeoutMemberData": 0, "timeoutTcpInspect": 0, "tlsVersions": [ "string" ] }, "updatedAt": "2024-01-01T12:00:00Z"}

Update a listenerProduction

PUT
/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener/{listenerId}

Replaces the listener's target specification as a whole. The body carries the complete desired state of every field publicCloud.loadbalancer.ListenerPutTargetSpec exposes, so read the listener first and restate every value you want to keep: a field left out of targetSpec is cleared, not carried over from the stored specification.

This matters most for the collection-valued and security-relevant fields. Leaving allowedCidrs out clears the allow list and reopens the listener to every source. Leaving sniContainerRefs out removes every SNI certificate, and leaving defaultTlsContainerRef out removes the default certificate. Leaving insertHeaders out stops every header from being inserted, and leaving tlsVersions out clears the TLS version restriction. Each of these is replaced as a whole. There is no per-element merge.

The create-only fields protocol and protocolPort cannot be changed once the listener exists. They are deliberately absent from the update model, and sending one is rejected with a 400.

name is required.

The optional checksum guards against a lost update: when supplied it must match the listener's current checksum or the request is rejected with a 409 checksum mismatch. Omitting it skips the check and forces the write (last-write-wins).

Path parameters

listenerId
required
stringuuid

Listener ID

loadbalancerId
required
stringuuid

Loadbalancer 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
ListenerPutTargetSpec

Desired target specification for the listener

Response

200Listenersuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the listener

currentState
read-only
ListenerCurrentState

Current state of the listener

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the listener

id
read-only
stringuuid

Unique identifier of the listener

resourceStatus
read-only
ResourceStatusEnum

Listener readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
ListenerTargetSpec

Last target specification of the listener

updatedAt
read-only
stringdate-time

Last update date of the listener

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

Example uses listenerId = 00000000-0000-0000-0000-000000000000, loadbalancerId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener/{listenerId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "allowedCidrs": [ "string" ], "connectionLimit": 0, "defaultPool": { "id": "00000000-0000-0000-0000-000000000000" }, "defaultTlsContainerRef": "string", "description": "string", "insertHeaders": { "xForwardedFor": true, "xForwardedPort": true, "xForwardedProto": true, "xSslClientDn": true, "xSslClientHasCert": true, "xSslClientVerify": true }, "name": "string", "operatingStatus": "DEGRADED", "protocol": "HTTP", "protocolPort": 0, "provisioningStatus": "ACTIVE", "sniContainerRefs": [ "string" ], "timeoutClientData": 0, "timeoutMemberConnect": 0, "timeoutMemberData": 0, "timeoutTcpInspect": 0, "tlsVersions": [ "string" ] }, "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": { "allowedCidrs": [ "192.0.2.0/24" ], "connectionLimit": 0, "defaultPool": { "id": "00000000-0000-0000-0000-000000000000" }, "defaultTlsContainerRef": "string", "description": "string", "insertHeaders": { "xForwardedFor": true, "xForwardedPort": true, "xForwardedProto": true, "xSslClientDn": true, "xSslClientHasCert": true, "xSslClientVerify": true }, "name": "string", "protocol": "HTTP", "protocolPort": 0, "sniContainerRefs": [ "string" ], "timeoutClientData": 0, "timeoutMemberConnect": 0, "timeoutMemberData": 0, "timeoutTcpInspect": 0, "tlsVersions": [ "string" ] }, "updatedAt": "2024-01-01T12:00:00Z"}

List L7 policiesProduction

GET
/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener/{listenerId}/l7policy

Returns the L7 policies of the listener.

Filters

The optional name and action query parameters narrow the list. Each one can be repeated (for example ?action=REJECT&action=REDIRECT_TO_POOL): repeated values of the same parameter are combined with OR, and different parameters are combined with AND. An unknown action value is rejected with a 400 InvalidParameter. The resourceStatus is computed from the live state of each resource, so it is not a filter: a status query parameter is rejected with a 400 InvalidParameter.

Path parameters

listenerId
required
stringuuid

Listener ID

loadbalancerId
required
stringuuid

Loadbalancer ID

projectId
required
string

Project ID

Query parameters

action
L7PolicyActionEnum[]

Filter by L7 policy action. Repeatable.

ValuesREDIRECT_PREFIXREDIRECT_TO_POOLREDIRECT_TO_URLREJECT
name
string[]

Filter by L7 policy name (case-insensitive substring match). Repeatable.

Headers

X-Pagination-Cursor
string

Pagination cursor

X-Pagination-Size
integer

Pagination size

Response

200L7Policy[]successful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the L7 policy

currentState
read-only
L7PolicyCurrentState

Current state of the L7 policy

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the L7 policy

id
read-only
stringuuid

Unique identifier of the L7 policy

resourceStatus
read-only
ResourceStatusEnum

L7 policy readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
L7PolicyTargetSpec

Last target specification of the L7 policy

updatedAt
read-only
stringdate-time

Last update date of the L7 policy

400objectError 400 response

Example uses listenerId = 00000000-0000-0000-0000-000000000000, loadbalancerId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener/{listenerId}/l7policy \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "action": "REDIRECT_PREFIX", "description": "string", "name": "string", "operatingStatus": "DEGRADED", "position": 0, "provisioningStatus": "ACTIVE", "redirectHttpCode": 0, "redirectPool": { "id": "00000000-0000-0000-0000-000000000000" }, "redirectPrefix": "string", "redirectUrl": "string", "rules": [ { "compareType": "string", "id": "00000000-0000-0000-0000-000000000000", "invert": true, "key": "string", "operatingStatus": "DEGRADED", "provisioningStatus": "ACTIVE", "type": "string", "value": "string" } ] }, "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": { "action": "REDIRECT_PREFIX", "description": "string", "name": "string", "position": 0, "redirectHttpCode": 0, "redirectPool": { "id": "00000000-0000-0000-0000-000000000000" }, "redirectPrefix": "string", "redirectUrl": "string", "rules": [ { "compareType": "CONTAINS", "invert": true, "key": "string", "type": "COOKIE", "value": "string" } ] }, "updatedAt": "2024-01-01T12:00:00Z" }]

Get an L7 policyProduction

GET
/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener/{listenerId}/l7policy/{l7PolicyId}

Returns the L7 policy, including its action and matching rules.

Path parameters

l7PolicyId
required
stringuuid

L7 policy ID

listenerId
required
stringuuid

Listener ID

loadbalancerId
required
stringuuid

Loadbalancer ID

projectId
required
string

Project ID

Response

200L7Policysuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the L7 policy

currentState
read-only
L7PolicyCurrentState

Current state of the L7 policy

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the L7 policy

id
read-only
stringuuid

Unique identifier of the L7 policy

resourceStatus
read-only
ResourceStatusEnum

L7 policy readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
L7PolicyTargetSpec

Last target specification of the L7 policy

updatedAt
read-only
stringdate-time

Last update date of the L7 policy

404objectError 404 response

Example uses l7PolicyId = 00000000-0000-0000-0000-000000000000, listenerId = 00000000-0000-0000-0000-000000000000, loadbalancerId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener/{listenerId}/l7policy/{l7PolicyId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "action": "REDIRECT_PREFIX", "description": "string", "name": "string", "operatingStatus": "DEGRADED", "position": 0, "provisioningStatus": "ACTIVE", "redirectHttpCode": 0, "redirectPool": { "id": "00000000-0000-0000-0000-000000000000" }, "redirectPrefix": "string", "redirectUrl": "string", "rules": [ { "compareType": "string", "id": "00000000-0000-0000-0000-000000000000", "invert": true, "key": "string", "operatingStatus": "DEGRADED", "provisioningStatus": "ACTIVE", "type": "string", "value": "string" } ] }, "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": { "action": "REDIRECT_PREFIX", "description": "string", "name": "string", "position": 0, "redirectHttpCode": 0, "redirectPool": { "id": "00000000-0000-0000-0000-000000000000" }, "redirectPrefix": "string", "redirectUrl": "string", "rules": [ { "compareType": "CONTAINS", "invert": true, "key": "string", "type": "COOKIE", "value": "string" } ] }, "updatedAt": "2024-01-01T12:00:00Z"}

Create an L7 policyProduction

POST
/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener/{listenerId}/l7policy

Creates an L7 policy that redirects or rejects traffic matching its rules. Position sets its evaluation order among the listener's policies.

Path parameters

listenerId
required
stringuuid

Listener ID

loadbalancerId
required
stringuuid

Loadbalancer ID

projectId
required
string

Project ID

Request body (required)

targetSpec
required
L7PolicyTargetSpec

Desired target specification for the L7 policy to create

Response

200L7Policysuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the L7 policy

currentState
read-only
L7PolicyCurrentState

Current state of the L7 policy

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the L7 policy

id
read-only
stringuuid

Unique identifier of the L7 policy

resourceStatus
read-only
ResourceStatusEnum

L7 policy readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
L7PolicyTargetSpec

Last target specification of the L7 policy

updatedAt
read-only
stringdate-time

Last update date of the L7 policy

400objectError 400 response
409objectError 409 response

Example uses listenerId = 00000000-0000-0000-0000-000000000000, loadbalancerId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener/{listenerId}/l7policy \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "action": "REDIRECT_PREFIX", "description": "string", "name": "string", "operatingStatus": "DEGRADED", "position": 0, "provisioningStatus": "ACTIVE", "redirectHttpCode": 0, "redirectPool": { "id": "00000000-0000-0000-0000-000000000000" }, "redirectPrefix": "string", "redirectUrl": "string", "rules": [ { "compareType": "string", "id": "00000000-0000-0000-0000-000000000000", "invert": true, "key": "string", "operatingStatus": "DEGRADED", "provisioningStatus": "ACTIVE", "type": "string", "value": "string" } ] }, "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": { "action": "REDIRECT_PREFIX", "description": "string", "name": "string", "position": 0, "redirectHttpCode": 0, "redirectPool": { "id": "00000000-0000-0000-0000-000000000000" }, "redirectPrefix": "string", "redirectUrl": "string", "rules": [ { "compareType": "CONTAINS", "invert": true, "key": "string", "type": "COOKIE", "value": "string" } ] }, "updatedAt": "2024-01-01T12:00:00Z"}

Delete an L7 policyProduction

DELETE
/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener/{listenerId}/l7policy/{l7PolicyId}

Deletes the L7 policy.

Path parameters

l7PolicyId
required
stringuuid

L7 policy ID

listenerId
required
stringuuid

Listener ID

loadbalancerId
required
stringuuid

Loadbalancer ID

projectId
required
string

Project ID

Response

200L7Policysuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the L7 policy

currentState
read-only
L7PolicyCurrentState

Current state of the L7 policy

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the L7 policy

id
read-only
stringuuid

Unique identifier of the L7 policy

resourceStatus
read-only
ResourceStatusEnum

L7 policy readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
L7PolicyTargetSpec

Last target specification of the L7 policy

updatedAt
read-only
stringdate-time

Last update date of the L7 policy

404objectError 404 response
409objectError 409 response

Example uses l7PolicyId = 00000000-0000-0000-0000-000000000000, listenerId = 00000000-0000-0000-0000-000000000000, loadbalancerId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener/{listenerId}/l7policy/{l7PolicyId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "action": "REDIRECT_PREFIX", "description": "string", "name": "string", "operatingStatus": "DEGRADED", "position": 0, "provisioningStatus": "ACTIVE", "redirectHttpCode": 0, "redirectPool": { "id": "00000000-0000-0000-0000-000000000000" }, "redirectPrefix": "string", "redirectUrl": "string", "rules": [ { "compareType": "string", "id": "00000000-0000-0000-0000-000000000000", "invert": true, "key": "string", "operatingStatus": "DEGRADED", "provisioningStatus": "ACTIVE", "type": "string", "value": "string" } ] }, "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": { "action": "REDIRECT_PREFIX", "description": "string", "name": "string", "position": 0, "redirectHttpCode": 0, "redirectPool": { "id": "00000000-0000-0000-0000-000000000000" }, "redirectPrefix": "string", "redirectUrl": "string", "rules": [ { "compareType": "CONTAINS", "invert": true, "key": "string", "type": "COOKIE", "value": "string" } ] }, "updatedAt": "2024-01-01T12:00:00Z"}

Update an L7 policyProduction

PUT
/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener/{listenerId}/l7policy/{l7PolicyId}

Replaces the L7 policy's target specification as a whole, including its action and evaluation position.

Path parameters

l7PolicyId
required
stringuuid

L7 policy ID

listenerId
required
stringuuid

Listener ID

loadbalancerId
required
stringuuid

Loadbalancer 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
L7PolicyUpdateTargetSpec

Desired target specification for the L7 policy

Response

200L7Policysuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the L7 policy

currentState
read-only
L7PolicyCurrentState

Current state of the L7 policy

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the L7 policy

id
read-only
stringuuid

Unique identifier of the L7 policy

resourceStatus
read-only
ResourceStatusEnum

L7 policy readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
L7PolicyTargetSpec

Last target specification of the L7 policy

updatedAt
read-only
stringdate-time

Last update date of the L7 policy

404objectError 404 response
409objectError 409 response

Example uses l7PolicyId = 00000000-0000-0000-0000-000000000000, listenerId = 00000000-0000-0000-0000-000000000000, loadbalancerId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}/listener/{listenerId}/l7policy/{l7PolicyId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "action": "REDIRECT_PREFIX", "description": "string", "name": "string", "operatingStatus": "DEGRADED", "position": 0, "provisioningStatus": "ACTIVE", "redirectHttpCode": 0, "redirectPool": { "id": "00000000-0000-0000-0000-000000000000" }, "redirectPrefix": "string", "redirectUrl": "string", "rules": [ { "compareType": "string", "id": "00000000-0000-0000-0000-000000000000", "invert": true, "key": "string", "operatingStatus": "DEGRADED", "provisioningStatus": "ACTIVE", "type": "string", "value": "string" } ] }, "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": { "action": "REDIRECT_PREFIX", "description": "string", "name": "string", "position": 0, "redirectHttpCode": 0, "redirectPool": { "id": "00000000-0000-0000-0000-000000000000" }, "redirectPrefix": "string", "redirectUrl": "string", "rules": [ { "compareType": "CONTAINS", "invert": true, "key": "string", "type": "COOKIE", "value": "string" } ] }, "updatedAt": "2024-01-01T12:00:00Z"}