Skip to content

Activity

Create, read, update, remove and manage activities (the records inside workflows).

Endpoints

EndpointArgumentsReturns
v3.activity.ball.candidatesactivityIduserId[]
v3.activity.ball.clearactivityIdunknown
v3.activity.ball.listunknownobject[]
v3.activity.ball.passactivityId, userIdunknown
v3.activity.ball.takeactivityIdunknown
v3.activity.buildPhaseCountCache-unknown
v3.activity.convertStackedVariablesworkspaceId: stringunknown
v3.activity.countprocessIdobject
v3.activity.createprocessId, Activity object, Options objectunknown
v3.activity.createManyunknown, unknown, Options objectobject[]
v3.activity.evaluateAllFunctionsworkspaceId: stringunknown
v3.activity.evaluateManyoptionsunknown
v3.activity.evaluateWorkflowFunctions.logsoptionsunknown
v3.activity.evaluateWorkflowFunctions.startoptionsunknown
v3.activity.explainNodeoptionsunknown
v3.activity.explainNode.assistoptionsunknown
v3.activity.explainNodeDryRunoptionsunknown
v3.activity.extractHistory-unknown
v3.activity.forceRepairPathoptionsunknown
v3.activity.forceRepairWorkflowPathoptionsunknown
v3.activity.functionField.assistoptionsunknown
v3.activity.linkedFrom.nextactivityId, activityId, optionsobject[]
v3.activity.linkedFrom.overviewactivityId, optionsobject
v3.activity.linkedFrom.refreshactivityId, phaseId, optionsobject
v3.activity.linkedFrom.searchactivityId, unknown, optionsobject
v3.activity.permissionsuserId, WorkspaceId, optionsunknown
v3.activity.phaseCountworkflowId: stringunknown
v3.activity.removed.morephaseId, optionsobject[]
v3.activity.removed.overviewunknown, optionsobject
v3.activity.removed.recoverunknownactivityId[]
v3.activity.repairPathoptionsunknown
v3.activity.repairPathDryRunoptionsunknown
v3.activity.repairWorkflowPathoptionsunknown
v3.activity.repairWorkflowPathDryRunoptionsunknown
v3.activity.template.createprocessId, phaseIdobject
v3.activity.timeline2optionsunknown
v3.activity.updateManyunknown, Options objectinteger
v3.activity.verifyWorkflowValuesoptionsunknown

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):

FieldTypeRequiredDescription
namestringno
fieldsRecord<string, any>no
fileIdsfileId[]no
followerIdsuserId[]noList of userIds to invite to activity discussion
locationobjectno
teamIdteamIdnoteamId
phaseIdphaseIdnophaseId (phase in a Workflow)

Argument 3 (Options object, optional):

FieldTypeRequiredDescription
teamIdObjectIdnoDefault team if not given in activity
fileIdsObjectId[]no
followerIdsObjectId[]no
locationobjectno
discussionIdObjectIdno
phaseIdphaseIdnophaseId (phase in a Workflow)
ignoreRequiredbooleannoIgnore 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):

FieldTypeRequiredDescription
teamIdteamIdnoteamId
fileIdsfileId[]nofileIds of files to upload to the activity/activities
followerIdsuserId[]nouserId's of users to invite to the activity discussion(s)
locationobjectno
discussionIddiscussionIdnodiscussionId
phaseIdphaseId | stringno
returnDocumentbooleannoReturn name, fields, followers, teamId, sequence and priority
ignoreRequiredbooleannoIgnore required fields Default: false.
workspaceIdWorkspaceIdnoworkspaceId (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:

FieldTypeRequiredDescription
_idactivityIdyesactivityId
uiduserIdyesuserId
cidWorkspaceIdyesworkspaceId (former networkId)
namestringyes
fieldsobject[]no
filesfileId[]no
locationobjectno
createdtimestampyesTime (milliseconds since 1970-01-01 UTC)
updatedtimestampnoTime (milliseconds since 1970-01-01 UTC)
discussiondiscussionIdyesdiscussionId
followersuserId[]yesusers invited to the activity discussion(s)
team_accountobjectyes
sequenceintegerno
priorityintegerno
processprocessId | stringyes
currentPhasephaseIdyesphaseId (phase in a Workflow)
completePhasesphaseId[]no
ballHolderobjectno

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):

FieldTypeRequiredDescription
processIdprocessIdyesworkflowId
phaseIdphaseIdnophaseId (phase in a Workflow)
_idactivityIdnoactivityId
namestringno
fieldsRecord<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):

FieldTypeRequiredDescription
runIdObjectIdyes
afterTsintegerno
limitintegernoDefault: 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):

FieldTypeRequiredDescription
processIdprocessIdyesworkflowId
fieldIdsfieldId | string[]no
applybooleannoDefault: 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):

FieldTypeRequiredDescription
activityIdactivityIdyesactivityId
fieldIdfieldId | stringyes
directionincoming | outgoing | bothnoDefault: "both". One of: incoming, outgoing, both.
graphModeconfigured | runtimenoDefault: "configured". One of: configured, runtime.
maxDepthintegernoDefault: 8.
incomingMaxDepthintegerno
outgoingMaxDepthintegerno
includeValuesbooleannoDefault: 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):

FieldTypeRequiredDescription
activityIdactivityIdyesactivityId
fieldIdfieldId | stringyes
directionincoming | outgoing | bothnoDefault: "both". One of: incoming, outgoing, both.
graphModeconfigured | runtimenoDefault: "configured". One of: configured, runtime.
maxDepthintegernoDefault: 8.
incomingMaxDepthintegerno
outgoingMaxDepthintegerno
includeValuesbooleannoDefault: 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):

