CalendarEvent
The CalendarEvent object
The CalendarEvent object looks like this in JSON:
{
"object": "calendar_event",
"id": 1,
"owner_id": 21908,
"owner_type": "course_offering",
"summary": "BR101: Main Class",
"description": null,
"start_date": "2022-08-01T13:00:00+00:00",
"end_date": "2022-08-01T14:00:00+00:00",
"all_day": false,
"recurrence_frequency": "weekly",
"recurrence_interval": 1,
"recurrence_count": null,
"recurrence_until": "2022-12-31",
"recurrence_by_day": "mo,we,fr",
"recurrence_skips": null,
"is_closure": false,
"closure_academic_year_id": null,
"busy": true,
"room_id": null,
"location": null,
"room_status": "none",
"url": null,
"added_at": null,
"added_by_id": null,
"sandbox": true
}
| Attribute | Required | Data Type |
|---|---|---|
| id | Yes | int |
| owner_id | Yes | int |
| owner_type | Yes | enum (person, course_offering, school_calendar, room, resource) |
| summary | No | text (255) |
| description | No | text |
| start_date | Yes | datetime |
| end_date | Yes | datetime |
| all_day | Yes | bool |
| recurrence_frequency | Yes | enum (none, daily, weekly, monthly, yearly) |
| recurrence_interval | Yes | int |
| recurrence_count | Yes | int |
| recurrence_until | Yes | date |
| recurrence_by_day | No | set (su, mo, tu, we, th, fr, sa) |
| recurrence_skips | Yes | text |
| is_closure | Yes | bool |
| closure_academic_year_id | No | int |
| busy | Yes | bool |
| room_id | Yes | int |
| location | Yes | text (100) |
| room_status | Yes | enum (none, tentative, accepted, declined) |
| url | No | text (2100) |
| added_at | No | datetime |
| added_by_id | No | int |
| sandbox | No | bool |
index
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/events" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
-d '{
"start_date": "2022-01-05",
"end_date": "2023-02-06",
"page": 1
}' \
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/events',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
body: {
:start_date => '2022-01-05',
:end_date => '2023-02-06'
}.to_json
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/events',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
json={
'start_date': '2022-01-05',
'end_date': '2023-02-06'
}
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/events"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
request.AddJsonBody(new {
start_date = "2022-01-05",
end_date = "2023-02-06"
});
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/events');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode([
'start_date' => '2022-01-05',
'end_date' => '2023-02-06'
]));
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "list",
"count": 67,
"results": 67,
"results_per_page": 200,
"pages": 1,
"page": 1,
"offset": 0,
"has_more": false,
"data": [
{
"object": "calendar_event",
"id": 2,
"owner_id": 1,
"owner_type": "school_calendar",
"summary": "Convocation",
"description": null,
"start_date": "2022-08-01T13:00:00+00:00",
"end_date": "2022-08-01T14:00:00+00:00",
"all_day": false,
"recurrence_frequency": "weekly",
"recurrence_interval": 1,
"recurrence_count": null,
"recurrence_until": "2022-12-31T00:00:00-0800",
"recurrence_by_day": "mo,we,fr",
"recurrence_skips": null,
"recurrence": "2022-08-01",
"is_closure": false,
"closure_academic_year_id": null,
"busy": true,
"room_id": null,
"location": null,
"room_status": "none",
"url": null,
"added_at": null,
"added_by_id": null
}
],
"sandbox": true
}
Returns up to 200 events per page. start_date/end_date may span at most 2 years.
HTTP Request
GET /events
Parameters
| Name | Required | Data Type | Description |
|---|---|---|---|
| start_date | Yes | datetime | |
| end_date | Yes | datetime | Must be no more than 2 years after start_date. |
| page | No | int | |
| limit | No | int | Maximum number of results per page. Default and maximum is 200. |
Expandable Properties
- attendees
- resources
Permissions
One of the following roles is required to call this method:
- Staff
create
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/events" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X POST
-d '{
"owner_type": "person",
"owner_id": 22,
"summary": "English 101",
"start": "2022-01-05 09:00:00",
"end": "2022-01-05 10:00:00",
"recurrence_frequency": "none",
"recurrence_interval": 1,
"recurrence_until": "0000-00-00",
"recurrence_by_day": "mo,we,fr",
"busy": true,
"url": "https:\/\/zoom.us\/j\/123",
"room_id": 1,
"attendees": "[{\"email_address\": \"guest@example.com\"}]",
"resources": "[{\"name\": \"Projector\"}]"
}' \
require 'httparty'
response = HTTParty.post(
'https://yourschool.populiweb.com/api2/events',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
body: {
:owner_type => 'person',
:summary => 'English 101',
:start => '2022-01-05 09:00:00',
:end => '2022-01-05 10:00:00'
}.to_json
)
puts response.body
import requests
response = requests.post(
'https://yourschool.populiweb.com/api2/events',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
json={
'owner_type': 'person',
'summary': 'English 101',
'start': '2022-01-05 09:00:00',
'end': '2022-01-05 10:00:00'
}
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/events"), Method.Post);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
request.AddJsonBody(new {
owner_type = "person",
summary = "English 101",
start = "2022-01-05 09:00:00",
end = "2022-01-05 10:00:00"
});
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/events');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode([
'owner_type' => 'person',
'summary' => 'English 101',
'start' => '2022-01-05 09:00:00',
'end' => '2022-01-05 10:00:00'
]));
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "calendar_event",
"id": 5,
"owner_id": 22,
"owner_type": "person",
"summary": "English 101",
"description": null,
"start_date": "2022-01-05T17:00:00+00:00",
"end_date": "2022-01-05T18:00:00+00:00",
"all_day": false,
"recurrence_frequency": "none",
"recurrence_interval": 0,
"recurrence_count": null,
"recurrence_until": null,
"recurrence_by_day": null,
"recurrence_skips": null,
"is_closure": false,
"closure_academic_year_id": null,
"busy": true,
"room_id": 1,
"location": null,
"room_status": "accepted",
"url": "https:\/\/zoom.us\/j\/123",
"added_at": "2026-07-25T16:24:09+00:00",
"added_by_id": 22,
"sandbox": true
}
Creates a new CalendarEvent object.
HTTP Request
POST /events
Parameters
| Name | Required | Data Type | Description |
|---|---|---|---|
| owner_type | Yes | enum (person, course_offering, school_calendar, room, resource) | |
| owner_id | No | int | Required unless owner_type = 'school_calendar' |
| summary | Yes | text (255) | |
| start | Yes | datetime | |
| end | Yes | datetime | |
| all_day | No | bool | |
| description | No | text | |
| recurrence_frequency | No | enum (none, daily, weekly, monthly, yearly) | |
| recurrence_interval | No | int | |
| recurrence_count | No | int | |
| recurrence_until | No | date | |
| recurrence_by_day | No | set (su, mo, tu, we, th, fr, sa) | |
| busy | No | bool | |
| url | No | text (2100) | |
| room_id | No | int | |
| location | No | text (100) | Use when you do not have a room_id. |
| attendees | No | array of objects | Each object should contain either person_id or email. Optionally set hidden to true. |
| notify_attendees | No | bool | Default is false |
| resources | No | array of objects | Each object should contain either facility_resource_id or name. |
Permissions
One of the following roles is required to call this method:
- Staff
show
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/events/(calendarevent)" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/events/(calendarevent)',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/events/(calendarevent)',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/events/(calendarevent)"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/events/(calendarevent)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "calendar_event",
"id": 1,
"owner_id": 21908,
"owner_type": "course_offering",
"summary": "BR101: Main Class",
"description": null,
"start_date": "2022-08-01T13:00:00+00:00",
"end_date": "2022-08-01T14:00:00+00:00",
"all_day": false,
"recurrence_frequency": "weekly",
"recurrence_interval": 1,
"recurrence_count": null,
"recurrence_until": "2022-12-31",
"recurrence_by_day": "mo,we,fr",
"recurrence_skips": null,
"is_closure": false,
"closure_academic_year_id": null,
"busy": true,
"room_id": null,
"location": null,
"room_status": "none",
"url": null,
"added_at": null,
"added_by_id": null,
"sandbox": true
}
Retrieves a specific CalendarEvent object.
HTTP Request
GET /events/(calendarevent)
Parameters
No additional parameters are needed beyond the ID of the object being requested that appears in the URL.
Expandable Properties
- attendees
- resources
Permissions
One of the following roles is required to call this method:
- Staff
update
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/events/(calendarevent)" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X PUT
-d '{
"summary": "English 101",
"start": "2022-01-05 09:00:00",
"end": "2022-01-05 10:00:00",
"recurrence_frequency": "none",
"recurrence_interval": 1,
"recurrence_count": 8,
"recurrence_until": "2022-05-28",
"recurrence_by_day": "mo,we,fr",
"busy": true,
"url": "https:\/\/zoom.us\/j\/123",
"room_id": 1,
"attendees": "[{\"person_id\": 12}]",
"remove_attendees": "[1]",
"resources": "[{\"name\": \"Projector\"}]",
"remove_resources": "[1]"
}' \
require 'httparty'
response = HTTParty.put(
'https://yourschool.populiweb.com/api2/events/(calendarevent)',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
body: {
:summary => 'English 101',
:start => '2022-01-05 09:00:00',
:end => '2022-01-05 10:00:00'
}.to_json
)
puts response.body
import requests
response = requests.put(
'https://yourschool.populiweb.com/api2/events/(calendarevent)',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
json={
'summary': 'English 101',
'start': '2022-01-05 09:00:00',
'end': '2022-01-05 10:00:00'
}
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/events/(calendarevent)"), Method.Put);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
request.AddJsonBody(new {
summary = "English 101",
start = "2022-01-05 09:00:00",
end = "2022-01-05 10:00:00"
});
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/events/(calendarevent)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode([
'summary' => 'English 101',
'start' => '2022-01-05 09:00:00',
'end' => '2022-01-05 10:00:00'
]));
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "calendar_event",
"id": 1,
"owner_id": 21908,
"owner_type": "course_offering",
"summary": "English 101",
"description": null,
"start_date": "2022-01-05T17:00:00+00:00",
"end_date": "2022-01-05T18:00:00+00:00",
"all_day": false,
"recurrence_frequency": "none",
"recurrence_interval": 0,
"recurrence_count": null,
"recurrence_until": null,
"recurrence_by_day": null,
"recurrence_skips": null,
"is_closure": false,
"closure_academic_year_id": null,
"busy": true,
"room_id": 1,
"location": null,
"room_status": "declined",
"url": "https:\/\/zoom.us\/j\/123",
"added_at": null,
"added_by_id": null,
"sandbox": true
}
Updates an existing CalendarEvent object.
HTTP Request
PUT /events/(calendarevent)
Parameters
| Name | Required | Data Type | Description |
|---|---|---|---|
| summary | Yes | text (255) | |
| start | Yes | datetime | |
| end | Yes | datetime | |
| all_day | No | bool | |
| description | No | text | |
| recurrence_frequency | No | enum (none, daily, weekly, monthly, yearly) | |
| recurrence_interval | No | int | |
| recurrence_count | No | int | |
| recurrence_until | No | date | |
| recurrence_by_day | No | set (su, mo, tu, we, th, fr, sa) | |
| busy | No | bool | |
| url | No | text (2100) | |
| room_id | No | int | |
| location | No | text (100) | Use when you do not have a room_id. |
| attendees | No | array of objects | Attendees to add. Each object should contain either person_id or email. Optionally set hidden to true. |
| remove_attendees | No | array of CalendarEventAttendee ids | Attendees to remove by their ID. |
| notify_attendees | No | bool | Default is false |
| resources | No | array of objects | Resources to add. Each object should contain either facility_resource_id or name. |
| remove_resources | No | array of CalendarEventResource ids | Resources to remove by their ID. |
Permissions
One of the following roles is required to call this method:
- Staff
delete
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/events/(calendarevent)" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X DELETE
-d '{
"recurrence": "2022-05-28"
}' \
require 'httparty'
response = HTTParty.delete(
'https://yourschool.populiweb.com/api2/events/(calendarevent)',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.delete(
'https://yourschool.populiweb.com/api2/events/(calendarevent)',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/events/(calendarevent)"), Method.Delete);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/events/(calendarevent)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "calendar_event",
"id": 1,
"deleted": true
}
Deletes an existing CalendarEvent object.
HTTP Request
DELETE /events/(calendarevent)
Parameters
| Name | Required | Data Type | Description |
|---|---|---|---|
| recurrence | No | date | Use to only delete a recurrence instance. |
No additional parameters are needed beyond the ID of the object to delete that appears in the URL.
Permissions
One of the following roles is required to call this method:
- Staff