Scheduling API Documentation

Overview

  • Scheduling - Retrieving, creating, editing, and deleting LEXI Live scheduled events.

Denotes an optional parameter.

Scheduling


The current version offers the following resources:

Terminology:

  • event_id - Your scheduled event(s) will have an event_id that was determined by the "UID" from your ICS. This event could have a list of recurring events attached.
  • recurrence_id - If you edit a single event from the group of recurring events, it will gain a recurrence_id. This recurrence_id is the start datetime (YYYYMMDDTHHmmss) the recurring event was originally meant to start.
  • presumed_recurrence_id - This is the start datetime (YYYYMMDDTHHmmss) of the single recurring event that you want to modify separate from the group of recurring events.

Retrieval


Resource Description
GET /events

Action

Retrieves list of all scheduled events from your credential set.

Parameters (Query)
event_id  Filter for events with the given event ID.
recurrence_id  Filter for events with the given recurrence ID.
duration_start  Filter for events after the given UNIX epoch timestamp.
Note: duration_start and duration_end must be used together when provided.
duration_end  Filter for events before the given UNIX epoch timestamp.
Note: duration_end must be used together when provided.
calculate_recurrences  Shows the recurring events.
Values to use:
  • true
  • false

Denotes an optional parameter.

Create & Modify


Resource Description
POST /events

Action

Create scheduled event(s).

Parameters (JSON)
ics (string) The event ICS represented as a string. ICS (Internet Calendaring and Scheduling) or iCalendar is an open standard for sharing calendar information. Please refer to RFC 5545 for the ICS standard. Please use your ICS library to convert the ICS data into a string. Please see example below.
We strongly advise you to use a third-party library to accomplish this.
instance_id (string) A comma-separated string of one or more LEXI or Translate Instance IDs to be used for the event.
(e.g., "asr_instance_123,lango_instance_123")
product (string) The product to schedule an event with. Even if Translate instances are used, keep this as "lexi".
Values to use:
  • lexi
tasks (list[objects])  A list of tasks to execute related to the event. Note: The "trigger" and "related" fields conform to the ICS standard.
Task options:
  • Email Reminder:
    {
        "type": "reminder",
        "related": "start",
        "trigger": "-PT1M",
        "email_addresses": [
            "fred.flintstone@ai-media.tv"
        ]
    }
                                                    
  • Email Event Transcript:
    {
        "type": "transcript",
        "related": "end",
        "trigger": "PT1M",
        "email_addresses": [
            "fred.flintstone@ai-media.tv"
        ],
        "file_type": "vtt"
    }
                                                    
Example

This JSON schedules an event recurring monthly every 3rd Monday for Fred Flintstone. Tasks include a reminder email 1 minute before the event start time and a email containing the transcript in WebVTT format 1 minute after the event end time.

{
    "ics": "BEGIN:VEVENT\r\nUID:602c7db9-8098-43dd-ae24-692a1dba939d@eegcloud.tv\r
        \nDTSTART;TZID=America/Los_Angeles:20230717T000000\r\nDTEND;TZID=America/Los_Angeles:20230717T003000\r
        \nSUMMARY:fredf_event\r\nRRULE:FREQ=MONTHLY;BYDAY=3MO\r\nEND:VEVENT\r\n",
    "tasks": [
        {
        "type": "reminder",
        "related": "start",
        "trigger": "-PT1M",
        "email_addresses": [
            "fred.flintstone@ai-media.tv"
        ]
        },
        {
        "type": "transcript",
        "related": "end",
        "trigger": "PT1M",
        "email_addresses": [
            "fred.flintstone@ai-media.tv"
        ],
        "file_type": "vtt"
        }
    ],
    "instance_id": "asr_instance_385rBs8u8JzUJRZK,lango_instance_173rGd4u8JzUJRLP",
    "product": "lexi"
}
                            
PUT /events/:event_id

Action

Modify scheduled event(s). Any parameters changed or removed in the JSON body will be reflected in the scheduled event(s).

Parameters (Path)
:event_id The ID of the event to modify.
Parameters (JSON)
ics (string) The event ICS represented as a string.
To modify the ICS:
  1. Retrieve the ICS string from the response body when you originally created the event
  2. Use an ICS library to convert the ICS string to an Event object
  3. Modify the Event object with the desired settings
  4. Convert the Event Object back to an ICS string
For example, to modify the RRULE statement to change the event recurrence pattern, add an UNTIL value to end the recurrence after 7/21/2023: "... RRULE:FREQ=WEEKLY;BYDAY=FR;UNTIL=20230721T070001Z ..."

Note: Do not modify the tasks within the ICS (indicated by the "X-EEG-TASKS" field). If you would like to modify the email reminder or email event transcript tasks, please modify them in the "tasks" object below and not within the ICS.
instance_id (string) A comma-separated string of one or more LEXI or Translate Instance IDs to be used for the event.
(e.g., "asr_instance_123,lango_instance_123")
product (string) The product to schedule an event with.
Values to use:
  • lexi
tasks (list[objects])  A list of tasks to execute related to the event. Note: The "trigger" and "related" fields conform to the ICS standard.
Task options:
  • Email Reminder:
    {
        "type": "reminder",
        "related": "start",
        "trigger": "-PT1M",
        "email_addresses": [
            "fred.flintstone@ai-media.tv"
        ]
    }
                                                    
  • Email Event Transcript:
    {
        "type": "transcript",
        "related": "end",
        "trigger": "PT1M",
        "email_addresses": [
            "fred.flintstone@ai-media.tv"
        ],
        "file_type": "vtt"
    }
                                                    
Parameters (Query)
presumed_recurrence_id  Specify the recurrence_id if you want to modify a specific event that was separated from the group of recurring scheduled events. This recurrence_id would match the presumed_recurrence_id that you specified in the above POST request.
Example: 20230821T000000 refers to an event on 8/21/2023.

Denotes an optional parameter.

Cancel & Delete


Resource Description
PUT /events/:event_id/cancel?recurrence_id=:recurrence_id

Action

Cancels a scheduled event with the given event ID.

Parameters (Path)

:event_id ID of the events to cancel.
Parameters (Query)
recurrence_id  Filter for a specific event with the given recurrence ID.
Example: 20230821T000000 refers to an event on 8/21/2023.
PUT /events/:event_id/uncancel?recurrence_id=:recurrence_id

Action

Uncancels a scheduled event with the given event ID.

Parameters (Path)

:event_id ID of the events to uncancel.
Parameters (Query)
recurrence_id  Filter for a specific event with the given recurrence ID.
Example: 20230821T000000 refers to an event on 8/21/2023.
DELETE /events/:event_id

Action

Deletes all events with the specified event ID.

Parameters (Path)
:event_id ID of the events to delete.

Denotes an optional parameter.