Skip to main content

routings

Creates, updates, deletes, gets or lists a routings resource.

Overview​

Nameroutings
TypeResource
Idovh.notification.routings

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Unique identifier of the routing
namestringName of the routing
activebooleanWhether this routing is currently active
created_atstring (date-time)Date at which the routing was created (wire: createdAt)
rulesarrayType of the contact mean

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectrouting_idRetrieve information about a routing
listselectx_pagination_cursor, x_pagination_sizeRetrieve every routing
createinsertactive, name, rulesCreate a routing
updateupdaterouting_idUpdate a routing
deletedeleterouting_idDelete the routing

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
routing_idstring (uuid)Routing ID (wire: routingId)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Retrieve information about a routing

SELECT
id,
name,
active,
created_at,
rules
FROM ovh.notification.routings
WHERE routing_id = '{{ routing_id }}' -- required
;

INSERT examples​

Create a routing

INSERT INTO ovh.notification.routings (
active,
name,
rules
)
SELECT
{{ active }} /* required */,
'{{ name }}' /* required */,
'{{ rules }}' /* required */
RETURNING
id,
name,
active,
created_at,
rules
;

UPDATE examples​

Update a routing

UPDATE ovh.notification.routings
SET
active = {{ active }},
name = '{{ name }}',
rules = '{{ rules }}'
WHERE
routing_id = '{{ routing_id }}' --required
RETURNING
id,
name,
active,
created_at,
rules;

DELETE examples​

Delete the routing

DELETE FROM ovh.notification.routings
WHERE routing_id = '{{ routing_id }}' --required
;