Skip to main content

captcha_instances

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

Overview​

Namecaptcha_instances
TypeResource
Idokta.captchas.captcha_instances

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique key for the CAPTCHA instance
namestringThe name of the CAPTCHA instance
_linksobjectSpecifies link relations (see Web Linking) available using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations.
secretKeystringThe secret key issued from the CAPTCHA provider to perform server-side validation for a CAPTCHA token
siteKeystringThe site key issued from the CAPTCHA provider to render a CAPTCHA on a page
typestringThe type of CAPTCHA provider (HCAPTCHA, RECAPTCHA_V2)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_captcha_instanceselectcaptchaId, subdomainRetrieves the properties of a specified CAPTCHA instance
list_captcha_instancesselectsubdomainLists all CAPTCHA instances with pagination support. A subset of CAPTCHA instances can be returned that match a supported filter expression or query.
create_captcha_instanceinsertsubdomainCreates a new CAPTCHA instance. Currently, an org can only configure a single CAPTCHA instance.
update_captcha_instanceupdatecaptchaId, subdomainPartially updates the properties of a specified CAPTCHA instance
replace_captcha_instancereplacecaptchaId, subdomainReplaces the properties for a specified CAPTCHA instance
delete_captcha_instancedeletecaptchaId, subdomainDeletes a specified CAPTCHA instance
> Note: If your CAPTCHA instance is still associated with your org, the request fails. You must first update your Org-wide CAPTCHA settings to remove the CAPTCHA instance.

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
captchaIdstringThe unique key used to identify your CAPTCHA instance
subdomainstring(default: my-org)

SELECT examples​

Retrieves the properties of a specified CAPTCHA instance

SELECT
id,
name,
_links,
secretKey,
siteKey,
type
FROM okta.captchas.captcha_instances
WHERE captchaId = '{{ captchaId }}' -- required
AND subdomain = '{{ subdomain }}' -- required
;

INSERT examples​

Creates a new CAPTCHA instance. Currently, an org can only configure a single CAPTCHA instance.

INSERT INTO okta.captchas.captcha_instances (
name,
secretKey,
siteKey,
type,
subdomain
)
SELECT
'{{ name }}',
'{{ secretKey }}',
'{{ siteKey }}',
'{{ type }}',
'{{ subdomain }}'
RETURNING
id,
name,
_links,
secretKey,
siteKey,
type
;

UPDATE examples​

Partially updates the properties of a specified CAPTCHA instance

UPDATE okta.captchas.captcha_instances
SET
name = '{{ name }}',
secretKey = '{{ secretKey }}',
siteKey = '{{ siteKey }}',
type = '{{ type }}'
WHERE
captchaId = '{{ captchaId }}' --required
AND subdomain = '{{ subdomain }}' --required
RETURNING
id,
name,
_links,
secretKey,
siteKey,
type;

REPLACE examples​

Replaces the properties for a specified CAPTCHA instance

REPLACE okta.captchas.captcha_instances
SET
name = '{{ name }}',
secretKey = '{{ secretKey }}',
siteKey = '{{ siteKey }}',
type = '{{ type }}'
WHERE
captchaId = '{{ captchaId }}' --required
AND subdomain = '{{ subdomain }}' --required
RETURNING
id,
name,
_links,
secretKey,
siteKey,
type;

DELETE examples​

Deletes a specified CAPTCHA instance
> Note: If your CAPTCHA instance is still associated with your org, the request fails. You must first update your Org-wide CAPTCHA settings to remove the CAPTCHA instance.

DELETE FROM okta.captchas.captcha_instances
WHERE captchaId = '{{ captchaId }}' --required
AND subdomain = '{{ subdomain }}' --required
;