Skip to content

Tags

Tags: list, filter, manage, and tag or untag content.

Endpoints

EndpointArgumentsReturns
v2.tags.checknetworkId: string, targetIds: string[]object
v2.tags.filternetworkId: string, filterOptions: { objects?: string[], tags: string[], types?: string[] }object
v2.tags.listnetworkId: stringobject
v2.tags.manage.addnetworkId: string, newTag: { value: string }HailerResult
v2.tags.manage.editnetworkId: string, tagId: string, newValue: { value: string }boolean
v2.tags.manage.removenetworkId: string, tagId: stringboolean
v2.tags.tagnetworkId: string, tagOpts: { tag: string, target: string, type: string }boolean
v2.tags.untagnetworkId: 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):

FieldTypeRequiredDescription
objectsObjectId[]noObject IDs
tagsObjectId[]yesTag IDs
typesaccount | activity | calendar | network | discussion | event | file | invite | message | notification | process | tag | team | user | wall_comment | wall_post[]noThe 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):

FieldTypeRequiredDescription
valuestringno

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

FieldTypeRequiredDescription
valuestringno

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

FieldTypeRequiredDescription
tagObjectIdyes
targetObjectIdyes
typeaccount | activity | calendar | network | discussion | event | file | invite | message | notification | process | tag | team | user | wall_comment | wall_postyesOne 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):

FieldTypeRequiredDescription
tagObjectIdyes
targetObjectIdyes

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? }.

Hailer Developer Documentation