API Reference
API
Each script in XDM has access to the api variable.
This variable provides access to most of the XDM objects.
In Scripts, you can find all variables available in the different scripts.
The api variable has the following attributes to access the respective object list.
Each attribute is a list of objects of the respective type.
The type is indicated by the column Element type.
The api only returns these objects on which the current user has READ access.
|
Variable |
Element type |
Description |
|---|---|---|
announcements |
Access to the list of defined announcements. |
|
applicationModels |
Access to the list of defined application models. |
|
classificationTerms |
Access to the list of all defined classification terms. |
|
connections |
This variable contains a list of all connections. The list does not differentiate between the connection type. The connection type is part of each connection entry. |
|
credentials |
This list contains all defined credentials. |
|
customParameters |
This list contains all defined custom parameters. |
|
dataShops |
Contains the list of all defined data shops. |
|
environments |
Contains a list of all defined environments. |
|
files |
Contains a list of all defined XDM files. |
|
hooks |
Contains a list of all defined task stage hooks. |
|
mappingTableContainers |
Contains a list of all defined mapping table container. |
|
matchers |
Contains a list of all defined matcher objects. |
|
modificationMethods |
Contains a list of all defined modification methods. |
|
modificationSets |
Contains a list of all defined modification sets. |
|
permissionRecipients |
Contains a list of all defined permission recipients. |
|
storageLocations |
Contains a list of all defined storage locations. |
|
tags |
Contains a list of all defined tags. |
|
taskStageHooks |
Contains a list of all defined task stage hooks. |
|
taskTemplates |
Row Level Processing Table Copy - Compatibility Table To Icebox - Compatibility Table From Icebox Analyze - Structure Compare With Icebox Generation |
Contains a list of all defined task template. The task template type is indicated by the task type field of each individual entry. |
workflowTemplates |
Contains a list of all defined workflow templates. |
MetaMap
A map that contains the meta information for each data shop form parameter. It is available only in dataShop scripts. In Scripts, you can find all variables available in the different scripts. The form parameters are stored in the map by the name of the mapped property. The following properties are available by field:
Field |
Type |
Updatable |
Description |
|---|---|---|---|
description |
String |
Yes |
The description of the form parameter. |
displayName |
String |
Yes |
The display name of the form parameter. |
error |
String |
Yes |
An error message that can be set if the input value of the form parameter is invalid. |
field |
String |
No |
The name of the mapped property of the form parameter. |
options |
List |
Yes |
The list of possible values. Each entry of the list has the attribute |
required |
Boolean |
Yes |
A flag that controls whether a value must be specified for the parameter or whether the parameter value can be empty. |
updatable |
Boolean |
Yes |
A flag that controls if the field is editable or not. If the field is not editable the user cannot change the value of the field. |
visible |
Boolean |
Yes |
A flag that controls whether the form parameter is displayed on the form is not. |
User
The variable of type user contains information about the current user that performs an action. In Modification Methods, Task Stage Hooks, and Workflows there are two different users available. The variable startedBy contains the user who executes an execution and the variable requestedBy contains the user who requested the execution. In all other cases the user is available in variable user. In Scripts, you can find all variables available in the different scripts. The user object contains the following fields:
Field |
Type |
Description |
|---|---|---|
active |
Boolean |
This flag indicates whether the user is active or inactive. Inactive users are typically disabled by an administrator and are not allowed to log into the XDM user interface. |
admin |
Boolean |
This flag indicates whether the user is in one of the defined administration roles and has administration permissions. |
authorities |
List |
The list of roles in which the user is a member of. These roles are provided by the used authorization provide like LDAP, OpenID. |
String |
This field stores the user’s email address. The email address is only available if the underlying authentication provider, such as LDAP or OpenID, makes the email address available to XDM during the login process. |
|
name |
String |
This field stores the full name of the user. It contains the first and last name of the user. It is only available if the underlying authentication provider, such as LDAP or OpenID, makes the full name available to XDM during the login process. |
purchaser |
Boolean |
This flag indicates if the user is a member of the purchaser role. |
userName |
String |
The technical user ID of the current user. This is the user ID used to log in at the XDM user interface. |
Execution
The execution object is typically used in workflow templates. It contains all runtime and status information for a run, including the current execution state, time information, progress data, user and context information. The execution object is commonly used in workflows, tasks, task stage hooks, or other scripts to access and react to the lifecycle of a run. Typical use cases include checking the current status, reading start and end timestamps, determining which user initiated or requested the run, and retrieving the corresponding task execution IDs.
Field |
Type |
Description |
|---|---|---|
taskExecutionId |
Number |
The parent execution ID of the currently running execution. This represents the execution ID of a Workflow. |
executableId |
Number |
The internal ID of the task execution object. |
executableName |
String |
Name of the executed Task or Workflow. |
parentName |
String |
Name of the parent object (Workflow Template and Task Template name). |
status |
Enum |
Current status of the execution (RUNNING, COMPLETED, ERROR etc.).. |
currentProgress |
Number |
Current progress of the execution in percent. |
currentProgressMessage |
String |
Text message describing the current progress (used in the UI and logs). |
canceledBy |
String |
Reference to the user or process that canceled the execution. Null if the execution was not canceled. |
exitCode |
Number |
A numeric exit code that indicates whether the execution was successful or not. A value of zero indicates a successful execution. This field is null while the execution is still running. |
exitMessage |
String |
Final status or error message of the execution. |
workingDirectorySize |
Number |
Size of this execution’s working directory on the file system. |
requestedBy |
String |
Identifier of the original requester (for example a REST caller). Null if no requester is set. |
startTime |
Timestamp |
Timestamp when the execution was started. |
lastHeartBeat |
Timestamp |
Timestamp of the last heartbeat of the running process. Useful to detect hanging executions. |
endTime |
Timestamp |
Timestamp when the execution finished. This field is null while the execution is still running. |
duration |
Number |
Elapsed runtime of the execution. For running executions this is often 0 or increasing over time; for finished executions it contains the total duration. |
startedBy |
String |
Internal reference to the user or principal that started the execution. |