Get started

zone

Subscribe an endpoint to every event on this page with zone.*. Each is the envelope every webhook event shares, with the ZoneEventObject object as its data.object.

Event typeWhat happened
zone.createdA zone was created.
zone.updatedA zone changed.
zone.deletedA zone was deleted.
zone.publishedA zone was published.
zone.unpublishedA zone was taken down.

The ZoneEventObject object

A zone as a webhook event carries it: its identifiers, its name and description, its level, mode and validity window, its status, whether it is private, and its version. Its geometry and source are never carried: getZone reads them.

object

string

required

One of: zone

The kind of object this is, always zone: the family of the event types that carry it, and what tells the members of WebhookEventObject apart.

id

string (uuid)

required

Identifier of the zone.

organization_id

string (uuid)

required

Identifier of the organization the zone belongs to.

name

string

required

The zone's name.

description

string | null

required

The zone's description, null when it has none.

level

string

required

One of: info, resolved, warning, danger

The zone's severity level.

mode

string

required

One of: polygon, circle, sensor, sector, freehand

How the zone's area was drawn.

status

string

required

One of: draft, published

Whether the zone has a live publication once this change was made.

is_private

boolean

required

Whether the zone is private to the organization.

start_at

string (date-time) | null

required

When the zone's validity window opens, null when it has always been in force.

end_at

string (date-time) | null

required

When the zone's validity window closes, null when it never lapses.

version

integer (int64)

required

The zone's version once this change was made. It climbs with every change a read of the zone shows, so of two events about one zone the one carrying the higher version is the later state: events are not delivered in order. A delete is the zone's last version change: zone.deleted carries the version one past the last the zone held, so an event about it that arrives after its delete is never the later state.

created_by

object

required

The user who created the zone.

created_at

string (date-time)

required

When the zone was created.

updated_at

string (date-time)

required

When the zone last changed.

zone.created

A zone was created.

Triggered by

  • zone.create: Always.
    • POST /v1/zones: postZone, mountaya.studio.zones.postZone() in TypeScript. Every zone created.

Payload

type

string

required

One of: zone.created

Always zone.created.

data.object

ZoneEventObject

required

Every other field is the envelope every webhook event shares.

zone.updated

A zone was changed: its fields, its area or its validity window.

Triggered by

  • zone.update: Always: every accepted change writes a new revision, one that sends the values already held included.
    • PATCH /v1/zones/{zone_id}: patchZone, mountaya.studio.zones.patchZone() in TypeScript. Every change accepted.

Payload

type

string

required

One of: zone.updated

Always zone.updated.

data.object

ZoneEventObject

required
data.previous_attributes

object

The former value of each field of data.object the change moved, and of no other.

Every other field is the envelope every webhook event shares.

zone.deleted

A zone was deleted, with its publication, which records no event of its own.

Triggered by

  • zone.delete: Always.
    • DELETE /v1/zones/{zone_id}: deleteZone, mountaya.studio.zones.deleteZone() in TypeScript. Every zone deleted.

Payload

type

string

required

One of: zone.deleted

Always zone.deleted.

data.object

ZoneEventObject

required

Every other field is the envelope every webhook event shares.

zone.published

A zone was published: a first publication, or a republication replacing the live one.

Triggered by

  • zone.publish: Always: a republication replaces the live publication and is recorded too.
    • POST /v1/zones/{zone_id}/publication: postZonePublication, mountaya.studio.zones.postZonePublication() in TypeScript. Every publication.

Payload

type

string

required

One of: zone.published

Always zone.published.

data.object

ZoneEventObject

required

Every other field is the envelope every webhook event shares.

zone.unpublished

A zone's live publication was taken down.

Triggered by

  • zone.unpublish: When the zone was published. Taking down what is not published records nothing.
    • DELETE /v1/zones/{zone_id}/publication: deleteZonePublication, mountaya.studio.zones.deleteZonePublication() in TypeScript. Every request.

Payload

type

string

required

One of: zone.unpublished

Always zone.unpublished.

data.object

ZoneEventObject

required

Every other field is the envelope every webhook event shares.