Course¶
A Course is a course of study or training: a language course, a first aid training, a cooking class.
Its runs, with their dates, place, mode, schedule and instructors, are Events whose additionalType is
CourseInstance and whose instanceOf points to the Course, listed in hasCourseInstance; book a run with an
EventReservation, sell it with an Offer. provider is an Organization,
a Place such as a school, or a Person. Google's course results read its JSON-LD document.
Modeled on schema.org/Course · JSON Schema · ABAC object type Course
Example¶
Create one with POST /courses:
{
"name": [
{
"at_language": "en",
"at_value": "German for beginners (A1)"
}
],
"courseCode": "DE-A1",
"educationalCredentialAwarded": [
{
"at_language": "en",
"at_value": "Certificate A1"
}
],
"inLanguage": "de",
"provider": {
"at_id": "https://apis.objectsgrid.com/places/4d5e6f7a-8b9c-4d0e-9f1a-2b3c4d5e6f7a"
}
}
Fields¶
Required: name.
| Field | Type | Required | Description |
|---|---|---|---|
at_context |
https://schema.org |
JSON-LD @context, always https://schema.org. |
|
at_type |
Course |
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. |
|
name |
list of LanguageTaggedString | Yes | The Course name. See schema.org/name. |
description |
list of LanguageTaggedString | The Course 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 | |
courseCode |
string | The identifier of the course, e.g. CS101 | |
coursePrerequisites |
list of LanguageTaggedString | What a participant should know or have done before | |
educationalCredentialAwarded |
list of LanguageTaggedString | The certificate or qualification the course leads to | |
numberOfCredits |
integer | The credits the course earns | |
teaches |
list of LanguageTaggedString | The skills or knowledge it teaches | |
about |
list of LanguageTaggedString | Its subjects | |
inLanguage |
string | The language it is taught in, an IETF BCP 47 language code, e.g. en, de-AT | |
provider |
Reference to Organization or Place or Person | Who offers the course: an Organization, a Place such as a school, or a Person | |
hasCourseInstance |
computed: list of Event | The runs of the course, Events whose additionalType is CourseInstance. Computed, read-only: the objects whose Event.instanceOf points to this object, listed from that type; never stored or written. | |
offers |
computed: list of Offer | The Offers for the course. 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 /courses |
| List and search | GET /courses |
| Create up to 100 at once | POST /courses/batch |
| Retrieve | GET /courses/{id} |
| Retrieve as a JSON-LD document for your pages | GET /courses/{id} with Accept: application/ld+json; see JSON-LD for your pages |
| Replace | PUT /courses/{id} |
| Update some fields | PATCH /courses/{id} |
| Delete | DELETE /courses/{id} |
The OpenAPI contract, with every parameter and response: Courses (JSON).
GraphQL¶
Endpoint POST https://apis.objectsgrid.com/graphql; see the GraphQL guide.
| Operation | Field |
|---|---|
| Query | course(id: ID!, version: String): Course |
| Query | courses(where: CourseWhereInput, orderBy: [CourseOrderByInput!], first: Int, after: String): CourseConnection! |
| Query | coursesGroupBy(by: [CourseGroupByField!]!, where: CourseWhereInput, having: CourseHavingInput, orderBy: [CourseGroupByOrderByInput!], first: Int, after: String): CourseGroupByConnection! |
| Mutation | createCourse(input: CreateCourseInput!): Course! |
| Mutation | updateCourse(input: UpdateCourseInput!, expectedVersion: String): Course! |
| Mutation | deleteCourse(id: ID!, expectedVersion: String): Boolean! |
Webhook events¶
Subscribe to these events in your webhook configuration to be called when a Course changes:
CourseCreated, CourseUpdated, CoursePatched, CourseDeleted.