Skip to main content

api_oauth2_clients

Creates, updates, deletes, gets or lists an api_oauth2_clients resource.

Overview​

Nameapi_oauth2_clients
TypeResource
Idovh.me.api_oauth2_clients

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringclient's name
client_idstringclient's client_id (wire: clientId)
callback_urlsarrayallowed callback urls (wire: callbackUrls)
created_atstring (date-time)client's creation date (wire: createdAt)
descriptionstringclient's description
flowstringoAuth2's flow (AUTHORIZATION_CODE, CLIENT_CREDENTIALS)
identitystringassociated IAM identity

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectclient_id(Beta version)
listselectx_pagination_modeList oAuth2 clients (Beta version)
createinsertdescription, flow, nameCreate a new oauth2 client (Beta version)
updateupdateclient_id(Beta version)
deletedeleteclient_idDelete an oAuth2 client (Beta version)

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"}})
client_idstringClient ID (wire: clientId)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

(Beta version)

SELECT
name,
client_id,
callback_urls,
created_at,
description,
flow,
identity
FROM ovh.me.api_oauth2_clients
WHERE client_id = '{{ client_id }}' -- required
;

INSERT examples​

Create a new oauth2 client (Beta version)

INSERT INTO ovh.me.api_oauth2_clients (
callback_urls,
description,
flow,
name
)
SELECT
'{{ callback_urls }}',
'{{ description }}' /* required */,
'{{ flow }}' /* required */,
'{{ name }}' /* required */
RETURNING
client_id,
client_secret
;

UPDATE examples​

(Beta version)

UPDATE ovh.me.api_oauth2_clients
SET
callback_urls = '{{ callback_urls }}',
description = '{{ description }}',
name = '{{ name }}'
WHERE
client_id = '{{ client_id }}' --required;

DELETE examples​

Delete an oAuth2 client (Beta version)

DELETE FROM ovh.me.api_oauth2_clients
WHERE client_id = '{{ client_id }}' --required
;