Calendar API
INTRO
API documentation of https://foutaise.org/cal/
GET https://foutaise.org/cal/api/v1/help
Display this API documentation.
Response
text/html
DELETE https://foutaise.org/cal/api/v1/events/{eventid}
Delete a calendar event.
Request header
Authorization (required)
The Authorization header must start with Apikey, followed by the user's API Key.
URI parameter
eventid: uint (required)
Id of the event to delete.
Example
curl -H "Authorization: Apikey <your-api-key>" \
-X DELETE \
https://foutaise.org/cal/api/v1/events/42
POST https://foutaise.org/cal/api/v1/events
Add a calendar event.
Request header
Authorization (required)
The Authorization header must start with Apikey, followed by the user's API Key.
Request data
title: string (required)
Title of the event.
date: string (required, format: yyyy-mm-dd)
Date of the event.
begin_hour: string (required, format: hh:mm)
Begin hour of the event.
end_hour: string (required, format: hh:mm)
End hour of the event.
Example
curl -H "Authorization: Apikey <your-api-key>" \
-X POST \
-d "date=2021-04-11" \
-d "title=test" \
-d "begin_hour=08:00" \
-d "end_hour=09:00" \
https://foutaise.org/cal/api/v1/events
POST https://foutaise.org/cal/api/v1/events/{eventid}
Edit a calendar event.
Request header
Authorization (required)
The Authorization header must start with Apikey, followed by the user's API Key.
URI parameter
eventid: uint (required)
Id of the event to edit.
Request data
title: string (required)
Title of the event.
date: string (required, format: yyyy-mm-dd)
Date of the event.
begin_hour: string (required, format: hh:mm)
Begin hour of the event.
end_hour: string (required, format: hh:mm)
End hour of the event.
Example
curl -H "Authorization: Apikey <your-api-key>" \
-X POST \
-d "date=2021-04-11" \
-d "title=test" \
-d "begin_hour=08:00" \
-d "end_hour=09:00" \
https://foutaise.org/cal/api/v1/events/42
GET https://foutaise.org/cal/api/v1/events
List future calendar events.
Request header
Authorization (required)
The Authorization header must start with Apikey, followed by the user's API Key.
Response
application/json: array of objects with the following properties
{
eventid: uint,
title: string,
date: string,
begin_hour: string,
end_hour: string
}
Example
curl -H "Authorization: Apikey <your-api-key>" \
https://foutaise.org/cal/api/v1/events