Skip to main content

sessions

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

Overview​

Namesessions
TypeResource
Idokta.identity_sources.sessions

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the identity source session
createdstring (date-time)The timestamp when the identity source session was created
identitySourceIdstringThe ID of the custom identity source for which the session is created
importTypestringThe type of import. All imports are INCREMENTAL imports.
lastUpdatedstring (date-time)The timestamp when the identity source session was created
statusstringThe current status of the identity source session (CLOSED, COMPLETED, CREATED, ERROR, EXPIRED, IN_PROGRESS, TRIGGERED)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_identity_source_sessionselectidentitySourceId, sessionId, subdomainRetrieves an identity source session for a given identity source ID and session ID
list_identity_source_sessionsselectidentitySourceId, subdomainLists all identity source sessions for the given identity source instance
create_identity_source_sessioninsertidentitySourceId, subdomainCreates an identity source session for the given identity source instance
delete_identity_source_sessiondeleteidentitySourceId, sessionId, subdomainDeletes an identity source session for a given identity source ID and session Id

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
identitySourceIdstringThe ID of the identity source for which the session is created (example: 0oa3l6l6WK6h0R0QW0g4)
sessionIdstringThe ID of the identity source session (example: aps1qqonvr2SZv6o70h8)
subdomainstring(default: my-org)

SELECT examples​

Retrieves an identity source session for a given identity source ID and session ID

SELECT
id,
created,
identitySourceId,
importType,
lastUpdated,
status
FROM okta.identity_sources.sessions
WHERE identitySourceId = '{{ identitySourceId }}' -- required
AND sessionId = '{{ sessionId }}' -- required
AND subdomain = '{{ subdomain }}' -- required
;

INSERT examples​

Creates an identity source session for the given identity source instance

INSERT INTO okta.identity_sources.sessions (
identitySourceId,
subdomain
)
SELECT
'{{ identitySourceId }}',
'{{ subdomain }}'
RETURNING
id,
created,
identitySourceId,
importType,
lastUpdated,
status
;

DELETE examples​

Deletes an identity source session for a given identity source ID and session Id

DELETE FROM okta.identity_sources.sessions
WHERE identitySourceId = '{{ identitySourceId }}' --required
AND sessionId = '{{ sessionId }}' --required
AND subdomain = '{{ subdomain }}' --required
;