Skip to main content
Version: v5.0

Types

Agent#

Represents a Agent

Type: Object

PropertyTypeDescription
_idStringThe id of the agent resource
_namespacesArray<String>Required, The namespace(s) of the resource.
_nameStringRequired, The agent name
_descriptionStringAgent's description
_backgroundStringRequired, The context for the agent
_userTypeStringRequired, unique identifier of the agent
_typeStringThe type of the agent, The backend will assign the value for this
_agentClassStringThe class name of the custom agent if it is implemented.
_configAgentConfigRequired, defines the llm model.

AgentCriteria#

Agent criteria

Type: Object

PropertyTypeDescription
_userTypeStringFilter by _userType field
_typeStringThe valid values are user_agent or system_agent
queryStringWild card search that operates on the name, description and background, for example, ?query=anamoly

AisvcOptions#

Use to set response options for AiSvc requests.

Type: Object

PropertyTypeDescription
_offsetNumberSets the number of results to skip in the Page response. For example, set to to skip the first 10 results.
_pageSizeNumberSets the number of results to return per Page in the response

Application#

The Application type defines an application.

Type: Object

PropertyTypeDescription
_idStringApplication UUID
_nameStringrequired, Application name
_descriptionStringApplication description
_appOwnerStringrequired, Application owner
_namespacesArray<String>Namespaces that the application pertains to
_redirecUrisStringrequired, Comma separated string with redirect URIs to receive the access_token after a successful authentication.
_authorizedOriginsStringComma separated string with the authorized origin restriction. Authentication from any other origins will be restricted.
_homeStringApplication home page URL
_orgIdStringrequired, Organization Id
_whitelistedAppsArray<String>An array of app ids for the Applications that can access resources in this app.
_loginThemeStringoptional, Login Theme supported by the platform

Chat#

Represents a chat entry in a conversation.

Type: Object

PropertyTypeDescription
_idStringThe chat entry id.
_conversationIdStringThe conversation id this chat belongs to.
_promptanyThe prompt input for this chat entry.
_llmResponseanyThe LLM response for this prompt.
_durationnumberDuration of LLM processing.
_embeddingArray<number>Embedding vector for chat.
_statusnumberStatus code of chat entry.
_summaryanySummary of the chat response.
_metadataAuditableDTOMetadata containing creation and update info.
_teamIdStringThe team id associated with the conversation.

Conversation#

Represents a conversation resource.

Type: Object

PropertyTypeDescription
_idStringThe conversation id.
_namespacesArray<String>Namespaces associated with the conversation.
_titleStringThe title of the conversation.
_userIdStringThe user id who created the conversation.
_statusnumberStatus of the conversation.
_embeddingModelStringThe embedding model used.
_metadataObjectMetadata including timestamps and user info.
_chatsArray<Chat>Array of chat entries.

ConversationCreateRequest#

Request to create a new conversation or continue an existing one.

Type: Object

PropertyTypeDescription
_inputConversationInputInput message for the conversation.
_teamIdStringThe team id for the conversation.
_idString(Optional) Conversation id to continue an existing conversation.

ConversationInput#

Represents the input for a conversation message.

Type: Object

PropertyTypeDescription
messageStringThe message content.

ConversationOptions#

Options for retrieving a conversation.

Type: Object

PropertyTypeDescription
getChatsbooleanWhether to include chat messages in the response.
firstNnumberNumber of first chats to retrieve.
lastNnumberNumber of last chats to retrieve.
offsetnumberOffset of chats to retrieve.
textToMatchstringText to match in chats.

CreatePermissionsResponse#

The response object when you create a Permission

Type: Object

PropertyTypeDescription
_successArray<Permission>An array of the successfully created permissions
_failuresArray<Permission>An array of the failed permissions and the reason for failure

Ctx#

Use a Ctx object to maintain project or session context.

Type: Object

PropertyTypeDescription
noAuthbooleanEnter if no authentication is required
authTokenStringUse to store an authentication token, if required
_namespacesArray<String>Stores namespaces when nsfilter is used
storageJSONSession storage

File#

Data type for a source file in the File Service.

Type: Object

PropertyTypeDescription
_idStringThe File's database id
_nameStringThe file name
_tipIdStringLatest version id
_tipVersionNumberLatest version number
_nextVersionNumberNext version number
_typeStringEither "file" or "dir"
_irnStringPlatform resource name with pattern as filesvc:file:<_id>
_namespacesArrayList of namespaces that the UserGroup has access to
_tagsArrayAdd custom tags to the File
_fileVersionFileVersionVersion details
_uploadMetaUploadMetaUpload metadata if the file is uploaded as a resumable file upload
_urlStringFile download URL that lasts 48 hours. Only appears as part of a request specific to get the download URL, such as GET /files/:id/url api response or IafFileSvc.getFileUrl().

FileContainer#

Type: NamedFileCollection

PropertyTypeDescription
_versionFileContainerVersionversion

FileContainerVersion#

Type: NamedFileCollectionVersion

PropertyTypeDescription
_userAttributesJSONit contains 'path' refers to file container(folder) path, '/' for root container

FileCriteria#

Criteria to target a source file in the File Service.

Type: Object

PropertyTypeDescription
_namespaces(Array<String> | String)Namespaces to filter. Please note that these namespaces must be present in nsfilter. If its not provided get files from all the namespaces in the nsfilter
_parentsStringFolder id to filter. Without an id, the request considers files from all folders. Use 'root' to filter by a root folder.
_idsStringA comma separted string of file ids to search.
_tags(Array<String> | String)A tag or array of tags to filter by. It supports both regex and exact match
_nameStringFilter by file name. Supports regex.
Examples
// Get all the files from all the folders from namespaces in the ctx let criteria = {} let files = IafFileSvc.getFiles(criteria, ctx);
// Get all files from root folder let criteria = {"_parents": "root"} let res = await IafFileSvc.getFiles(criteria, ctx);
// Get all files from specific folder let criteria = {"_parents": "5a25417d-1408-42d4-b9a2-812be53bb111"} let res = await IafFileSvc.getFiles(criteria, ctx);
// Get all files by ids let criteria = {"_ids": "5a25417d-1408-42d4-b9a2-812be53bb111,f3dc8288-39f1-4d7c-9b4b-51fe364db874,bf03bc5f-bfe4-40f4-91fd-5ece6effbe99"} let res = await IafFileSvc.getFiles(criteria, ctx);
//Get All bimpk files let criteria = {"_name":".*bimpk"} let res = await IafFileSvc.getFiles(criteria, ctx);

FileHeaders#

These headers will be applied to the HTTP response during download if they were specified during upload.

Type: Object

PropertyTypeDescription
nullString"content-type" - Mime type of the file, Ex: image/png, application/pdf or image/svg+xml
nullString"content-encoding" - Content encoding type. Ex: gzip

FileItem#

An object that represents a source file with user-created properties that can be related to NamedUserCollection types and other RelatedItem types.

Type: RelatedItem

PropertyTypeDescription
_fileIdStringRefers to the source file's id in File Service
_fileVersionIdStringRefers to the source file version's id in File Service

FilePreviewOptions#

Options for displaying a preview. Currently it is only available for images and it is generated 640x480 dimension only.

Type: Object

PropertyTypeDescription
widthNumberPreview image width.
heightNumberPreview image height

FileVersion#

A version of a source file

Type: Object

PropertyTypeDescription
_idStringThe FileVersion's id
_versionNumberThe version number
_fileSizeNumberThe file's memory size
_fileIdStringId reference of the source file
_urlStringFile download URL that lasts 48 hours. Only appears as part of a request specific to get the download ULR, such as GET /files/:id/versions/:versionId/url api response or IafFileSvc.getFileVersionUrl().

GeometryView#

Use the GeometryView type to define a geometry view.

Type: Object

PropertyTypeDescription
indexNumberEnter the index of your view to identify it in an array of views from a model
labelStringView title
valueStringFile id that represents the view

IafActionDescriptor#

Type: Object

PropertyTypeDescription
actionsArray<String>
descJSONcriteria with key value pair

IafPermissionDescriptor#

It defines permissions for various resources. It usually helps to define permissions for a user group in a project while creating the user group.

Type: Object

PropertyTypeDescription
accessAllbooleanProvide all actions to all the resources for a given namespace. If it's true then all other resources defined below will be ignored.
workspacesArray<IafActionDescriptor>
namedUserItemsArray<IafActionDescriptor>
namedUserCollsArray<IafActionDescriptor>
filesArray<IafActionDescriptor>
scriptsArray<IafActionDescriptor>
userConfigsArray<IafActionDescriptor>
permissionProfilesArray<IafActionDescriptor>
apiconfigdefsArray<IafActionDescriptor>
orchestratorArray<IafActionDescriptor>
telemetryconfigsArray<IafActionDescriptor>
usergroupsArray<IafActionDescriptor>Define allowed permission actions for a user group on the same user group. For example, if the permissions are given as ["READ", "EDIT"], the members of the user group can read and edit the user group.

