Appearance
Activity
Create, read, update, remove and manage activities (the records inside workflows).
Endpoints
v3.activity.ball.candidates
Description
List users eligible to receive the ball for an activity. Returns the activity followers (the users that are part of the activity), which is the same set the activity participants sidenav shows. Any of them can be passed the ball.
Parameters
Argument 1 (activityId, required): activityId
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.ball.candidates', [
'507f1f77bcf86cd799439011', // activityId (required)
]);
console.log(result);Returns
Array of userId.
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.activity.ball.clear
Description
Clear the ball (active responsibility) for an activity, leaving it with no holder.
Parameters
Argument 1 (activityId, required): activityId
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.ball.clear', [
'507f1f77bcf86cd799439011', // activityId (required)
]);
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?, debug? }.
v3.activity.ball.list
Description
Get ball holders for activity discussions the user participates in. Pass "*" to return every ball holder the caller can see, or an array of discussionIds to restrict the result. Unknown or non-participant discussionIds are silently dropped.
Parameters
Argument 1 (``* \| discussionId[], required): Either "*" for all, or an array of discussionIds
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.ball.list', [
'*', // Either "*" for all, or an array of discussionIds (required)
]);
console.log(result);Returns
Array of object.
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.activity.ball.pass
Description
Pass the ball (active responsibility) for an activity to another user.
Parameters
Argument 1 (activityId, required): activityId
Argument 2 (userId, required): userId
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.ball.pass', [
'507f1f77bcf86cd799439011', // activityId (required)
'507f1f77bcf86cd799439011', // userId (required)
]);
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?, debug? }.
v3.activity.ball.take
Description
Take the ball (active responsibility) for an activity, assigning it to yourself.
Parameters
Argument 1 (activityId, required): activityId
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.ball.take', [
'507f1f77bcf86cd799439011', // activityId (required)
]);
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?, debug? }.
v3.activity.buildPhaseCountCache
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Undocumented
This endpoint declares no argument schema in the source yet.
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.buildPhaseCountCache', []);
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?, debug? }.
v3.activity.convertStackedVariables
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Undocumented
This endpoint declares no argument schema in the source yet.
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.convertStackedVariables', []);
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?, debug? }.
v3.activity.count
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (processId, optional): Workflow 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('v3.activity.count', [
'507f1f77bcf86cd799439011', // processId
]);
console.log(result);Returns
Record<string, number>
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.activity.create
Description
Creates one single activity, for creating multiple activities at a time use v3.activity.createMany. Aside from the amount of Activities created, they function the same way.
Parameters
Argument 1 (processId, required): workflowId
Argument 2 (Activity object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | |
fields | Record<string, any> | no | |
fileIds | fileId[] | no | |
followerIds | userId[] | no | List of userIds to invite to activity discussion |
location | object | no | |
teamId | teamId | no | teamId |
phaseId | phaseId | no | phaseId (phase in a Workflow) |
Argument 3 (Options object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
teamId | ObjectId | no | Default team if not given in activity |
fileIds | ObjectId[] | no | |
followerIds | ObjectId[] | no | |
location | object | no | |
discussionId | ObjectId | no | |
phaseId | phaseId | no | phaseId (phase in a Workflow) |
ignoreRequired | boolean | no | Ignore required fields Default: false. |
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.create', [
'507f1f77bcf86cd799439011', // processId (required)
{
name: 'string',
fields: {
'507f1f77bcf86cd799439012': '...', // fieldId: value
},
},
{
teamId: '507f1f77bcf86cd799439011', // Default team if not given in activity
fileIds: ['507f1f77bcf86cd799439011'],
},
]);
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?, debug? }.
v3.activity.createMany
Description
This function is used to create one or more activities at the same time, all in the same workflow.
workflowId and at least one Activity object is required to call this endpoint. If you also provide an Options object, all the activities will have the info set in the Options object, unless otherwise specified in an Activity object. In other words, an Options object will not overwrite what is set in an Activity object, but it is useful for decreasing repetition.
If you do not know what exact fields are being used, we recommend you to start with v3.activity.template.create to acquire a template to base your calls off of.
If you do not have a predefined Owner Team in the workflow, you need to set a teamId either in an Activity object or in an Options object.
Parameters
Argument 1 (processId \| string, required):
Argument 2 (object[], required): Activity object(s)
Argument 3 (Options object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
teamId | teamId | no | teamId |
fileIds | fileId[] | no | fileIds of files to upload to the activity/activities |
followerIds | userId[] | no | userId's of users to invite to the activity discussion(s) |
location | object | no | |
discussionId | discussionId | no | discussionId |
phaseId | phaseId | string | no | |
returnDocument | boolean | no | Return name, fields, followers, teamId, sequence and priority |
ignoreRequired | boolean | no | Ignore required fields Default: false. |
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.createMany', [
'507f1f77bcf86cd799439011', // argument 1 (required)
[{
name: 'string',
fields: {
'507f1f77bcf86cd799439012': '...', // fieldId: value
}, // fieldIds as keys and desired field values as values
}],
{
teamId: '507f1f77bcf86cd799439011', // teamId
fileIds: ['507f1f77bcf86cd799439011'], // fileIds of files to upload to the activity/activities
},
]);
console.log(result);Returns
Array of objects:
| Field | Type | Required | Description |
|---|---|---|---|
_id | activityId | yes | activityId |
uid | userId | yes | userId |
cid | WorkspaceId | yes | workspaceId (former networkId) |
name | string | yes | |
fields | object[] | no | |
files | fileId[] | no | |
location | object | no | |
created | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
updated | timestamp | no | Time (milliseconds since 1970-01-01 UTC) |
discussion | discussionId | yes | discussionId |
followers | userId[] | yes | users invited to the activity discussion(s) |
team_account | object | yes | |
sequence | integer | no | |
priority | integer | no | |
process | processId | string | yes | |
currentPhase | phaseId | yes | phaseId (phase in a Workflow) |
completePhases | phaseId[] | no | |
ballHolder | object | no |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.activity.evaluateAllFunctions
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Undocumented
This endpoint declares no argument schema in the source yet.
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.evaluateAllFunctions', []);
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?, debug? }.
v3.activity.evaluateMany
Description
Dryrun on multiple function fields
Evaluation of Function Field functions on a given activity and field without saving the result, only returning it.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
processId | processId | yes | workflowId |
phaseId | phaseId | no | phaseId (phase in a Workflow) |
_id | activityId | no | activityId |
name | string | no | |
fields | Record<string, any> | 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.evaluateMany', [
{
processId: '507f1f77bcf86cd799439011', // workflowId
},
]);
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?, debug? }.
v3.activity.evaluateWorkflowFunctions.logs
Description
Loads persisted progress for a workflow function-field evaluate-all run.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
runId | ObjectId | yes | |
afterTs | integer | no | |
limit | integer | no | Default: 200. |
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.evaluateWorkflowFunctions.logs', [
{
runId: '507f1f77bcf86cd799439011',
},
]);
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?, debug? }.
v3.activity.evaluateWorkflowFunctions.start
Description
Starts a workflow-scoped fast function-field evaluate-all run.
Only workspace admins and owners may start runs. The run is asynchronous and progress is persisted for polling/reconnect.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
processId | processId | yes | workflowId |
fieldIds | fieldId | string[] | no | |
apply | boolean | no | Default: false. |
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.evaluateWorkflowFunctions.start', [
{
processId: '507f1f77bcf86cd799439011', // workflowId
},
]);
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?, debug? }.
v3.activity.explainNode
Description
Explain incoming dependencies and outgoing dependents for one activity field node.
The start node is exact: activityId + fieldId. The field does not need to be a function field; non-function fields can still have outgoing dependents.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
activityId | activityId | yes | activityId |
fieldId | fieldId | string | yes | |
direction | incoming | outgoing | both | no | Default: "both". One of: incoming, outgoing, both. |
graphMode | configured | runtime | no | Default: "configured". One of: configured, runtime. |
maxDepth | integer | no | Default: 8. |
incomingMaxDepth | integer | no | |
outgoingMaxDepth | integer | no | |
includeValues | boolean | no | Default: false. |
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.explainNode', [
{
activityId: '507f1f77bcf86cd799439011', // activityId
fieldId: '507f1f77bcf86cd799439011',
},
]);
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?, debug? }.
v3.activity.explainNode.assist
Description
Generate an AI analysis for one Explain Node graph.
This endpoint is read-only. It uses the deterministic Explain Node graph as the source of truth and does not suggest code or workflow fixes.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
activityId | activityId | yes | activityId |
fieldId | fieldId | string | yes | |
direction | incoming | outgoing | both | no | Default: "both". One of: incoming, outgoing, both. |
graphMode | configured | runtime | no | Default: "configured". One of: configured, runtime. |
maxDepth | integer | no | Default: 8. |
incomingMaxDepth | integer | no | |
outgoingMaxDepth | integer | no | |
includeValues | boolean | no | Default: false. |
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.explainNode.assist', [
{
activityId: '507f1f77bcf86cd799439011', // activityId
fieldId: '507f1f77bcf86cd799439011',
},
]);
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?, debug? }.
v3.activity.explainNodeDryRun
Description
Dry-run the active function for one activity field node from Explain Node.
This is read-only and intended for admins/owners debugging the function-field graph.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
activityId | activityId | yes | activityId |
fieldId | fieldId | string | yes | |
incomingMaxDepth | integer | no | |
includeContext | boolean | no | Default: false. |
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.explainNodeDryRun', [
{
activityId: '507f1f77bcf86cd799439011', // activityId
fieldId: '507f1f77bcf86cd799439011',
},
]);
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?, debug? }.
v3.activity.extractHistory
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Undocumented
This endpoint declares no argument schema in the source yet.
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.extractHistory', []);
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?, debug? }.
v3.activity.forceRepairPath
Description
Force-repair the upstream function-field path for one activity field.
Force repair does not trust editable values; configured cycles block the repair before writes happen.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
activityId | activityId | yes | activityId |
fieldId | fieldId | string | yes | |
incomingMaxDepth | integer | no | |
outgoingMaxDepth | integer | no | |
includeValues | boolean | no | Default: true. |
writeValues | boolean | no | Default: false. |
propagateDependents | boolean | no | Default: true. |
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.forceRepairPath', [
{
activityId: '507f1f77bcf86cd799439011', // activityId
fieldId: '507f1f77bcf86cd799439011',
},
]);
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?, debug? }.
v3.activity.forceRepairWorkflowPath
Description
Force-repair the selected function field for every active activity in one workflow.
Force repair does not trust editable values; activities with configured cycles are reported as blocked without writes.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
workflowId | processId | yes | workflowId |
fieldId | fieldId | string | yes | |
incomingMaxDepth | integer | no | |
outgoingMaxDepth | integer | no | |
includeValues | boolean | no | Default: true. |
writeValues | boolean | no | Default: false. |
propagateDependents | boolean | no | Default: true. |
limit | integer | no | |
includeActivityResults | boolean | no | Default: true. |
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.forceRepairWorkflowPath', [
{
workflowId: '507f1f77bcf86cd799439011', // workflowId
fieldId: '507f1f77bcf86cd799439011',
},
]);
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?, debug? }.
v3.activity.functionField.assist
Description
Generate, improve, or explain a Function Field JavaScript body using Anthropic Claude.
This endpoint returns a suggestion only. It does not save or mutate the workflow.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
mode | generate | improve | explain | yes | One of: generate, improve, explain. |
instruction | string | no | |
code | string | no | |
activityId | activityId | yes | activityId |
workflow | object | yes | |
field | object | yes | |
dependencies | object[] | no | Default: []. |
functionVariables | object | no | Default: {}. |
currentEvaluation | object | no | Default: {}. |
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.functionField.assist', [
{
mode: 'generate',
activityId: '507f1f77bcf86cd799439011', // activityId
workflow: {
id: '507f1f77bcf86cd799439011', // workflowId
},
field: {
id: '507f1f77bcf86cd799439011',
},
},
]);
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?, debug? }.
v3.activity.linkedFrom.next
Description
Loads linked activities after specified activityId
Parameters
Argument 1 (activityId, required): Fetch activities that are linked to specified activity id
Argument 2 (activityId, required): Loads activities that are after this specified activityId
Argument 3 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
activityLimit | number | no | Limit of activities to load per phase |
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.linkedFrom.next', [
'507f1f77bcf86cd799439011', // activityId (required)
'507f1f77bcf86cd799439011', // activityId (required)
{
activityLimit: 0, // Limit of activities to load per phase
},
]);
console.log(result);Returns
Array of objects:
| Field | Type | Required | Description |
|---|---|---|---|
_id | activityId | yes | activityId |
name | string | yes | |
index | number | yes | |
currentPhase | phaseId | yes | phaseId (phase in a Workflow) |
primaryNumericField | number | no | |
primaryDateField | number | no |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.activity.linkedFrom.overview
Description
Loads given amount of linked activities.
Parameters
Argument 1 (activityId, required): Fetch activities that are linked to specified activity id
Argument 2 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
activityLimit | number | no | Limit of activities to load per phase |
includeEmptyWorkflows | boolean | no | Option to return workflows with no linked activities Default: false. |
phaseIds | phaseId[] | 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.linkedFrom.overview', [
'507f1f77bcf86cd799439011', // activityId (required)
{
activityLimit: 0, // Limit of activities to load per phase
includeEmptyWorkflows: false, // Option to return workflows with no linked activities
},
]);
console.log(result);Returns
Record<processId, object>
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.activity.linkedFrom.refresh
Description
Loads specified linked activities in a specified phase
Parameters
Argument 1 (activityId, required): Fetch activities that are linked to specified activity id
Argument 2 (phaseId, required): Linked phaseId to load linked activities from
Argument 3 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
activityIds | activityId[] | no | Activities to load in specified phase |
searchString | string | no | Search string. Matches activity name |
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.linkedFrom.refresh', [
'507f1f77bcf86cd799439011', // activityId (required)
'507f1f77bcf86cd799439011', // phaseId (required)
{
activityIds: ['507f1f77bcf86cd799439011'], // Activities to load in specified phase
searchString: 'string', // Search string. Matches activity name
},
]);
console.log(result);Returns
Record<processId, object>
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.activity.linkedFrom.search
Description
Searches linked activities
Parameters
Argument 1 (activityId, required): Fetch activities that are linked to specified activity id
Argument 2 (string, required): Search string. Matches activity name
Argument 3 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
activityLimit | number | no | Limit of activities to load per phase |
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.linkedFrom.search', [
'507f1f77bcf86cd799439011', // activityId (required)
'string', // Search string. Matches activity name (required)
{
activityLimit: 0, // Limit of activities to load per phase
},
]);
console.log(result);Returns
Record<processId, object>
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.activity.permissions
Description
Will return the permissions of the user in the specified network.
As an admin you can check the permissions of other users in your workspace.
Parameters
Argument 1 (userId, required): userId
Argument 2 (WorkspaceId, required): workspaceId (former networkId)
Argument 3 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
details | boolean | no | One of: true. |
items | object | no | Exact match on specific Ids for quicker permission lookup. |
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.permissions', [
'507f1f77bcf86cd799439011', // userId (required)
'507f1f77bcf86cd799439011', // WorkspaceId (required)
{
details: false,
items: {
workflowIds: ['507f1f77bcf86cd799439011'],
calendarIds: ['507f1f77bcf86cd799439011'],
}, // Exact match on specific Ids for quicker permission lookup.
},
]);
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?, debug? }.
v3.activity.phaseCount
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (processId, optional): workflowId
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.phaseCount', [
'507f1f77bcf86cd799439011', // processId
]);
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?, debug? }.
v3.activity.removed.more
Description
Lists activities from activityRemoved collection
Parameters
Argument 1 (phaseId, required): phaseId (phase in a Workflow)
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('v3.activity.removed.more', [
'507f1f77bcf86cd799439011', // phaseId (required)
{
limit: 0,
skip: 0,
},
]);
console.log(result);Returns
Array of objects:
| Field | Type | Required | Description |
|---|---|---|---|
_id | activityId | yes | activityId |
name | string | yes | |
removedOn | timestamp | no | Time (milliseconds since 1970-01-01 UTC) |
removedBy | userId | no | userId |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.activity.removed.overview
Description
Lists activities from activityRemoved collection
Parameters
Argument 1 (processId[], required):
Argument 2 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
limit | 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('v3.activity.removed.overview', [
['507f1f77bcf86cd799439011'],
{
limit: 0,
search: 'string',
},
]);
console.log(result);Returns
Record<processId, Record<phaseId, object[]>>
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.activity.removed.recover
Description
Recover activities from activityRemoved collection
Parameters
Argument 1 (activityId[], required):
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.removed.recover', [
['507f1f77bcf86cd799439011'],
]);
console.log(result);Returns
Array of activityId.
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.activity.repairPath
Description
Repair the upstream function-field path for one activity field.
Safe repair trusts editable function fields that already have values, then optionally propagates downstream dependents.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
activityId | activityId | yes | activityId |
fieldId | fieldId | string | yes | |
incomingMaxDepth | integer | no | |
outgoingMaxDepth | integer | no | |
includeValues | boolean | no | Default: true. |
writeValues | boolean | no | Default: false. |
propagateDependents | boolean | no | Default: true. |
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.repairPath', [
{
activityId: '507f1f77bcf86cd799439011', // activityId
fieldId: '507f1f77bcf86cd799439011',
},
]);
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?, debug? }.
v3.activity.repairPathDryRun
Description
Plan a repair-path operation without evaluating or writing values.
Set force=true to inspect forceRepairPath behavior without committing any changes.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
activityId | activityId | yes | activityId |
fieldId | fieldId | string | yes | |
incomingMaxDepth | integer | no | |
outgoingMaxDepth | integer | no | |
includeValues | boolean | no | Default: true. |
propagateDependents | boolean | no | Default: true. |
force | boolean | no | Default: false. |
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.repairPathDryRun', [
{
activityId: '507f1f77bcf86cd799439011', // activityId
fieldId: '507f1f77bcf86cd799439011',
},
]);
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?, debug? }.
v3.activity.repairWorkflowPath
Description
Repair the selected function field for every active activity in one workflow.
The workflow is only the batch selector; each activity still gets an activity-scoped repair plan.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
workflowId | processId | yes | workflowId |
fieldId | fieldId | string | yes | |
incomingMaxDepth | integer | no | |
outgoingMaxDepth | integer | no | |
includeValues | boolean | no | Default: true. |
writeValues | boolean | no | Default: false. |
propagateDependents | boolean | no | Default: true. |
limit | integer | no | |
includeActivityResults | boolean | no | Default: true. |
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.repairWorkflowPath', [
{
workflowId: '507f1f77bcf86cd799439011', // workflowId
fieldId: '507f1f77bcf86cd799439011',
},
]);
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?, debug? }.
v3.activity.repairWorkflowPathDryRun
Description
Plan workflow-scoped repairPath operations without evaluating or writing values.
Set force=true to inspect forceRepairPath behavior for every active activity in the workflow field.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
workflowId | processId | yes | workflowId |
fieldId | fieldId | string | yes | |
incomingMaxDepth | integer | no | |
outgoingMaxDepth | integer | no | |
includeValues | boolean | no | Default: false. |
propagateDependents | boolean | no | Default: false. |
force | boolean | no | Default: false. |
limit | integer | no | |
includeActivityResults | boolean | no | Default: true. |
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.repairWorkflowPathDryRun', [
{
workflowId: '507f1f77bcf86cd799439011', // workflowId
fieldId: '507f1f77bcf86cd799439011',
},
]);
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?, debug? }.
v3.activity.template.create
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (processId, required): workflowId
Argument 2 (phaseId, required): phaseId (phase in a Workflow)
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.template.create', [
'507f1f77bcf86cd799439011', // processId (required)
'507f1f77bcf86cd799439011', // phaseId (required)
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
name | object | yes | |
team | object | no | |
fields | object[] | yes |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.activity.timeline2
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 | |
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 |
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.timeline2', [
{
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
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?, debug? }.
v3.activity.updateMany
Description
With this function, you can update one or more activities.
Provide an array of objects containing at least the _id of the activity you wish to update.
When changing the same field to the same value on many objects, using the Options object would be more efficient, as all activities will be updated with the info contained in the Options object. Note however that the changes provided in an Activity object will be used over the changes provided in an Options object.
Unless specified, the name, all fields, followers, files, and so on are left unchanged.
Adding fieldId/fileId/userId: null to fields, files or followers objects will remove the old value(s).
Adding "*": null to files or followers objects will remove all the old values.
Adding fileId/userId: true to files or followers objects will set a new value.
You can combine the above methods to remove and add multiple values.
Parameters
Argument 1 (object[], required): Activity object(s)
Argument 2 (Options object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
fields | Record<fieldId | string, any> | no | fieldIds as keys and desired field values as values |
files | Record<any, any> | no | Use fileIds to update files, see info above |
followers | Record<any, any> | no | Use userIds to update followers, see info above |
location | object | no | |
discussionId | discussionId | no | discussionId |
teamId | teamId | no | teamId |
phaseId | phaseId | string | no | |
returnDocument | boolean | no | Return name, fields, followers, teamId, sequence and priority |
ignoreRequired | boolean | no | Ignore required fields Default: false. |
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.updateMany', [
[{
_id: '507f1f77bcf86cd799439011', // `_id` of the activity to be updated
}],
{
fields: {
'507f1f77bcf86cd799439012': '...', // fieldId: value
}, // fieldIds as keys and desired field values as values
files: {
'507f1f77bcf86cd799439012': '...', // fieldId: value
}, // Use fileIds to update files, see info above
},
]);
console.log(result);Returns
integer
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v3.activity.verifyWorkflowValues
Description
Scan selected workflow function fields for stored/computed value drift.
This endpoint is read-only. It evaluates shallow incoming runtime paths, skips dependents, and returns candidate nodes for repairPath/repairWorkflowPath.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
workflowId | processId | yes | workflowId |
fieldId | fieldId | string | no | |
fieldIds | fieldId | string[] | no | |
activityIds | activityId[] | no | |
incomingMaxDepth | integer | no | Default: 1. |
mode | runtime | forcePreview | no | Default: "runtime". One of: runtime, forcePreview. |
includeValues | boolean | no | Default: false. |
includeResults | boolean | no | Default: true. |
statuses | ok | ok_with_warnings | stale | missing | trusted_editable | blocked | evaluation_error | dependency_unverified[] | no | |
limit | integer | no | |
maxNodes | integer | no | Default: 100000. |
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.verifyWorkflowValues', [
{
workflowId: '507f1f77bcf86cd799439011', // workflowId
},
]);
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?, debug? }.