adm_embed_api
This document contains the API documentation for the adm_embed_api
package.
Functions and Procedures
Section titled “Functions and Procedures”get_item_values
Section titled “get_item_values”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:
Name | Direction | Type | Description |
---|---|---|---|
p_embed_token | in | adm_embed_tokens.embed_token%type | The embed token to include in the parameters |
p_username | in | varchar2 | The username to include in the parameters |
p_session | in | number default nv('APP_SESSION' | The session ID to include in the parameters |
Returns: varchar2
- A formatted string containing the URL parameters for embedding
get_or_create_document_token
Section titled “get_or_create_document_token”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:
Name | Direction | Type | Description |
---|---|---|---|
p_document_id | in | adm_documents.document_id%type | The ID of the document to get/create a token for |
p_description | in | adm_embed_tokens.description%type default null | Optional description for the embed token (only used when creating) |
p_expires_at | in | adm_embed_tokens.expires_at%type default systimestamp + 1 | Optional expiration date for the embed token (only used when creating) |
p_is_readonly | in | adm_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
get_or_create_folder_token
Section titled “get_or_create_folder_token”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:
Name | Direction | Type | Description |
---|---|---|---|
p_folder_id | in | adm_folders.folder_id%type | The ID of the folder to get/create a token for |
p_description | in | adm_embed_tokens.description%type default null | Optional description for the embed token (only used when creating) |
p_expires_at | in | adm_embed_tokens.expires_at%type default systimestamp + 1 | Optional expiration date for the embed token (only used when creating) |
p_is_readonly | in | adm_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
generate_token
Section titled “generate_token”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:
Name | Direction | Type | Description |
---|---|---|---|
p_embed_type | in | adm_embed_tokens.embed_type%type | The type of embedding: ‘DOCUMENT’ or ‘FOLDER’ |
p_asset_path | in | adm_embed_tokens.asset_path%type | The path to the asset being embedded |
p_description | in | adm_embed_tokens.description%type default null | Optional description of what this embed token is for |
p_expires_at | in | adm_embed_tokens.expires_at%type default null | Optional expiration date for the embed token |
p_is_readonly | in | adm_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