Index#

Type: Object

PropertyTypeDescription
keyJSONProperties to index
optionsJSONPass your index options

Invite#

Use the Invite type to define a user invite to a project or user group.

Type: Object

PropertyTypeDescription
_idStringInvite UUID
_emailStringEmail address to send the invite to
_expireTimeNumberThe system generates a expiry time for the invite, which is seven days from the invite creation.
_userExistsbooleanThe system determines if the user's email address is registered or not.

InviteCriteria#

Find Invites by criteria

Type: Object

PropertyTypeDescription
_statusArray<String>Filter invites by the statuses you pass in the array

InviteOptions#

Use the InviteOptions type to add response options for Invite queries.

Type: Object

PropertyTypeDescription
_offsetNumberSets the number of results to skip in the Page response. For example, set to to skip the first 10 results.
_pageSizeNumberSets the number of results to return per Page in the response
includeAllbooleanSet to true to include all the invites instead of particular page

InviteParams#

Type: Object

PropertyTypeDescription
invite_linkStringinvite link which user will be clicked in the email, invite id would be appended by the system
typeStringtype of invite(Ex: Project)
nameStringname of the invite (Ex: Project name)
inviter_nameStringinviter's name

ItemsvcOptions#

Use to set response options for Item Service requests.

Type: Object

PropertyTypeDescription
transactionalbooleanSet to true to make POST, PUT or DELETE requests transactional.

KnowledgeBase#

Represents a KnowledgeBase resource.

Type: Object

PropertyTypeDescription
_idStringThe id of the knowledge base resource.
_nameStringName of the knowledge base.
_fileIdStringSource file id stored in file service.
_fileVersionIdStringVersion id of the file.
_vectorizedStatusStringVectorization status, e.g., VECTORIZED or PENDING.
_userTypeStringUser type identifier for knowledge base.
_namespacesArray<String>Namespaces associated with the knowledge base.
_irnStringInternal resource name.
_metadataObjectMetadata containing createdAt, updatedAt, createdById, updatedById.

KnowledgeBaseCriteria#

Criteria for filtering KnowledgeBase resources.

Type: Object

PropertyTypeDescription
_idStringFilter by id.
_nameStringFilter by name.
_userTypeStringFilter by user type.
_vectorizedStatusStringFilter by vectorization status.
queryStringWildcard search against name

NamedFileCollection#

A user-created FileItem collection. The NamedFileCollection class is a subclass of the NamedUserCollection class and inherits its properties and the properties the NamedUserCollection class itself inherits.

Type: NamedUserCollection

PropertyTypeDescription
_versionNamedFileCollectionVersionA given version of the NamedFileCollection.

NamedFileCollectionVersion#

Type: NamedUserCollectionVersion

NamedUserCollection#

A user-created RelatedItem collection. The NamedUserCollection class is a subclass of the NamedUserItem class and inherits its properties.

Type: NamedUserItem

PropertyTypeDescription
_versionNamedUserCollectionVersionA given version of the NamedUserCollection.
_encryptionEnabledBooleanEnables encryption for the NamedUserCollection. If set to True then any related items prefixed with a . will be encrypted.

NamedUserCollectionVersion#

Type: NamedUserItemVersion

NamedUserItem#

The foundational item type in the platform. All NamedUserItem subclasses, such as NamedUserCollection subclasses as well as UserConfig and Script subclasses inherit the properties of this class.

Type: Object

PropertyTypeDescription
_idStringThe NamedUserItem's database id
_nameStringA readable, long-form name
_descriptionStringA string that describes the purpose of the NamedUserItem class instance
_shortNameStringShorter abbreviation of the NamedUserItem name that is used for reference
_userTypeStringA user-given name to identify a NamedUserItem. This userType is helpful for queries to find a unique item with a unique userType or NamedUserItems that share a userType.
_userItemIdStringA unique id value generated by the Item Service.
_versionNamedUserItemVersionContain's version data

NamedUserItemCriteria#

Query criteria you can pass in Item Service platform APIs to target specific NamedUserItem classes based on your query.

Type: Object

PropertyTypeDescription
queryJSONPass a simple query object. For more information, see the following examples.
Examples
// simple filter exampleslet query = {"_usertype": "project_setup","_name": "projectSetup"}let query = {"_id": {"$in": ["5c9328e8b834740001cd95d4","5c9328e8b834740001cd95d4"]}}
// Complex querylet query = { "$and": [   {      "_userType": "file_container",     "_name": "Root Container"   } ], "$or": [   {     "_tipVersion": 1   },   {     "_id": {       "$in": ["5c9328e8b834740001cd95d4","5d31574411efe92d8832c21c"]     }   } ]}
// Query with versionlet query = {  "$and": [    {      "_userType": "platform_setup_script",      "_name": "setup_script"    }  ],  "$or": [    {      "_versions._userAttributes.key": "value"    },    {      "_id": {         "$in": ["5c9328e8b834740001cd95d4", "5d31574411efe92d8832c21c"]      }    }  ]}
// Query with all versionslet query = {  "$and": [    {       "_name": "setup_script",       "_userType":"platform_setup_script"    }  ],  "$or": [    {       "_versions._userAttributes.key": "version2Value"    },    {      "_versions._userAttributes.config": {        "$in":["value1","value2"]      }    }  ],   "_versions.all": true}

NamedUserItemCriteriaOptions#

Define response options for NamedUserItems with Item Service platform APIs.

Type: Object

PropertyTypeDescription
projectJSONPass an object that contains one or more projection criteria specifiers.
sortJSONPass an object that contains one or more sort criteria specifiers. Set a property to 1 to sort ascending and -1 to sort descending.
pagePageRequestPass an object that contains one or more pagination options.
pagedResbooleanSet to true to get a Page class result rather than an array, which is the default. The default page size is 200, which is also the maximum.
Examples
// Simple optionslet options = {  "project":{ "_userType": 1, "_itemClass": 1},  "sort": { "_name": 1 },   "page": { "_offset": 10, "_pageSize": 20 }}
// with versionslet options = { "project": { "_userType": 1, _versions._userAttributes.classification_system_name: 1 }, "sort": { "_name": 1},  "page": { "_offset": 10, "_pageSize": 20} }

NamedUserItemVersion#

Represents a version of a given NamedUserItem, contained in the NamedUserItem's _version array.

Type: Object

PropertyTypeDescription
_idStringThe NamedUserItemVersion's database id
_userAttributesJSONAdd custom key-value pairs. Add the attribute name to the key, for example, _userAttributes.<attribute_name>: <attribute_value>
_versionNumberThe version number, which is generated and not editable
_userItemIdStringRefers to the _userItemId value in the parent NamedUserItem
_itemClassStringRefers to the _itemClass value in the parent NamedUserItem
_userItemDbIdStringRefers to the _id value in the parent NamedUserItem

NamedUserItemVersionCloneOptions#

When you clone NamedUserCollections, pass a NamedUserItemVersionCloneOptions object to define if you also want to clone the NamedUserCollections's relationships and inverse relationships.

Type: Object

PropertyTypeDescription
relationshipsbooleanFor NamedUserCollections, set to true to also clone the NamedUserCollection's relationships
inverseRelationshipsbooleanFor NamedUserCollections, set to true to also clone the NamedUserCollection's inverse relationships

NamedUserItemVersionCriteria#

Query criteria you can pass in Item Service platform APIs to target specific NamedUserItemVersion classes based on your query.

Type: Object

PropertyTypeDescription
queryJSONPass a simple query
Examples
// simple filter exampleslet query = { "_userAttributes.fileId": "4e2b9de5-9a73-44f9-8153-bc0904b694c5" }let query = { "_id": {"$in": ["5c9328e8b834740001cd95d4","5c9328e8b834740001cd95d4"]}}
// complex querylet query = {   "$and": [    {       "_userAttributes.fileId" :"4e2b9de5-9a73-44f9-8153-bc0904b694c5",      "_userAttributes.name": "Sample"    }  ],  "$or": [    {       "_id": {         "$in": [ "5c9328e8b834740001cd95d4","5d31574411efe92d8832c21c" ]      }    }  ]}

NotificationDevice#

Represents a notification device

Type: Object

PropertyTypeDescription
_idStringThe id of the resource
_ownerNotificationOwnerThe owner of the device
_createdAtDateThe timestamp for resource creation
_updatedAtDateThe timestamp for resource modification
_versionNumberThe current version of the resource (used for optimistic concurrency)
_transportNotificationTransportThe notification transport type for this device
_emailNotificationDeviceEmailConfiguration for an email device
_statusNotificationDeviceStatusCurrent status of the device

