Appearance
Network groups
User group management within a workspace: create, get, update, and remove groups.
Endpoints
| Endpoint | Arguments | Returns |
|---|---|---|
network.group.create | options, unknown, options | unknown |
network.group.get | String groupId | object |
network.group.remove | groudId | boolean |
network.group.set | options, options | boolean |
network.group.update | groudId, Use memberIds to update followers, options | boolean |
network.group.create
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
description | string | no | |
custom | boolean | no | |
shared | boolean | no | |
public | boolean | no |
Argument 2 (string[], optional):
Argument 3 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
networkId | 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('network.group.create', [
{
name: 'string',
},
['string'],
{
networkId: '507f1f77bcf86cd799439011', // workspaceId (former networkId)
},
]);
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? }.
network.group.get
Description
Get group info by id
Parameters
Argument 1 (groudId, required): groudId
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('network.group.get', [
'507f1f77bcf86cd799439011', // groudId (required)
]);
console.log(result);Returns
| Field | Type | Required | Description |
|---|---|---|---|
_id | string | yes | |
name | string | yes | |
groups | groudId[] | no | |
teams | teamId[] | no | |
users | userId[] | no | |
description | string | no |
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
network.group.remove
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (groudId, required): groudId
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('network.group.remove', [
'507f1f77bcf86cd799439011', // groudId (required)
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
network.group.set
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (object, required):
| Field | Type | Required | Description |
|---|---|---|---|
groupId | groudId | yes | groudId |
section | name | description | shared | public | yes | One of: name, description, shared, public. |
data | any | yes |
Argument 2 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
networkId | 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('network.group.set', [
{
groupId: '507f1f77bcf86cd799439011', // groudId
section: 'name',
data: '...',
},
{
networkId: '507f1f77bcf86cd799439011', // workspaceId (former networkId)
},
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.
network.group.update
Description
Undocumented
This endpoint has no description in the source yet.
Parameters
Argument 1 (groudId, required): groudId
Argument 2 (Record<any, any>, optional): Use memberIds to update followers
Argument 3 (object, optional):
| Field | Type | Required | Description |
|---|---|---|---|
networkId | 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('network.group.update', [
'507f1f77bcf86cd799439011', // groudId (required)
{
'507f1f77bcf86cd799439012': '...', // fieldId: value
},
{
networkId: '507f1f77bcf86cd799439011', // workspaceId (former networkId)
},
]);
console.log(result);Returns
boolean
Auth: requires an authenticated session.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.