Calendar
The Calendar API allows for managing calendars by fetching a list of calendars, creating, updating, and deleting calendar entries.
Data Schema
Field | Type | Description |
---|---|---|
id |
integer |
Unique identifier for the calendar |
name |
string |
Name of the calendar |
data |
string |
Calendar data in base64 encoded iCalendar format |
attributes |
object |
Additional calendar attributes |
Fetch a List of Calendars
Retrieves a list of calendars based on the user's authorization.
🛠Endpoint:
GET /calendars
Authorization:
- Requires Basic Authentication (
basicAuth
)
Query Parameters:
Parameter | Type | Description |
---|---|---|
all |
boolean |
Can only be used by admins or managers to fetch all entities. |
userId |
integer |
Standard users can use this only with their own userId . |
cURL Request:
curl -u username:password -X GET "https://itsochvts.com/api/calendars" \
-H "Content-Type: application/json"
200 OK - Response Body
[
{
"id": 0,
"name": "string",
"data": "string", // base64 encoded iCalendar data
"attributes": {}
}
]
Create a Calendar
Creates a new calendar.
🛠Endpoint:
POST /calendars
Authorization:
- Requires Basic Authentication (
basicAuth
)
Request Body:
{
"id": 0,
"name": "string",
"data": "string", // base64 encoded iCalendar data
"attributes": {}
}
cURL Request:
curl -u username:password -X POST "https://itsochvts.com/api/calendars" \
-H "Content-Type: application/json" \
-d '{
"id": 0,
"name": "string",
"data": "string",
"attributes": {}
}'
200 OK - Response Body
{
"id": 0,
"name": "string",
"data": "string",
"attributes": {}
}
Update a Calendar
Updates an existing calendar.
🛠Endpoint:
PUT /calendars/{id}
Authorization:
- Requires Basic Authentication (
basicAuth
)
Path Parameters:
Parameter | Type | Description |
---|---|---|
id |
integer |
The calendar ID to update. |
Request Body:
{
"id": 0,
"name": "string",
"data": "string", // base64 encoded iCalendar data
"attributes": {}
}
cURL Request:
curl -u username:password -X PUT "https://itsochvts.com/api/calendars/{id}" \
-H "Content-Type: application/json" \
-d '{
"id": 0,
"name": "string",
"data": "string",
"attributes": {}
}'
200 OK - Response Body
{
"id": 0,
"name": "string",
"data": "string",
"attributes": {}
}
Delete a Calendar
Deletes an existing calendar.
🛠Endpoint:
DELETE /calendars/{id}
Authorization:
- Requires Basic Authentication (
basicAuth
)
Path Parameters:
Parameter | Type | Description |
---|---|---|
id |
integer |
The calendar ID to delete. |
cURL Request:
curl -u username:password -X DELETE "https://itsochvts.com/api/calendars/{id}" \
-H "Content-Type: application/json"