NotificationDeviceEmail#

Represents a notification email device configuration

Type: Object

PropertyTypeDescription
_addressStringEmail address

NotificationDeviceQuery#

Represents a notification group query

Type: Object

PropertyTypeDescription
idsArray<String>The ids to match
ownerNotificationOwnerQueryThe owner to match

NotificationDeviceStatus#

Represents a notification sender redirect

Type: (UNKNOWN: StringLiteralType | UNKNOWN: StringLiteralType)

NotificationGroup#

Represents a notification group

Type: Object

PropertyTypeDescription
_idStringThe id of the resource
_namespacesArray<String>The namespace(s) of the resource.
_createdAtDateThe timestamp for resource creation
_updatedAtDateThe timestamp for resource modification
_versionNumberThe current version of the resource (used for optimistic concurrency)
_nameStringThe resource name
_descriptionStringThe resource description

NotificationGroupQuery#

Represents a notification group query

Type: Object

PropertyTypeDescription
idsArray<String>The ids to match
namespacesArray<String>The namespace(s) to match
nameStringThe names to match

NotificationNotification#

Represents a notification (i.e. sent history)

Type: Object

PropertyTypeDescription
_idStringThe id of the resource
_namespacesArray<String>The namespace(s) of the resource.
_ownerNotificationOwnerThe owner of the resource
_createdAtDateThe timestamp for resource creation
_updatedAtDateThe timestamp for resource modification
_versionNumberThe current version of the resource (used for optimistic concurrency)
_templateNotificationTemplateThe template used to generate this notification
_triggerNotificationTriggerThe trigger that caused this notification
_senderNotificationSenderThe sender that sent this notification
_subscriptionNotificationSubscriptionThe subscription that caused this notification
_transportNotificationTransportThe transport type
_emailNotificationTemplateEmailThe email notification body (if transport type is email)

NotificationNotificationQuery#

Represents a notification query

Type: Object

PropertyTypeDescription
idsArray<String>The ids to match
namespacesArray<String>The namespace(s) to match
ownerNotificationOwnerQueryThe owner to match
nameStringThe names to match

NotificationOwner#

Represents a notification device owner

Type: Object

PropertyTypeDescription
_irnStringOwner IRN

NotificationOwnerQuery#

Represents a notification device owner

Type: Object

PropertyTypeDescription
irnStringOwner IRN

NotificationScript#

Represents a notification script

Type: Object

PropertyTypeDescription
_idStringThe id of the script to execute.

NotificationSender#

Represents a sender

Type: Object

PropertyTypeDescription
_idStringThe id of the resource
_namespacesArray<String>The namespace(s) of the resource.
_createdAtDateThe timestamp for resource creation
_updatedAtDateThe timestamp for resource modification
_versionNumberThe current version of the resource (used for optimistic concurrency)
_nameStringThe resource name
_descriptionStringThe resource description
_transportNotificationTransportThe notification transport type for this sender
_emailNotificationSenderEmailEmail sender configuration
_templatesMap<NotificationSenderActionNotificationTemplate>Templates to use for each pre-defined sender action
_redirectsMap<NotificationSenderRedirectString>Redirect URLs for each pre-defined sender redirect step

NotificationSenderAction#

Represents a notification sender action

Type: UNKNOWN: StringLiteralType

NotificationSenderEmail#

Represents a notification email sender configuration

Type: Object

PropertyTypeDescription
_addressStringThe sender address
_displayNameStringThe sender displayName

NotificationSenderQuery#

Represents a notification group query

Type: Object

PropertyTypeDescription
idsArray<String>The ids to match
namespacesArray<String>The namespace(s) to match
nameStringThe names to match

NotificationSenderRedirect#

Represents a notification sender redirect

Type: (UNKNOWN: StringLiteralType | UNKNOWN: StringLiteralType | UNKNOWN: StringLiteralType | UNKNOWN: StringLiteralType | UNKNOWN: StringLiteralType | UNKNOWN: StringLiteralType)

NotificationSubscription#

Represents a notification subscription

Type: Object

PropertyTypeDescription
_idStringThe id of the resource
_namespacesArray<String>The namespace(s) of the resource.
_groupNotificationGroupThe group to subscribe to
_deviceNotificationDeviceThe device to subscribe with
_statusNotificationSubscriptionStatusCurrent status of the subscription
_versionNumberThe current version of the resource (used for optimistic concurrency)
_requestedAtDateThe last time an attempt was made to confirm the subscriber
_acceptedAtDateThe last time the subscription was accepted
_cancelledAtDateThe last time the subscription was cancelled

NotificationSubscriptionQuery#

Represents a notification group query

Type: Object

PropertyTypeDescription
idsArray<String>The ids to match
namespacesArray<String>The namespace(s) to match
nameStringThe names to match

NotificationSubscriptionStatus#

Represents a notification sender redirect

Type: (UNKNOWN: StringLiteralType | UNKNOWN: StringLiteralType | UNKNOWN: StringLiteralType | UNKNOWN: StringLiteralType)

NotificationSvcCreateOptions#

Represents a notification-service specific create options

Type: Object

NotificationSvcDeleteOptions#

Represents a notification-service specific create options

Type: Object

PropertyTypeDescription
versionNumberOptimistic concurrency version

NotificationSvcGetOptions#

Represents a notification-service specific create options

Type: Object

NotificationSvcListOptions#

Represents a notification-service specific create options

Type: Object

PropertyTypeDescription
_offsetNumberSets the number of results to skip in the Page response. For example, set to to skip the first 10 results.
_pageSizeNumberSets the number of results to return per Page in the response

NotificationSvcUpdateOptions#

Represents a notification-service specific create options

Type: Object

PropertyTypeDescription
versionNumberOptimistic concurrency version

NotificationTemplate#

Represents a notification template

Type: Object

PropertyTypeDescription
_idStringThe id of the resource
_namespacesArray<String>The namespace(s) of the resource.
_createdAtDateThe timestamp for resource creation
_updatedAtDateThe timestamp for resource modification
_versionNumberThe current version of the resource (used for optimistic concurrency)
_nameStringThe resource name
_descriptionStringThe resource description
_transportNotificationTransportThe notification transport type for this template
_emailNotificationTemplateEmailConfiguration for an email template
_formatNotificationTemplateFormatThe format used to write the template

NotificationTemplateEmail#

Represents a notification email template configuration

Type: Object

PropertyTypeDescription
_subjectStringTemplate for the subject
_bodyStringTemplate for the body

NotificationTemplateFormat#

Represents a notification template format

Type: UNKNOWN: StringLiteralType

NotificationTemplateQuery#

Represents a notification group query

Type: Object

PropertyTypeDescription
idsArray<String>The ids to match
namespacesArray<String>The namespace(s) to match
nameStringThe names to match

NotificationTransport#

Represents a notification transport type

Type: (UNKNOWN: StringLiteralType | UNKNOWN: StringLiteralType | UNKNOWN: StringLiteralType | UNKNOWN: StringLiteralType)

NotificationTriggerEvent#

Represents a notification event trigger configuration

Type: Object

PropertyTypeDescription
_filtersMap<StringString>Trigger body filters (see extended description)

NotificationTriggerQuery#

Represents a notification trigger query

Type: Object

PropertyTypeDescription
idsArray<String>The ids to match
namespacesArray<String>The namespace(s) to match
nameStringThe names to match

NotificationTriggerType#

Represents a notification trigger type

Type: UNKNOWN: StringLiteralType

Options#

Use the Options type to add pagination options to your API response.

Type: Object

PropertyTypeDescription
_offsetNumberSets the number of results to skip in the Page response. For example, set to to skip the first 10 results.
_pageSizeNumberSets the number of results to return per Page in the response

Page#

The object class returned in a response that describes the response's pagination options, response items total count, and the reponse items themselves.

Type: Object

PropertyTypeDescription
_pageSizeNumberThe response page size
_offsetNumberThe response offset
_totalNumberThe total count of items in the response
_listArray<T>An array of the response items

PageRequest#

Type: Object

PropertyTypeDescription
_offsetNumberoffset
_pageSizeNumberNumber of items in the page

PasswordPolicy#

Type: Object

PropertyTypeDescription
textStringpassword criteria text
regexStringRegex to validate the criteria

Permission#

Use a Permission type to define resource permissions

Type: Object

PropertyTypeDescription
_idStringPermission UUID
_namespaceStringNamespace that the permission pertains to
_resourceDescResourceDescriptorPass a ResourceDescriptor object to target the resources that the permission pertains to
_userPermissionUserPermission user
_configJSONStores additional details about the permission
_actionsArray<String>Pass an array of permitted actions on the described resources for the permission. The following list shows the possible actions: "READ", "WRITE", "SHARE", "". To permit all actions, use "".

