Skip to main content
Sakai provides a modern REST API through the WebAPI module, exposing various tools and services through standardized HTTP endpoints.

Base URL

All REST API endpoints are relative to your Sakai installation:
https://your-sakai-instance.edu/api

Available Endpoints

Announcements

GET /users/me/announcements
endpoint
Get announcements for the current user from their pinned sites
Response: Returns a list of recent announcements with site information and URLs.
{
  "announcements": [
    {
      "id": "announcement-id",
      "title": "Important Course Update",
      "body": "...",
      "siteId": "site-123",
      "siteTitle": "Chemistry 101",
      "createdBy": "[email protected]",
      "createdDate": "2024-03-04T10:30:00Z",
      "url": "/portal/site/site-123/tool/announcement-tool-id"
    }
  ]
}
Source: webapi/src/main/java/org/sakaiproject/webapi/controllers/AnnouncementsController.java:56

Calendar

GET /users/me/calendar
endpoint
Get calendar events for the current user
Response: Returns upcoming calendar events from user’s sites.
{
  "events": [
    {
      "id": "event-id",
      "title": "Final Exam",
      "description": "...",
      "startTime": "2024-03-15T14:00:00Z",
      "endTime": "2024-03-15T16:00:00Z",
      "siteId": "site-123",
      "type": "exam",
      "url": "/portal/site/site-123"
    }
  ]
}
Source: webapi/src/main/java/org/sakaiproject/webapi/controllers/CalendarController.java:47

Grades

GET /sites/{siteId}/grades
endpoint
Get gradebook information for a site
Parameters:
  • siteId (path) - The site identifier
Response: Returns gradebook items and grades for the current user. Source: webapi/src/main/java/org/sakaiproject/webapi/controllers/GradesController.java

Forums/Discussions

GET /users/me/forums
endpoint
Get forum topics and messages for the current user
Response: Returns recent forum activity and unread messages. Source: webapi/src/main/java/org/sakaiproject/webapi/controllers/ForumsController.java

Dashboard

GET /users/me/dashboard
endpoint
Get dashboard information for the current user
Response: Aggregated data including announcements, assignments, calendar events, and grades. Source: webapi/src/main/java/org/sakaiproject/webapi/controllers/DashboardController.java

Conversations

GET /sites/{siteId}/conversations
endpoint
Get conversations (discussion topics) for a site
POST /sites/{siteId}/conversations
endpoint
Create a new conversation topic
Source: webapi/src/main/java/org/sakaiproject/webapi/controllers/ConversationsController.java

Lessons

GET /sites/{siteId}/lessons
endpoint
Get lesson pages for a site
Source: webapi/src/main/java/org/sakaiproject/webapi/controllers/LessonsController.java

Notifications

GET /users/me/notifications
endpoint
Get notifications for the current user
PUT /users/me/notifications/{notificationId}
endpoint
Mark a notification as read
Source: webapi/src/main/java/org/sakaiproject/webapi/controllers/NotificationsController.java

Permissions

GET /sites/{siteId}/permissions
endpoint
Get current user’s permissions for a site
Response: Returns a list of permissions the current user has in the specified site. Source: webapi/src/main/java/org/sakaiproject/webapi/controllers/PermissionsController.java

Response Format

All endpoints return JSON by default. The response structure typically includes:
{
  "data": { },
  "status": "success",
  "timestamp": "2024-03-04T10:30:00Z"
}

Error Responses

error
object
Error details when a request fails
Example error response:
{
  "error": {
    "status": "403",
    "message": "Permission denied",
    "timestamp": "2024-03-04T10:30:00Z"
  }
}

HTTP Status Codes

  • 200 OK - Request successful
  • 201 Created - Resource created successfully
  • 400 Bad Request - Invalid request parameters
  • 401 Unauthorized - Authentication required
  • 403 Forbidden - Insufficient permissions
  • 404 Not Found - Resource not found
  • 500 Internal Server Error - Server error

Next Steps

Authentication

Learn how to authenticate with the REST API

Examples

View practical REST API usage examples

Build docs developers (and LLMs) love