FieldTypeRequiredDescription
activityIdactivityIdyesactivityId
fieldIdfieldId | stringyes
incomingMaxDepthintegerno
includeContextbooleannoDefault: 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):

FieldTypeRequiredDescription
activityIdactivityIdyesactivityId
fieldIdfieldId | stringyes
incomingMaxDepthintegerno
outgoingMaxDepthintegerno
includeValuesbooleannoDefault: true.
writeValuesbooleannoDefault: false.
propagateDependentsbooleannoDefault: 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):

FieldTypeRequiredDescription
workflowIdprocessIdyesworkflowId
fieldIdfieldId | stringyes
incomingMaxDepthintegerno
outgoingMaxDepthintegerno
includeValuesbooleannoDefault: true.
writeValuesbooleannoDefault: false.
propagateDependentsbooleannoDefault: true.
limitintegerno
includeActivityResultsbooleannoDefault: 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):

FieldTypeRequiredDescription
modegenerate | improve | explainyesOne of: generate, improve, explain.
instructionstringno
codestringno
activityIdactivityIdyesactivityId
workflowobjectyes
fieldobjectyes
dependenciesobject[]noDefault: [].
functionVariablesobjectnoDefault: {}.
currentEvaluationobjectnoDefault: {}.

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):

FieldTypeRequiredDescription
activityLimitnumbernoLimit 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:

FieldTypeRequiredDescription
_idactivityIdyesactivityId
namestringyes
indexnumberyes
currentPhasephaseIdyesphaseId (phase in a Workflow)
primaryNumericFieldnumberno
primaryDateFieldnumberno

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):

FieldTypeRequiredDescription
activityLimitnumbernoLimit of activities to load per phase
includeEmptyWorkflowsbooleannoOption to return workflows with no linked activities Default: false.
phaseIdsphaseId[]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):

FieldTypeRequiredDescription
activityIdsactivityId[]noActivities to load in specified phase
searchStringstringnoSearch 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? }.

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):

FieldTypeRequiredDescription
activityLimitnumbernoLimit 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):

FieldTypeRequiredDescription
detailsbooleannoOne of: true.
itemsobjectnoExact 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):

FieldTypeRequiredDescription
limitnumberno
skipnumberno
searchstringno

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:

FieldTypeRequiredDescription
_idactivityIdyesactivityId
namestringyes
removedOntimestampnoTime (milliseconds since 1970-01-01 UTC)
removedByuserIdnouserId

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):

FieldTypeRequiredDescription
limitnumberno
searchstringno

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):

FieldTypeRequiredDescription
activityIdactivityIdyesactivityId
fieldIdfieldId | stringyes
incomingMaxDepthintegerno
outgoingMaxDepthintegerno
includeValuesbooleannoDefault: true.
writeValuesbooleannoDefault: false.
propagateDependentsbooleannoDefault: 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):

FieldTypeRequiredDescription
activityIdactivityIdyesactivityId
fieldIdfieldId | stringyes
incomingMaxDepthintegerno
outgoingMaxDepthintegerno
includeValuesbooleannoDefault: true.
propagateDependentsbooleannoDefault: true.
forcebooleannoDefault: 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):

FieldTypeRequiredDescription
workflowIdprocessIdyesworkflowId
fieldIdfieldId | stringyes
incomingMaxDepthintegerno
outgoingMaxDepthintegerno
includeValuesbooleannoDefault: true.
writeValuesbooleannoDefault: false.
propagateDependentsbooleannoDefault: true.
limitintegerno
includeActivityResultsbooleannoDefault: 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):

FieldTypeRequiredDescription
workflowIdprocessIdyesworkflowId
fieldIdfieldId | stringyes
incomingMaxDepthintegerno
outgoingMaxDepthintegerno
includeValuesbooleannoDefault: false.
propagateDependentsbooleannoDefault: false.
forcebooleannoDefault: false.
limitintegerno
includeActivityResultsbooleannoDefault: 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

FieldTypeRequiredDescription
nameobjectyes
teamobjectno
fieldsobject[]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):

FieldTypeRequiredDescription
dateFieldIdObjectIdyes
datesobjectyes
groupByFieldIdObjectId | name | team_accountnoField to group results by
phaseIdsObjectId[]yes
processIdObjectIdyes
resourceIdsObjectId[]no
searchstringno
showEmptyResourcesbooleanno
teamAccountObjectIdno
userobjectno

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):

FieldTypeRequiredDescription
fieldsRecord<fieldId | string, any>nofieldIds as keys and desired field values as values
filesRecord<any, any>noUse fileIds to update files, see info above
followersRecord<any, any>noUse userIds to update followers, see info above
locationobjectno
discussionIddiscussionIdnodiscussionId
teamIdteamIdnoteamId
phaseIdphaseId | stringno
returnDocumentbooleannoReturn name, fields, followers, teamId, sequence and priority
ignoreRequiredbooleannoIgnore 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):

FieldTypeRequiredDescription
workflowIdprocessIdyesworkflowId
fieldIdfieldId | stringno
fieldIdsfieldId | string[]no
activityIdsactivityId[]no
incomingMaxDepthintegernoDefault: 1.
moderuntime | forcePreviewnoDefault: "runtime". One of: runtime, forcePreview.
includeValuesbooleannoDefault: false.
includeResultsbooleannoDefault: true.
statusesok | ok_with_warnings | stale | missing | trusted_editable | blocked | evaluation_error | dependency_unverified[]no
limitintegerno
maxNodesintegernoDefault: 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? }.

Hailer Developer Documentation