PermissionCriteria#

Use a PermissionCriteria type to filter permissions based on the criteria you set.

Type: Object

PropertyTypeDescription
_namespaceStringOne or more namespaces that the permissions pertain to. For one namespace, pass the namespace name as a string: "NS1". For multiple namespaces, pass a single string that concatenates key-value pairs with , for example: "_namespace=NS1&_namespace=NS2".
patternmatchStringPass the string "true" to consider the value as a pattern. Use this option to get permissions with IRNs that match the IRN pattern you pass. It treats the IRN you pass as a pattern and looks up database IRNs as text to match. By default, is set to false.
Examples
Platform looks up permissions in two ways1. Look up permissions for given IRN 2. Lookup permissions for given pattern
Consider below irns in the DB- itemsvc:nameduseritems:*- itemsvc:nameduseritems:63246b6cc6b43b33ef3d5e2a- *:*:*
1. Look up permissions for given IRNIt considers irn in the DB as pattern and irn in the query string as text to match. It will get permissions for given resource. For above irns, It works as below
_resourceDesc._irn=itemsvc:nameduseritems:* matches itemsvc:nameduseritems:* and *:*:*_resourcesDesc._irn=itemsvc:nameduseritems:63246b6cc6b43b33ef3d5e2a matches all the irns, meaning if a user has access for *:*:* permission then he would have also have this irn._resourcesDesc._irn=*:*:* matches *:*:* only
2. Lookup permissions for given patternIt considers irn in the querystring as pattern and irn in the DB as text to match. It would be used to get multiple permissions matching for given pattern. The same input would have different results.
_resourceDesc._irn=itemsvc:nameduseritems:* matches itemsvc:nameduseritems:* and itemsvc:nameduseritems:63246b6cc6b43b33ef3d5e2a_resourcesDesc._irn=itemsvc:nameduseritems:63246b6cc6b43b33ef3d5e2a matches itemsvc:nameduseritems:63246b6cc6b43b33ef3d5e2a_resourcesDesc._irn=*:*:* matches all the irns
Given below the examples with other criteria
Example 1: Fetch permissions for current user for a resourceCriteria: _namespace=NS1&_resourceDesc._irn=itemsvc:nameduseritems:63246b6cc6b43b33ef3d5e2a
Exmaple 2: Fetch permissions for all the users for a resource. The session user should have SHARE permissions since the user is trying to get permissions for other usersCriteria: _namespace=NS1&_resourceDesc._irn=itemsvc:nameduseritems:63246b6cc6b43b33ef3d5e2a&_user._id=*&_user._type=user
Exmaple 3: Fetch permissions for specific user for a resource. The session user should have SHARE permissions since the user is trying to get permissions for other userCriteria: _namespace=NS1&_resourceDesc._irn=itemsvc:nameduseritems:63246b6cc6b43b33ef3d5e2a&_user._id=<user_id>&_user._type=user
Example 4:  Fetch permissions for current user for a resource with _resourceDesc._criteria matchedCriteria: _namespace=NS1&_resourceDesc._irn=itemsvc:nameduseritems:*&_resourceDesc._criteria._userType=iaf_ext_elements
Example 5:  Fetch permissions by pattern matchCriteria: _namespace=NS1&_resourceDesc._irn=itemsvc:nameduseritems:*&patternmatch=trueResult: It returns permissions for namespace/irn and for matching the given pattern. The result will have union of both lookups

PermissionOperation#

Use the PermissionOperation type to create objects that define a permission set for a user.

Type: Object

PropertyTypeDescription
createbooleanGrants user create access
readbooleanGrant user read access
updatebooleanGrant user update access
deletebooleanGrant user delete access
sharebooleanGrant user share access

PermissionProfile#

Type: Object

PropertyTypeDescription
_idStringPermissionProfile UUID
_userTypeStringEnter a string name that makes the permission profile unique or a string that is shared to identify permission profiles of the same type.
_nameStringPermission profile name
_namespacesArray<String>Namespaces that the permission profile pertains to
_permissionsArray<ProfilePermission>An array of ProfilePermission objects

PermissionUser#

Type: Object

PropertyTypeDescription
_idStringEnter a User or UserGroup UUID
_typeStringEnter or

PrincipalInfo#

Type: Object

PropertyTypeDescription
_emailString
_firstNameString
_lastNameString
_userIdString

ProfilePermission#

Type: Object

PropertyTypeDescription
_resourceDescResourceDescriptorResource description, The resources in the permission is described by multiple values
_namespaceStringnamespace
_actionsArray<String>actions allowed in the permission. For Ex, ["READ", "WRITE"], ["*"] for any action

Project#

A Project is a type of workspace that has a _userType of "project_workspace". The project semantics are defined at the client-side and are encapsulated within the Project resource and the IafProj APIs. A Project can be used to group resources within the project workspace and define a permission model to access these resources.

Type: Workspace

Related Item Queries#

The Item Service supports custom queries on Related Items.

CollectionQuery#

A query object used as part of RelatedItem queries in NamedUserCollections.

Type: Object

PropertyTypeDescription
collectionDescObjectPass a valid database query to run on the list of NamedUserCollections. The collections lookup will be filtered by the namespaces in the user's context.
collectionProjectObjectPass an object that contains one or more projection specifiers to enable or disable the NamedUserCollection fields in the response
queryObjectPass a valid database query to find RelatedItems in the selected NamedUserCollections.
optionsRelatedItemQueryOptionsDefine the query control options such as pagination, sorting and projection. These options work on the results of the criteria defined in parent.query.

CustomRelatedItemQuery#

There are three types of CustomRelatedItemQuery for related items. Please use any one of them       1. FindWithRelatedQuery       2. FindInCollectionsQuery       3. DistinctRelatedItemFieldQuery

Type: Object

CustomRelatedItemQueryResponse#

Custom related query responses are returned as a CustomRelatedItemQueryResponse type object.

Type: Object

