Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 10 Next »

API endpoints

The base URL of the APIs is: /onelistserver/api/datasync e.g. https://iqx.onelistapprovals.com/onelistserver/api/datasync/synctasks. These APIs can be viewed and tested using Swagger which is accessible via /onelistserver/swagger. The full API signatures can also be found here.

Authentication

The source system must use the API key that is assigned to it by OneList to interact with the data sync APIs. The API key should be specified in the X-API-Key header in every HTTP request. Below is an example of a HTTP POST request:

POST https://iqx.onelistapprovals.com/onelistserver/api/datasync/SyncTasks HTTP/1.1
X-API-Key: TQUIteYnrxqHkBvh2{
Content-Type: application/json

{"activeTasks":[….]}

The key terms used in the APIs

Term

Description

TaskType

This constant value must match the Task Adapter Task Type in OneList configured to handle the request.

TaskId

This is the source system unique identifier of the task. The value must be consistent in the whole lifecycle of the task.

BusinessObjId

This is source system identifier of the business object associated with the task. For example,

  • The PO number for the purchase order approval task;

  • The SharePoint item id for the document approval task;

  • It can be the same as the Task Id if there is no separate entity for the task.

ActionId

This is the source system workflow action identifier.

Assignee

The user id of the source system user who is assigned to the task as the approver / agent.

Delegator

The user id of the source system user who is delegating the task.

Delegate

The user id of the source system user who is the task delegate.

HashValue

The string value can be used to compare if the task has been changed. The following can be used as the hash value for a task:

  • Last update timestamp;

  • Version number of the business object, e.g. document version;

  • Calculated based on the value of critical fields or the entire task, e.g. MD5 hash.

The key APIs for integration

Note: only the key parameters of each API are listed here, please view the full API signature via /onelistserver/swagger.

Function

Description

/onelistserver/api/datasync/SyncTasks

This API synchronizes OneList tasks with source workflow tasks.

  • The ActiveTasks array contains new or updated task detail. OneList reads this array to add or update the tasks to its task cache;

    • The supported task actions must be defined in the EnabledActions field;

    • The meta data of the task attachments should be included in the Attachments field. The attachment files are posted to OneList separately using the /onelistserver/api/datasync/SyncAttachments API.

    • The TaskDetail is a madatory field and it must be assigned the full detail of the task (JSON). This is the source data for the OneList task engine to layout the task for presentation.

  • The DeletedTaskId array contains the id of the tasks that are completed by the source workflow. OneList removes these tasks from its task cache;

/onelistserver/api/datasync/GetUserSyncRequests

This API returns the list of source system user who has outstanding task but is not yet mapped to an OneList user. The source system should call the SyncUsers API to map these users before they can view their tasks in OneList.

/onelistserver/api/datasync/GetActiveUsers

This API returns the profiles of the active OneList users. This API can be used to detect user changes in the source system.

  • The UserName field is the source system user id;

  • The OneListUserId field is the OneList user id;

  • The other fields are the current OneList user profile information.

/onelistserver/api/datasync/SyncUsers

This API adds or updates OneList user account with the source system user information. It also creates the user mapping between the OneList user account and the source system user account.

  • The UserName field is the source system user id;

  • The OneListUserId field is optional, if not specified then the UserName is used as the OneList user id;

  • The other fields are used to populate the OneList user profile.

/onelistserver/api/datasync/SyncAttachments

This API synchronizes OneList task attachment cache with source system files.

  • The Attachments array contains the current version of the files for the task;

  • The DeletedAttachments array contains the source sytem document id that is removed from the source system document repository.

/onelistserver/api/datasync/GetActionRequests

This API returns the list of user task actions. The source system should perform the requested task action in the workflow.

  • The UserId is the source system user id who performed the action in OneList;

  • The Task field is the full detail of the task to be actioned;

  • The TaskAction field contains the detail of the task action including user input such as approval comment;

  • The LineActions array is only populated for task supporting line-level action;

  • The Token field may contain the refresh token for source system to impersonate the user.

/onelistserver/api/datasync/PostTaskActionOutcome

/onelistserver/api/datasync/PostLineLevalTaskActionOutcome

Source system calls this API to notifiy OneList of the requested task action.

  • The OneListRequestId is the identifier of the action request;

  • The Messages array is optional for posting any status or error messages to OneList.

What needs to integrate with OneList

An adapter will generally implement these integration processes:

  • No labels