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 (ACTIVE, INACTIVE)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_trusted_originselecttrustedOriginId, subdomainRetrieves a trusted origin
list_trusted_originsselectsubdomainq, filter, after, limitLists all trusted origins
create_trusted_origininsertsubdomainCreates a trusted origin
replace_trusted_originreplacetrustedOriginId, subdomainReplaces a trusted origin
delete_trusted_origindeletetrustedOriginId, subdomainDeletes a trusted origin
activate_trusted_originexectrustedOriginId, subdomainActivates a trusted origin. Sets the status to ACTIVE.
deactivate_trusted_originexectrustedOriginId, subdomainDeactivates 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
subdomainstring(default: my-org)
trustedOriginIdstringid of the trusted origin
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​

Retrieves a trusted origin

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

INSERT examples​

Creates a trusted origin

INSERT INTO okta.trustedorigins.trusted_origins (
name,
origin,
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
createdBy = '{{ createdBy }}',
lastUpdatedBy = '{{ lastUpdatedBy }}',
name = '{{ name }}',
origin = '{{ origin }}',
scopes = '{{ scopes }}',
status = '{{ status }}'
WHERE
trustedOriginId = '{{ trustedOriginId }}' --required
AND 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 trustedOriginId = '{{ trustedOriginId }}' --required
AND subdomain = '{{ subdomain }}' --required
;

Lifecycle Methods​

Activates a trusted origin. Sets the status to ACTIVE.

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