Appearance
Tags
Tags: list, filter, manage, and tag or untag content.
Endpoints
| Endpoint | Arguments | Returns |
|---|---|---|
v2.tags.check | networkId: string, targetIds: string[] | object |
v2.tags.filter | networkId: string, filterOptions: { objects?: string[], tags: string[], types?: string[] } | object |
v2.tags.list | networkId: string | object |
v2.tags.manage.add | networkId: string, newTag: { value: string } | HailerResult |
v2.tags.manage.edit | networkId: string, tagId: string, newValue: { value: string } | boolean |
v2.tags.manage.remove | networkId: string, tagId: string | boolean |
v2.tags.tag | networkId: string, tagOpts: { tag: string, target: string, type: string } | boolean |
v2.tags.untag | networkId: string, tagOpts: { tag: string, target: string } | boolean |
v2.tags.check
Description
Returns all tags assosiated with provided objects
Parameters
Argument 1 (WorkspaceId, required): workspaceId (former networkId)
Argument 2 (ObjectId[], required): Object 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.tags.check', [
'507f1f77bcf86cd799439011', // WorkspaceId (required)
['507f1f77bcf86cd799439011'],
]);
console.log(result);Returns
Record<string, string[]>
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v2.tags.filter
Description
Goes over the provided dataset and picks out the objects that contain the provided teags.
Will return a subset of tags that are still present in the returned objects but not present in the set of tags used to filter the set of objects.
Parameters
Argument 1 (WorkspaceId, required): workspaceId (former networkId)
Argument 2 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
objects | ObjectId[] | no | Object IDs |
tags | ObjectId[] | yes | Tag IDs |
types | account | activity | calendar | network | discussion | event | file | invite | message | notification | process | tag | team | user | wall_comment | wall_post[] | no | The type of object we are interesed in 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.tags.filter', [
'507f1f77bcf86cd799439011', // WorkspaceId (required)
{
tags: ['507f1f77bcf86cd799439011'], // Tag IDs
},
]);
console.log(result);Returns
object
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v2.tags.list
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (WorkspaceId, required): 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('v2.tags.list', [
'507f1f77bcf86cd799439011', // WorkspaceId (required)
]);
console.log(result);Returns
Record<string, object>
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v2.tags.manage.add
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (WorkspaceId, required): workspaceId (former networkId)
Argument 2 (Tag to be created, optional):
| Field | Type | Required | Description |
|---|---|---|---|
value | 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.tags.manage.add', [
'507f1f77bcf86cd799439011', // WorkspaceId (required)
{
value: 'string',
},
]);
console.log(result);Returns
HailerResult
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v2.tags.manage.edit
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (ObjectId, required): Network ID
Argument 2 (ObjectId, required): Tag ID
Argument 3 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
value | 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.tags.manage.edit', [
'507f1f77bcf86cd799439011', // ObjectId (required)
'507f1f77bcf86cd799439011', // ObjectId (required)
{
value: 'string',
},
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v2.tags.manage.remove
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (WorkspaceId, required): workspaceId (former networkId)
Argument 2 (ObjectId, required): Tag 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.tags.manage.remove', [
'507f1f77bcf86cd799439011', // WorkspaceId (required)
'507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v2.tags.tag
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (WorkspaceId, required): workspaceId (former networkId)
Argument 2 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
tag | ObjectId | yes | |
target | ObjectId | yes | |
type | account | activity | calendar | network | discussion | event | file | invite | message | notification | process | tag | team | user | wall_comment | wall_post | yes | One of: account, activity, calendar, network, discussion, event, file, invite, message, notification, process, tag, team, user, wall_comment, wall_post. |
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.tags.tag', [
'507f1f77bcf86cd799439011', // WorkspaceId (required)
{
tag: '507f1f77bcf86cd799439011',
target: '507f1f77bcf86cd799439011',
type: 'account',
},
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
v2.tags.untag
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (WorkspaceId, required): workspaceId (former networkId)
Argument 2 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
tag | ObjectId | yes | |
target | 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.tags.untag', [
'507f1f77bcf86cd799439011', // WorkspaceId (required)
{
tag: '507f1f77bcf86cd799439011',
target: '507f1f77bcf86cd799439011',
},
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.