Appearance
Activities
Activity operations: copy, list, kanban, timeline, files, and field evaluation.
Endpoints
| Endpoint | Arguments | Returns |
|---|---|---|
v2.activities.copy | unknown, Object for storing all optional modifiers for copy behaviour | object[] |
v2.activities.count.linked | unknown | object |
v2.activities.dependentFields | ObjectId, ObjectId | object |
v2.activities.evaluate | ObjectId, unknown, unknown, FunctionDependency, options | object |
v2.activities.evaluateDependencies | unknown, unknown | object |
v2.activities.events | options | object[] |
v2.activities.expired | options | object[] |
v2.activities.files | ObjectId, options | unknown |
v2.activities.kanban.list | ObjectId, options | object |
v2.activities.kanban.load | ObjectId | object |
v2.activities.list | Phase object, Options object | object |
v2.activities.nameIsUnique | ObjectId, unknown | boolean |
v2.activities.removeFollower | options | boolean |
v2.activities.timeline | options | object |
v2.activities.updatePriority | options | unknown |
v2.activities.copy
Description
Creates copies of activities provided in an array. The resulting activities will all be called 'Copy of ...' unless otherwise specified in the rename object within the second parameter. The values in any given field will be kept for all fields used in the initial phase of the workflow.
Example: If supplied the correct activityId for foo, the result will be named Copy of foo. If the rename object was {fooId: 'New Name'} then the result would be New Name.
Parameters
Argument 1 (ObjectId[], required): One or many activityIds to copy
Argument 2 (Object for storing all optional modifiers for copy behaviour, optional):
| Field | Type | Required | Description |
|---|---|---|---|
workspaceId | WorkspaceId | no | workspaceId (former networkId) |
advanced | boolean | no | Check for linked activities and create copies of those with linkage preserved Default: false. |
keepEditableFunctionValues | boolean | no | Copy the stored values of editable function fields as-is instead of re-evaluating them on the copy Default: false. |
rename | Record<activityId, string> | no | activity._id: "newName" Default: null. |
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('v2.activities.copy', [
['507f1f77bcf86cd799439011'],
{
workspaceId: '507f1f77bcf86cd799439011', // workspaceId (former networkId)
advanced: false, // Check for linked activities and create copies of those with linkage preserved
},
]);
console.log(result);Returns
Array of objects:
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | |
name | string | no | |
copyOfActivity | activityId | no | activityId |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
v2.activities.count.linked
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId[], required): ActivityIds you want a linked count for
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('v2.activities.count.linked', [
['507f1f77bcf86cd799439011'],
]);
console.log(result);Returns
Record<string, number>
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
v2.activities.dependentFields
Description
Get dependendent fields of the given fieldId
Parameters
Argument 1 (ObjectId, required): processId
Argument 2 (ObjectId, required): fieldId
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('v2.activities.dependentFields', [
'507f1f77bcf86cd799439011', // ObjectId (required)
'507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
processes | object[] | no | See below. |
unauthorized | number | no |
processes[] (object):
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | no | |
name | string | no | |
fields | object[] | no | See below. |
processes[].fields[] (object):
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | no | |
label | string | no | |
type | string | no | |
functionVariables | any | no |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
v2.activities.evaluate
Description
Dryrun Function Field function
Evaluation of Function Field function on a given activity and field without saving the result, only returning it.
Parameters
Argument 1 (ObjectId, required): activityId
Argument 2 (ObjectId \| name``, required): fieldId
Argument 3 (string, required): code
Argument 4 (FunctionDependency, Record<string, object | object[]>, optional):
Argument 5 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
incomingMaxDepth | integer | no | |
evaluateIncomingNodes | boolean | 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('v2.activities.evaluate', [
'507f1f77bcf86cd799439011', // ObjectId (required)
'507f1f77bcf86cd799439011', // fieldId (required)
'string', // code (required)
{
'507f1f77bcf86cd799439012': {
type: '<',
data: ['string'],
}, // fieldId: value
},
{
incomingMaxDepth: 0,
evaluateIncomingNodes: false,
},
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
activity | object | no | See below. |
context | any | no | Evaluation context for given activity |
Context that is available in the function execution sandbox | | issues | object | no | Default: {"unusedDependencies":[],"noFunctionBody":false,"hasStackedDependencies":false}. See below. | | meta | object | no | See below. | | error | string | no | | | metrics | any | no | Metrics for Function Fields Evaluation | | cost | any | no | Token Cost for Evaluation |
activity (object):
| Field | Type | Required | Description |
|---|---|---|---|
_id | activityId | yes | activityId |
process | processId | yes | workflowId |
name | string | no | |
nameError | string | no | |
created | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
updated | timestamp | no | Time (milliseconds since 1970-01-01 UTC) |
cid | WorkspaceId | yes | workspaceId (former networkId) |
currentPhase | phaseId | yes | phaseId (phase in a Workflow) |
fields | object[] | no | See below. |
sequence | number | no |
activity.fields[] (object):
| Field | Type | Required | Description |
|---|---|---|---|
id | ObjectId | yes | |
value | any | yes | |
type | string | yes | One of: activitylink, country, date, daterange, datetime, datetimerange, numeric, numericunit, teams, text, textarea, textunit, textpredefinedoptions, time, timerange, users, linkedfrom, subheader. |
error | string | no |
issues (object):
| Field | Type | Required | Description |
|---|---|---|---|
unusedDependencies | string[] | no | Default: []. |
noFunctionBody | boolean | no | Default: false. |
hasStackedDependencies | boolean | no | Default: false. |
meta (object):
| Field | Type | Required | Description |
|---|---|---|---|
stable | boolean | no | true if all fields could be evaluated to a stable value |
fields | Record<string, object> | no | Field level stability and errors. See below. |
dryRun | object | no | Dry-run comparison data for the requested field. See below. |
error | string | no |
meta.fields.* (object):
| Field | Type | Required | Description |
|---|---|---|---|
stable | boolean | no | |
error | string | no |
meta.dryRun (object):
| Field | Type | Required | Description |
|---|---|---|---|
fieldId | ObjectId | name | yes | |
editable | boolean | yes | |
currentValue | any | no | |
evaluatedValue | any | no | |
evaluated | boolean | yes |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
v2.activities.evaluateDependencies
Description
Get dependency graph to the field
Parameters
Argument 1 (ObjectId[], required): activityIds
Argument 2 (ObjectId[], required): fieldIds
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('v2.activities.evaluateDependencies', [
['507f1f77bcf86cd799439011'],
['507f1f77bcf86cd799439011'],
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
nodes | object[] | no | See below. |
edges | object[] | no | See below. |
nodes[] (object):
| Field | Type | Required | Description |
|---|---|---|---|
id | string | no | |
label | string | no | |
parent | string | no | |
classes | string[] | no |
edges[] (object):
| Field | Type | Required | Description |
|---|---|---|---|
id | string | no | |
source | string | no | |
target | string | no |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
v2.activities.events
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
dates | object | yes | See below. |
filter | object | no | Optional filtering See below. |
dates (object):
| Field | Type | Required | Description |
|---|---|---|---|
start | timestamp | yes | Start Date as iso date string or timestamp |
end | timestamp | yes | End Date as iso date string or timestamp |
filter (object):
| Field | Type | Required | Description |
|---|---|---|---|
user | ObjectId[] | no | User IDs |
field | ObjectId[] | no | Date field IDs |
hideUnassigned | boolean | no | Hide unassigned |
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('v2.activities.events', [
{
dates: {
start: Date.now(), // Start Date as iso date string or timestamp
end: Date.now(), // End Date as iso date string or timestamp
},
},
]);
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 See below. |
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 |
extendedProps (object):
| Field | Type | Required | Description |
|---|---|---|---|
activity_id | ObjectId | yes | Activity id |
created | timestamp | yes | Activity creation date |
updated | timestamp | yes | Activity modification date |
completed | timestamp | no | Activity completion date |
phase | object | yes | Phase Meta See below. |
process | object | yes | Process Meta See below. |
field | object | yes | Field Meta See below. |
extendedProps.phase (object):
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | Phase id |
name | string | yes | Phase name |
isEndpoint | boolean | no | Is Phase endpoint |
extendedProps.process (object):
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | Process id |
name | string | yes | Process name |
extendedProps.field (object):
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | Field id |
label | string | yes | Field label |
type | date | time | daterange | timerange | datetime | datetimerange | yes | Field type |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
v2.activities.expired
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
processes | ObjectId[] | yes | Processes to look for overdue activities. |
phases | ObjectId[] | no | Phases to look in for overdue activities. |
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('v2.activities.expired', [
{
processes: ['507f1f77bcf86cd799439011'], // Processes to look for overdue activities.
},
]);
console.log(result);Returns
Array of objects:
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | |
name | string | yes | |
process | object | no | See below. |
phase | object | no | See below. |
isFollowed | boolean | no | |
discussion | ObjectId | no | |
field | object | no | See below. |
daysOverdue | integer | no |
process (object):
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | no | |
name | string | no |
phase (object):
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | no | |
name | string | no |
field (object):
| Field | Type | Required | Description |
|---|---|---|---|
id | ObjectId | no | |
value | timestamp | object | no | |
type | string | no | |
label | string | no |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
v2.activities.files
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required):
Argument 2 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
limit | number | no | |
skip | number | no | |
search | string | 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('v2.activities.files', [
'507f1f77bcf86cd799439011', // ObjectId (required)
{
limit: 0,
skip: 0,
},
]);
console.log(result);Returns
Undocumented
The return value is not described in the source yet.
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
v2.activities.kanban.list
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required):
Argument 2 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
filter | object | no | See below. |
search | string | no | Default: null. |
limit | integer | no | Default: 20. |
skip | integer | no | Default: 0. |
phase | ObjectId | no | Limits query to one phase only. |
includeUsers | boolean | no | Include available user & field list. Default true Default: true. |
includeTeams | boolean | no | Includes available team & account list. Default true. Default: true. |
filter (object):
| Field | Type | Required | Description |
|---|---|---|---|
user | object | no | See below. |
account | ObjectId | no | |
team | ObjectId | no | |
dates | object | no | See below. |
ballHolder | userId | no | Filter by ball holder userId |
filter.user (object):
| Field | Type | Required | Description |
|---|---|---|---|
uid | ObjectId | yes | |
field | ObjectId | yes |
filter.dates (object):
| Field | Type | Required | Description |
|---|---|---|---|
field | ObjectId | yes | |
start | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
end | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
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('v2.activities.kanban.list', [
'507f1f77bcf86cd799439011', // ObjectId (required)
{
filter: {
user: { /* ... */ },
account: '507f1f77bcf86cd799439011',
},
search: 'string',
},
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
map | Record<string, object> | no | The map contains phases grouped by phaseId containing activities and meta for phase |
typescript
map: { [phaseId: string]: {
activities: {
_id: validObjectId.required(),
followers: Joi.array().items(Joi.string().hex().length(24)),
name: Joi.string(),
fields: ,
files: Joi.array().items(validObjectId),
primaryDateField: JoiDate,
priority: Joi.number(),
}[]
meta: {
count: number,
totalPrimaryNumericValue: number,
primaryNumericFieldUnit: string \| null
}
}
``` See below. |
| `meta` | object | no | See below. |
**`map.*`** (object):
| Field | Type | Required | Description |
|---|---|---|---|
| `activities` | object[] | no | See below. |
| `meta` | object | no | See below. |
**`map.*.activities[]`** (object):
| Field | Type | Required | Description |
|---|---|---|---|
| `_id` | ObjectId | yes | |
| `followers` | ObjectId[] | no | |
| `name` | string | no | |
| `fields` | Record<string, object> | no | Fields of activity, format of items is dependent on the configuration of the process given in `process` field. See below. |
| `files` | ObjectId[] | no | |
| `primaryDateField` | date | no | Date (Time 00:00:00.000 of day starting milliseconds since 1970-01-01 UTC) |
| `priority` | number | no | |
| `linkedFromCount` | number | no | |
| `ballHolder` | object | no | See below. |
| `discussion` | discussionId | no | discussionId |
**`map.*.activities[].fields.*`** (object):
| Field | Type | Required | Description |
|---|---|---|---|
| `type` | string | yes | One of: `activitylink`, `country`, `date`, `daterange`, `datetime`, `datetimerange`, `numeric`, `numericunit`, `teams`, `text`, `textarea`, `textunit`, `textpredefinedoptions`, `time`, `timerange`, `users`, `linkedfrom`, `subheader`. |
| `value` | any | no | |
**`map.*.activities[].ballHolder`** (object):
| Field | Type | Required | Description |
|---|---|---|---|
| `userId` | ObjectId | yes | |
| `assignedAt` | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
| `assignedBy` | ObjectId | yes | |
**`map.*.meta`** (object):
| Field | Type | Required | Description |
|---|---|---|---|
| `_id` | string | no | |
| `count` | number | yes | |
| `totalPrimaryNumericValue` | number | no | |
| `primaryNumericFieldUnit` | string | no | |
**`meta`** (object):
| Field | Type | Required | Description |
|---|---|---|---|
| `users` | Record<string, ObjectId[]> | no | `[fieldId string]: userId[]` |
| `teams` | Record<string, ObjectId[]> | no | `[teamId: string]: accountId[]` |
**Auth:** requires an authenticated session.
**Errors:** on failure returns the standard Hailer error object `{ code, msg, details?, retryAfter?, debug? }`. `retryAfter` is a delay in milliseconds.
## `v2.activities.kanban.load`
**Description**
::: warning Undocumented
This endpoint has no description in the source yet.
:::
**Parameters**
**Argument 1 (`ObjectId`, required):** Activity id
**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('v2.activities.kanban.load', [
'507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
activity | object | no | See below. |
process | processId | no | workflowId |
phase | phaseId | no | phaseId (phase in a Workflow) |
activity (object):
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | |
followers | ObjectId[] | no | |
name | string | no | |
fields | Record<string, object> | no | Fields of activity, format of items is dependent on the configuration of the process given in process field. See below. |
files | ObjectId[] | no | |
primaryDateField | date | no | Date (Time 00:00:00.000 of day starting milliseconds since 1970-01-01 UTC) |
priority | number | no | |
linkedFromCount | number | no | |
ballHolder | object | no | See below. |
discussion | discussionId | no | discussionId |
activity.fields.* (object):
| Field | Type | Required | Description |
|---|---|---|---|
type | string | yes | One of: activitylink, country, date, daterange, datetime, datetimerange, numeric, numericunit, teams, text, textarea, textunit, textpredefinedoptions, time, timerange, users, linkedfrom, subheader. |
value | any | no |
activity.ballHolder (object):
| Field | Type | Required | Description |
|---|---|---|---|
userId | ObjectId | yes | |
assignedAt | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
assignedBy | ObjectId | yes |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
v2.activities.list
Description
With this function, you can get the activities of one workflow and phase (or of one dataset and category) listed by calling the function with workflowId (optional) and phaseId (required) in the Phase object. The successful response will be "activities" array of activity objects and a "metadata" object.
You can sort and filter the list of activities with the Options object. The successful response has up to 20 activities sorted by the latest update time and date in descending order by default. All options for sorting and filtering are listed in the request body schema below.
Parameters
Argument 1 (Phase object, required):
| Field | Type | Required | Description |
|---|---|---|---|
process | processId | no | workflowId |
phase | phaseId | yes | phaseId (phase in a Workflow) |
Argument 2 (Options object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
sortBy | name | created | updated | following | owner | team | completedOn | priority | sequence | ObjectId | no | Default: "updated". |
sortOrder | asc | desc | no | "asc" for ascending and "desc" for descending order Default: "desc". |
filter | object | no | See below. |
search | string | no | |
limit | integer | no | Limit the maximum number of results Default: 20. |
skip | integer | no | Skip the number of the 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. |
includeHistory | boolean | no | Includes "history" array of objects with all versions of the activity Default: false. |
filter (object):
| Field | Type | Required | Description |
|---|---|---|---|
user | object | no | See below. |
account | ObjectId | no | accountId |
team | teamId | no | teamId |
dates | object | no | See below. |
ballHolder | userId | no | Filter by ball holder userId |
filter.user (object):
| Field | Type | Required | Description |
|---|---|---|---|
uid | userId | yes | userId |
field | fieldId | yes | fieldId |
filter.dates (object):
| Field | Type | Required | Description |
|---|---|---|---|
start | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
end | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
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('v2.activities.list', [
{
phase: '507f1f77bcf86cd799439011', // phaseId (phase in a Workflow)
},
{
sortBy: 'name',
sortOrder: 'asc', // "asc" for ascending and "desc" for descending order
},
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
activities | object[] | no | See below. |
metadata | object | no | See below. |
activities[] (object):
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | The _id of the activity |
process | processId | yes | workflowId |
followers | ObjectId[] | no | userId(s) invited to the activity discussion |
team_account | object | yes | See below. |
name | string | no | |
created | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
updated | timestamp | no | Time (milliseconds since 1970-01-01 UTC) |
uid | userId | yes | userId |
currentPhase | phaseId | yes | phaseId (phase in a Workflow) |
discussion | discussionId | yes | discussionId |
fields | Record<string, object> | no | Fields of the activity. The format of the items is dependent on the configuration of the process given in process field. See below. |
history | any | no | All versions of the activity |
files | fileId[] | no | |
priority | integer | no | |
active | boolean | no | Activity not in endpoint phase is considered active |
location | object | no | See below. |
sequence | integer | no | |
ballHolder | object | no | See below. |
activities[].team_account (object):
| Field | Type | Required | Description |
|---|---|---|---|
account | ObjectId | yes | accountId |
team | ObjectId | yes | teamId |
activities[].fields.* (object):
| Field | Type | Required | Description |
|---|---|---|---|
type | string | yes | One of: activitylink, country, date, daterange, datetime, datetimerange, numeric, numericunit, teams, text, textarea, textunit, textpredefinedoptions, time, timerange, users, linkedfrom, subheader. |
value | any | no |
activities[].location (object):
| Field | Type | Required | Description |
|---|---|---|---|
type | point | area | polyline | no | |
label | string | no | |
data | object[] | no | See below. |
activities[].location.data[] (object):
| Field | Type | Required | Description |
|---|---|---|---|
lat | number | no | Latitude |
lng | number | no | Longitude |
activities[].ballHolder (object):
| Field | Type | Required | Description |
|---|---|---|---|
userId | ObjectId | yes | |
assignedAt | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
assignedBy | ObjectId | yes |
metadata (object):
| Field | Type | Required | Description |
|---|---|---|---|
activityLinks | Record<string, number> | no | [activity string]: number |
totalCount | integer | yes | Total number of activities in the phase |
users | Record<string, ObjectId[]> | no | fieldIds as keys and userIds as values |
teams | Record<string, ObjectId[]> | no | teamIds as keys and accountIds as values |
dates | object | no | See below. |
totalPrimaryNumericValue | number | no | |
behindSchedule | integer | no | The number of activities that are due now compared to Primary Date Value |
lessThanOneWeek | integer | no | The number of activities that are due in less than one week compared to Primary Date Value |
onSchedule | integer | no | The number of activities that are due in more than one week compared to Primary Date Value |
behindScheduleValue | number | no | |
lessThanOneWeekValue | number | no | |
onScheduleValue | number | no | |
primaryNumericFieldUnit | string | no |
metadata.dates (object):
| Field | Type | Required | Description |
|---|---|---|---|
start | timestamp | no | Time (milliseconds since 1970-01-01 UTC) |
end | timestamp | no | Time (milliseconds since 1970-01-01 UTC) |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
v2.activities.nameIsUnique
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required): Process ID
Argument 2 (string, required): Activity name to check
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('v2.activities.nameIsUnique', [
'507f1f77bcf86cd799439011', // ObjectId (required)
'string', // Activity name to check (required)
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
v2.activities.removeFollower
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
activityId | ObjectId | yes | activityId of the activity user needs to be removed from |
userId | ObjectId | yes | userId of the to be removed user |
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('v2.activities.removeFollower', [
{
activityId: '507f1f77bcf86cd799439011', // activityId of the activity user needs to be removed from
userId: '507f1f77bcf86cd799439011', // userId of the to be removed user
},
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
v2.activities.timeline
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
dateFieldId | ObjectId | yes | |
dates | object | yes | See below. |
groupByFieldId | ObjectId | name | team_account | no | Field to group results by |
phaseIds | ObjectId[] | yes | |
processId | ObjectId | yes | |
resourceIds | ObjectId[] | no | |
search | string | no | |
showEmptyResources | boolean | no | |
teamAccount | ObjectId | no | |
user | object | no | See below. |
dates (object):
| Field | Type | Required | Description |
|---|---|---|---|
start | date | yes | Date (Time 00:00:00.000 of day starting milliseconds since 1970-01-01 UTC) |
end | date | yes | Date (Time 00:00:00.000 of day starting milliseconds since 1970-01-01 UTC) |
user (object):
| Field | Type | Required | Description |
|---|---|---|---|
uid | ObjectId | yes | |
field | ObjectId | yes |
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('v2.activities.timeline', [
{
dateFieldId: '507f1f77bcf86cd799439011',
dates: {
start: Date.now(), // Date (Time 00:00:00.000 of day starting milliseconds since 1970-01-01 UTC)
end: Date.now(), // Date (Time 00:00:00.000 of day starting milliseconds since 1970-01-01 UTC)
},
phaseIds: ['507f1f77bcf86cd799439011'],
processId: '507f1f77bcf86cd799439011',
},
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
activities | object[] | no | See below. |
metadata | object | no | See below. |
activities[] (object):
| Field | Type | Required | Description |
|---|---|---|---|
active | boolean | yes | |
allDay | boolean | yes | |
end | timestamp | boolean | no | |
fields | object[] | no | See below. |
id | ObjectId | no | |
currentPhase | phaseId | no | phaseId (phase in a Workflow) |
resourceId | string | no | |
start | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
title | string | no | |
ballHolder | object | no | See below. |
discussion | ObjectId | no |
activities[].fields[] (object):
| Field | Type | Required | Description |
|---|---|---|---|
id | ObjectId | yes | |
type | string | yes | One of: activitylink, country, date, daterange, datetime, datetimerange, numeric, numericunit, teams, text, textarea, textunit, textpredefinedoptions, time, timerange, users, linkedfrom, subheader. |
value | any | no | |
error | string | no |
activities[].ballHolder (object):
| Field | Type | Required | Description |
|---|---|---|---|
userId | ObjectId | yes | |
assignedAt | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
assignedBy | ObjectId | yes |
metadata (object):
| Field | Type | Required | Description |
|---|---|---|---|
activityLinks | object | no | |
totalCount | number | yes | |
users | Record<string, ObjectId[]> | no | [fieldId string]: userId[] |
teams | Record<string, ObjectId[]> | no | [teamId: string]: accountId[] |
dates | object | no | See below. |
totalPrimaryNumericValue | number | no | |
behindSchedule | number | no | |
lessThanOneWeek | number | no | |
onSchedule | number | no | |
behindScheduleValue | number | no | |
lessThanOneWeekValue | number | no | |
onScheduleValue | number | no | |
primaryNumericFieldUnit | string | no | |
resourceGroupField | ObjectId | name | team_account | no | |
resources | object[] | no | See below. |
metadata.dates (object):
| Field | Type | Required | Description |
|---|---|---|---|
start | string | number | no | |
end | string | number | no |
metadata.resources[] (object):
| Field | Type | Required | Description |
|---|---|---|---|
id | name | team_account | ObjectId | yes | |
title | string | yes |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.
v2.activities.updatePriority
Description
Update one or many priority fields in a phase.Ex: change position for activity in Kanban view.Function only used when change position for an activity in same phase
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
activityId | ObjectId | yes | activityId of changed activity |
priority | number | yes | New priority number for changed activity |
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('v2.activities.updatePriority', [
{
activityId: '507f1f77bcf86cd799439011', // activityId of changed activity
priority: 0, // New priority number for changed activity
},
]);
console.log(result);Returns
Undocumented
The return value is not described in the source yet.
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.