api_oauth2_clients
Creates, updates, deletes, gets or lists an api_oauth2_clients resource.
Overview​
| Name | api_oauth2_clients |
| Type | Resource |
| Id | ovh.me.api_oauth2_clients |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | client's name |
client_id | string | client's client_id (wire: clientId) |
callback_urls | array | allowed callback urls (wire: callbackUrls) |
created_at | string (date-time) | client's creation date (wire: createdAt) |
description | string | client's description |
flow | string | oAuth2's flow (AUTHORIZATION_CODE, CLIENT_CREDENTIALS) |
identity | string | associated IAM identity |
An oAuth2 Client
| Name | Datatype | Description |
|---|---|---|
name | string | client's name |
client_id | string | client's client_id (wire: clientId) |
callback_urls | array | allowed callback urls (wire: callbackUrls) |
created_at | string (date-time) | client's creation date (wire: createdAt) |
description | string | client's description |
flow | string | oAuth2's flow (AUTHORIZATION_CODE, CLIENT_CREDENTIALS) |
identity | string | associated IAM identity |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | client_id | (Beta version) | |
list | select | x_pagination_mode | List oAuth2 clients (Beta version) | |
create | insert | description, flow, name | Create a new oauth2 client (Beta version) | |
update | update | client_id | (Beta version) | |
delete | delete | client_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The 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_id | string | Client ID (wire: clientId) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
(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
;
List oAuth2 clients (Beta version)
SELECT
name,
client_id,
callback_urls,
created_at,
description,
flow,
identity
FROM ovh.me.api_oauth2_clients
WHERE x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: api_oauth2_clients
props:
- name: callback_urls
value:
- "{{ callback_urls }}"
description: |
allowed callback urls
- name: description
value: "{{ description }}"
description: |
client's description
- name: flow
value: "{{ flow }}"
description: |
oAuth2's flow
valid_values: ['AUTHORIZATION_CODE', 'CLIENT_CREDENTIALS']
- name: name
value: "{{ name }}"
description: |
client's name
UPDATE examples​
- update
(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
Delete an oAuth2 client (Beta version)
DELETE FROM ovh.me.api_oauth2_clients
WHERE client_id = '{{ client_id }}' --required
;