Skip to content

adm_embed_api

This document contains the API documentation for the adm_embed_api package.

Generates secure URL parameters for embedding functionality

Signature:

function get_item_values (
p_embed_token in adm_embed_tokens.embed_token%type,
p_username in varchar2,
p_session in number default nv('APP_SESSION'
);

Parameters:

NameDirectionTypeDescription
p_embed_tokeninadm_embed_tokens.embed_token%typeThe embed token to include in the parameters
p_usernameinvarchar2The username to include in the parameters
p_sessioninnumber default nv('APP_SESSION'The session ID to include in the parameters

Returns: varchar2 - A formatted string containing the URL parameters for embedding


Gets an existing embed token for a document or creates a new one if none exists It will create a new one if it expires in the next hour

Signature:

function get_or_create_document_token (
p_document_id in adm_documents.document_id%type,
p_description in adm_embed_tokens.description%type default null,
p_expires_at in adm_embed_tokens.expires_at%type default systimestamp + 1,
p_is_readonly in adm_embed_tokens.is_read_only%type default 'Y'
) return adm_embed_tokens.embed_token%type;

Parameters:

NameDirectionTypeDescription
p_document_idinadm_documents.document_id%typeThe ID of the document to get/create a token for
p_descriptioninadm_embed_tokens.description%type default nullOptional description for the embed token (only used when creating)
p_expires_atinadm_embed_tokens.expires_at%type default systimestamp + 1Optional expiration date for the embed token (only used when creating)
p_is_readonlyinadm_embed_tokens.is_read_only%type default 'Y'Whether the embed token should be read-only (only used when creating)

Returns: adm_embed_tokens.embed_token%type - The embed token for the document


Gets an existing embed token for a folder or creates a new one if none exists It will create a new one if it expires in the next hour

Signature:

function get_or_create_folder_token (
p_folder_id in adm_folders.folder_id%type,
p_description in adm_embed_tokens.description%type default null,
p_expires_at in adm_embed_tokens.expires_at%type default systimestamp + 1,
p_is_readonly in adm_embed_tokens.is_read_only%type default 'Y'
) return adm_embed_tokens.embed_token%type;

Parameters:

NameDirectionTypeDescription
p_folder_idinadm_folders.folder_id%typeThe ID of the folder to get/create a token for
p_descriptioninadm_embed_tokens.description%type default nullOptional description for the embed token (only used when creating)
p_expires_atinadm_embed_tokens.expires_at%type default systimestamp + 1Optional expiration date for the embed token (only used when creating)
p_is_readonlyinadm_embed_tokens.is_read_only%type default 'Y'Whether the embed token should be read-only (only used when creating)

Returns: adm_embed_tokens.embed_token%type - The embed token for the folder


Creates a new embed token and stores it in the database Generates a secure token for embedding specific assets or content types. Runs as an autonomous transaction so that you can generate tokens on the fly

Signature:

function generate_token (
p_embed_type in adm_embed_tokens.embed_type%type,
p_asset_path in adm_embed_tokens.asset_path%type,
p_description in adm_embed_tokens.description%type default null,
p_expires_at in adm_embed_tokens.expires_at%type default null,
p_is_readonly in adm_embed_tokens.is_read_only%type default 'Y'
) return adm_embed_tokens.embed_token%type;

Parameters:

NameDirectionTypeDescription
p_embed_typeinadm_embed_tokens.embed_type%typeThe type of embedding: ‘DOCUMENT’ or ‘FOLDER’
p_asset_pathinadm_embed_tokens.asset_path%typeThe path to the asset being embedded
p_descriptioninadm_embed_tokens.description%type default nullOptional description of what this embed token is for
p_expires_atinadm_embed_tokens.expires_at%type default nullOptional expiration date for the embed token
p_is_readonlyinadm_embed_tokens.is_read_only%type default 'Y'Whether the embed token should be read-only

Returns: adm_embed_tokens.embed_token%type - The generated embed token