Back to top
Vastuu Group

Calendar

Version: 1.0
Last updated: July 23, 2020
|
Reading time: 8 min

Overview


The calendar API provides means to create calendar entries to identities. You can e.g. create an event for a housing company identity, a reservation to a room identity, or just a regular calendar entry to any identity you want.

The calendar entry requires a "to"-identity, the ID of the identity to which the calendar entry applies to. Specify a type for the entry, e.g. Event, Reservation, CalendarEntry. Give the calendar entry a title, e.g. "Housewarming party", a start date, when the entry starts, and an end date when the entry ends. The dates are in RFC3339 format, and will be saved in UTC time.

You can specify if an entry repeats, as defined in ISO 8601 repeating intervals. A location can be added as well, if needed, as a string, e.g. "Living room".

The cc is a list of user IDs to whom the calendar entry can be CC'd to. A notification about the entry will be sent to these users.

Capabilities

  • Allows reading a calendar entry by its id.
  • Allows listing calendars created for "to"-identity.
  • Allows creating a new calendar entry
  • Allows updating a calendar entry by its id
  • Allows deleting a calendar entry by its id.


You need to be logged in into Platform of Trust Sandbox and get your bearer token to execute the following cURL requests.

POST request to create a calendar entry

curl -i -X POST \
   --url "https://api-sandbox.oftrust.net/calendars/v1" \
   --header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9eyJzY29w...DVs5aaf" \
   --header "Content-Type: application/json" \
   --data \
   "{
         \"toIdentity\": \"0920a84a-1548-4644-b95d-e3f80e1b9ca6\",
         \"type\": \"Event\",
         \"title\": \"April fool's day festivities.\",
         \"startDate\": \"2019-04-01T12:00:00+02:00\",
         \"endDate\": \"2019-04-01T16:00:00+02:00\",
         \"repeats\": \"R5/2008-03-01T13:00:00Z/P1Y2M10DT2H30M\",
         \"content\": \"April fool's event, held on the courtyard.\",
         \"location\": \"Courtyard at Teststreet 12\",
         \"cc\": [
                \"323bde80-4cc2-472e-bb77-e6a3e95a1253\",
                \"0827e9c3-9664-479f-b0ec-956a35d72e4b\"
         ]
  }"

GET a calendar entry by id

curl -i -X GET \
   -- url "https://api-sandbox.oftrust.net/calendars/v1/{id}" \
   -- header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9eyJzY29w...DVs5aaf>" \

GET calendar list created for an 'to' identity with {to_identity_id}

curl -i -X GET \
   -- url "https://api-sandbox.oftrust.net/calendars/v1/{to_Identity_id}/list" \
   -- header "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9eyJzY29w...DVs5aaf>" \

NOTE: checkout doc.oftrust.net to see more requests to the Identity API and code samples in Java, Python and JavaScript.


API Specifications

Download Open API Specification (OAS) for Calendar here

Download RESTful API Modeling Language (RAML) specifications for Calendar here

Developer Guides

Read on how to get your Bearer Token to start accessing and using Platform of Trust APIs in this Guide

Read more about Identities and permissions on them in our Identities and Links guide

Read Identity and Data Discovery guide to learn discovering data products in an identity network

Profiles in Other Platforms

ProgrammableWeb

Questions and Feedback

Have a question on Calendar API? Shoot it in Platform of Trust Stack Overflow community page.

Did Calendar API miss some features? Make a Wish in GitHub.

Did we miss something? Make a Wish!

Tell us in GitHub

See all APIs