Appearance
Search
Global search across workspace content.
Endpoints
| Endpoint | Arguments | Returns |
|---|---|---|
v2.search.global | options | object |
v2.search.global
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
search | string | yes | |
sections | (activities | events | files | users | feed | messages)[] | yes | |
discussionId | any | no | |
options | object | no | See below. |
options (object):
| Field | Type | Required | Description |
|---|---|---|---|
workspaceIds | WorkspaceId[] | * | no | |
onlyTaggableActivities | 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.search.global', [
{
search: 'string',
sections: ['activities'],
},
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
feed | any[] | yes | |
activities | object[] | yes | See below. |
users | any[] | yes | |
events | any[] | yes | |
messages | object[] | no | See below. |
files | any[] | yes |
activities[] (object):
| Field | Type | Required | Description |
|---|---|---|---|
_id | activityId | yes | activityId |
cid | WorkspaceId | no | workspaceId (former networkId) |
process | processId | yes | workflowId |
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) |
followers | userId[] | no | |
discussion | discussionId | no | discussionId |
messages[] (object):
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | yes | Message id |
created | timestamp | yes | Timestamp of when the message was sent |
updated | timestamp | no | Timestamp of when the message was last updated |
removed | timestamp | no | Timestamp of when the message was deleted |
edited | timestamp | no | Timestamp of when the message last edited |
loc | object | no | Message location data |
from | userId | no | Sender user id |
uid | userId | no | Sender user id |
discussion | discussionId | no | Discussion id |
type | string | no | Type of the message One of: user, user.join, user.leave, activity.created, activity.updated, activity.removed, linked.activity.created, linked.activity.moved, event.new, event.updated, event.removed, event.going, event.notgoing, event.attend_response, discussion.invites, discussion.removesinvites, meet.start, meet.end, ball.passed, ball.passed_by, ball.taken, ball.cleared, ball.auto_assigned, collapsed. |
meta | string[] | object | string | no | Meta data of the message |
msg | string | no | The contents of the message |
files | fileId[] | no | Attached files |
tagged | object | no | |
_metas | object | no | See below. |
localIdentifier | string | no | |
replyTo | ObjectId | no | Id of the reply message |
replyMessage | object | no | Reply message |
reactions | Record<string, string[]> | no | Message user reactions |
stars | object[] | no | See below. |
isStarred | boolean | no | |
linkedData | array | no | |
scheduled | boolean | no | |
cid | WorkspaceId | no | workspaceId (former networkId) |
deleteAt | Date | no | Date after which the message should be automatically deleted (BSON Date for MongoDB TTL) |
forwardMessage | object | no | |
_discussion | any | no |
messages[]._metas (object):
| Field | Type | Required | Description |
|---|---|---|---|
files | Record<string, object> | no | See below. |
messages[]._metas.files.* (object):
| Field | Type | Required | Description |
|---|---|---|---|
_id | ObjectId | no | |
hash | binary | no | |
uid | ObjectId | yes | |
length | number | no | |
name | string | no | |
created | timestamp | yes | Time (milliseconds since 1970-01-01 UTC) |
updated | timestamp | no | Time (milliseconds since 1970-01-01 UTC) |
removed | timestamp | no | Soft-delete timestamp; set when a DigiOne user deletes the file |
type | string | yes | MIME file type |
isPicture | boolean | no | |
isVideo | boolean | no | |
isPublic | boolean | no | |
fileSets | ObjectId[] | no | |
tags | string[] | no | |
cid | WorkspaceId | no | Workspace scope. Absent for legacy (unscoped) files; immutable once set |
readers | string[] | no | ACL of a workspace-scoped file |
dimensions | object | no |
messages[].stars[] (object):
| Field | Type | Required | Description |
|---|---|---|---|
created | number | no | |
uid | userId | no | userId |
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.