Appearance
Activity list
List and query activities.
Endpoints
| Endpoint | Arguments | Returns |
|---|---|---|
v3.activity.events | startDate: number, endDate: number, options?: { workspaceId?: string, processId?: string } | object[] |
v3.activity.list | query: { processId: string, phaseId: string, limit?: number, skip?: number, search?: string, workspaceId?: string } | object |
v3.activity.timeline | startDate: number, endDate: number, options?: { workspaceId?: string, processId?: string, phaseId?: string, groupByField?: string } | object |
v3.activity.events
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (JoiTime, timestamp, required): Start Date as iso date string or timestamp
Argument 2 (JoiTime, timestamp, required): End Date as iso date string or timestamp
Argument 3 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
filter | object | no | |
fieldIds | fieldId[] | no | |
workflowIds | processId[] | no | |
workspaceIds | WorkspaceId[] | no | |
activityIds | activityId[] | no | |
unassigned | boolean | no | Load events with no assigned people |
Example
javascript
const { Client } = require('@hailer/cli');
const client = await Client.create({
host: 'https://api.hailer.com',
username: 'you@example.com',
password: '••••••',
});
const result = await client.request('v3.activity.events', [
Date.now(), // JoiTime (required)
Date.now(), // JoiTime (required)
{
filter: {
and: [{ /* ... */ }],
or: [{ /* ... */ }],
},
fieldIds: ['507f1f77bcf86cd799439011'],
},
]);
console.log(result);Returns
Array of objects:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Event id based on activity id and field id |
title | string | yes | Activity name |
extendedProps | object | yes | Activity meta data |
start | timestamp | yes | Start timestamp |
end | timestamp | any | yes | End timestamp. Will be false on single all day event. |
allDay | boolean | yes | All day event |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.activity.list
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (Workflow object, required):
| Field | Type | Required | Description |
|---|---|---|---|
processId | processId | string | yes | |
phaseId | phaseId | string | yes |
Argument 2 (Options object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
sortBy | name | created | updated | following | owner | team | completedOn | priority | ObjectId | no | Default: "updated". |
sortOrder | asc | desc | no | "asc" for ascending and "desc" for descending order Default: "desc". |
limit | integer | no | Limit the maximum number of results Default: 20. |
page | integer | no | Current page. Default: 1 Default: 0. |
skip | integer | no | Old: Skip the number of first results. Default: 0 Default: 0. |
includeUsers | boolean | no | Includes available users & fields list in the "metadata" object Default: true. |
includeTeams | boolean | no | Includes available teams & accounts list in the "metadata" object Default: true. |
includeDates | boolean | no | Includes primary date range in the "metadata" object Default: false. |
includeStats | boolean | no | Includes stats in the "metadata" object Default: false. |
includeActivityLinks | boolean | no | Includes activity link counts for activities Default: true. |
includeHistory | boolean | no | Includes "history" array of objects with all versions of the activity Default: false. |
filters | any | no | |
filter | any | no | |
search | string | any | no | |
returnFlat | boolean | no | Default: false. |
readPreference | primary | primaryPreferred | secondary | secondaryPreferred | no | Specify an optional readPreference for the query |
useIndexedData | boolean | no | Can prevent the use of IndexedData even if it available in the workspace. Default: true. |
workspaceId | WorkspaceId | no | workspaceId (former networkId) |
Example
javascript
const { Client } = require('@hailer/cli');
const client = await Client.create({
host: 'https://api.hailer.com',
username: 'you@example.com',
password: '••••••',
});
const result = await client.request('v3.activity.list', [
{
processId: '507f1f77bcf86cd799439011',
phaseId: '507f1f77bcf86cd799439011',
},
{
sortBy: 'name',
sortOrder: 'asc', // "asc" for ascending and "desc" for descending order
},
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
activities | object[] | no | |
metadata | object | no |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.activity.timeline
Description
Returns activity events for full-calendar timeline from specified time period and grouped by a field. Allows sending activity filtering
Parameters
Argument 1 (JoiTime, timestamp, required): Start Date as iso date string or timestamp
Argument 2 (JoiTime, timestamp, required): End Date as iso date string or timestamp
Argument 3 (Options, required):
| Field | Type | Required | Description |
|---|---|---|---|
filter | object | no | |
groupBy | Record<string, fieldId | name | team_account> | yes | { WorkflowId: FieldId } to group by |
resourceIds | fieldId[] | no | Show only these resources |
showEmptyResources | boolean | no | Whether to return resources with no events or not |
fieldIds | fieldId[] | no | Which date fields to return events with |
activityIds | activityId[] | no |
Example
javascript
const { Client } = require('@hailer/cli');
const client = await Client.create({
host: 'https://api.hailer.com',
username: 'you@example.com',
password: '••••••',
});
const result = await client.request('v3.activity.timeline', [
Date.now(), // JoiTime (required)
Date.now(), // JoiTime (required)
{
groupBy: {
'507f1f77bcf86cd799439012': '507f1f77bcf86cd799439011', // fieldId: value
}, // { WorkflowId: FieldId } to group by
},
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
activities | object[] | no | |
resources | object[] | no |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.