Skip to main content

Retrieving data

It is possible to load data from Comind workspace's app.

https://api.comindwork.com/api/w/${workspace}/a/${app}/tickets/list

If the workspace/app pair is not provided - the query searches across all available data (in all workspaces and apps).

To limit the results - it is possible to provide filter expression, limit the number of returned records and specify the fields.

Permission to access data

When requesting data - the access rights of the currently authenticated user are applied. The query may return empty results if this user does not have access to certain workspace, app, or record.

If the user does not have access to specific fields of the app records, or specific record - these fields will not be returned as well.

Sample code

Retrieve list of users

curl --request POST ^
--url "https://api.comindwork.com/api/w/METAMETA/a/USER/tickets/list" ^
--json {limitRecords:100} ^
--header "Authorization:CMW_AUTH_CODE YOUR-AUTH-CODE-GOES-HERE"
async function getAllUsers() {
const workspaceAlias = "METAMETA";
const appAlias = "USER";
const apiEndpoint = `w/${workspaceAlias}/a/${appAlias}/tickets/list`;
const allUsers = await comind.records.retrieve(apiEndpoint, {
limitRecords: 100,
});
console.warn(`Found users: ${allUsers.length}`);
return allUsers;
}

Retrieve list of tasks (records in Task app) in the Helpdesk workspace, filter by normal-priority unfinished tasks

curl --request POST ^
--url "https://api.comindwork.com/api/w/HELPDESK/a/TASK/tickets/list" ^
--json "{limitRecords:1,listOfFields:'priority,number',rlx:'priority=\"normal\" and state!=\"resolved\"'}" ^
--header "Authorization:CMW_AUTH_CODE YOUR-AUTH-CODE-GOES-HERE"

Supported parameters

  • listOfFields - by default only system-fields included, use "ALL" to get all records' fields, or specify exact list of fields
  • sortBy - sorting - for example "sortBy=creation_date desc"
  • limitRecords - limiting number of returned values - e.g. 10
  • skipRecords - number of items to skip - e.g. 100, used with limitRecords
  • rlx - possibility to filter data with query - e.g. 'priority="normal" and state!="resolved"'