Skip to content

adm_annotations_api

API for managing document and folder annotations (metadata key-value pairs for background processing)

Add a new annotation for a document Raises an error if an annotation with the same key already exists

Signature:

procedure add_document_annotation (
p_document_id in number,
p_annotation_key in varchar2,
p_annotation_value in varchar2 default null
);

Parameters:

NameDirectionTypeDescription
p_document_idinnumberThe document ID
p_annotation_keyinvarchar2The annotation key (must be lowercase)
p_annotation_valueinvarchar2 default nullThe annotation value

Update an existing annotation for a document Raises an error if the annotation does not exist

Signature:

procedure update_document_annotation (
p_document_id in number,
p_annotation_key in varchar2,
p_annotation_value in varchar2
);

Parameters:

NameDirectionTypeDescription
p_document_idinnumberThe document ID
p_annotation_keyinvarchar2The annotation key
p_annotation_valueinvarchar2The new annotation value

Get an annotation value for a document. Throws an error if not found.

Signature:

function get_document_annotation (
p_document_id in number,
p_annotation_key in varchar2
) return varchar2;

Parameters:

NameDirectionTypeDescription
p_document_idinnumberThe document ID
p_annotation_keyinvarchar2The annotation key

Returns: varchar2 - The annotation value


Check if an annotation exists for a document

Signature:

function document_annotation_exists (
p_document_id in number,
p_annotation_key in varchar2
) return boolean;

Parameters:

NameDirectionTypeDescription
p_document_idinnumberThe document ID
p_annotation_keyinvarchar2The annotation key

Returns: boolean - boolean indicating if the annotation exists


Delete an annotation for a document

Signature:

procedure delete_document_annotation (
p_document_id in number,
p_annotation_key in varchar2
);

Parameters:

NameDirectionTypeDescription
p_document_idinnumberThe document ID
p_annotation_keyinvarchar2The annotation key

Delete all annotations for a document

Signature:

procedure delete_all_document_annotations (
p_document_id in number
);

Parameters:

NameDirectionTypeDescription
p_document_idinnumberThe document ID

Add a new annotation for a folder Raises an error if an annotation with the same key already exists

Signature:

procedure add_folder_annotation (
p_folder_id in number,
p_annotation_key in varchar2,
p_annotation_value in varchar2 default null
);

Parameters:

NameDirectionTypeDescription
p_folder_idinnumberThe folder ID
p_annotation_keyinvarchar2The annotation key (must be lowercase)
p_annotation_valueinvarchar2 default nullThe annotation value

Update an existing annotation for a folder Raises an error if the annotation does not exist

Signature:

procedure update_folder_annotation (
p_folder_id in number,
p_annotation_key in varchar2,
p_annotation_value in varchar2
);

Parameters:

NameDirectionTypeDescription
p_folder_idinnumberThe folder ID
p_annotation_keyinvarchar2The annotation key
p_annotation_valueinvarchar2The new annotation value

Get an annotation value for a folder. Throws an error if not found.

Signature:

function get_folder_annotation (
p_folder_id in number,
p_annotation_key in varchar2
) return varchar2;

Parameters:

NameDirectionTypeDescription
p_folder_idinnumberThe folder ID
p_annotation_keyinvarchar2The annotation key

Returns: varchar2 - The annotation value


Check if an annotation exists for a folder

Signature:

function folder_annotation_exists (
p_folder_id in number,
p_annotation_key in varchar2
) return boolean;

Parameters:

NameDirectionTypeDescription
p_folder_idinnumberThe folder ID
p_annotation_keyinvarchar2The annotation key

Returns: boolean - boolean indicating if the annotation exists


Delete an annotation for a folder

Signature:

procedure delete_folder_annotation (
p_folder_id in number,
p_annotation_key in varchar2
);

Parameters:

NameDirectionTypeDescription
p_folder_idinnumberThe folder ID
p_annotation_keyinvarchar2The annotation key

Delete all annotations for a folder

Signature:

procedure delete_all_folder_annotations (
p_folder_id in number
);

Parameters:

NameDirectionTypeDescription
p_folder_idinnumberThe folder ID