Hailer API

Download OpenAPI specification:Download

Getting started

It is recommended to read the entire "Getting started" section to get the basic understanding of how this API can be used before starting to use it, as this will reduce your level of stress while working with this API. It is only a few paragraphs long.

We assume you are familiar with some tools like Postman or cURL to be able to make use of this documentation.

Help Center has many articles, such as Hailer Product Description, to help you get more familiar with Hailer.

Staging backend

The examples are written for Hailer's staging (sandbox) backend, which base URL is https://api.hailer.biz/api.

Important: The staging backend is a playground for new versions and database might be cleared from time to time. Let us know if you are working in that environment so we can inform you when we are making changes or dropping data.

Production backend

Hailer's production backend's base URL is https://api.hailer.com/api.

Ways of interacting

There are two ways of interacting with the Hailer API; HTTP REST and Socket.io API. The Socket.io API also provides signals for real-time updates, which is not supported on the HTTP REST API.

HTTP REST

All requests to the HTTP REST API have the operator in the path and the arguments as POST payload in JSON format, Content-Type: application/json. If you use Postman, be sure to set body to raw and type to JSON.

Arguments can be given in three ways.

Type 1, args array as key in an object:

{ "args": ["user@mail.com", "password"] }

Type 2, argument as key mapped object:

{
  "0": "user@mail.com",
  "1": "password"
}

Type 3, argument array:

["user@mail.com", "password"]

Throughout this documentation the examples are generated with Type 2 due to how OpenAPI works. Manually written examples use Type 3, passing a JSON array. Type 1 is there for backwards compatibility.

Socket.io API

The socket API provides events which make responding to updates fast and easy.

To get started using the socket.io api there is a node.js client called HailerCli. See it's README for instructions to set it up. It is both a Command Line Interface (CLI) and SDK.

Three quick steps for starting with the staging backend & HTTP REST

  1. Register to Hailer's staging backend.

  2. Log in programmatically with cURL, Postman, or your custom application by sending POST request to https://api.hailer.biz/api/login with your username and password as arguments.

Example: log in with cURL

curl -H "Content-Type: application/json" -d '["user@mail.com", "password"]' https://api.hailer.biz/api/login

Example: log in with Postman

["user@mail.com", "password"]

Response on successful login is a session key, for example:

"8cErRKj+F3d1ud7e4TTXZme004jcs5HGNn9tK0LcDqlQAKWpxSpEY8LlYOLgJFWlM5GAqnHbGwTLK28KMenY1g=="

Save the session key to yourself.

  1. Now you can run any API command using the given session key (based on the permissions of that user) by setting a cookie hlrkey to the session key, or setting it as an http header directly.

Example: send post to Feed with cURL

curl -s -H "Content-Type: application/json" -H "hlrkey: 8cErRKj...KMenY1g==" -d '[{ "subject": "Posting via API", "text": "Cool post from API." }]' https://api.hailer.biz/api/wall2/new_post

Example: send post to Feed with Postman

Before sending your POST request in Postman, do the following steps:

  1. go to Authorization tab
  2. set "Type" to "API Key"
  3. set "Key" to hlrkey
  4. set "Value" to the session key you got

URL: https://api.hailer.biz/api/wall2/new_post

POST request body example:

[
  {
    "subject": "Posting via API", 
    "text" : "Cool post from API."
  }
]

Activity

Do you have a workflow or a dataset yet?

Before you can call activities endpoints, you need to have a workflow or a dataset. It is most convenient to create workflows and datasets in the Hailer UI. You can read more about managing workflows and datasets and how to create a custom workflow at Hailer's Help Center.

How to get workflowId and phaseId?

When you have your workflow or dataset created, click the phase or category you want to create a template from, and you will see two ids in the URL path in your browser's address bar. workflowId is the 24-character string after subdirectory named processes, and phaseId is the 24-character string after subdirectory named phase.

Example URL with 000000000000000000000000 as workflowId and 111111111111111111111111 as phaseId: https://app.hailer.biz/#/activities/process/000000000000000000000000/phase/111111111111111111111111/table

