This document provides comprehensive documentation of the Activity API including descriptions, request methods, endpoints, parameters, and example requests and responses.
POST
/api/activities
name (required): The name of the activity.curl -X POST http://example.com/api/activities \
-H "Content-Type: application/json" \
-d '{"name": "Picnic"}'
{
"id": "activity-public-id",
"name": "Picnic"
}
GET
/api/activities/{activityId}
activityId (required): The public ID of the activity.curl http://example.com/api/activities/activity-public-id
{
"id": "activity-public-id",
"name": "Picnic",
"dates": [],
"attendees": []
}
GET
/api/activities/{activityId}/dates
activityId (required): The public ID of the activity.start (optional): Start date filter.end (optional): End date filter.full-attendees (optional): Include full attendee details. Values: true, false.curl "http://example.com/api/activities/activity-public-id/dates?start=2023-01-01&end=2023-01-31&full-attendees=true"
[
{
"date": "2023-01-15",
"attendee": {
"id": "attendee-public-id",
"name": "John Doe"
},
"activity": "activity-public-id"
}
]
POST
/api/activities/{activityId}/attendees
activityId (required): The public ID of the activity.name (required): Name of the attendee.curl -X POST http://example.com/api/activities/activity-public-id/attendees \
-H "Content-Type: application/json" \
-d '{"name": "John Doe"}'
{
"id": "attendee-public-id",
"name": "John Doe",
"created": true
}
POST
/api/activities/{activityId}/attendees/{attendeeId}/dates
activityId (required): The public ID of the activity.attendeeId (required): The public ID of the attendee.date (required): Date to be associated with the attendee.curl -X POST http://example.com/api/activities/activity-public-id/attendees/attendee-public-id/dates \
-H "Content-Type: application/json" \
-d '{"date": "2023-01-15"}'
{
"date": "2023-01-15",
"activity": "activity-public-id",
"attendee": "attendee-public-id"
}
DELETE
/api/activities/{activityId}/attendees/{attendeeId}/dates/{date}
activityId (required): The public ID of the activity.attendeeId (required): The public ID of the attendee.date (required): Date to be removed.curl -X DELETE http://example.com/api/activities/activity-public-id/attendees/attendee-public-id/dates/2023-01-15
true
This documentation covers the primary operations of the Activity API, aiming to provide sufficient information for interacting with the endpoints effectively.