OScript API/Built-in Package Index |
DAPI (Document Application Programming Interface) maintains a hierarchical database of nodes and their related attributes. Each node can have multiple versions of data, in the form of BLOBs (Binary Large Objects). A common form of versioned data stored at the nodes are electronic files of any format.
Node management is very much like a file system in that creation, updating, deleting, moving, and copying of nodes is supported.
DAPI protects access to all nodes through both the User, Group, System, World permissions and ACL (Access Control Lists).
DAPI supports for Aliases for nodes and Generations for versions. Aliases provide shortcuts to other nodes stored in the DAPI databases. Generations provide a reference to a specific version of a node.
Note: The DAPI category functionality supports the legacy node category features. Most of the current set of DAPI category attributes functions are not used for the current more sophisticated category features which are implemented in OScript. However, a few of the functions are used to support the additional node attributes feature.
The followings are types of DAPI object handles used with the DAPI functions:
The DAPI Package contains a formidable number of functions. The following table describes the bulk of the functionality provided:
The subtype of an alias node.
Specify to include all columns, including the system and user columns.
Specifies an attribute of type date.
Specifies an attribute of type fixed length text.
Specifies an attribute of type Integer.
Specifies an attribute of type long length text.
Specifies an attribute of type Real.
Specify to include both the system and category attributes.
Specify to include only the category attributes.
Specify to include only the system attributes.
Specifies an attribute of type variable length text.
The auditing event when a version is added to a node.
The auditing event when a node is aliased.
The auditing event when the system or category attributes of a node has changed.
The auditing event when the ordering of a compound document's child node has changed.
The auditing event when a node is copied.
The auditing event when a node is created.
The auditing event when a generation is created for a node.
The auditing event when a release is created for a compound document.
The auditing event when a rendition is added to a version of a node.
The auditing event when a revision is created for a compound document.
The auditing event when a node is deleted.
The auditing event when a release of a compound document is deleted.
The auditing event when a rendition of a version is deleted.
The auditing event when a revision of a compound document is deleted.
The auditing event when a version of a node is deleted.
The auditing event when a version of a node is fetched.
The auditing event when a user logs in to the system.
The auditing event when a user logs out of the system.
The auditing event when a node is moved.
The auditing event when the permissions of a node have changed.
The auditing event when versions of a node are purged.
The auditing event when a node is renamed.
The auditing event when a node is reserved.
The auditing event when a node is unreserved.
The auditing section identifier used in system initialization.
A provider callback reason constant which indicates the reading of a block of blob data from the database.
A provider callback reason constant which indicates the writing of a block of blob data to the database.
Specify to operate based unique node ID.
A return status constant used by the callback to cancel an operation without causing an error to occur.
A DAPI callback reason constant which indicates a version of a node will be copied.
A DAPI callback reason constant which indicates a node will be created.
A DAPI callback reason constant which indicates a version of a node will be deleted.
A DAPI callback reason constant which indicates one or more nodes are fetched for application node filtering.
A DAPI callback reason constant which indicates a new version will be added to a node.
A DAPI callback reason constant to filter out unwanted notifications.
A DAPI callback reason constant which indicates the owner of a node is updated.
A DAPI callback reason constant which indicates a version is ready for content filtering.
A provider callback reason constant which indicates the closing of a blob after opening for reading or writing.
A copy option for copying only the specified node without copying its child nodes
A copy option for copying only the current version of all nodes.
A copy option indicating that the copied node will have the same category as the destination parent node.
A copy option indicating that the copied node will have the same permissions as the destination parent node.
A copy option indicating that the copied node will have the same user attributes as the destination parent node.
A copy option indicating that a node's category and its attributes should not be copied.
A copy option indicating that a node's user attributes should not be copied.
A copy option indicating that version information should not be copied.
A DAPI callback reason constant which indicates a node was encountered and will be copied.
A copy option indicating that only the published version will be copied.
A copy option for setting the copied node's creator to the current user.
A copy option for copying a specific version of a node.
A copy option indicating that the copied node will have the same permissions as the source node.
A copy option indicating that all copied versions will be unlocked.
A copy option indicating that all copied nodes will be unreserved.
The DapiNode type number.
The DapiSession type number.
The DapiStream type number.
The DapiVersion type number.
A permission bit which enables deletion of a version.
A permission bit which enables access to a version's blob data contents.
A permission bit which enables access of the version attributes.
Another permission bit for a custom defined version privileges.
A permission bit for a custom defined version privileges.
A permission bit which enables the modification of the version attributes.
A provider callback reason constant which indicates the deletion of a blob.
A delete option to skip child count updating.
A DAPI callback reason constant which indicates a node was encountered and will be deleted.
A return status constant used by the callback to abort an operation.
A provider callback reason constant which indicates querying whether the blob content is fetchable.
Used to fetch raw version data.
Standard version data fetch mode.
A provider callback reason constant which indicates the reading of a blob from the database.
A provider callback reason constant which indicates the writing of a blob from the database.
An Integer mask representing full permissions.
The subtype of a generation node.
The default version locked flag.
A DAPI cbMoveOptions flag for moving items into a structure with permissions controllers.
A DAPI cbMoveOptions flag for moving items within a structure with permissions controllers.
A DAPI callback reason constant which indicates a node was encountered and will be moved.
Internal usage.
Internal usage.
A permission bit which enables the addition of child nodes.
A permission bit which enables the addition of a new major version to a node.
A permission bit which enables the a node's permissions to be viewed and edited.
A permission bit which enables the deletion of the child nodes.
A permission bit which enables node deletion.
A permission bit which enables the modification of the category attributes of a node.
The default subtype of a node.
The default node unreserved flag.
A permission bit which enables access of the content and attributes of a node.
A permission bit which allows a user to see the node.
A permission bit for custom defined privileges.
A permission bit for custom defined privileges.
The change notification constant for adding an ACL to a node.
The change notification constant for deleting an ACL from a node.
The change notification constant for modifying an ACL of a node.
The change notification constant for copying a node.
The change notification constant for creating a node.
The change notification constant for creating a root node.
The change notification constant for deleting a node.
The change notification constant for deleting a node version.
The change notification constant for moving a node.
The change notification constant for renaming a node.
The change notification constant for modifying a node.
The integer status indicating success.
A provider callback reason constant which indicates opening a blob data for reading.
A provider callback reason constant which indicates opening a blob data for writing.
A permission level constant for permissions up to delete privileges.
A permission level constant for only see privilege.
A permission level constant for permissions up to see contents privileges
A return status constant used by the callback to change a node permissions in a RWD setting in a move operation.
A permission level constant for permissions up to modify privileges.
The permission type for ACL permissions.
The permission type for group permissions.
The permission type for system permissions.
The permission type for user permissions.
The permission type for world permissions.
The Macintosh platform.
The UNIX platform.
An unknown platform.
The Windows platform.
The default node reserved flag.
A provider callback reason constant which indicates setting the position of blob data.
A provider callback reason constant which indicates the retrieval of object size.
A return status constant used by the callback to skip a copy of a node in a copy operation without causing an error.
Specify to include system columns only.
An integer value indicating that an attribute is unused.
Specify to include user columns only.
A version copy option for setting the copied version's creator to the current user.
A version copy option indicating that user attributes should not be copied.
A version copy option to copy the renditions with the version.
A version copy option indicating that the copied version should be unlocked.
A constant to indicate the creation of a major version.
A constant to indicate the retrieval of the current version.
A constant to indicate the retrieval of the current major version.
A constant to indicate tthe retrieval of the current published version.
The default version unlocked flag.
A return status constant used to indicate that a version's blob content has not yet been loaded.
Adds the specified attribute to the specified category.
Adds a new category.
Adds a new category attribute.
Adds a user or group access right to the specified node.
Adds a new column to the DTree table.
Adds a custom provider for blob data storage to the current session.
Adds a new rendition to the specified version.
Adds a new rendition to the specified version by getting data from the specified Socket object.
Adds a new thumbnail to the specified version.
Adds a new thumbnail to the specified version by getting data from the specified DAPISTREAM object.
Adds a value as a version to the specified node.
Adds a version to the specified node.
Adds a version to the specified node by getting data from the specified Socket object.
Adds a new column to the DVersData table.
Creates a new node that is an alias of the specified node.
Allocates a new DAPINODE cloned object in memory.
Allocates a new DAPIVERSION cloned object in memory.
Allocates a new DAPINODE object in memory.
Allocates a DAPISESSION object for a login user.
Allocates a new DAPIVERSION object in memory.
Records a custom auditing event.
Clean up the DAPINODE cache for the calling thread.
Sets purge flag to false.
Clone a node with original node attributes.
Clones a version to the specified node.
Copies a node but not its child nodes.
Copies the category and attributes of one node to another.
Copies a node and its child nodes.
Copies the user attributes of one node to another.
Copies a specified version as a new version of the specified node.
Copies the user attributes of one version to another.
Creates a new node that is a generation of the specified node.
Creates a new node.
Creates a root node for a volume.
Creates a single object.
Deletes an attribute from a category.
Deletes a category.
Deletes an attributes.
Deletes the specified node and its child nodes.
Deletes a user or group access right from the specified node.
Deletes the specified rendition of a specified version.
Deletes the specified thumbnail of the specified version.
Deletes all thumbnails of the specified version.
Deletes the specified version.
Copies the specified version rendition contents to a file on the local machine.
Reads multiple portions of the version rendition contents and writes it to the specified Socket object.
Reads a portion of the version rendition contents and writes it to the specified Socket object.
Reads the version rendition contents and writes it to the specified Socket object.
Copies the specified thumbnail to a file on the local machine.
Returns the specified thumbnail as a base64 encoded string.
Returns the specified thumbnail as a byte array.
Reads the thumbnail and writes it to the specified DAPISTREAM objec.
Copies the specified version contents to a file on the local host.
Retrieves the version of a node as a value.
Reads multiple portions of the version contents and writes it to the specified Socket object.
Reads a portion of the version contents and writes it to the specified Socket object.
Reads the version contents and writes it to the specified Socket object.
Retrieves the external source information specified by the external source name
Retrieves the external source information specified by the external source ID number
Retrieves the comment of a DAPINODE for the specified language.
Retrieves the name of a DAPINODE for the specified language.
Retrieves a node by specifying a name or a relative path.
Retrieves a node based on its GUID.
Retrieves a node based on its unique ID.
Returns a List of column names in the DTree table.
Returns the permissions mask that the current user has on the specified node.
Returns a user or group access right for the specified node.
Returns all user or group access rights for the specified node.
Returns a List of DAPINODE objects for the given DataID list.
Returns a user attribute value for the specified node.
Retrieves the original node referenced by the specified alias or generation node.
Retrieves the parent node of the specified node.
Gets the current purge flag.
Retrieves a recycled node (i.e., a node deleted logically but not purged yet) based on its unique ID.
Retrieves a rendition of the specified version.
Get the size of the specified rendition.
Retrieves a specific version of the specified node.
Retrieves a version based on its GUID.
Retrieves a version based on unique ID.
Retrieves a version based on the unique version name of a node.
Returns a List of column names of the DVersData table.
Get the size of the specified version.
Returns a user attribute value for the specified version.
Returns true if the version has the specified thumbnail else false..
Checks if a node is a descendant of another.
Returns a List of all the aliases to the specified node.
Returns a RecArray containing information about all existing categories.
Returns a RecArray containing information about attributes.
Returns a RecArray containing the child nodes Records of a specified node.
Returns a List of all the generations of the specified node.
Returns a List of all generations of the specified release or revision of a compound document.
Returns a List of all generations of the specified version.
Returns a List of all renditions of the specified version.
Returns a List of the child nodes of a specified node.
Returns a List of all thumbnails of the specified version.
Returns a List of all versions of the specified node.
Locks the specified version.
Relocates the specified node and its child nodes.
Changes the data provider of the specified version.
Returns the next available ordering position in a compound document.
Returns the number of aliases to the specified node.
Returns the number of generations of the specified node.
Returns the number of generations of the specified release or revision of a compound document.
Returns the number of generations of the specified version.
Returns the number of rendition types associated with a specified version.
Returns the number of child nodes of the specified node.
Returns the number of thumbnails associated with a specified version.
Returns the number of versions of the specified node.
Opens a stream for reading the contents of the specified version.
Opens a stream for writing the contents of the specified version.
Purges the specified node and its child nodes.
Deletes one or more versions from the specified node.
Forces a retrieval of the most recent node information from the database.
Forces a retrieval of the most recent version information from the database.
Renames the specified node.
Reserves the specified node.
Establishes a callback script for node events.
Sets a default provider to use during a session.
Sets the comment of a DAPINODE for the specified language.
Sets the name of a DAPINODE for the specified language.
Assigns a value to the specified user attribute of the specified node.
Sets purge flag to true.
Set the mode used to fetch version data
Assigns a value to the specified user attribute of the specified version.
Unlocks the specified version.
Unreserves the specified node.
Updates the childcount of the specified node.
Updates modified node attributes of the specified node.
Updates the user or group access right of the specified node.
Updates modified version attributes of the specified version.
Updates a category.
Updates an attribute.
Determines whether the specified version's blob content has been loaded.
Closes the specified open stream for reading or writing.
Returns the length of an opened version stream.
Reads a portion of data from an opened version stream.
Writes a portion of data to an opened version stream.
The subtype of an alias node. The value is 1.
Specify to include all columns (both system and user columns). Used by DAPI.GetNodeColumnNames() and DAPI.GetVersionColumnNames().
Specifies that an attribute type is a Date. Used by DAPI.AddCategoryAttr().
Specifies that an attribute type is text of a fixed length. Used by DAPI.AddCategoryAttr().
Specifies that the attribute type is an Integer. Used by DAPI.AddCategoryAttr().
Specifies than an attribute type is long length text. Used by DAPI.AddCategoryAttr().
Specifies that the attribute type is a Real number. Used by DAPI.AddCategoryAttr().
Specify to include both the system and category attributes. Used by DAPI.GetNodeUserAttr() and DAPI.SetNodeUserAttr().
Specify to include only the category attributes. Used by DAPI.GetNodeUserAttr() and DAPI.SetNodeUserAttr().
Specify to include only the system attribute. Used by DAPI.GetNodeUserAttr() and DAPI.SetNodeUserAttr().
Specifies that the attribute type is variable length text. Used by DAPI.AddCategoryAttr().
The auditing event recorded when a version is added to a node, as with DAPI.AddVersion() or DAPI.AddValAsVersion().
The auditing event recorded when a node is aliased, as with DAPI.AliasNode().
The auditing event recorded when the system or category attributes of a node have changed, as with DAPI.SetNodeUserAttr() or DAPI.UpdateNode().
The auditing event recorded when the ordering of a compound document's child node has changed, as with DAPI.UpdateNode()
The auditing event recorded when a node is copied, as with DAPI.CopyNode().
The auditing event recorded when a node is created, as with DAPI.AliasNode() or DAPI.CreateNode().
The auditing event recorded when a generation is created for a node, as with DAPI.CreateGeneration().
The auditing event recorded when a release is created for a compound document, as with DAPI.CreateNode() called with a subtype of 138.
The auditing event recorded when a rendition is added to a version of a node, as with DAPI.AddRendition() or DAPI.AddRenditionFromStream().
The auditing event recorded when a revision is created for a compound document, as with DAPI.CreateNode() with a subtype of 139.
The auditing event recorded when a node is deleted, as with DAPI.DeleteNode().
The auditing event recorded when a release of a compound document is deleted, as with DAPI.DeleteNode() with a subtype of 138.
The auditing event recorded when a rendition of a version is deleted, as with DAPI.DeleteRendition().
The auditing event recorded when a revision of a compound document is deleted, as with DAPI.DeleteNode() with a subtype of 139.
The auditing event recorded when a version of a node is deleted, as with DAPI.DeleteVersion().
The auditing event recorded when a version of a node is fetched, as with DAPI.FetchVersion(), DAPI.FetchVersionToStream(), or DAPI.FetchVersionRangesToStream().
The auditing event recorded when a user logs in to the system. This event is not recorded by any DAPI function.
The auditing event recorded when a user logs out of the system. This event is not recorded by any DAPI function.
The auditing event recorded when a node is moved, as with DAPI.MoveNode().
The auditing event recorded when the permissions of a node has changed, as with DAPI.UpdateNode(), DAPI.AddNodeRight(), DAPI.UpdateNodeRight(), or DAPI.DeleteNodeRight().
The auditing event recorded when versions of a node is purged, as with DAPI.PurgeVersions().
The auditing event recorded when a node is renamed, as with DAPI.RenameNode().
The auditing event recorded when a node is reserved, as with DAPI.ReserveNode().
The auditing event recorded when a node is unreserved, as with DAPI.UnreserveNode().
The auditing section identifier used in system initialization. It is used to record the auditing events of a node type in the KIni table. The value of the identifier is 'Livelink.Auditing'
A provider callback reason constant which indicates the reading of a block of blob data from the database.
A provider callback reason constant which indicates the writing of a block of blob data to the database.
Specify to operate based on the unique node ID. Used by DAPI.GetNodeByID().
A return status constant used by the callback to cancel an operation without causing an error.
A DAPI callback reason constant which indicates a version of a node will be copied.
A DAPI callback reason constant which indicates a node will be created.
A DAPI callback reason constant which indicates a version of a node will be deleted.
A DAPI callback reason constant which indicates one or more nodes are fetched for application node filtering.
A DAPI callback reason constant which indicates a new version will be added to a node.
A DAPI callback reason constant to filter out unwanted notifications.
A DAPI callback reason constant which indicates the owner of a node is updated. This is when the DAPINODE.pUserID field is updated by DAPI.UpdateNode().
A DAPI callback reason constant which indicates a version is ready for content filtering. This is called during the version fetch process to enable or disable a content filter.
A provider callback reason constant which indicates the closing of a blob after opening for reading or writing.
A copy option for copying only the specified node without copying its child nodes. Used by DAPI.CopyNode().
A copy option for copying only the current version of all nodes. Used by DAPI.CopyNode() and DAPI.CopyANode().
A copy option to indicate that the copied node will have the same category as the destination parent node. Used by DAPI.CopyANode().
A copy option indicating that the copied node will have the same permissions as the destination parent node. Used by DAPI.CopyANode().
A copy option indicating that the copied node will have the same user attributes as the destination parent node. Used by DAPI.CopyANode().
A copy option indicating that the category and its attributes should not be copied. Used by DAPI.CopyANode().
A copy option indicating that the user attributes should not be copied. Used by DAPI.CopyANode().
A copy option indicating that version information will not be copied. Used by DAPI.CopyANode().
A DAPI callback reason constant indicating encountered nodes will be copied. The callback is issued by DAPI.CopyNode() and DAPI.CopyANode().
A copy option indicating that only the published version will be copied. Used by DAPI.CopyNode().
A copy option which sets the copied node's creator to the current user. Used by DAPI.CopyANode().
A copy option for copying a specific version of a node. Used by DAPI.CopyANode().
A copy option indicating that the copied node will have the same permissions as the source node. Used by DAPI.CopyNode().
A copy option indicating that all copied versions will be unlocked. Used by DAPI.CopyANode().
A copy option indicating that all copied nodes will be unreserved. Used by DAPI.CopyNode() and DAPI.CopyANode().
The DapiNode type number.
The DapiSession type number.
The DapiStream type number.
The DapiVersion type number.
A permission bit which enables version deletion.
A permission bit which enables access to a version's blob data contents.
A permission bit which enables access to version attributes.
A permission bit for custom version permission use.
A permission bit for custom version permission use.
A permission bit which enables modification of version attributes.
A provider callback reason constant which indicates the deletion of a blob.
A delete option for DeleteNode() to skip the child count update.
A DAPI callback reason constant indicating the encountered node will be deleted. The callback is issued by DAPI.DeleteNode().
A return status constant used by a callback to abort an operation.
A provider callback reason constant which indicates querying whether the blob content is fetchable.
Constant used with SetVersionFetchMode() to fetch unaltered version data as it is stored.
Constant used with SetVersionFetchMode() to perform a standard version fetch.
A provider callback reason constant which indicates the reading of a blob from the database.
A provider callback reason constant which indicates the writing of a blob from the database.
An Integer mask which represents full permissions.
The subtype of a generation node. The value is 2.
The default version locked flag. The value is 128.
If this flag is set in the cbMoveOptions returned to the DAPI move callback, nodes will not have their own perms after the move, but will instead be controlled by (have permID set to) the same node as the destination of the move if that destination node has a permID, and otherwise by: the target itself, if MOVE_CB_PERM_CONTROLLER_SUBTREES is also set; or the node's parent, if MOVE_CB_PERM_CONTROLLER_SUBTREES is not set. This flag is appropriate when a move occurs from an acl-controlled area into a permID-controlled area.
Similar to MOVE_CB_PERM_CONTROLLER except that it handles subtrees, with their own perm-controlling roots, within the tree of moving nodes. This means that:
A DAPI callback reason constant which indicates a node was encountered and will be moved. The callback is issued by DAPI.MoveNode().
Internal usage.
Internal usage.
A permission bit which enables the child node addition.
A permission bit which enables the addition of a new major version to a node.
A permission bit which enables node permission viewing and editing.
A permission bit which enables deletion of child nodes for this node.
A permission bit which enables deletion of the node.
A permission bit which enables category attribute modification.
The default subtype of a node. The value is 0.
The default node unreserved flag. The value is 0.
A permission bit which enables access to the node's content and attributes.
A permission bit which enables a user to see the node.
A permission bit for a custom node permissions.
A permission bit for a custom node permissions.
The change notification constant for the addition of an ACL to a node. It is used in the NType column of the DTreeNotify table. The value is 8.
The change notification constant for the deleting of an ACL from a node. It is used in column NType of the DTreeNotify table. The value is 10.
The change notification constant for the modification of an ACL of a node. It is used in column NType of the DTreeNotify table. The value is 9.
The change notification constant for the copying of a node. It is used in column NType of the DTreeNotify table. The value is 2.
The change notification constant for the creation of a node. It is used in column NType of the DTreeNotify table. The value is 1.
The change notification constant for the creation of a root node. It is used in column NType of the DTreeNotify table. The value is 3.
The change notification constant for deleting a node. It is used in column NType of the DTreeNotify table. The value is 4.
The change notification constant for deleting a node version. It is used in column NType of the DTreeNotify table. The value is 2004.
The change notification constant for moving a node. It is used in column NType of the DTreeNotify table. The value is 5.
The change notification constant for renaming a node. It is used in column NType of the DTreeNotify table. The value is 6.
The change notification constant for the modification of a node. It is used in column NType of the DTreeNotify table. The value is 7.
The status constant indicating success. Returned by DAPI functions to indicate that a call was completed successfully. The value is 0.
A provider callback reason constant which indicates opening blob data for reading.
A provider callback reason constant which indicates the opening of blob data for writing.
A permission level constant enabling permissions up to, and including, deletion. It is used in the See column of the DTreeACL table. The value is 4.
A permission level constant enabling see privileges only. It is used in the See column of the DTreeACL table. The value is 1.
A permission level constant enabling permissions up to, and including, see contents privileges. It is used in the See column of the DTreeACL table. The value is 2.
A return status constant used by the callback to change a node permissions in a RWD setting in a move operation.
A permission level constant enabling permissions up to, and including, modify privileges. It is used in the See column of the DTreeACL table. The value is 3.
The permission type enabling ACL permissions. It is used in column ACLType of the DTreeACL table. The value is 0.
The permission type enabling group permissions. It is used in column ACLType of the DTreeACL table. The value is 2.
The permission type enabling system permissions. It is used in column ACLType of the DTreeACL table. The value is 4.
The permission type enabling user permissions. It is used in column ACLType of the DTreeACL table. The value is 1.
The permission type enabling world permissions. It is used in column ACLType of the DTreeACL table. The value is 3.
The Macintosh platform. This constant is used in the platform attribute of a version.
The UNIX platform. This constant is used in the platform attribute of a version.
An unknown platform. This constant is used in the platform attribute of a version.
The Windows platform. This constant is used in the platform attribute of a version.
The default node reserved flag. The value is 128.
A provider callback reason constant which indicates the setting of a blob data position.
A provider callback reason constant which indicates the retrieval of object size.
A return status constant used by the callback to skip a copy of a node in a copy operation without causing an error.
Specify to include the system columns only. Used by DAPI.GetNodeColumnNames() and DAPI.GetVersionColumnNames().
An integer value indicating that an attribute is unused. The value is -1. For example, if a node does not contain any versions, the maximum number of versions is set to unused.
Specify to include the user columns only. Used by DAPI.GetNodeColumnNames() and DAPI.GetVersionColumnNames().
A version copy option for setting the copied version's creator to the current user. Used by DAPI.CopyVersion().
A version copy option indicating that user attributes should not be copied. Used by DAPI.CopyVersion().
A version copy option to copy the renditions with the version.
A version copy option indicating that the copied version will be unlocked. Used by DAPI.CopyVersion().
A constant to indicate the creation of a major version. A major version will be created if this constant is assigned to the DAPINODE.pVerMajor field of a newly allocated DAPIVERSION handler used in DAPI.AddVersion() and DAPI.CopyVersion().
A constant to indicate the retrieval of the current version. It is used in DAPI.GetVersion() to get the current version of a standard versioning node or the current version (either major or minor) of a major and minor versioning node.
A constant to indicate the retrieval of the current major version. It is used in DAPI.GetVersion() to get the current major version of a major and minor versioning node.
A constant to indicate tthe retrieval of the current published version. It is used in DAPI.GetVersion() to get the current version of a standard versioning node or the current major version of a major and minor versioning node.
The default version unlocked flag. The value is 0.
A return status constant which indicates
that the version's blob content has not yet been loaded. Used by $WebDoc.WebDocUtils.NodeToWeb()
.
Adds the specified attribute to the specified category.
This inserts a row into the DCatAttrs table. Both the category and the attribute specified must exist or the function will fail. Attributes can be added to more than one category.
The DAPISESSION object handle.
The name of the category to which the attribute will be added. The category specified must have previously been created using DAPI.AddCategory().
The name of the attribute to add. The attribute specified must have previously been created using DAPI.AddCategoryAttr().
TRUE to indicate that the specified attribute is required.
DAPI.OK (Integer 0) if successful; Error otherwise.
Adds a new category.
This inserts a row into the DCategories table and modifies the database schema by creating the table specified by tableName. The structure of this table is modified as attributes are added to the category using DAPI.AddAttrToCategory().
The DAPISESSION object handle.
The name of the new category.
The name to display when the category is used in the application.
The name of the table in which the attribute data associated with this category should be stored.
DAPI.OK (Integer 0) if successful; Error otherwise.
Adds a new category attribute.
This inserts a row into the DAttributes table. New attributes must be added to a category before they can be used. An attribute can be added to more than one category, if desired.
The DAPISESSION object handle.
The name of the new attribute.
Specifies a constant indicating the DAPI attribute data type. Acceptable values are:
An Integer indicating the length of the attribute. The type must be the DAPI.ATTR_FCHAR or DAPI.ATTR_VCHAR or it is ignored.
Specifies an optional List of extended argument values. The DAttributes table must first be modified (using interactive SQL) to accept the values specified in this List. The data types of the values in the List must correspond to the data types of the columns added to the DAttributes table.
DAPI.OK (Integer 0) if successful; Error otherwise.
Adds a user or group access right to the specified node.
This inserts a row into the DTreeACL table.
The DAPINODE object handle.
The user or group ID.
The permissions bit mask which is one or more node permission constants joined by bitwise OR operators.
DAPI.OK (Integer 0) if successful; Error otherwise.
Adds a new column to the DTree table.
This is most often used during system configuration to properly set up the database.
The DAPISESSION object handle.
The name of the new column.
The data type of the new column.
DAPI.OK (Integer 0) if successful; Error otherwise.
Adds a custom provider for blob data storage to the current session.
The DAPISESSION object handle.
The name of the custom provider.
TRUE to indicate non-blob storage.
An OScript script reference. This script must contain functions to handle getting, writing, and deleting the blob data.
The specific OSpace object of the script.
DAPI.OK (Integer 0) if successful; Error otherwise.
Adds a new rendition to the specified version.
The DAPIVERSION object handle.
The newly allocated DAPIVERSION object handle. This allows file attributes to be pre-assigned to the rendition.
The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string.
The local file path of the rendition file.
DAPI.OK (Integer 0) if successful; Error otherwise.
Adds a new rendition to the specified version by getting data from the specified Socket object.
The DAPIVERSION object handle.
The name of the new rendition.
The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string.
The Socket object from which the rendition contents are read.
An Assoc object containing the file attributes of the rendition.
DAPI.OK (Integer 0) if successful; Error otherwise.
Adds a new thumbnail to the specified version.
The DAPIVERSION object handle.
The newly allocated DAPIVERSION object handle. This allows file attributes to be pre-assigned to the thumbnail.
The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string.
The local file path of the thumbnail file.
DAPI.OK (Integer 0) if successful; Error otherwise.
Adds a new thumbnail to the specified version by getting data from the specified DAPISTREAM object.
The DAPIVERSION object handle.
The name of the new thumbnail.
The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string.
The DAPISTREAM object from which the thumbnail is read.
An Assoc object containing the file attributes of the thumbnail.
The page number of the thumbnail.
DAPI.OK (Integer 0) if successful; Error otherwise.
Adds a value as a version to the specified node.
The DAPINODE object handle.
The newly allocated DAPIVERSION object handle. This allows file attributes to be pre-assigned to the version.
The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string.
The value to be store as a version. Acceptable values are Boolean, Date, Integer, List, Real, and String. The Assoc, RecArray, and Record data types are currently not supported.
Used to force this version to be treated as the first version of the specified node. Defaults to FALSE.
Used to clone this version to the specified node. Defaults to FALSE.
DAPI.OK (Integer 0) if successful; Error otherwise.
Adds a version to the specified node.
The DAPINODE object handle.
The newly allocated DAPIVERSION object handle. This allows file attributes to be pre-assigned to the version.
The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string.
The local file path of the file to be stored as a version.
Used to force this version to be treated as the first version of the specified node. Defaults to FALSE.
Used to clone this version to the specified node. Defaults to FALSE.
DAPI.OK (Integer 0) if successful; Error otherwise.
Adds a version to the specified node by retrieving data from the specified Socket object.
The DAPINODE object handle.
The newly allocated DAPIVERSION object handle. This allows file attributes to be pre-assigned to the version.
The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string.
The Socket object from which the version contents are read.
An Assoc object contains the file attributes of the version.
Used to force this version to be treated as the first version of the specified node. Defaults to FALSE.
DAPI.OK (Integer 0) if successful; Error otherwise.
Adds a new column to the DVersData table.
This is most often used during system configuration to properly set up the database.
The DAPISESSION object handle.
The name of the new column.
The data type of the new column.
DAPI.OK (Integer 0) if successful; Error otherwise.
Creates a new node that is an alias of the specified node.
A unique ID is automatically assigned to the new node if successful.
The DAPINODE object handle of the node for which an alias is created.
The DAPINODE object handle of the node that will be the parent of the new alias node.
The newly allocated DAPINODE object handle. This allows node attributes to be pre-assigned to the node.
TRUE if the the alias will inherit the access control list (ACL) from the parent node; FALSE otherwise. FALSE is the default.
DAPI.OK (Integer 0) if successful; Error otherwise.
Allocates a new DAPINODE object in memory.
Once a new node object has been allocated, values can be assigned to the node properties before the actual creation of the node.
The DAPISESSION object handle.
The original node attributes.
The DAPINODE object handle if successful; Error otherwise.
Allocates a new DAPIVERSION object in memory.
Once a new version object has been allocated, values can be assigned to the version properties before the actual creation of the version.
The DAPISESSION object handle.
The original version attributes.
The DAPIVERSION object handle if successful; Error otherwise.
Allocates a new DAPINODE object in memory.
Once a new node object has been allocated, values can be assigned to the node properties before the actual creation of the node.
The DAPISESSION object handle.
The DAPINODE object handle if successful; Error otherwise.
Allocates a DAPISESSION object for a login user.
A DAPISESSION contains information pertaining node management. A DAPISESSION is a required argument for most DAPI functions.
The CAPILOGIN object handle specifically for the login user.
TRUE to enable the recording of node change events for text search indexing procedures, FALSE otherwise. The default is TRUE.
The DAPISESSION object handle; Error otherwise.
Allocates a new DAPIVERSION object in memory.
Once a new version object has been allocated, values can be assigned to the version properties before the actual creation of the version.
The DAPISESSION object handle.
The DAPIVERSION object handle if successful; Error otherwise.
Records a custom auditing event.
This inserts a row in the DAudit table. If the first parameter is a DAPINODE object handle, then the ID and the name of the node will be recorded. If the first parameter is a DAPISESSION object handle, then the ID will be 0 and the name will be undefined.
The DAPINODE object handle or the DAPISESSION object handle.
A string indicating the event.
A string giving a detailed description of the event.
DAPI.OK (Integer 0) if successful; Error otherwise.
Clean up the DAPINODE cache.
Each Content Server thread maintains its own DAPINODE cache so calling this fuction will only affect the thread that is executing the function.
In general, application developers don't need to call this function because it has been called by the framework. The only exception might be the case where a lot of DAPINODE objects would be retrieved and used by long-running background agents.
DAPI.OK TRUE if successful; FALSE otherwise.
Sets purge flag to false.
true regardless. Thus, there is no need to check the return value.
Clone a node with original node attributes.
The newly allocated DAPINODE object handle. This allows node attributes to be pre-assigned to the node.
The DAPINODE object handle of the node that will be the parent of the new node.
The original node attributes.
Either as the copyAcls flag or an integer containing the new options
DAPI.OK (Integer 0) if successful; Error otherwise.
Clones a version to the specified node.
The DAPINODE object handle.
The newly allocated DAPIVERSION object handle. This allows file attributes to be pre-assigned to the version.
The original version attributes.
DAPI.OK (Integer 0) if successful; Error otherwise.
Copies a node but not its child nodes.
DAPI will issue a callback for the node it copied by calling a script setup by DAPI.SetCallback().
The DAPINODE object handle of the node to copy.
The DAPINODE object handle of the node that will be the parent of the copied node.
The newly allocated DAPINODE object handle. This allows node attributes to be pre-assigned to the node.
An optional flag for copy options. This flag can be joined by bitwise OR operators using the following constants:
The specific version to be copied with the node. Used only if the option DAPI.COPY_SPECIFICV is used in options.
DAPI.OK (Integer 0) if successful; Error otherwise.
Copies the category and attributes of one node to another.
Call DAPI.UpdateNode() after this function to save the changes to the database.
The DAPINODE object handle of the node whose category attributes are to be copied.
The DAPINODE object handle of the node to which the original node's category attributes are to be copied.
DAPI.OK (Integer 0) if successful; Error otherwise.
Copies a node and its child nodes.
DAPI will issue a callback for each node it encounters by calling a script setup by DAPI.SetCallback().
The DAPINODE object handle of the node to copy.
The DAPINODE object handle of the node that will be the parent of the copied node.
An optional flag for copy options. This flag can be joined by bitwise OR operators using the following constants: * DAPI.COPY_A_NODE * DAPI.COPY_CURRENTV * DAPI.COPY_UNLOCKV * DAPI.COPY_UNRESERVE
An optional String indicating a name for the copied node, or an Assoc of multilingual names, keyed by language code.
Defaults to the name of the original node if not specified.
The DAPINODE object handle of the copied node if successful; Error otherwise.
Copies the user attributes of one node to another.
Call DAPI.UpdateNode() after this function to save the changes to the database.
The DAPINODE object handle of the node whose user attributes are to be copied.
The DAPINODE object handle of the node to which the original node's user attributes are to be copied.
DAPI.OK (Integer 0) if successful; Error otherwise.
Copies a specified version as a new version of the specified node.
The DAPIVERSION object handle of the version to copy.
The DAPINODE object handle of the node where the new version is stored.
The newly allocated DAPIVERSION object handle. This allows version attributes to be pre-assigned to the version.
An optional flag for copy options. This flag can be joined by bitwise OR operators using the following constants:
The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider() if it is an empty string.
DAPI.OK (Integer 0) if successful; Error otherwise.
Copies the user attributes of one version to another.
Call DAPI.UpdateVersion() after the this function to save modifying the database.
The DAPIVERSION object handle of the version whose user attributes are to be copied.
The DAPIVERSION object handle of the version to which the original version's user attributes are to be copied.
DAPI.OK (Integer 0) if successful; Error otherwise.
Creates a new node that is a generation of the specified node.
A generation is a reference to the specific version, release, or revision of a node. It causes a system lock on the specific version, release, or revision. A unique ID is automatically assigned to the new node upon successful completion.
This function will create a generation of the current version, release, or revision unless the current version, major, or minor attributes are set in the newly allocated DAPINODE object.
The DAPINODE object handle of the node for which a new generation is created.
The DAPINODE object handle of the node that will be the parent of the new generation node
The newly allocated DAPINODE object handle. This allows node attributes to be pre-assigned to the node.
An optional flag where TRUE indicates that only the root node is to be included in the creation of generations. Defaults to FALSE if not specified.
TRUE if the generation will inherit the access control list (ACL) from the parent node; FALSE otherwise. The default is FALSE
DAPI.OK (Integer 0) if successful; Error otherwise.
Creates a new node.
A unique ID is automatically assigned to the new node upon successful completion.
The newly allocated DAPINODE object handle. This allows node attributes to be pre-assigned to the node.
The DAPINODE object handle of the node that will be the parent of the new node.
TRUE if the new node will inherit the access control list (ACL) from the parent node; FALSE otherwise. The default is FALSE.
DAPI.OK (Integer 0) if successful; Error otherwise.
Creates a root node for a volume.
A unique ID is automatically assigned to the new node upon successful execution of this function. To create a root node with a specific volume ID, preset the volume ID in the newly allocated DAPINODE object.
The newly allocated DAPINODE object handle. This allows node attributes to be pre-assigned to the node.
DAPI.OK (Integer 0) if successful; Error otherwise.
Creates a single object in the parent specified.
A unique ID is automatically assigned to the new node upon successful execution of this function.
The DAPISESSION object handle,
The parent DAPINODE object.
The details of the object to be created.
DAPI.OK (Integer 0) if successful; Error otherwise.
Deletes an attribute from a category.
This deletes a row from the DCatAttrs table.
The DAPISESSION object handle.
The name of the category from which the attribute is removed.
The name of the attribute to delete.
DAPI.OK (Integer 0) if successful; Error otherwise.
Deletes a category.
This deletes a row from the DCategories table.
The DAPISESSION object handle.
The name of the category to delete.
TRUE if the associated category table should be deleted upon successful deletion of the category.
DAPI.OK (Integer 0) if successful; Error otherwise.
Deletes an attributes.
This deletes a row in the DAttributes table.
The DAPISESSION object handle.
The name of the attribute to delete.
TRUE to force a check on the usage of this attribute so that the function will fail if it is used by any category.
DAPI.OK (Integer 0) if successful; Error otherwise.
Deletes the specified node and its child nodes.
This will fail if the specified node (or any of its child nodes) are reserved, referenced by a generation, or contain locked versions.
DAPI will issue a callback for each node it encounters by calling a script setup by DAPI.SetCallback().
The DAPINODE object handle of the node to delete.
An optional flag for delete options. This flag can be joined by bitwise OR operators using the following constants:
DAPI.OK (Integer 0) if successful; Error otherwise.
Deletes a user or group access right from the specified node.
This deletes a row from the DTreeACL table.
The DAPINODE object handle.
The user or group ID.
DAPI.OK (Integer 0) if successful; Error otherwise.
Deletes the specified rendition of a specified version.
The DAPIVERSION object handle.
The type of the rendition.
DAPI.OK (Integer 0) if successful; Error otherwise.
Deletes the specified thumbnail of the specified version.
The DAPIVERSION object handle of the version from which the spcecified thumbnail will be deleted.
The type of the thumbnail.
The page number of the thumbnail.
DAPI.OK (Integer 0) if successful; Error otherwise.
Deletes all thumbnails of the specified version.
The DAPIVERSION object handle of the version whose thumbnails to be deleted.
DAPI.OK (Integer 0) if successful; Error otherwise.
Writes multiple portions of the version rendition contents to the specified Socket object.
The DAPIVERSION object handle.
The Socket object to which the rendition contents are written.
The type of the rendition.
A List of entries in which each element is a List with two integers representing a range. The first integer is the starting position and the second integer is the end position.
An HTML header for the specified ranges.
DAPI.OK (Integer 0) if successful; Error otherwise.
Writes a portion of the version rendition contents to the specified Socket object.
The DAPIVERSION object handle.
The Socket object to which the rendition contents are written.
The type of the rendition.
A List of two integers representing the range. The first integer is the starting position and the second integer is the end position.
DAPI.OK (Integer 0) if successful; Error otherwise.
Copies the specified version rendition contents to a file on the local host.
The DAPIVERSION object handle.
The type of the rendition.
The local file path to which the rendition contents are copied.
DAPI.OK (Integer 0) if successful; Error otherwise.
Writes the version rendition contents to the specified Socket.
The DAPIVERSION object handle.
The Socket object to which the rendition contents are written.
The type of the rendition.
DAPI.OK (Integer 0) if successful; Error otherwise.
Copies the specified thumbnail contents to the specified file on the local host.
The DAPIVERSION object handle.
The type of the thumbnail.
The local file path to which the rendition contents are copied.
The page number of the thumbnail to be fetched.
DAPI.OK (Integer 0) if successful; Error otherwise.
Returns the specified thumbnail as a base64 encoded string.
The DAPIVERSION object handle.
The type of the thumbnail.
The page number of the thumbnail.
a string representation of the specified thumbnail if successful; Error otherwise.
Returns the specified thumbnail as a byte array.
The DAPIVERSION object handle.
The type of the thumbnail.
The page number of the thumbnail.
a Byte arrary if successful; Error otherwise.
Writes a portion of the thumbnail to the specified DAPISTREAM object.
The DAPIVERSION object handle.
The DAPISTREAM object to which the thumbnail contents are written.
The type of the thumbnail.
The page number of the thumbnail.
DAPI.OK (Integer 0) if successful; Error otherwise.
Copies the specified version contents to a file on the local host.
The DAPIVERSION object handle.
The local file path to which the version contents are copied.
DAPI.OK (Integer 0) if successful; Error otherwise.
Retrieves the value stored as the version of a node.
The DAPIVERSION object handle.
The value stored for this version if successful; Error otherwise.
Writes multiple portions of the version contents to the specified Socket object.
The DAPIVERSION object handle.
The Socket object to which the version contents are written.
A List of entries in which each element is a List with two integers representing the range. The first integer is the starting position and the second integer is the end position.
An HTML header for the specified ranges.
DAPI.OK (Integer 0) if successful; Error otherwise.
Writes a portion of the version contents to the specified Socket.
The DAPIVERSION object handle.
The Socket object to which the version contents are written.
A List of two integers representing the range. The first integer is the starting position and the second integer is the end position.
DAPI.OK (Integer 0) if successful; Error otherwise.
Writes the version contents to the specified Socket object.
The DAPIVERSION object handle.
The Socket object to which the version contents are written.
DAPI.OK (Integer 0) if successful; Error otherwise.
Retrieves a RecArray containing the external source ID number, name, and display value.
The DAPISESSION object handle.
The external source name.
A RecArray containing the values for the external source ID, Value and Display.
Object prgCtx = $pSession Dynamic ret ret = DAPI.GetExternalSource( prgCtx.DSession().fSession, 'file_system' ) echo( ret ) Output: V{<'ID','Value','Display'><1,'file_system',?>}
Retrieves a RecArray containing the external source ID number, name, and display value.
The DAPISESSION object handle.
The external source ID number.
A RecArray containing the values for the external source ID, Value and Display.
Object prgCtx = $pSession Dynamic ret ret = DAPI.GetExternalSourceByID( prgCtx.DSession().fSession, 1 ) echo( ret ) Output: V{<'ID','Value','Display'><1,'file_system',?>}
Gets the comment for a DAPINODE in the specified language.
The DAPINODE object handle.
The language code of the desired comment.
The comment if successful, an undefined value otherwise.
Gets the name for a DAPINODE in the specified language.
The DAPINODE object handle.
The language code of the desired name.
The name if successful, an undefined value otherwise.
Retrieves as specified by name or relative path.
For example, get a child node named 'A' by specifying 'A' for _namePath_, or get a grandchild node named 'B', which is a child node of 'A', by specifying 'A:B' for _namePath_.
A String indicating the name or relative path (separated by colons) of the child node to retrieve from the specified parent node.
The DAPINODE object handle identifying the starting point parent node from which the child node is retrieved.
TRUE if all node attributes are fetched up front; FALSE otherwise. The default is TRUE.
The DAPINODE object handle of the retrieved node if successful; Error otherwise.
Retrieves a node based on its GUID.
The DAPISESSION object handle.
The GUID of the node to be retrieved.
TRUE if all node attributes are fetched up front; FALSE otherwise. The default is TRUE.
TRUE if recycled nodes should be retrieved. The default is FALSE.
The DAPINODE object handle of the retrieved node if successful; Error otherwise.
Retrieves a node based on its unique ID.
It is not necessary to specify the volume ID. Use the constant DAPI.BY_DATAID to fetch the node based on the unique node ID or simply specify the node ID in the second parameter.
The DAPISESSION object handle.
An Integer indicating the volume ID of the node or the unique node ID if the third parameter is not specified
An Integer identifying the node ID.
TRUE if all node attributes are fetched up front; FALSE otherwise. The default is TRUE.
The DAPINODE object handle of the retrieved node if successful; Error otherwise. Note that the function will return an error when the node's DataID equals its ParentID.
Returns a List of column names in the DTree table.
The DAPISESSION object handle.
TRUE if the type of columns whose names will be returned.
The List of column names if successful; Error otherwise.
Returns the permissions mask that the current user has on the specified node.
The DAPINODE object handle.
The permissions bit mask which is one or more node permission constants joined by bitwise OR operators if successful; Error otherwise.
Returns a user or group access right for the specified node.
The DAPINODE object handle.
The user or group ID.
The permissions bit mask which is one or more node permission constants joined by bitwise OR operators if successful; Error otherwise.
Returns all user or group access rights for the specified node.
The DAPINODE object handle.
A RecArray containing the records of the DTreeACL table if successful; Error otherwise.
Returns a List of DAPINODE objects for the given DataID list.
Nodes deleted or not accessible to the requesting user will not be included in the return list. The extendedSettings parameter allows to specify if more data will be retrieved from the Content Server database. By default, it retrieves multilingual name and comment for the requesting user's preferred language only; and it retrieves neither the external data attributes (ExternalCreateDate, ExternalModifyDate, ExternalCreatorID, and ExternalSourceID) nor the ExtendedData attribute.
The DAPISESSION object for the requesting user.
A list of DataIDs of type Integer.
An optional Assoc object containing options for specifying what data attributes should be retrieved from database.
Boolean ExtendedData: TRUE to indicate that the ExtendedData attribute will be set with the value from the database; otherwise, it is not set. It defaults to FALSE.
Boolean Name: TRUE to indicate the node's pMultilingual will have the multilingual names for all enabled languages; otherwise,it just contains multilingual data for the requesting user's preference language. It defaults to FALSE.
Boolean Comment: TRUE to indicate the node's pMultilingual will have the multilingual comments for all enabled languages; otherwise, it just contains multilingual data for the requesting user's preference language. It defaults to FALSE.
Boolean ExternalData: TRUE to indicate the external data will be retrieved from the Content Server database; otherwise, returned nodes do not have meaningful values in the external data attributes. It defaults to FALSE.
A List containing the DAPINODE object handles if successful; Error otherwise. Note that an error will be returned if the length of the input dataIDs parameter is over 250.
/* Sample data in DTreeMultilingual
DataID LanguageCode Name DComment
5811 en_US root the one at the top of a tree
5811 fr racine un sommet particulier, nommé racine de l'arborescence àpartir duquel il
Sample data in DTreeCoreExternalData
DataID VersionNum ExternalCreateDate ExternalModifyDate ExternalCreatorID ExternalSourceID
5811 0 2020-01-07 15:53:21.500 2020-01-07 15:53:21.500 1
*/
Assoc extendedDefaultSettings
DAPINODE node
DAPISESSION dSession
Dynamic apiError
Dynamic result
List nodeList
Object prgCtx
RecArray multilingual
Record rec
String errMsg
List ids = { 5811 }
Boolean ok = TRUE
String userName = 'francais' // Supposing this user set French (fr) as his Preference Language and has read permission on 5811
Assoc checkVal = $lliapi.PrgSession.GetPrgCtx( userName )
if ( checkVal.ok )
prgCtx = checkVal.pSession dSession = prgCtx.DSession().fSession echo( "--- Example One (default settings): No external data and Multilingual data for user's preferred language only ---- " ) result = DAPI.GetNodesByIDs( dSession, ids ) if ( IsNotError( result ) ) PrintResult( result ) else ok = FALSE apiError = result errMsg = "Error in retrieving the list of objects" end
/* Output of Example One
16:14:11,650 INFO {5811} pExternalCreateDate=[?]
16:14:11,650 INFO {5811} Code=[fr] Name=[racine] DComment=[un sommet particulier, nommé racine de l'arborescence àpartir duquel il]
*/
echo( "--- Example Two: Request to get all multilingual names and external data ---- " ) extendedDefaultSettings = Assoc{ "Name": TRUE, "ExternalData": TRUE } result = DAPI.GetNodesByIDs( dSession, ids, extendedDefaultSettings ) if ( IsNotError( result ) ) PrintResult( result ) else ok = FALSE apiError = result errMsg = "Error in retrieving the list of objects" end
/* Output of Example Two
contains all external data
16:19:29,753 INFO {5811} pExternalCreateDate=[Tue Jan 07 15:53:21 2020]
contains all multilingual Names but does not have all multilingual comments.
16:19:29,753 INFO {5811} Code=[en_US] Name=[root] DComment=[?]
16:19:29,753 INFO {5811} Code=[fr] Name=[racine] DComment=[un sommet particulier, nommé racine de l'arborescence àpartir duquel il]
*/
else
ok = FALSE errMsg = checkVal.errMsg
end
if ( !ok )
Echo( errMsg )
end
function void PrintResult( List result )
DAPINode node RecArray multilingual Record rec for node in result Echo( Str.Format( '{%1} pExternalCreateDate=[%2]', node.pID, node.pExternalCreateDate ) ) multilingual = node.pMultilingual for rec in multilingual Echo( Str.Format( '{%1} Code=[%2] Name=[%3] DComment=[%4]', node.pID, rec.LanguageCode, rec.Name, rec.DComment ) ) end end
end
Returns a user attribute value for the specified node.
The DAPINODE object handle.
The name of the attribute.
An integer indicating the attribute type:
The default value is [[DAPI.ATTR_SET_ALL]] If it is not specified.
The value for the specific attribute if successful; Error otherwise.
Retrieves the original node referenced by the specified alias or generation node.
Note that the specified node is returned if the specified node is not an alias or a generation.
The DAPINODE object handle of the possible alias or generation node.
The DAPINODE object handle of the original node if successful; Error otherwise.
Retrieves the parent node of the specified node.
The DAPINODE object handle.
The DAPINODE object handle of the parent node if successful; Error otherwise. Note that it returns Error if the node is a root node.
Retrieves a recycled node based on its unique ID.
It is not necessary to specify the volume ID. Use the constant DAPI.BY_DATAID to fetch the node based on the unique node ID or simply specify the node ID in the second parameter. Note that this function can return a DAPINODE that does not exist when the "recycled" node has been actually purged. That can happen when the function is called on a deleted node of special node type that must be purged immediately.
The DAPISESSION object handle.
An Integer indicating the volume ID of the node or the unique node ID if the third parameter is not specified
An Integer identifying the node ID.
TRUE if all node attributes are fetched up front; FALSE otherwise. The default is TRUE.
The DAPINODE object handle of the retrieved node if successful; Error otherwise.
Retrieves a rendition of the specified version.
The DAPIVERSION object handle.
The type of the rendition.
The DAPIVERSION object handle of the retrieved rendition if successful; Error otherwise.
Returns the size of the specified rendition.
Note: While this may be more accurate than the DAPIVERSION.pFileDataSize feature, it also may take more time to calculate this size.
The DAPIVERSION object handle.
The type of the rendition.
The size, in bytes, of the rendition if successful; Error otherwise.
Retrieves the specified thumbnail of the version.
The DAPIVERSION object handle.
The type of the thumbnail.
The page number of the thumbnail.
The DAPIVERSION object handle of the retrieved rendition if successful; Error otherwise.
Retrieves a specific version of the specified node.
The DAPINODE object handle.
An Integer identifying which version to retrieve or the following constants:
The DAPIVERSION object handle of the retrieved version if successful; Error otherwise.
Retrieves a version based on its GUID.
The GUID of the version to be retrieved.
The DAPISESSION object handle.
The DAPIVERSION object handle of the retrieved node if successful; Error otherwise.
Retrieves a version based on its unique ID.
An integer indicating the version ID
The DAPISESSION object handle.
The DAPIVERSION object handle of the retrieved version if successful; Error otherwise.
Retrieves a version based on the unique version name of a node.
The DAPINODE object handle.
The unique name of the version.
The DAPIVERSION object handle of the retrieved version if successful; Error otherwise.
Returns a List of column names in the DVersData table.
The DAPISESSION object handle.
The type of columns whose names will be returned, which should be one of the following:
The List of column names if successful; Error otherwise.
Returns the size of the specified version.
Note: While this may be more accurate than the DAPIVERSION.pFileDataSize feature, it also may take more time to calculate this size.
The DAPIVERSION object handle.
The size, in bytes, of the version if successful; Error otherwise.
Returns a user attribute value for the specified version.
The DAPIVERSION object handle.
The name of the attribute.
The value for the specific attribute if successful; Error otherwise.
Returns true if the version has the thumbnail specified, else false.
The DAPIVERSION object handle of the version against which the check will be done.
The type of the thumbnail.
The page number of the thumbnail.
A Boolean value if successful; Error otherwise.
Checks if a node is a descendant of another.
This returns TRUE if node is a descendant of tree.
The DAPINODE object handle.
The DAPINODE object handle of the node which may be a parent of node.
A Boolean value if successful; Error otherwise.
Returns a List of all aliases of the specified node.
The DAPINODE object handle.
The permissions bit mask which is one or more node permission constants joined by bitwise OR operators.
A List containing the DAPINODE object handles if successful; Error otherwise.
Returns a RecArray containing information about all existing categories.
This retrieves all rows from the DCategories table.
The DAPISESSION object handle.
A RecArray if successful; Error otherwise.
Returns a RecArray containing information about attributes.
This retrieves rows from the DAttributes table.
The DAPISESSION object handle.
An optional String indicating a category association. If specified, information is only returned for attributes associated with the specified category. If not included, information is returned for all attributes.
A RecArray if successful; Error otherwise.
Returns a RecArray containing the child nodes of a specified node, in which each node is represented as a record.
The DAPISESSION object handle.
An Integer indicating the volume ID of the node.
An Integer identifying the node ID.
The name of the database table or database view to use.
An optional SQL clause to restrict the retrieval of the child nodes.
An optional permissions masks to restrict the retrieval of child nodes.
A RecArray, containing records of child nodes if successful; Error otherwise. The Record fields will vary depending upon the table and view name specified.
Returns a List of all generations of the specified node.
The DAPINODE object handle.
The permissions bit mask which is one or more node permission constants joined by bitwise OR operators.
A List containing the DAPINODE object handles if successful; Error otherwise.
Returns a List of all generations of the specified release or revision of a compound document.
The DAPINODE object handle.
An Integer indicating the major release number.
An Integer indicating the minor release number.
The permissions bit mask which is one or more node permission constants joined by bitwise OR operators.
A List containing the DAPINODE object handles if successful; Error otherwise.
Returns a List of all generations of the specified version.
The DAPIVERSION object handle.
The permissions bit mask which is one or more node permission constants joined by bitwise OR operators.
A List containing the DAPINODE object handles if successful; Error otherwise.
Returns a List of all renditions of the specified version.
The DAPIVERSION object handle.
A List containing the DAPIVERSION object handles if successful; Error otherwise.
Returns a List of the child nodes of a specified node.
The DAPINODE object handle.
An optional query String, phrased as the condition of a SQL clause, limiting which nodes are returned.
An optional String identifying a category. If present and defined, retrieval is restricted to include only those nodes whose category is this specific category value.
An optional String indicating an attribute query, phrased as the condition of a SQL clause, coupled with the category parameter, further restricting the retrieval to include only those nodes whose attributes contain a specific value.
TRUE if all node attributes are fetched up front; FALSE otherwise. FALSE is the default.
An optional permissions mask to restrict the retrieval by permission privileges.
A List containing the DAPINODE object handles if successful; Error otherwise.
Returns a List of all thumbnails of the specified version.
The DAPIVERSION object handle.
A List containing the DAPIVERSION object handles if successful; Error otherwise.
Returns a List of all versions of the specified node.
The DAPINODE object handle.
An Integer indicating how many versions to skip at the start of the result set. The default offset is 0.
A positive Integer between 1 and 1000 indicating the maximum number of versions to return. If an offset is specified, the default limit is 50; if no offset is specified, then all versions will be returned. If the specified limit is over 1000, it will automatically be set to 1000; if it is zero or below then it will be set to 50.
A List containing the DAPIVERSION object handles if successful; Error otherwise.
Locks the specified version.
The DAPIVERSION object handle.
An Integer indicating the type of lock. A standard value to use is DAPI.LOCK_VERSION.
DAPI.OK (Integer 0) if successful; Error otherwise.
Relocates the specified node and all its child nodes.
DAPI will issue a callback for each node it encounters by calling a script setup by DAPI.SetCallback().
The DAPINODE object handle of the node to be relocated.
The DAPINODE object handle of the node that will be the parent of the moved node.
An optional String indicating the new name for the moved node, or an Assoc containing multilingual names for the new node, keyed by language code.
TRUE if the moved node and its child nodes will inherit permissions from the parent node, otherwise the permissions of the moved node and its child nodes will remain unchanged.
DAPI.OK (Integer 0) if successful; Error otherwise.
Changes the data provider storage of the specified version. The metadata will be re-indexed. Does not update the modification date of the version or node.
The DAPIVERSION object handle.
The name of the provider.
The type of the provider move.
DAPI.OK (Integer 0) if successful; Error otherwise.
Returns the next available ordering position in a compound document.
The DAPINODE object handle.
The next available position (the maximum current child node position plus one) if successful; Error otherwise.
Returns the number of aliases of the specified node.
The DAPINODE object handle.
The number of aliases if successful; Error otherwise.
Returns the number of generations of the specified node.
The DAPINODE object handle.
The number of generations if successful; Error otherwise.
Returns the number of generations of the specified release or revision of a compound document.
The DAPINODE object handle.
the major release number.
the minor release number.
The number of generations if successful; Error otherwise.
Returns the number of generations of the specified version.
The DAPIVERSION object handle.
The number of generations if successful; Error otherwise.
Returns the number of rendition types associated with a specified version.
The DAPIVERSION object handle.
The number of rendition types if successful; Error otherwise.
Returns the number of child nodes of the specified node.
Note: this obtains the count by issuing a database query.
The DAPINODE object handle.
The number of child nodes if successful; Error otherwise.
Returns the number of thumbnails of the specified version.
The DAPIVERSION object handle.
The number of thumbnails if successful; Error otherwise.
Opens a stream for reading the contents of the specified version.
Important: DAPI.VerStreamClose() must be called after reading.
The DAPIVERSION object handle.
TRUE to read the resource fork of the version contents, false to read the data fork. The default is FALSE.
The DAPISTREAM object handle of the retrieved node if successful; Error otherwise.
Opens a stream for writing the contents of the specified version.
Important: DAPI.VerStreamClose() must be called after writing.
The DAPINODE object handle.
The newly allocated DAPIVERSION object handle. This allows file attributes to be pre-assigned to the version.
The total length of data, in Bytes, to be written.
The name of the provider. Defaults to the provider set by the DAPI.SetDefaultProvider if it is an empty string.
TRUE to read the resource fork of the version contents, false to read the data fork. The default is FALSE.
The DAPISTREAM object handle of the retrieved node if successful; Error otherwise.
Purges the specified node and its child nodes.
This will fail if the specified node (or any of its child nodes) are reserved, referenced by a generation, or contain locked versions.
DAPI will issue a callback for each node it encounters by calling a script setup by DAPI.SetCallback().
The DAPINODE object handle of the node to delete.
An optional flag for purge options. This flag can be joined by bitwise OR operators using the following constants:
DAPI.OK (Integer 0) if successful; Error otherwise.
Deletes one or more versions from the specified node.
Locked versions and versions that are referenced by generations are not included in the purging procedure.
The DAPINODE object handle.
The number of versions to be retained. Versions are deleted from oldest to most recent. Defaults to 1 if not specified.
DAPI.OK (Integer 0) if successful; Error otherwise.
Forces a retrieval of the most recent node information from the database.
The DAPINODE object handle.
DAPI.OK (Integer 0) if successful; Error otherwise.
Forces a retrieval of the most recent version information from the database.
The DAPIVERSION object handle.
DAPI.OK (Integer 0) if successful; Error otherwise.
Renames the specified node.
This is the only way to rename a node. Setting the pName and doing a DAPI.UpdateNode() will not work, nor will calling DAPI.SetMultilingualName() on a node that has already been created.
The DAPINODE object handle.
The new name for the node as a String, or a set of multilingual names for the new node as an Assoc, keyed by language code.
DAPI.OK (Integer 0) if successful; Error otherwise.
Reserves the specified node.
The DAPINODE object handle.
An Integer indicating the type of lock. The standard value is DAPI.RESERVE_NODE.
The user or group ID of the user or group for whom the node is being reserved. The default is the current user if unspecified.
DAPI.OK (Integer 0) if successful; Error otherwise.
Establishes a callback script for node events.
The events include copying, moving, and deleting nodes.
The DAPISESSION object handle.
The script to run when node events occur.
The object containing the script feature.
DAPI.OK (Integer 0) if successful; Error otherwise.
Sets a default provider to use during a session.
Most functions accepting the provider parameter will default to this provider. The default is the 'SQL' provider if unspecified.
The DAPISESSION object handle.
The name of the provider name.
DAPI.OK (Integer 0) if successful; Error otherwise.
Sets the comment for a DAPINODE in the specified language.
NOTE: This is an in-memory set only. Changes will not be saved to the database until DAPI.UpdateNode() is called.
The DAPINODE object handle.
The language code for the comment.
The new comment for the node.
DAPI.OK (Integer 0) if successful; Error otherwise.
Sets the name for a DAPINODE in the specified language.
This method cannot be called after a node has been created. To change a node's name after creation, use DAPI.RenameNode().
NOTE: This is an in-memory set only. Changes will not be saved to the database until DAPI.CreateNode() is called.
The DAPINODE object handle.
The language code for the name.
The new name for the node.
DAPI.OK (Integer 0) if successful; Error otherwise.
Assigns a value to the specified user attribute of the specified node.
Call DAPI.UpdateNode() after this function to save the changes to the database.
The DAPINODE object handle.
The name of the attribute.
The value to be assigned to the specified attribute.
An integer indicating the attribute type:
The default value is DAPI.ATTR_SET_ALL if unspecified.
DAPI.OK (Integer 0) if successful; Error otherwise.
Sets purge flag to true.
Always True. Thus, there is no need to check the return value.
Set the mode used to fetch version data. The standard fetch mode DAPI.FETCHMODE_STANDARD is used unless otherwise set.
The DAPIVERSION object handle.
The fetch mode:
DAPI.OK (Integer 0) if successful; Error otherwise.
Assigns a value to the specified user attribute of the specified version.
Call DAPI.UpdateVersion() after this function to save the changes to the database.
The DAPIVERSION object handle.
The name of the attribute.
The value to be assigned to the specified attribute.
DAPI.OK (Integer 0) if successful; Error otherwise.
Unlocks the specified version.
The DAPIVERSION object handle.
DAPI.OK (Integer 0) if successful; Error otherwise.
Unreserves the specified node.
The DAPINODE object handle.
DAPI.OK (Integer 0) if successful; Error otherwise.
Updates the child count of the specified node, incrementing by a specified amount.
This will set the modification date of the node to the current date and time, and will optionally trigger a notification event.
Node to be updated.
Number to add to the current child count.
Indicates whether a notification event should be created. Defaults to FALSE.
DAPI.OK (Integer 0) if successful; Error otherwise.
Updates modified node attributes of the specified node. The changeModifyDate parameter defaults to TRUE which triggers an NType = 7 (Update) insert into DTreeNotify. If FALSE, the node's ModifyDate is not updated and no row is inserted into DTreeNotify.
The DAPINODE object handle.
FALSE to indicate that the ModifyDate will not be changed. Defaults to TRUE.
DAPI.OK (Integer 0) if successful; Error otherwise.
Updates the user or group access right of the specified node.
The DAPINODE object handle.
The user or group ID.
The permissions bit mask which is one or more node permission constants joined by bitwise OR operators.
DAPI.OK (Integer 0) if successful; Error otherwise.
Updates modified version attributes for the specified version.
Note that the 3 version attributes, DAPIVersion.pID (VersionID), DAPIVersion.pNodeID (DocID), and DAPIVersion.pNumber (Version), are ignored by this function and cannot be updated for data integrity reason.
The DAPIVERSION object handle.
DAPI.OK (Integer 0) if successful; Error otherwise.
Updates a category.
This updates a row of the DCategories table. The function fails if the specified category name does not exist.
The DAPISESSION object handle.
A category record. The columns must compatible with those in the DCategories table.
DAPI.OK (Integer 0) if successful; Error otherwise.
Updates an attribute.
This updates a row of the DAttributes table. The function fails if the specified attribute name does not exist.
The DAPISESSION object handle.
An attribute record. The columns must compatible with those in the DAttributes table.
DAPI.OK (Integer 0) if successful; Error otherwise.
Determines whether the specified version's blob content has been loaded.
The DAPIVERSION object handle.
TRUE if the version's content has been loaded, FALSE if it has not been loaded, or an Error if there was a problem determining fetchability.
Closes the specified open stream for reading or writing.
An opened DAPISTREAM must be closed when no longer in use.
The DAPIVERSION object handle.
The DAPISTREAM object handle.
DAPI.OK (Integer 0) if successful; Error otherwise.
Returns the length of an opened version stream.
The DAPISTREAM object handle.
The length of the opened version stream if successful; Error otherwise.
Reads a portion of data from an opened version stream.
The stream must be previously opened for reading using DAPI.OpenReadVerStream().
The DAPISTREAM object handle.
The length of data, in Bytes, to read.
A Bytes value containing the read data if successful; Error otherwise.
Writes a portion of data to an opened version stream.
The stream must be previously opened for writing using DAPI.OpenWriteVerStream().
The DAPISTREAM object handle.
A Bytes value containing the data to be written to the version.
Number of bytes written, if successful; Error otherwise.
Copyright © 2021 OpenText Corporation. All rights reserved. |