Skip to main content

trusted_origins

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

Overview

Nametrusted_origins
TypeResource
Idokta.trustedorigins.trusted_origins

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringUnique identifier for the trusted origin
namestringUnique name for the trusted origin
_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.
createdstring (date-time)Timestamp when the trusted origin was created
createdBystringThe ID of the user who created the trusted origin
lastUpdatedstring (date-time)Timestamp when the trusted origin was last updated
lastUpdatedBystringThe ID of the user who last updated the trusted origin
originstringUnique origin URL for the trusted origin. The supported schemes for this attribute are HTTP, HTTPS, FTP, Ionic 2, and Capacitor.
scopesarrayArray of scope types that this trusted origin is used for
statusstring

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_trusted_originsselectsubdomainq, filter, after, limitLists all trusted origins
get_trusted_originselectsubdomainRetrieves a trusted origin
create_trusted_origininsertsubdomainCreates a trusted origin
replace_trusted_originreplacesubdomainReplaces a trusted origin
delete_trusted_origindeletesubdomainDeletes a trusted origin
activate_trusted_originexecsubdomainActivates a trusted origin. Sets the status to ACTIVE.
deactivate_trusted_originexecsubdomainDeactivates a trusted origin. Sets the status to INACTIVE.

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
subdomainstringThe domain of your organization. This can be a provided subdomain of an official okta domain (okta.com, oktapreview.com, etc) or one of your configured custom domains. (default: my-org)
afterstringAfter cursor provided by a prior request
filterstringFilter trusted origins with a supported expression for a subset of properties. You can filter on the following properties: name, origin, status, and type (type of scopes).
limitinteger (int32)Specifies the number of results
qstringA search string that prefix matches against the name and origin

SELECT examples

Lists all trusted origins

SELECT
id,
name,
_links,
created,
createdBy,
lastUpdated,
lastUpdatedBy,
origin,
scopes,
status
FROM okta.trustedorigins.trusted_origins
WHERE subdomain = '{{ subdomain }}' -- required
AND q = '{{ q }}'
AND filter = '{{ filter }}'
AND after = '{{ after }}'
AND limit = '{{ limit }}';

INSERT examples

Creates a trusted origin

INSERT INTO okta.trustedorigins.trusted_origins (
data__name,
data__origin,
data__scopes,
subdomain
)
SELECT
'{{ name }}',
'{{ origin }}',
'{{ scopes }}',
'{{ subdomain }}'
RETURNING
id,
name,
_links,
created,
createdBy,
lastUpdated,
lastUpdatedBy,
origin,
scopes,
status
;

REPLACE examples

Replaces a trusted origin

REPLACE okta.trustedorigins.trusted_origins
SET
data__createdBy = '{{ createdBy }}',
data__lastUpdatedBy = '{{ lastUpdatedBy }}',
data__name = '{{ name }}',
data__origin = '{{ origin }}',
data__scopes = '{{ scopes }}',
data__status = '{{ status }}'
WHERE
subdomain = '{{ subdomain }}' --required
RETURNING
id,
name,
_links,
created,
createdBy,
lastUpdated,
lastUpdatedBy,
origin,
scopes,
status;

DELETE examples

Deletes a trusted origin

DELETE FROM okta.trustedorigins.trusted_origins
WHERE subdomain = '{{ subdomain }}' --required;

Lifecycle Methods

Activates a trusted origin. Sets the status to ACTIVE.

EXEC okta.trustedorigins.trusted_origins.activate_trusted_origin 
@subdomain='{{ subdomain }}' --required;