Opami developersAPI v1.0.0

Conformance test

When a calendar is connected, Opami calls every required endpoint with sample data and checks each answer against the event format. The calendar is usable for reading once every read operation passes, and for writing once every write passes too. Run the same test yourself before connecting: it is the code Opami runs.

  1. Download opami-calendar-conformance.mjs (Node 20 or later, no dependencies).
  2. Write config.json:
{
  "endpoints": [
    { "operation": "calendars.list", "method": "GET", "url_template": "https://cal.example.com/calendars" },
    { "operation": "freebusy.query", "method": "POST", "url_template": "https://cal.example.com/freebusy" },
    { "operation": "events.list", "method": "GET", "url_template": "https://cal.example.com/calendars/{calendar_id}/events?from={from}&to={to}" },
    { "operation": "events.get", "method": "GET", "url_template": "https://cal.example.com/calendars/{calendar_id}/events/{event_id}" }
  ],
  "auth": { "type": "bearer", "token": "your test token" }
}

auth is { "type": "bearer", "token" }, { "type": "api_key", "key", "header" } (header defaults to X-API-Key) or { "type": "basic", "username", "password" }.

  1. Run node opami-calendar-conformance.mjs config.json.

What it checks, in order:

The test writes to the calendar it picks when you enter the write endpoints: point it at a test calendar.