PropertyTypeDescription
_listArray<RelatedItemQueryResponse>Contains the result collections with parent and child RelatadItems
_timeStringTime taken to execute the query
Examples
  1. Sample response of FindWithRelatedQueryResponse
{  "_list": [    {      "_uri": "/nameduseritems/5ced0ce85502b659e49cad12",      "_name": "1Mb_4222225_elements",      "_tipVersion": 2,      "_itemClass": "NamedUserCollection",      "_userItemId": "1mb_4222225_ba_elem_OYK5UKTTTl",      "_tipId": "5cee29f98702dd0b75f7983d",      "_versions": [        {          "_userItemDbId": "5ced0ce85502b659e49cad12",          "_relatedItems": {            "_pageSize": 2,            "_list": [              {                "_id": "5ced0cdea717bb1892f81a93",                "source_id": "150f10e7-70e9-40e4-86e8-4fb92aa169a8-000bd95a",                "package_id": 12143,                "type_elements": {                  "_pageSize": 2,                  "_list": [                    {                      "_id": "5ced0cdea717bb1892f81464",                      "properties": {                        "Revit Category": {                          "val": "OST_StructuralFraming"                        },                        "baBIMAssureType": {                          "val": "Beams"                        }                      }                    },                    {                      "_id": "5ced0cdea717bb1892f81464",                      "properties": {                        "Revit Category": {                          "val": "OST_StructuralFraming"                        },                        "baBIMAssureType": {                          "val": "Beams"                        }                      }                    }                  ],                  "_offset": 0,                  "_total": 2                }              },              {                "_id": "5ced0cdea717bb1892f81a94",                "source_id": "e5db3719-101e-4bac-b26e-161a11a108f3-000fc8f5",                "package_id": 15208,                "type_elements": {                  "_pageSize": 2,                  "_list": [                    {                      "_id": "5ced0cdea717bb1892f81464",                      "properties": {                        "Revit Category": {                          "val": "OST_StructuralFraming"                        },                        "baBIMAssureType": {                          "val": "Beams"                        }                      }                    },                    {                      "_id": "5ced0cdea717bb1892f81464",                      "properties": {                        "Revit Category": {                          "val": "OST_StructuralFraming"                        },                        "baBIMAssureType": {                          "val": "Beams"                        }                      }                    }                  ],                  "_offset": 0,                  "_total": 2                }              }            ],            "_offset": 0,            "_total": 2            "_filteredSize": 2 // will be available when relatedFilter is used. There may be chance _pageSize and  _filteredSize differs. Because _pageSize is calculated based on  parent query, whereas _filteredSize is number of items in the response. In other words it is number of parent items has children by matching child query.          },          "_id": "5ced191a91816a6d369aacaa",          "_isTip": false,          "_metadata": {            "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c",            "_createdAt": 1559039208862,            "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c",            "_updatedAt": 1559112185463          },          "_version": 1        },        {          "_userItemDbId": "5ced0ce85502b659e49cad12",          "_relatedItems": {            "_pageSize": 2,            "_list": [              {                "_id": "5ced0cdea717bb1892f81a92",                "source_id": "150f10e7-70e9-40e4-86e8-4fb92aa169a8-000bd958",                "package_id": 12138,                "type_elements": {                  "_pageSize": 0,                  "_list": [],                  "_offset": 0,                  "_total": 0                }              },              {                "_id": "5ced0cdea717bb1892f81a93",                "source_id": "150f10e7-70e9-40e4-86e8-4fb92aa169a8-000bd95a",                "package_id": 12143,                "type_elements": {                  "_pageSize": 0,                  "_list": [],                  "_offset": 0,                  "_total": 0                }              }            ],            "_offset": 0,            "_total": 15          },          "_id": "5cee29f98702dd0b75f7983d",          "_isTip": true,          "_metadata": {            "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c",            "_createdAt": 1559039208862,            "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c",            "_updatedAt": 1559112185464          },          "_version": 2        }      ],      "_irn": "itemsvc:nameduseritem:5ced0ce85502b659e49cad12",      "_id": "5ced0ce85502b659e49cad12",      "_kind": "collection"    }  ],  "_time": "107ms"}```2. Sample Response FindInCollectionsQuery ```javascript{  "_list": [      {          "_uri": "/nameduseritems/5cee7fef6505d6286dbca46a",          "_name": "11_new_geom_view",          "_tipVersion": 1,          "_itemClass": "NamedUserCollection",          "_userItemId": "11_new_geom_view_4LeaYYWpsz",          "_tipId": "5cee80c1fa298d0d3e34e23c",          "_versions": [              {                  "_userItemDbId": "5cee7fef6505d6286dbca46a",                  "_relatedItems": {                      "_pageSize": 0,                      "_list": [],                      "_offset": 0,                      "_total": 0                  },                  "_id": "5cee80c1fa298d0d3e34e23c",                  "_isTip": true,                  "_metadata": {                      "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c",                      "_createdAt": 1559134191563,                      "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c",                      "_updatedAt": 1559134191563                  },                  "_version": 1              }          ],          "_irn": "itemsvc:nameduseritem:5cee7fef6505d6286dbca46a",          "_id": "5cee7fef6505d6286dbca46a",          "_kind": "collection"      },      {          "_uri": "/nameduseritems/5cee7fee6505d6286dbca468",          "_name": "11_new_elem_props",          "_tipVersion": 1,          "_itemClass": "NamedUserCollection",          "_userItemId": "11_new_elprops_qagnj32kE7",          "_tipId": "5cee80c1fa298d0d3e34e23a",          "_versions": [              {                  "_userItemDbId": "5cee7fee6505d6286dbca468",                  "_relatedItems": {                      "_pageSize": 0,                      "_list": [],                      "_offset": 0,                      "_total": 0                  },                  "_id": "5cee80c1fa298d0d3e34e23a",                  "_isTip": true,                  "_metadata": {                      "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c",                      "_createdAt": 1559134190147,                      "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c",                      "_updatedAt": 1559134190147                  },                  "_version": 1              }          ],          "_irn": "itemsvc:nameduseritem:5cee7fee6505d6286dbca468",          "_id": "5cee7fee6505d6286dbca468",          "_kind": "collection"      },      {          "_uri": "/nameduseritems/5cee7fee6505d6286dbca469",          "_name": "11_new_elements",          "_tipVersion": 2,          "_itemClass": "NamedUserCollection",          "_userItemId": "11_new_ba_elem_1sjwcciumd",          "_tipId": "5cee814dfa298d0d3e34e246",          "_versions": [              {                  "_userItemDbId": "5cee7fee6505d6286dbca469",                  "_relatedItems": {                      "_pageSize": 5,                      "_list": [                          {                              "_id": "5cee7fe8c27e69cd0209ef58",                              "source_id": "dd7a8b4b-7241-4687-87aa-fd7906f76354-0003842e"                          },                          {                              "_id": "5cee7fe8c27e69cd0209ef59",                              "source_id": "dd7a8b4b-7241-4687-87aa-fd7906f76354-00038450"                          },                          {                              "_id": "5cee7fe8c27e69cd0209ef5a",                              "source_id": "dd7a8b4b-7241-4687-87aa-fd7906f76354-00038463"                          },                          {                              "_id": "5cee7fe8c27e69cd0209ef5b",                              "source_id": "dd7a8b4b-7241-4687-87aa-fd7906f76354-00038933"                          },                          {                              "_id": "5cee7fe8c27e69cd0209ef5c",                              "source_id": "dd7a8b4b-7241-4687-87aa-fd7906f76354-00038950"                          }                      ],                      "_offset": 0,                      "_total": 5                  },                  "_id": "5cee80c1fa298d0d3e34e23b",                  "_isTip": false,                  "_metadata": {                      "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c",                      "_createdAt": 1559134191035,                      "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c",                      "_updatedAt": 1559134542075                  },                  "_version": 1              },              {                  "_userItemDbId": "5cee7fee6505d6286dbca469",                  "_relatedItems": {                      "_pageSize": 3,                      "_list": [                          {                              "_id": "5cee7fe8c27e69cd0209ef58",                              "source_id": "dd7a8b4b-7241-4687-87aa-fd7906f76354-0003842e"                          },                          {                              "_id": "5cee7fe8c27e69cd0209ef59",                              "source_id": "dd7a8b4b-7241-4687-87aa-fd7906f76354-00038450"                          },                          {                              "_id": "5cee7fe8c27e69cd0209ef5b",                              "source_id": "dd7a8b4b-7241-4687-87aa-fd7906f76354-00038933"                          }                      ],                      "_offset": 0,                      "_total": 3                  },                  "_id": "5cee814dfa298d0d3e34e246",                  "_isTip": true,                  "_metadata": {                      "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c",                      "_createdAt": 1559134191035,                      "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c",                      "_updatedAt": 1559134542086                  },                  "_version": 2              }          ],          "_irn": "itemsvc:nameduseritem:5cee7fee6505d6286dbca469",          "_id": "5cee7fee6505d6286dbca469",          "_kind": "collection"      },      {          "_uri": "/nameduseritems/5cee7fef6505d6286dbca46b",          "_name": "11_new_type_el",          "_tipVersion": 1,          "_itemClass": "NamedUserCollection",          "_userItemId": "11_new_type_el_uUUlgM1sn4",          "_tipId": "5cee80c1fa298d0d3e34e23d",          "_versions": [              {                  "_userItemDbId": "5cee7fef6505d6286dbca46b",                  "_relatedItems": {                      "_pageSize": 0,                      "_list": [],                      "_offset": 0,                      "_total": 0                  },                  "_id": "5cee80c1fa298d0d3e34e23d",                  "_isTip": true,                  "_metadata": {                      "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c",                      "_createdAt": 1559134191623,                      "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c",                      "_updatedAt": 1559134191623                  },                  "_version": 1              }          ],          "_irn": "itemsvc:nameduseritem:5cee7fef6505d6286dbca46b",          "_id": "5cee7fef6505d6286dbca46b",          "_kind": "collection"      }  ],  "_time": "22ms"}```3.Sample Response DistinctRelatedItemFieldQuery ```javascript{ "_list": [   {     "_uri": "/nameduseritems/5cee7fee6505d6286dbca469",     "_tipVersion": 2,     "_itemClass": "NamedUserCollection",     "_userItemId": "11_new_ba_elem_1sjwcciumd",     "_tipId": "5cee814dfa298d0d3e34e246",     "_versions": [       {         "_userItemDbId": "5cee7fee6505d6286dbca469",         "_relatedItems": {           "type_id": [             1,             26,             55,             60           ]         },         "_id": "5cee80c1fa298d0d3e34e23b",         "_isTip": false,         "_metadata": {           "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c",           "_createdAt": 1559134191035,           "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c",           "_updatedAt": 1559134542075         },         "_version": 1       },       {         "_userItemDbId": "5cee7fee6505d6286dbca469",         "_relatedItems": {           "type_id": [             442,             463,             474,             506,             535,             554,             575,             610           ]         },         "_id": "5cee814dfa298d0d3e34e246",         "_isTip": true,         "_metadata": {           "_updatedById": "17285382-7f67-4b04-b231-bcdca454ed2c",           "_createdAt": 1559134191035,           "_createdById": "17285382-7f67-4b04-b231-bcdca454ed2c",           "_updatedAt": 1559134542086         },         "_version": 2       }     ],     "_irn": "itemsvc:nameduseritem:5cee7fee6505d6286dbca469",     "_id": "5cee7fee6505d6286dbca469",     "_kind": "collection"   } ], "_time": "20ms"}

DistinctRelatedItemFieldQuery#

Find distinct related items from each collection in the query result

Type: CustomRelatedItemQuery

PropertyTypeDescription
collectionDescObjectPass an object with your key-value criteria to target NamedUserCollections you want to look up. The lookup is filtered by the namespaces in the user's context.
collectionProjectObjectPass an object that contains one or more projection specifiers to enable or disable the NamedUserCollection fields in the response.
fieldStringName of the field whose distinct values you want to look up. Fields within subdocuments or arrays of subdocuments can be looked up using the dot notation. e.g. properties.name
queryObjectPass an object that contains a valid database query to filter the RelatedItems before the distinct field value lookup.
Examples
// Sample Request
{ "$distinctRelatedItemField": {   "collectionDesc": {     "_userItemId": "11_new_ba_elem_1sjwcciumd",     "_versions.all": true // Optional, Search over all the versions if  its true, otherwise searches only in tip version. Default false   },   "collectionProject": {     "_id": 1,     "_userItemId": 1   },   "field": "type_id",   "query": {} }}/

DistinctRelatedItemResponse#

Type: Object

PropertyTypeDescription
nullArray<Object>- The given property name that contains the distinct query items.

FindInCollectionsQuery#

Use to look up NamedUserCollection types and their RelatedItems based on your criteria

Type: CollectionQuery

Examples
// It works as below,// 1. It executes `parent.collectionDesc` with given `parent.collectionProject`.// 2. For each collection from above,  filters for related items by `parent.query` with `parent.options`// 3. The response would have collections and related items.
// Sample Request{ "$findInCollections": {   "collectionDesc": {     "_itemClass": "NamedUserCollection"     "_versions.all": true // Optional, Search over all the versions if  its true, otherwise searches only in tip version. Default false   },   "collectionProject": {     "_userItemId": 1,     "_name": 1   },   "query": {     "type_id": 278   },   "options": {     "project": {       "source_id": 1     },     "page": {       "_pageSize": 100,       "_offset": 0     },     "sort": {       "_metadata._updatedAt": 1     }   } }}

FindWithRelatedQuery#

Looks up RelatedItems in multiple NamedUserCollections at a depth of one relationship level.

Type: CustomRelatedItemQuery

PropertyTypeDescription
parentCollectionQueryDefine and pass a CollectionQuery object to target parent collections that contain RelatedItems you want to look up.
relatedFilterRelatedFilterDefine criteria to filter the parent RelatedItems based on their child RelatedItems. You can use either or , not both.
relatedArray<RelatedQuery>Define criteria to look up child RelatedItems. You can use either or , not both.
Examples

Simple related query

//The query execution flow below
// 1. It executes `parent.collectionDesc` with given `parent.collectionProject`.// 2. For each collection from above, filters for related items by `parent.query` with `parent.options`// 3. Execute related query by `relatedDesc` for the collection// 4. Filter children for each related collection by `related.query` with related.options provided// 5. The consolidated children would be added related item response with key `as` property.// 6. Please refer {@link CustomRelatedItemQueryResponse} for the output
{"$findWithRelated": {  "parent": {    "collectionDesc": {      "_userItemId": "1mb_4222225_ba_elem_OYK5UKTTTl"      "_versions.all": true // Optional, Search over all the versions if  its true, otherwise searches only in tip version. Default false    },    "query": {      "type_id": 1213    },    "collectionProject": {      "_userItemId": 1,      "_name": 1    },    "options": {      "project": {        "source_id": 1,        "package_id": 1      },      "page": {        "_pageSize": 200,        "_offset": 0      },      "sort": {        "_metadata._updatedAt": 1      }    }  },  "related": [    {      "relatedDesc": {        "_relatedUserType": "rvt_type_elements"      },      "query": {        "properties.OmniClass Title.val": "Beams"      },      "options": {        "project": {          "properties.Revit Category.val": 1,          "properties.baBIMAssureType.val": 1        },        "page": {          "_pageSize": 100,          "_offset": 0        },        "sort": {          "_metadata._updatedAt": 1        }      },      "as": "type_element"    }  ]}```  Sample request for related filter query```javascript//  It executes as below
// 1. It executes `parent.collectionDesc` with given `parent.collectionProject`.// 2. For each collection from above, filters for related items by `parent.query` with `parent.options`// 3. Execute related query by `relatedDesc` for the collection// 4. Filter children for each related collection by `relatedFilter.[$or|$and]` with related.options provided// 5. The consolidated children would be added related item response with key `as` property.// 6. If related item doesn't have match any children by its query then the related item(parent) would be ignored in the response// 7. lease refer {@link CustomRelatedItemQueryResponse} for the output{  "$findWithRelated": {    "parent": {      "collectionDesc": {        "_userItemId": "11_new_ba_elem_1sjwcciumd",        "_versions.all": true // Optional, Search over all the versions if  its true, otherwise searches only in tip version. Default false      },      "collectionProject": {        "_userItemId": 1      },      "query": {        "type_id": 278      },      "options": {        "project": {          "source_id": 1        },        "page": {          "_pageSize": 100,          "_offset": 0        },        "sort": {          "_metadata._updatedAt": 1        }      }    },    "relatedFilter": {      "includeResult": true,      "$or": [        {          "relatedDesc": {            "_relatedUserType": "rvt_type_elements"          },          "query": {            "properties.Revit Category.val": "OST_Windows"          },          "options": {            "project": {              "properties.Revit Category.val": 1,              "properties.baBIMAssureType.val": 1            },            "page": {              "_pageSize": 100,              "_offset": 0            },            "sort": {              "_metadata._updatedAt": 1            }          },          "as": "type_elements"        }      ]    }  }}

FindWithRelatedQueryParentResponse#

Type: RelatedItem

PropertyTypeDescription
nullPage<RelatedItem>- The given property name for the 'as' parameter in the query. Contains the child RelatedItems.

RelatedFilter#

Insert a relatedFilter in your findWithRelated query to filter for parent items that match a child item query across NamedUserCollections.

Type: Object

PropertyTypeDescription
includeResultbooleanSet to true to include matching child items in the response. If you do not include this property, the default is false.

In a list, enter the child item filter arguments you want either the OR or AND logical operator to evaluate. An array of child RelatedItem filter criteria to be evaluated with the OR logical operator. Should use either $or or $and but not both together| |$or|Array<RelatedQuery>|The list of filter criteria for child RelatedItems to evaluate with the OR logical operator. Use either $or or $and but not both together.| |$and|Array<RelatedQuery>|The list of filter criteria for child RelatedItems to evaluate with the AND logical operator. Use either $or or $and but not both together.|

RelatedItemQueryOptions#

Type: Object

PropertyTypeDescription
projectJSONPass an object that contains one or more projection specifiers to enable or disable the RelatedItem fields in the response
sortJSONPass an object that contains one or more sort specifiers to sort the results based on fields in the RelatedItems.
pagePageRequestpage request, by default _pageSize is 200 and _offset as 0.
Examples
let options = {    "project":{"_id": 1, "dtCategory": 1},    "sort": {"dtType":1}, // -1 for descending order    "page": {"_offset": 10, "_pageSize": 20} // default page size: 200, max page Size: 1000}

RelatedItemQueryResponse#

RelatedItem query responses are returned as a RelatedItemQueryResponse type object.

Type: NamedUserCollection

PropertyTypeDescription
_versionsArray<RelatedItemQueryResponseVersion>Contains matching versions with related items(parent)

RelatedItemQueryResponseVersion#

RelatedItemVersion query responses are returned as a RelatedItemQueryResponseVersion type object.

Type: NamedUserItemVersion

PropertyTypeDescription
_relatedItems(Page<FindWithRelatedQueryParentResponse> | Page<RelatedItem> | Page<DistinctRelatedItemResponse>)A page of the response items. For a findWithRelatedQuery, the parent RelatedItems; for findInCollection queries, the RelatedItems; for DistinctRelateditemFieldQuery, the distinct RelatedItems.

RelatedQuery#

Insert a RelatedQuery in your findWithRelated query to define criteria to look up child related items.

Type: Object

PropertyTypeDescription
relatedDescObjectAdd your relationship query for the selected parent RelatedItems as a valid simple query.
queryObjectAdd a valid simple query to filter the child related items you selected in the related.relatedDesc query.
optionsRelatedItemQueryOptionsPass an object that can contain the following response options parameters for the results of the criteria you define in related.query: "page", "project", "sort". These options work on the results of the criteria defined in .
asStringName the field that will contain the child RelatedItem results in the response.

RelatedCollection#

Define a RelatedCollection when you want to add an existing collection, such as a NamedUserCollection or NamedFileCollection, to a NamedCompositeItem.

Type: RelatedCollection

PropertyTypeDescription
_idStringThe RelatedCollection's database id.
_userItemIdStringThe collection's _userItemId value
_userTypeStringThe collection's _userType value
_itemIdStringThe collection's _id value
_userItemClassStringThe collection's NamedUserItem class, such as a "NamedUserCollection" or "NamedFileCollection"
_userItemVersionIdStringThe collection's version id
_userItemVersionNumberThe collection's version number

RelatedCollectionCriteria#

Define criteria to target RelatedCollections.

Type: Object

PropertyTypeDescription
queryJSONPass an object that contains your query.
Examples
// simple filter exampleslet query = { "_userType": "file_container" }let query = { "_itemId": {"$in": [ "5c9328e8b834740001cd95d4","5c9328e8b834740001cd95d4" ] }}
// complex querylet query = {  "$and": [    {       "_userType":"file_container",      "_itemId": {        "$in": ["5dafe5736f2d3a4dcc55fa14","68afe5736f2d3a4dcc55fa14"]      }    }  ]}

RelatedItem#

An object with user-created properties that can be related to NamedUserCollection types and other RelatedItem types.

Type: Object

PropertyTypeDescription
_idStringThe database id

RelatedItemCriteria#

Query object to target RelatedItems that match your query

Type: Object

PropertyTypeDescription
queryJSONPass an object that contains your query.
Examples
// simple filter exampleslet query = { "dtCategory": "Casework", "dtType": "Counter" }let query = {"_id": { "$in": ["5c9328e8b834740001cd95d4","5c9328e8b834740001cd95d4"] }}
// complex querylet query = {  "$and": [    {       "type_id": "28",      "dtType":"Counter"    }  ],  "$or": [    {      "package_id": 29    },    {      "_id": { "$in": ["5c9328e8b834740001cd95d4","5d31574411efe92d8832c21c"] }    }  ]}

RelatedItemCriteriaOptions#

Define response options for NamedUserItems with Item Service platform APIs.

Type: Object

PropertyTypeDescription
projectJSONPass an object that contains one or more projection criteria specifiers.
sortJSONPass an object that contains one or more sort criteria specifiers. Set a property to 1 to sort ascending and -1 to sort descending.
pagePageRequestPass an object that contains one or more pagination options.
pagedResbooleanSet to true to get a Page class result rather than an array, which is the default. The default page size is 200, which is also the maximum./**
Define response options for RelatedItems with Item Service platform APIs.
projectJSONPass an object that contains one or more projection criteria specifiers.
sortJSONPass an object that contains one or more sort criteria specifiers. Set a property to 1 to sort ascending and -1 to sort descending.
pagePageRequestPass an object that contains one or more pagination options.
userItemVersionIdStringTo return a particular user item version, pass the version id. Without this parameter, it looks up the tip version.
pagedResbooleanSet to true to get a Page class result rather than an array, which is the default. The default page size is 200, and the maximum is 1000.
Examples
// lookup from tip versionlet options = {  "project":{ "_id": 1, "dtCategory": 1 },  "sort": { "dtType": 1 },   "page": { "_offset": 10, "_pageSize": 20 }}
// lookup from particular versionlet options = {  "project":{ "_id": 1, "dtCategory": 1 },  "sort": { "dtType": 1 },   "page": { "_offset": 10, "_pageSize": 20 },  "userItemVersionId": "5cee803a6505d6286dbca522"}

Relationship#

Use the Relationship class to define a relationship from a RelatedItem to one or more RelatedItems.

Type: Object

PropertyTypeDescription
_idStringid UUID
_relatedUserItemIdStringThe _userItemId of the parent item’s collection
_relatedUserItemDbIdStringThe _id of the parent item’s collection
_relatedUserItemVersionIdStringThe _userItemId of the parent item’s collection version
_relatedUserItemVersionNumberThe parent collection's version number
_relatedUserItemClassStringThe NamedUserItem class of the parent item's collection, such as NamedUserCollection or NamedFileCollection
_relatedToIdsArray<String>Array of one or more RelatedItem ids to create relationships with as children.
_relatedUserTypeStringA custom userType to identify the relationship
_relatedFromIdStringRelatedItem id of parent related item
_isInversebooleanSet to true to invert the relationship to a child-parent relationship. Set to false for a parent-child relationship.
_userTypeStringUser defined type of the relationship.
_customAttributesObjectAdd custom attributes in key-value pairs

RelationshipCriteria#

Type: Object

PropertyTypeDescription
queryJSONPass an object that contains one or more projection specifiers.
Examples
// simple filter exampleslet query = { "_relatedUserType": "file_container" }let query = { "_id": { "$in": ["5c9328e8b834740001cd95d4","5c9328e8b834740001cd95d4"] }}
// complex querylet query = {  "$and":[    {       "_relatedUserType": "file_container",      "_relatedToIds": {         "$in": [ "5dafe5736f2d3a4dcc55fa14","68afe5736f2d3a4dcc55fa14" ]      }    }  ]}

RelationshipCriteriaOptions#

Define response options for Relationship queries

Type: Object

PropertyTypeDescription
projectJSONPass an object that contains one or more projection criteria specifiers.
sortJSONPass an object that contains one or more sort criteria specifiers. Set a property to 1 to sort ascending and -1 to sort descending.
pagePageRequestPass an object that contains one or more pagination options. The default page size is 200, which is also the max page size.
userItemVersionIdStringTo return a particular user item version, pass the version id. Without this parameter, it looks up the tip version.
Examples
// lookup from tip versionlet options = {  "project": { "_relatedUserType": 1, "_relatedFromId": 1 },  "sort": { "_relatedUserType": 1 },   "page": {"_offset": 10, "_pageSize": 20}}
// lookup from particular versionlet options = {  "project": { "_relatedUserType": 1, "_relatedFromId": 1 },  "sort": { "_relatedUserType": 1 },   "page": { "_offset": 10, "_pageSize": 20 },   "userItemVersionId": "5cee803a6505d6286dbca522"}

ResourceDescriptor#

Use the ResourceDescriptor type to target a single resource or multiple resources that match your criteria

Type: Object

PropertyTypeDescription
_irnStringA resource name, which uses the following pattern: ::<resource_id>. For example, see the following IRN for a file: filesvc:file:4e2b9de5-9a73-44f9-8153-bc0904b694c5
_criteriaUNKNOWN: OptionalTypeFilter criteria as key-value pairs
_subresourceDescSubResourceDescriptorSupports only in Item service and spiecific resource IRNs Ex: "itemsvc:nameduseritem:6333e105026300398e2d653e". It can't be used for the IRN(s) such as itemsvc:nameduseritem:*

ResuambleFileUploadProps#

Use the ResuambleFileUploadProps to define and handle resumable file uploads.

Type: Object

PropertyTypeDescription
filenameStringFile name
tagsArrayArray of string tags to attribute to the file
onCompleteFunctionCallback function for when the file upload completes
onProgressFunctionCallback function for when the file upload is in progress
onErrorFunctionCallback function for when the file upload fails
headersFileHeadersThe headers will be applied to the HTTP response during download

Script#

A user-created script. The Script class is a subclass of the NamedUserItem class and inherits its properties.

Type: NamedUserItem

PropertyTypeDescription
_versionScriptVersionA given version of the script's content.

ScriptVersion#

ScriptVersion contains a _userData property with the Script's versioned content. The ScriptVersion is contained in the Script class's _version property.

Type: NamedUserItemVersion

PropertyTypeDescription
_userDataStringScript content

Secret#

Use the Secret type to define a secret in the Passport Service.

Type: Object

PropertyTypeDescription
_idStringSecret UUID.
_nameStringName of the Secret.
_valueStringValue of the Secret.
_descriptionStringDescription of the Secret.
_userTypeStringUser type associated with the Secret.
_namespacesArray<String>Namespaces associated with the Secret.

SourceCode#

Represents source code payload for Agents or Tools. The code must extend Agent or AbstractTool and implement processRequest (for agents) or _call (for tools).

Type: Object

PropertyTypeDescription
_contentStringThe code content as a single string. Use either _content or _file—if both are provided, _content takes precedence.
_fileStringAccepts either a File or ReadStream object. Use either _content or _file—if both are provided, _content takes precedence.
_idStringOptional source code record id.
Examples
// Example for Agent sourceCodeconst agentSourceCode = {  "_content": "import { Agent } from '@dtplatform/agent-core'; export class MultiTaskerAgent extends Agent { constructor(options: any) { super(options); } async processRequest(type: string, state?: any, prompt?: string, tools?: any[], userId?: string, sessionId?: string, chatHistory?: [], additionalParams?: Record<string, string>): Promise<any> { const rules = fetchDynamicRules(); console.log(state); const enhancedPrompt = `Use these rules to answer the prompt, RULES: ${rules} USER-PROMPT: ${state?.state?.messages[state?.state?.messages?.length - 1].content}`; console.log(enhancedPrompt); const res: any = await this.callLLM(type, state, enhancedPrompt, tools); return res; } }; function fetchDynamicRules() { return `Rule 1: Wall-mounted sockets must have standard mounting height of 300mm AFF. Rule 2: All electrical elements must be assigned to a circuit. Rule 3: Total connected load on a panel must not exceed its rated capacity. Rule 4: Conduits or trays passing through fire-rated walls must include firestopping.`; }"};
// Example for Tool sourceCodeconst toolSourceCode = {  "_content": "import { AbstractTool } from '@dtplatform/agent-core'; import { z } from 'zod'; const testSchema = z.object({ param1: z.string().describe('This is the user prompt')}); export default class StringModifierTool1 extends AbstractTool { name: string = 'StringModifierTool'; description: string = 'A simple StringModifierTool'; schema = testSchema; async _call(args: z.infer<typeof testSchema>) { console.log('StringModifierTool called on', args); return `I'm a simple tool tester.`; } }"};

TaskDef#

Create a custom task that executes within a workflow

Type: Object

PropertyTypeDescription
_idStringThe Task's id
_workflow_def_idStringThe id of the WorkflowDef that the Task is part of
_nameStringA custom name
_descriptionStringDescribes the Task
_sequencenoNumberSequence number to define where this Tasks is in the execution order of tasks
_typeStringEnter the Task type, such as SCRIPT_EXECUTION, USER_INPUT, HAYSTACK, SWITCH, REST_CONNECTOR, FORK_JOIN, or DO_WHILE.
_inputParamsObjectThe Task's input parameters
_retryCountNumberEnter the number of retry attempts after a Task fails. The default is three attemps and the maximum is 10.
_retryLogicStringEnter one of the following retry logic mechanisms: FIXED, EXPONENTIAL_BACKOFF, LINEAR_BACKOFF. FIXED reschedule the task for after retryDelaySeconds. EXPONENTIAL_BACKOFF reschedules the task for after retryDelaySeconds (2 ^ attemptNumber). LINEAR_BACKOFF reschedules the task for after retryDelaySeconds backoffRate * attemptNumber.
_retryDelaySecondsNumberTime in seconds to wait before a retry. The default time is 60 seconds.
_timeoutSecondsNumberTime in seconds that a task is marked TIMED_OUT after being IN_PROGRESS and not reaching a terminal state.
_timeoutPolicyStringThe task's timeout policy. Enter "RETRY", "ALERT_ONLY", or the default "TIME_OUT_WF". RETRY retries the task, TIME_OUT_WF times out and terminates the task, and ALERT_ONLY registers a counter.
_responseTimeoutSecondsNumberTime in seconds to wait if no status update is received before the task is rescheduled. An example is when the worker fails to poll a task due to errors or network failure. The default time is 600 seconds.
_resultObjectThe Task's output.
_decisionCasesObjectFor SWITCH tasks only. A object where the keys are the possible cases and their values are an array of tasks to execute if that case is selected.
_forkTasksArray<Array<Object>>For FORK JOIN tasks only. An array of task arrays to run in parallel.

Team#

Represents a Team resource. Teams allow you to group multiple agents with specific roles and define an execution flow for coordinated, multi-agent workflows.

Type: Object

PropertyTypeDescription
_idStringThe id of the team resource.
_namespacesArray<String>The namespace(s) of the resource.
_nameStringRequired, The team name.
_descriptionStringA short description of what the team does
_agentsArray<Object>Required, Agents participating in this team, each with _userType and _role properties.
_flowArray<Object>Required, Defines the execution sequence by specifying transitions with "from" and "to" fields.

TeamCriteria#

Team criteria

Type: Object

PropertyTypeDescription
_nameStringFilter by team name.
queryStringWildcard search on the team name.

Tool#

Represents a Tool

Type: Object

PropertyTypeDescription
_idStringThe id of the tool resource
_namespacesArray<String>Required, The namespace(s) of the resource
_nameStringRequired, The name of the tool
_descriptionStringA short description of what the tool does
_userTypeStringRequired, Unique identifier of the tool
_typeStringThe type of the tool, assigned by the backend
_toolClassStringThe class name of the custom tool implementation

ToolCriteria#

Tool criteria

Type: Object

PropertyTypeDescription
_userTypeStringFilter by _userType field
_typeStringFilter by _type field (e.g., tool type)
queryStringWild card search that operates on the name and description, for example, ?query=sensor

UploadMeta#

Type: Object

PropertyTypeDescription
_sizeNumber
_uploadOffsetNumber
_checksumString
_uploadIdString

User#

The User type defines a system user.

Type: Object

PropertyTypeDescription
_idStringUser id as UUID
_firstnameStringThe user's first name
_lastnameStringThe user's last name
_emailStringThe user's email
_isSocialbooleanSet to true if the user is created by social login
_disabledbooleanSet to true to disable the user

UserCollectionBulkOperationOptions#

Use the UserCollectionBulkOperationOptions type to process bulk operation asynchronously.

Type: UserCollectionOptions

PropertyTypeDescription
asyncBooleanSet to true to process bulk operation asynchronously. The promise response contains a URL to check the async process status.

UserCollectionOptions#

Look up NamedUserCollections under a specfic version.

Type: ItemsvcOptions

PropertyTypeDescription
userItemVersionIdStringLooks up under a given version rather than the tip version.

UserConfig#

A user-created configuration. The UserConfig class is a subclass of the NamedUserItem class and inherits its properties.

Type: NamedUserItem

PropertyTypeDescription
_versionUserConfigVersionA given version of the UserConfig's content.

UserConfigVersion#

UserConfigVersion contains a _userData property with the UserConfig's versioned content. The UserConfigVersion is contained in the UserConfig class's _version property.

Type: NamedUserItemVersion

PropertyTypeDescription
_userDataStringUser config content

UserCriteria#

Use the UserCriteria type to define a "starts with" filter query for a user by email, first name, or last name.

Type: Object

PropertyTypeDescription
queryStringPass a string that contains an email, first name, or last name that you want to apply a startsWith filter to

UserGroup#

The UserGroup type defines a group of users and the workspaces they can access.

Type: Object

PropertyTypeDescription
_idStringThe UserGroup's UUID
_descriptionStringThe UserGroup's description
_nameStringReadable long-form UserGroup name, such as "Project 1 developer operations group"
_shortNameStringShorter abbreviation of the UserGroup name that is used for reference, such as "dev_ops_proj_1"
_namespacesArray<String>List the namespaces that the UserGroup has access to
_userAttributesStringAdd custom key-value pairs. Add the attribute name to the key, for example, _userAttributes.<attribute_name>: <attribute_value>
_userTypeStringUser type
_isMemberbooleanSet to true if the current user is a member of the UserGroup

UserGroupDescriptor#

It define user group along with permission granted for the user group.

Type: UserGroup

PropertyTypeDescription
permissionsIafPermissionDescriptorThe list of permission granted for the usergroup

WorkflowDef#

A blueprint that describes the sequence, structure, and rules for the execution of defined tasks.

Type: Object

PropertyTypeDescription
_idStringThe Workflow's id
_nameStringA custom name
_descriptionStringDescribe the Workflow
_userTypeStringA user-given name to identify a WorkflowDef. This userType is helpful for queries to find a unique item with a unique userType or WorkflowDefs that share a userType.
_namespacesArray<String>An array of namespaces you want to add the Workflow to
_taskDefsArray<TaskDef>An array of your defined tasks
_timeoutSecondsNumberThe number of seconds before the Workflow times out when unresponsive
_timeoutPolicyStringWorkflow's timeout policy. The default value is TIME_OUT_WF, where the Workflow is marked TIMED_OUT and terminated. You can set this property to ALERT_ONLY.
_updatedByStringUser Id of the user who last updated the workflow
_createdByStringUser Id of the user who created the workflow

Workspace#

Use the Workspace type to define a workspace in the Passport Service.

Type: Object

PropertyTypeDescription
_idStringProject UUID, which the platform attributes after the Workspace is created
_descriptionStringA description of the Workspace and its purpose
_nameStringReadable long-form Workspace name, such as "Project 1 Workspace"
_shortNameStringShorter abbreviation of the Workspace name that is used for reference, such as "proj_1_ws"
_namespacesArray<String>List the namespaces that the Workspace has access to
_userAttributesJSONAdd custom attributes to the Workspace class object