v2.activities.list

With this function, you can get the activities of one workflow and phase (or of one dataset and category) listed by calling the function with workflowId (optional) and phaseId (required) in the Phase object. The successful response will be "activities" array of activity objects and a "metadata" object.

You can sort and filter the list of activities with the Options object. The successful response has up to 20 activities sorted by the latest update time and date in descending order by default. All options for sorting and filtering are listed in the request body schema below.

Request Body schema: application/json
required
object

Phase object

object

Options object

Responses

Request samples

Content type
application/json
{
  • "0": {
    },
  • "1": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.activity.createMany

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.

Request Body schema: application/json
0
required
string (processId) = 24 characters

workflowId

required
Array of objects non-empty

Activity object(s)

object

Options object

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": [
    ],
  • "2": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.activity.updateMany

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.

Request Body schema: application/json
required
Array of objects non-empty

Activity object(s)

object

Options object

Responses

Request samples

Content type
application/json
{
  • "0": [
    ],
  • "1": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.activity.template.create

The successful response from calling this v3/activity.template.create endpoint will give you a template with information you can use for making other API calls related to activities. For example if you want to create activities (v3.activity.createMany), you would want to know the fieldIds for the fields you want to add data to. Those ids and much more you can get from calling this endpoint.

Call this endpoint with your workflowId and phaseId (both required) as shown in the request body schema below. If you are using this endpoint to create a template for your dataset instead of a workflow, the ids are the same: workflowId for the dataset and phaseId for the category.

Activity field subtypes

Activity fields have types (e.g. string, number or object) and subtypes (e.g. text, numeric or date). When a new field is being added to a workflow, a type of the field needs to be defined. That type is the subtype's value you will get in the successful response when calling v3/activity.template.create endpoint. Subtypes are listed below with explanations.

text field accepts a string with maximum length of 2048 characters
textpredefinedoptions field's drop-down menu's options are listed in the field's data array
textarea field accepts a string with maximum length of 32768 characters
numeric field accepts a numeric value
numericunit field accepts a numeric value, and also has a unit string
date, time and datetime fields accept a timestamp (integer) in milliseconds since 1970-01-01 UTC (check MDN Web Docs for information on JavaScript Date objects)
daterange, timerange and datetimerange fields accept an object with "start" and "end" as keys (both required), and timestamps (integers) as values, for example:

{
    "start": 1669852800000,
    "end": 1672794600000
}

country field accepts a two-letter (alpha-2) ISO 3166 country code as a string
activitylink field's allowed activity links are listed as workflowId(s) in the field's data array
users field accepts one 24-character userId as a string
teams field accepts one 24-character teamId as a string

Request Body schema: application/json
0
required
string (processId) = 24 characters

workflowId

1
required
string (phaseId) = 24 characters

phaseId (phase in a Workflow)

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.activity.linkedFrom.overview

Loads given amount of linked activities.

Request Body schema: application/json
0
required
string (activityId) = 24 characters

Fetch activities that are linked to specified activity id

object

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

Insight

Introduction

Hailer insights exists to provide a simple way for Hailer users to create insights from their data. Primarily we focus on presenting data that comes out from Hailer, but we also want to allow advanced users such as members of our project team to bring data into the Hailer insights tool from other systems.

Hailer insights provides all Hailer data in light SQL chart format. Users can manipulate the data using SQL queries to make it more user friendly. For instance date timestamps become a whole lot more usable when stringifying them into week, month and year and field names can be renamed to be more explanatory.

Insights makes it quick and easy to filter and view the data from different angles. The data can be made into shareable HTML or CSV links or opened up in a pivot view. The pivot view in itself solves a large number of requirements coming from people engaged in business intelligence analysis.

This introduction was picked from this article: Hailer Insights.

Improvements

Improvements from the previous Insight implementation

  • Seamless UX

  • Performance

  • No session keys need to be extracted and maintained

  • No cryptic table names needed

  • Almost live data (only caching for performance, which can be bypassed with option)

  • Insights can be kept inside the workspace

Known limitations

--

Changes

2023-04

  • Added support for phase move timestamps
  • Added support for teams
  • Added support for range fields (all Hailer fields are now supported)

History

2022-11-22 Insights Native

Insights have been available in Hailer since 2020(??) as a separate service loosely integrated into Hailer. The original implementation was written in whole by Juha Järvinen, and had a separate server downloading activity data and enabling the pivoting. A simple iframe integration to show Insights in Hailer web frontend was written by Jonas Ritzmo.

When enough experience from customer usage was collected in 2022, it was decided to make Insights an integral part of Hailer, and during the development, is was popularly called "Native Insights". At this point the Insight data source was built into the Hailer backend, and a frontend for editing and viewing these Insights was implemented into the Hailer frontend. This effort was a cooperation between Juha Järvinen and André Kaustell.

Technical implementation

Introduction

Insight is a simplistic pivoting tool designed to work on all activity data in Hailer, and is designed with potential support for other data sources in mind.

An Insight contains defined data sources. These sources are Activities from Workflow and Datasets, their fields and meta data. These sources are built into temporary SQLite tables, on which a user defined query is executed, building the final output. This output is then read into the Insight component in the frontend which provides pivoting functionality to the user.

In order to not break Insights when Workflows are trivially changed, like field names or workflow name, Insights are built using the underlying fieldId's. Those are defined in sources.

Key features

  • New Insights can be created by workspace administrators and owners
  • When creating or editing an Insight a preview of the result is presented, or error shown if Insight is incomplete or broken
  • An Insight can have one of the following visibility and edit permission: per user or team
  • Insights listing for workspace users
  • Workspace administrators and owners can see all Insights available in a workspace
  • Ordinary workspace Users and Inviters can see Insights with in which they are members, and edit those which they have edit permission set
  • An Insight always concerns one workspace, it can not collect data from many workspaces
  • If an Insight is set as public, it is accessible through a secret link, which requires no authentication for viewing the Insight
  • The data presented in an Insight must always be up to date (Up to 60 minute delay is acceptable)

When adding or editing an Insight, the following parameters can be set:

  • Name
  • Which workflows/datasets it concerns
  • Visibility and edit permission: per user or team
  • Public: Yes / No
  • SQLite query
  • Timestamp when Insight last updated

Not yet implemented:

  • Default view configuration

Endpoints

v3.insight.list
v3.insight.create
v3.insight.update
v3.insight.preview
v3.insight.data
v3.insight.member.add
v3.insight.member.remove
v3.insight.permissions.grant
v3.insight.permissions.deny

Publicly available endpoints:

v3.insight.public

See test/test-story-insight.ts, for usage examples of endpoints.

Database

Insights have a collection in the database.

Permissions

Insights are workspace specific and their permissions are based on the members structure, providing user and team specific view or edit permissions.

Public

When an Insight is created, a publicKey is generated. When public is set to true, the publicKey will allow access to anyone with the link. The publicKey cannot be changed.

There is a fronend implementation which produces the link based on the publicKey, and it ends up being something like this:

https://app.hailer.com/insight?key=<publicKey>

The frontend implementation uses the v3.insight.public endpoint to get data from the API.

Selecting sources, field support and SQL mappings

Fields

All activity field types are supported. Field type mappings are as follows FieldType: '<SQLite Type>':

All range fields will result in two columns, with Start and End added to the name.

numeric: 'REAL',
numericunit: 'REAL',
date: 'INTEGER',
time: 'INTEGER',
datetime: 'INTEGER',
timerange: 'INTEGER',
daterange: 'INTEGER'
datetimerange: 'INTEGER',
activitylink: 'TEXT',
country: 'TEXT',
teams: 'TEXT',
text: 'TEXT',
textarea: 'TEXT',
textunit: 'TEXT',
textpredefinedoptions: 'TEXT',
users: 'TEXT',

Meta data

Meta data from activities can be read using the following meta keys:

_id           // activityId
uid           // createdBy userId
createdBy     // createdBy userId
name
created       // Unix timestamp when activity was created
updated       // Unix timestamp when activity was last updated
phaseId       // current phase id
phaseName     // name of current phase
phaseLastMove // Unix timestamp of when activity was last moved to given phaseId
workflowId    // workflow or dataset id
workflowName  // workflow of dataset name

For users and teams there are tables created so they are accessible in every Insight by default. These meta tables are called user and team, and both have _id and name columns.

Examples

Example with activity name and createdBy:

v3.insight.create(
    <workspaceId>,
    {
        name: 'Book Insights',
        sources: [{
            name: 'books',
            workflowId: <workflowId>,
            fields: [
                { name: 'title', meta: 'name' },
                { name: 'addedBy', meta: 'createdBy' }
            ]
        }],
        query: 'SELECT title, adder.name FROM books LEFT JOIN user AS adder ON adder._id = books.addedBy',
    }
)

Example with phaseLastMove:

v3.insight.create(
    <workspaceId>,
    {
        name: 'Tasks',
        sources: [{
            name: 'Done',
            workflowId: <workflowId>,
            fields: [
                { name: 'Title', meta: 'name' },
                { name: 'done', meta: 'phaseLastMove', phaseId: <phaseId> }
            ]
        }],
        query: "SELECT Title, datetime(done, 'unixepoch') AS done FROM Tasks",
    }
)

Example with range field:

v3.insight.create(
    <workspaceId>,
    {
        name: 'Project durations',
        sources: [{
            name: 'Projects',
            workflowId: <workflowId>,
            fields: [
                { name: 'Title', meta: 'name' },
                { name: 'Duration', meta: 'phaseLastMove', phaseId: <phaseId> }
            ]
        }],
        query: "SELECT Title, datetime(DurationStart, 'unixepoch') AS Start, datetime(DurationEnd, 'unixepoch') as End FROM Projects",
    }
)

v3.insight.create

Create new Insight

Prerequisits

See Activity on how to create Workflows and Activities to get started using Insights.

Before creating an Insight you may call the v3.insight.preview endpoint with partial Insight data to assist the user in designing and debugging the Insight.

Example 1: Activity name and field from single workflow

v3.insight.create(
    workspaceId, // where to create insight
    {
        name: 'Book Insights',
        sources: [{
            name: 'books',
            workflowId: <workflowId>,
            fields: [
                { name: 'title', meta: 'name' },
                { name: 'publishDate', fieldId: <fieldId> }
            ]
        }],
        query: 'SELECT title, publishDate FROM books',
    }
)

Example 2: Join data from two Workflows

v3.insight.create(
    workspaceId,
    {
        name: 'Book Insights',
        sources: [{
            name: 'books',
            workflowId: <bookWorkflowId>,
            fields: [
                { name: 'title', meta: 'name' },
                { name: 'publishDate', fieldId: <fieldId> }
            ]
        }, {
            name: 'authors',
            workflowId: <authorWorkflowId>,
            fields: [
                { name: 'id', meta: '_id' }, // get Activity Id
                { name: 'authorName', meta: 'name' }, // get Activity Name
                { name: 'born', fieldId: <fieldId> }
            ]
        }],
        query: `
            SELECT title, publishDate, authorName
            FROM authors
            LEFT JOIN books ON books.author = author.id
        `
    }
)
Request Body schema: application/json
0
required
string (WorkspaceId) = 24 characters

workspaceId (former networkId)

object

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.insight.update

Update single Insight

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

insightId

required
object

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.insight.list

List Insights

Request Body schema: application/json
0
required
string (WorkspaceId) = 24 characters

workspaceId (former networkId)

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.insight.data

Get Insight data

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

insightId

object

Option

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.insight.preview

Preview partial Insight

Preview is used when designing Insights, and can be called frequently by the frontend to show a preview of the result or return errors when the Insights is broken. It requires only sources and query to be set.

If user calling the endpoint is an Workspace Admin sources can differ from the original insight.

If user calling the endpoint is a regular user with edit permission set, sources cannot be changed from original insight, to protect data from leaking.

To preserve performance when using preview it only picks at most 20 activites from the database.

Request Body schema: application/json
0
required
string (WorkspaceId) = 24 characters

workspaceId (former networkId)

object

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.insight.member.add

Add member

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

insightId

required
Workspace (string) or Team (string) or User (string) or Group (string)

network_<networkId>, team_<teamId>, user_<userId>, group_<groupId>

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.insight.member.remove

Remove member of process.

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

insightId

required
Workspace (string) or Team (string) or User (string) or Group (string)

network_<networkId>, team_<teamId>, user_<userId>, group_<groupId>

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

Role

Introduction

Roles are still work in progress.

Creating, editing, listing and removing of roles is currently possible with workspaces with 'customRoles' license override

Key features

Roles don't do anything yet, you can just remove edit and add them.

  • Workspace administrators and owners can see and manage all Roles available in a workspace
  • Workspace Users, Inviters and guests cannot see or manage any Roles
  • Roles are workspace specific

Endpoints

v3.network.role.list
v3.network.role.create
v3.network.role.update
v3.network.role.remove

See test/test-api-v3-network-role.ts, for usage examples of endpoints.

Database

Roles have a collection in the database.

Permissions

Roles are can be managed by workspace owners and admins. This might change to include some permission like 'role-manager' for a custom role

Files

Upload file

Upload file to Hailer, returns _id on success.

Curl example:

curl -i -X POST -H "hlrkey: 8cErRK...enY1g==;" -H "Content-Type: multipart/form-data" -F "data=@myfile.jpg" https://api.hailer.biz/upload
Request Body schema: multipart/form-data
file
string <binary>

Responses

Response samples

Content type
application/json
{
  • "_id": "string"
}

Core

v2.core.init

Request Body schema: application/json
0
Array of strings
Items Enum: "user" "users" "network" "networks" "teams" "groups" "accounts" "processes" "calendars" "tags" "apps"
object

Responses

Request samples

Content type
application/json
{
  • "0": [
    ],
  • "1": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

Process

process.get_next_prefix_id

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

process.create

API endpoint for creating a workflow/dataset in Hailer. If you are able to, we strongly recommend using the web UI. The doc for this endpoint looks bad and is currently being refactored.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "0": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

process.install_template

Install template to current network

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

process.list

List workflow/dataset information. Can be used to determine required/non-required fields for a given phase, or if not supplied with a phaseId then it can be used to give insight into the entire workflow. Will only work for a workflow or dataset which the active user has access to.

Request Body schema: application/json
0
string (ObjectId) = 24 characters

processId

1
string (ObjectId) = 24 characters

phaseId

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

process.remove

Standard function for removing a workflow or dataset, provided the user has the appropriate permissions.

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Valid processId

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

process.set_info

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters
required
object (ProcessUpdate)
2
string
Enum: "fi" "en" "sv"

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": {
    },
  • "2": "fi"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

process.create_field

Calling this endpoint with the appropriate permissions and a correctly formatted fieldObject will add a new field to the selected workflow/dataset.

Example: If provided the field parameter object {"label": "Total cost", "type": "numericunit", "unit": "€"} this will create and return a field {"id": "0123456789abcdef12345678", "label": "Total cost", "type": "numericunit", "unit": "€"}

Request Body schema: application/json
0
required
string (processId) = 24 characters

workflowId

required
object (ProcessFieldCreate)

Process Field descriptor

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

process.update_field

When called, will attempt to update the desired Field in the indicated Workflow (processId) according to the provided updateObject. The function will take all information given in the updateObject

If the user lacks the appropriate permissions, this call will fail. Similarly, if the fieldId and processId are mismatched, in that the field is not used in that workflow, it will return a failure response.

Request Body schema: application/json
0
required
string (processId) = 24 characters

workflowId

1
required
string (fieldId) = 24 characters

fieldId

required
object (ProcessFieldUpdate)

Process Field descriptor

3
string
Enum: "fi" "en" "sv"

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "stringstringstringstring",
  • "2": {
    },
  • "3": "fi"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

process.remove_field

Request Body schema: application/json
0
required
string (processId) = 24 characters

workflowId

1
required
string (fieldId) = 24 characters

fieldId

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

process.set_documentTemplates

Create, update and remove documentTemplates.

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

ProcessId

1
object or null

Object containing all document templates. If NULL, all templates will be deleted.

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": { }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

process.set_documentTemplate

Create, update and remove one documentTemplate.

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

ProcessId

1
required
object

Object containing one document template. If it only contains the name, template will be deleted.

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": { }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

process.set_docTemplateFieldProperty

Set field property for template under documentTemplates.

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "0": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v2.process.get

Request Body schema: application/json
0
string (processId) = 24 characters

workflowId

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v2.process.copy

Request Body schema: application/json
required
processId (string) or Array of processId (strings)

One or many processIds to copy

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v2.process.meta

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "0": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v2.process.star

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v2.process.publicForm.create

Generate process/dataset form key endpoint. If endpoint already exist, it will be replaced with new form key

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "0": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v2.process.publicForm.update

Update process/dataset form key endpoint. Form key will not be replaced

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "0": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v2.process.member.list

List permissions

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Process Id

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v2.process.member.add

Add member to process.

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Process Id

required
string or string or string or string

Network / User / Team / Group

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v2.process.member.remove

Remove member of process.

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Process Id

required
string or string or string or string

User / Team

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v2.process.permissions.grant

Grant permission to Process for User / Team.

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Process Id

required
string or string or string or string

User / Team

2
string
Enum: "admin" "any" "own" "ownteam"

Permission

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "string",
  • "2": "admin"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v2.process.permissions.deny

Deny permission to Process for User / Team.

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Process Id

required
string or string or string or string

User / Team

2
string
Enum: "admin" "any" "own" "ownteam"

Permission

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "string",
  • "2": "admin"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

Phase

phase.create

Create a new phase in the desired process or dataset. This function only creates a phase labeled "New Phase".

To modify name, fields, connections, and other settings use phase.update.

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

phase.update

When called, this function will attempt to update the specified phase according to the Phase Settings Object.

Will return an error if the user lacks the appropriate permissions.

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Process Id

1
required
string (ObjectId) = 24 characters

Phase Id

required
object (ProcessPhaseUpdate)

Phase Settings

3
string
Enum: "fi" "en" "sv"

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "stringstringstringstring",
  • "2": {
    },
  • "3": "fi"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

phase.remove

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters
1
required
string (ObjectId) = 24 characters

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

phase.save_field_option

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters
1
required
string (ObjectId) = 24 characters
2
required
string
Enum: "eventDateField" "tableDeadlineField"
3
required
string or null (ObjectId) = 24 characters

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "stringstringstringstring",
  • "2": "eventDateField",
  • "3": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

phase.set_info

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters
1
required
string (ObjectId) = 24 characters
required
object
3
string
Enum: "fi" "en" "sv"

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "stringstringstringstring",
  • "2": {
    },
  • "3": "fi"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

phase.follow

Request Body schema: application/json
0
required
string (processId) = 24 characters

workflowId

1
required
string (phaseId) = 24 characters

phaseId (phase in a Workflow)

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v2.process.phase.member.add

Add member to phase.

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Process Id

1
required
string (ObjectId) = 24 characters

Phase Id

required
string or string or string or string

User / Team / Workspace

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "stringstringstringstring",
  • "2": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v2.process.phase.member.remove

Remove member of phase.

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Process Id

1
required
string (ObjectId) = 24 characters

Phase Id

required
string or string or string or string

User / Team / Workspace

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "stringstringstringstring",
  • "2": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v2.process.phase.member.list

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Process Id

1
required
string (ObjectId) = 24 characters

Phase Id

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v2.process.phase.permissions.grant

Grant permission to Phase for User / Team.

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Process Id

1
required
string (ObjectId) = 24 characters

Phase Id

required
string or string or string or string

User / Team

3
required
string
Value: "edit"

Permission

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "stringstringstringstring",
  • "2": "string",
  • "3": "edit"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v2.process.phase.permissions.deny

Deny permission to Process for User / Team.

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Process Id

1
required
string (ObjectId) = 24 characters

Phase Id

required
string or string or string or string

User / Team

3
required
string
Value: "edit"

Permission

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "stringstringstringstring",
  • "2": "string",
  • "3": "edit"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

Discussion

v2.discussion.star

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.discussion.touch

Sets users last seen date for specified discussions

Request Body schema: application/json
0
required
Array of strings (discussionId) non-empty [ items = 24 characters ]

Responses

Request samples

Content type
application/json
{
  • "0": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.discussion.message.get

Load specified message

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

messageId

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.discussion.message.focus

Load 100 messages around specified message

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

messageId

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.discussion.message.next

Load 50 newer messages than specified message

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

messageId

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.discussion.message.previous

Load 50 older messages than specified message

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

messageId

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.discussion.message.latest

Load 50 latest messages from specified discussion

Request Body schema: application/json
0
required
string (discussionId) = 24 characters

discussionId

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

Login

v3.login

Returns sessionId which, can be used as header hlrkey: <sessionId> or as cookie hlrkey: <sessionId>, or to connect a socket.io connection using the resume command

Request Body schema: application/json
0
required
string

username

1
required
string

password

Responses

Request samples

Content type
application/json
{
  • "0": "string",
  • "1": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.loginGoogle

Login with Google SSO. Returns sessionId which, can be used as header hlrkey: <sessionId> or as cookie hlrkey: <sessionId>, or to connect a socket.io connection using the resume command

Request Body schema: application/json
0
required
string

idToken

Responses

Request samples

Content type
application/json
{
  • "0": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.loginApple

Login with Apple SSO. Returns sessionId which, can be used as header hlrkey: <sessionId> or as cookie hlrkey: <sessionId>, or to connect a socket.io connection using the resume command

Request Body schema: application/json
0
required
string

idToken

Responses

Request samples

Content type
application/json
{
  • "0": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.loginToken

Request Body schema: application/json
0
required
string <= 64 characters

loginToken

Responses

Request samples

Content type
application/json
{
  • "0": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.resume

Resume session - Used for resuming session with socket connection.

Request Body schema: application/json
0
required
string

Responses

Request samples

Content type
application/json
{
  • "0": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

App

v3.app.create

Create new App

v3.app.create(
    {
        name: 'new App',
        description: 'My cool new App',
        url: 'http://apps.hailer.com/app/asdasdasd'
    }
)
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "0": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.app.remove

Remove App

v3.app.remove(<appId>)
Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

appId

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.app.update

Update App

v3.app.update(
    <appId>,
    {
        name: 'new App',
        description: 'My cool new App',
        url: 'http://apps.hailer.com/app/asdasdasd'
    }
)
Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

appId

required
object

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.app.list

Remove App

Lists all Apps related to the workspace the user is currently in

v3.app.list())
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.app.member.add

Add member

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

appId

required
Workspace (string) or Team (string) or User (string) or Group (string)

network_<networkId>, team_<teamId>, user_<userId>, group_<groupId>

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.app.member.remove

Remove member

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

appId

required
Workspace (string) or Team (string) or User (string) or Group (string)

network_<networkId>, team_<teamId>, user_<userId>, group_<groupId>

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}

v3.app.config.update

Edit app configuration

Request Body schema: application/json
0
required
string (ObjectId) = 24 characters

appId

required
object

Responses

Request samples

Content type
application/json
{
  • "0": "stringstringstringstring",
  • "1": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "msg": "string",
  • "details": { },
  • "debug": null
}