Deployments: loading...

System Events

View your System Events Log

All actions on hook.io are tracked internally as System Events. These events are useful for monitoring the actions your services are performing.

Events and Role Access

It's important to note that all hook.io events are available as Access Roles. This mapping allows granular role based key access per System Event.

Writing to System Events

Several useful events ( such as hook::run or keys::authCheck) are automatically written to your event service log.

A full listing of available events can currently be found here.

Currently, hook.io does not support writing custom system events.

Events API

To access the System Event log for an account, simply attach /events to the end of your account homepage.

{{appUrl}}/marak/events?hook_private_key=b4b1153f-ae6c-49f5-9cd7-1f554a6c1a1e

The events endpoint for a Hook will intelligently respond based on the incoming HTTP Accept Header.

Authentication

By default, hook.io system events are private. In order to access them from a third-party service, you'll need to generate a valid API Access Key with the events::read role.

Below is a link which contains a limited role API Access Key created only for demonstration purposes.

{{appUrl}}/marak/events?hook_private_key=b4b1153f-ae6c-49f5-9cd7-1f554a6c1a1e

Streaming events

To access streaming events, request the events endpoint with an Accept Header value of */*

Example: curl -N {{appUrl}}/marak/events?hook_private_key=b4b1153f-ae6c-49f5-9cd7-1f554a6c1a1e

Plain Text Events

To access plain text events, request the events endpoint with an Accept Header value of text/plain

Example: curl -H "Accept: text/plain" {{appUrl}}/marak/events?hook_private_key=b4b1153f-ae6c-49f5-9cd7-1f554a6c1a1e

Client SDK

Using the Client SDK to access events is simple

Here are two examples of using the Client SDK. See SDK for more information

var sdk = require("hook.io-sdk");
var client = sdk.createClient({});
// callback style
client.events.get('marak', function (err, events) {
  console.log(err, events);
});
// streaming
client.events.stream('marak', process.stdout);