Event¶
An Event is something happening at a time and place: a concert, a workshop, a match, a festival.
additionalType names its kind, a Schema.org subtype of Event such as MusicEvent, SportsEvent or Festival,
which is its JSON-LD @type. It is held at a Place (location), can be part of another Event
(superEvent; the other lists it in subEvent), and its tickets are Offers whose itemOffered is the
Event, listed in offers. Statuses use EventStatusType; a rescheduled event keeps
its earlier dates in previousStartDate. A class that repeats is one Event with an eventSchedule
(Schedule); a run of a Course is an Event whose additionalType is CourseInstance, with
courseMode, courseWorkload, courseSchedule, instructor and instanceOf (the Course), which other kinds
refuse.
Modeled on schema.org/Event · JSON Schema · ABAC object type Event
Example¶
Create one with POST /events:
{
"name": [
{
"at_language": "en",
"at_value": "Jazz Night"
}
],
"additionalType": "MusicEvent",
"startDate": "2027-06-01T20:00:00+02:00",
"endDate": "2027-06-01T23:00:00+02:00",
"eventStatus": "https://schema.org/EventScheduled",
"eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
"location": {
"at_id": "https://apis.objectsgrid.com/places/4d5e6f7a-8b9c-4d0e-9f1a-2b3c4d5e6f7a"
}
}
Fields¶
Required: name, startDate.
| Field | Type | Required | Description |
|---|---|---|---|
at_context |
https://schema.org |
JSON-LD @context, always https://schema.org. |
|
at_type |
Event |
JSON-LD @type, the object's type name. |
|
at_id |
URL | The object's ObjectsGrid URL, https://apis.objectsgrid.com/<path>/<id>, its JSON-LD @id: what References to it hold. Assigned by ObjectsGrid. |
|
id |
string | The object's id. Assigned by ObjectsGrid when the object is created. | |
identifier |
string | The object's id, as Schema.org identifier. Assigned by ObjectsGrid. |
|
additionalType |
string (18 values) | The kind of event, a Schema.org subtype of Event: its JSON-LD @type. CourseInstance, a run of a Course, takes courseMode, courseWorkload, courseSchedule, instructor and instanceOf, which other kinds refuse. None for an Event. | |
name |
list of LanguageTaggedString | Yes | The Event name. See schema.org/name. |
description |
list of LanguageTaggedString | The Event description. See schema.org/description. | |
url |
URL | The object's own URL, https://apis.objectsgrid.com/<path>/<id>. Assigned by ObjectsGrid. |
|
image |
URL | image URL | |
startDate |
date-time | Yes | The start date and time of the event, ISO 8601 with a time zone |
endDate |
date-time | The end date and time of the event, ISO 8601 with a time zone | |
doorTime |
date-time | The time admission will commence | |
duration |
string | The duration of the event, as an ISO 8601 duration, e.g. 'PT2H' | |
eventStatus |
EventStatusType | The status of the event: scheduled, cancelled, postponed, rescheduled or moved online | |
eventAttendanceMode |
EventAttendanceModeEnumeration | Whether the event is attended in person, online, or both | |
inLanguage |
string | The language of the event, an IETF BCP 47 language code, e.g. 'en', 'de-AT' | |
isAccessibleForFree |
boolean | Whether the event is free | |
maximumAttendeeCapacity |
integer | The total number of individuals that may attend | |
remainingAttendeeCapacity |
integer | The number of attendee places that remain unallocated | |
previousStartDate |
list of date-time | The start dates of a rescheduled event before it was rescheduled | |
eventSchedule |
list of Schedule | When the event repeats, e.g. every Tuesday at 18:30 | |
courseMode |
string | CourseInstance: how it is attended: online, onsite or blended | |
courseWorkload |
string | CourseInstance: the time it takes, an ISO 8601 duration, e.g. PT20H | |
courseSchedule |
Schedule | CourseInstance: when its sessions are | |
instructor |
list of References to Person or Organization | CourseInstance: who teaches it | |
instanceOf |
Reference to Course | CourseInstance: the Course it is a run of | |
location |
Reference to Place | Where the event happens | |
organizer |
Reference to Organization or Person | The party organizing the event | |
performer |
list of References to Organization or Person | The performers at the event | |
superEvent |
Reference to Event | The event this one is part of, e.g. the festival of a concert | |
subEvent |
computed: list of Event | The events that are part of this one. Computed, read-only: the objects whose Event.superEvent points to this object, listed from that type; never stored or written. | |
offers |
computed: list of Offer | The Offers for the event, such as its tickets. Computed, read-only: the objects whose Offer.itemOffered points to this object, listed from that type; never stored or written. | |
tags |
list of Tag | Tags your ABAC policy decides on. Created empty when not sent, kept by a PUT that leaves them out, cleared by null or []. |
|
meta |
ObjectMeta | Read-only metadata: version, type, creation and last update. |
REST API¶
Base URL https://apis.objectsgrid.com. Every request sends the X-ObjectsGrid-AccessPoint and Authorization: Bearer <access token> headers; see the REST API guide.
| Operation | Request |
|---|---|
| Create | POST /events |
| List and search | GET /events |
| Create up to 100 at once | POST /events/batch |
| Retrieve | GET /events/{id} |
| Retrieve as a JSON-LD document for your pages | GET /events/{id} with Accept: application/ld+json; see JSON-LD for your pages |
| Replace | PUT /events/{id} |
| Update some fields | PATCH /events/{id} |
| Delete | DELETE /events/{id} |
The OpenAPI contract, with every parameter and response: Events (JSON).
GraphQL¶
Endpoint POST https://apis.objectsgrid.com/graphql; see the GraphQL guide.
| Operation | Field |
|---|---|
| Query | event(id: ID!, version: String): Event |
| Query | events(where: EventWhereInput, orderBy: [EventOrderByInput!], first: Int, after: String): EventConnection! |
| Query | eventsGroupBy(by: [EventGroupByField!]!, where: EventWhereInput, having: EventHavingInput, orderBy: [EventGroupByOrderByInput!], first: Int, after: String): EventGroupByConnection! |
| Mutation | createEvent(input: CreateEventInput!): Event! |
| Mutation | updateEvent(input: UpdateEventInput!, expectedVersion: String): Event! |
| Mutation | deleteEvent(id: ID!, expectedVersion: String): Boolean! |
Webhook events¶
Subscribe to these events in your webhook configuration to be called when an Event changes:
EventCreated, EventUpdated, EventPatched, EventDeleted.