Permit¶
A Permit is a permit, licence or certificate a Service issues: a parking permit, an
inspection certificate. It says when and where it is valid, who issued it (issuedBy) and through which Service
(issuedThrough); the Service points to it as its serviceOutput. A Permit is a private record: it has no
JSON-LD document.
Modeled on schema.org/Permit · JSON Schema · ABAC object type Permit
Example¶
Create one with POST /permits:
{
"name": [
{
"at_language": "en",
"at_value": "Resident parking, zone 3"
}
],
"validFrom": "2027-01-01T00:00:00+01:00",
"validFor": "P1Y",
"validIn": "Zone 3",
"issuedBy": {
"at_id": "https://apis.objectsgrid.com/organizations/9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
}
}
Fields¶
Required: name.
| Field | Type | Required | Description |
|---|---|---|---|
at_context |
https://schema.org |
JSON-LD @context, always https://schema.org. |
|
at_type |
Permit |
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 Permit name. See schema.org/name. |
description |
list of LanguageTaggedString | The Permit description. See schema.org/description. | |
url |
URL | The object's own URL, https://apis.objectsgrid.com/<path>/<id>. Assigned by ObjectsGrid. |
|
validFrom |
date-time | When the permit starts to be valid | |
validUntil |
date-time | When the permit stops being valid | |
validFor |
string | How long it is valid, an ISO 8601 duration, e.g. P1Y | |
validIn |
string | Where it is valid, e.g. a city or a zone | |
permitAudience |
Audience | Who the permit is for | |
issuedBy |
Reference to Organization | The Organization issuing the permit | |
issuedThrough |
Reference to Service | The Service the permit was issued through | |
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 /permits |
| List and search | GET /permits |
| Create up to 100 at once | POST /permits/batch |
| Retrieve | GET /permits/{id} |
| Replace | PUT /permits/{id} |
| Update some fields | PATCH /permits/{id} |
| Delete | DELETE /permits/{id} |
Permit objects have no JSON-LD document: asked for one (Accept: application/ld+json), GET answers 406.
The OpenAPI contract, with every parameter and response: Permits (JSON).
GraphQL¶
Endpoint POST https://apis.objectsgrid.com/graphql; see the GraphQL guide.
| Operation | Field |
|---|---|
| Query | permit(id: ID!, version: String): Permit |
| Query | permits(where: PermitWhereInput, orderBy: [PermitOrderByInput!], first: Int, after: String): PermitConnection! |
| Query | permitsGroupBy(by: [PermitGroupByField!]!, where: PermitWhereInput, having: PermitHavingInput, orderBy: [PermitGroupByOrderByInput!], first: Int, after: String): PermitGroupByConnection! |
| Mutation | createPermit(input: CreatePermitInput!): Permit! |
| Mutation | updatePermit(input: UpdatePermitInput!, expectedVersion: String): Permit! |
| Mutation | deletePermit(id: ID!, expectedVersion: String): Boolean! |
Webhook events¶
Subscribe to these events in your webhook configuration to be called when a Permit changes:
PermitCreated, PermitUpdated, PermitPatched, PermitDeleted.