clever.data
Module clever.data
API
Definitions
ballerinax/clever.data Ballerina library
Overview
Clever is a platform that securely connects education applications with the roster data held by school districts. The Clever Data connector lets Ballerina programs read and manage that data through the Clever Data API, and supports version 3.1 of the API.
Key features
- Browse districts, schools, terms, courses and sections
- Look up students, teachers, staff and contacts, and the sections and resources linked to them
- Retrieve attendance records and data change events
- Create, update and delete assignments, and review or grade student submissions
- Authenticate with a bearer access token
Setup guide
To use the Clever Data connector you need an access token for the Clever Data API.
-
Sign in to the Clever Dashboard and open the application you have registered with Clever, or register a new one.
-
Copy the client ID and client secret of the application.
-
Obtain a district-app access token by sending the client ID and client secret as HTTP Basic credentials to the Clever token endpoint at
https://clever.com/oauth/tokens, or copy a token for the district from the Clever dashboard. -
Keep the token safe and supply it to the connector through a
Config.tomlfile or an environment variable.
Quickstart
To use the clever.data connector in your Ballerina application, update the .bal file as follows:
Step 1: Import the module
import ballerinax/clever.data;
Step 2: Instantiate a new connector
Create a Config.toml file with your access token:
token = "<access-token>"
Then create a client using the token:
configurable string token = ?; data:Client clever = check new ({auth: {token}});
Step 3: Invoke the connector operation
Use the client to list the schools in the district:
public function main() returns error? { data:SchoolsResponse _ = check clever->getSchools(); }
Step 4: Run the Ballerina application
bal run
Examples
The Clever Data connector provides practical examples illustrating usage in various scenarios. Explore these examples, covering the following use cases:
- School roster overview - List the districts, the schools in them and the sections taught at each school.
- Assignment grading workflow - Create an assignment in a section, update it and review or grade the student submissions.
Clients
clever.data: Client
Provides access to the Clever Data API, letting applications read and manage education roster data such as districts, schools, courses, sections, students and teachers, as well as assignments and submissions.
Constructor
Gets invoked to initialize the connector.
init (ConnectionConfig config, string serviceUrl)- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.clever.com/v3.1" - URL of the target service
getCourses
function getCourses(map<string|string[]> headers, *GetCoursesQueries queries) returns CoursesResponse|errorList courses
Parameters
- queries *GetCoursesQueries - Queries to be sent with the request
Return Type
- CoursesResponse|error - OK Response
getCourse
Get a course
Parameters
- id string - ID of the course
Return Type
- CourseResponse|error - OK Response
getDistrictForCourse
function getDistrictForCourse(string id, map<string|string[]> headers) returns DistrictResponse|errorGet the district of a course
Parameters
- id string - ID of the course
Return Type
- DistrictResponse|error - OK Response
getResourcesForCourse
function getResourcesForCourse(string id, map<string|string[]> headers, *GetResourcesForCourseQueries queries) returns ResourcesResponse|errorList the resources of a course
Parameters
- id string - ID of the course
- queries *GetResourcesForCourseQueries - Queries to be sent with the request
Return Type
- ResourcesResponse|error - OK Response
getSchoolsForCourse
function getSchoolsForCourse(string id, map<string|string[]> headers, *GetSchoolsForCourseQueries queries) returns SchoolsResponse|errorList the schools of a course
Parameters
- id string - ID of the course
- queries *GetSchoolsForCourseQueries - Queries to be sent with the request
Return Type
- SchoolsResponse|error - OK Response
getSectionsForCourse
function getSectionsForCourse(string id, map<string|string[]> headers, *GetSectionsForCourseQueries queries) returns SectionsResponse|errorList the sections of a course
Parameters
- id string - ID of the course
- queries *GetSectionsForCourseQueries - Queries to be sent with the request
Return Type
- SectionsResponse|error - OK Response
getDistricts
function getDistricts(map<string|string[]> headers, *GetDistrictsQueries queries) returns DistrictsResponse|errorList districts
Parameters
- queries *GetDistrictsQueries - Queries to be sent with the request
Return Type
- DistrictsResponse|error - OK Response
getDistrict
Get a district
Parameters
- id string - ID of the district
Return Type
- DistrictResponse|error - OK Response
getResources
function getResources(map<string|string[]> headers, *GetResourcesQueries queries) returns ResourcesResponse|errorList resources
Parameters
- queries *GetResourcesQueries - Queries to be sent with the request
Return Type
- ResourcesResponse|error - OK Response
getResource
Get a resource
Parameters
- id string - ID of the resource
Return Type
- ResourceResponse|error - OK Response
getCoursesForResource
function getCoursesForResource(string id, map<string|string[]> headers, *GetCoursesForResourceQueries queries) returns CoursesResponse|errorList the courses of a resource
Parameters
- id string - ID of the resource
- queries *GetCoursesForResourceQueries - Queries to be sent with the request
Return Type
- CoursesResponse|error - OK Response
getSectionsForResource
function getSectionsForResource(string id, map<string|string[]> headers, *GetSectionsForResourceQueries queries) returns SectionsResponse|errorList the sections of a resource
Parameters
- id string - ID of the resource
- queries *GetSectionsForResourceQueries - Queries to be sent with the request
Return Type
- SectionsResponse|error - OK Response
getUsersForResource
function getUsersForResource(string id, map<string|string[]> headers, *GetUsersForResourceQueries queries) returns UsersResponse|errorList the users of a resource
Parameters
- id string - ID of the resource
- queries *GetUsersForResourceQueries - Queries to be sent with the request
Return Type
- UsersResponse|error - OK Response
getSchools
function getSchools(map<string|string[]> headers, *GetSchoolsQueries queries) returns SchoolsResponse|errorList schools
Parameters
- queries *GetSchoolsQueries - Queries to be sent with the request
Return Type
- SchoolsResponse|error - OK Response
getSchool
Get a school
Parameters
- id string - ID of the school
Return Type
- SchoolResponse|error - OK Response
getCoursesForSchool
function getCoursesForSchool(string id, map<string|string[]> headers, *GetCoursesForSchoolQueries queries) returns CoursesResponse|errorList the courses of a school
Parameters
- id string - ID of the school
- queries *GetCoursesForSchoolQueries - Queries to be sent with the request
Return Type
- CoursesResponse|error - OK Response
getDistrictForSchool
function getDistrictForSchool(string id, map<string|string[]> headers) returns DistrictResponse|errorGet the district of a school
Parameters
- id string - ID of the school
Return Type
- DistrictResponse|error - OK Response
getSectionsForSchool
function getSectionsForSchool(string id, map<string|string[]> headers, *GetSectionsForSchoolQueries queries) returns SectionsResponse|errorList the sections of a school
Parameters
- id string - ID of the school
- queries *GetSectionsForSchoolQueries - Queries to be sent with the request
Return Type
- SectionsResponse|error - OK Response
getTermsForSchool
function getTermsForSchool(string id, map<string|string[]> headers, *GetTermsForSchoolQueries queries) returns TermsResponse|errorList the terms of a school
Parameters
- id string - ID of the school
- queries *GetTermsForSchoolQueries - Queries to be sent with the request
Return Type
- TermsResponse|error - OK Response
getUsersForSchool
function getUsersForSchool(string id, map<string|string[]> headers, *GetUsersForSchoolQueries queries) returns UsersResponse|errorList the users of a school
Parameters
- id string - ID of the school
- queries *GetUsersForSchoolQueries - Queries to be sent with the request
Return Type
- UsersResponse|error - OK Response
getSections
function getSections(map<string|string[]> headers, *GetSectionsQueries queries) returns SectionsResponse|errorList sections
Parameters
- queries *GetSectionsQueries - Queries to be sent with the request
Return Type
- SectionsResponse|error - OK Response
getSection
Get a section
Parameters
- id string - ID of the section
Return Type
- SectionResponse|error - OK Response
getCourseForSection
Get the course of a section
Parameters
- id string - ID of the section
Return Type
- CourseResponse|error - OK Response
getDistrictForSection
function getDistrictForSection(string id, map<string|string[]> headers) returns DistrictResponse|errorGet the district of a section
Parameters
- id string - ID of the section
Return Type
- DistrictResponse|error - OK Response
getResourcesForSection
function getResourcesForSection(string id, map<string|string[]> headers, *GetResourcesForSectionQueries queries) returns ResourcesResponse|errorList the resources of a section
Parameters
- id string - ID of the section
- queries *GetResourcesForSectionQueries - Queries to be sent with the request
Return Type
- ResourcesResponse|error - OK Response
getSchoolForSection
Get the school of a section
Parameters
- id string - ID of the section
Return Type
- SchoolResponse|error - OK Response
getTermForSection
Get the term of a section
Parameters
- id string - ID of the section
Return Type
- TermResponse|error - OK Response
getUsersForSection
function getUsersForSection(string id, map<string|string[]> headers, *GetUsersForSectionQueries queries) returns UsersResponse|errorList the users of a section
Parameters
- id string - ID of the section
- queries *GetUsersForSectionQueries - Queries to be sent with the request
Return Type
- UsersResponse|error - OK Response
getTerms
function getTerms(map<string|string[]> headers, *GetTermsQueries queries) returns TermsResponse|errorList terms
Parameters
- queries *GetTermsQueries - Queries to be sent with the request
Return Type
- TermsResponse|error - OK Response
getTerm
Get a term
Parameters
- id string - ID of the term
Return Type
- TermResponse|error - OK Response
getDistrictForTerm
Get the district of a term
Parameters
- id string - ID of the term
Return Type
- DistrictResponse|error - OK Response
getSectionsForTerm
function getSectionsForTerm(string id, map<string|string[]> headers, *GetSectionsForTermQueries queries) returns SectionsResponse|errorList the sections of a term
Parameters
- id string - ID of the term
- queries *GetSectionsForTermQueries - Queries to be sent with the request
Return Type
- SectionsResponse|error - OK Response
getSchoolsForTerm
function getSchoolsForTerm(string id, map<string|string[]> headers, *GetSchoolsForTermQueries queries) returns SchoolsResponse|errorList the schools of a term
Parameters
- id string - ID of the term
- queries *GetSchoolsForTermQueries - Queries to be sent with the request
Return Type
- SchoolsResponse|error - OK Response
getUsers
function getUsers(map<string|string[]> headers, *GetUsersQueries queries) returns UsersResponse|errorList users
Parameters
- queries *GetUsersQueries - Queries to be sent with the request
Return Type
- UsersResponse|error - OK Response
getUser
Get a user
Parameters
- id string - ID of the user
Return Type
- UserResponse|error - OK Response
getDistrictForUser
Get the district of a user
Parameters
- id string - ID of the user
Return Type
- DistrictResponse|error - OK Response
getContactsForUser
function getContactsForUser(string id, map<string|string[]> headers, *GetContactsForUserQueries queries) returns UsersResponse|errorList the contacts of a user
Parameters
- id string - ID of the user
- queries *GetContactsForUserQueries - Queries to be sent with the request
Return Type
- UsersResponse|error - OK Response
getStudentsForUser
function getStudentsForUser(string id, map<string|string[]> headers, *GetStudentsForUserQueries queries) returns UsersResponse|errorList the students of a user
Parameters
- id string - ID of the user
- queries *GetStudentsForUserQueries - Queries to be sent with the request
Return Type
- UsersResponse|error - OK Response
getTeachersForUser
function getTeachersForUser(string id, map<string|string[]> headers, *GetTeachersForUserQueries queries) returns UsersResponse|errorList the teachers of a user
Parameters
- id string - ID of the user
- queries *GetTeachersForUserQueries - Queries to be sent with the request
Return Type
- UsersResponse|error - OK Response
getResourcesForUser
function getResourcesForUser(string id, map<string|string[]> headers, *GetResourcesForUserQueries queries) returns ResourcesResponse|errorList the resources of a user
Parameters
- id string - ID of the user
- queries *GetResourcesForUserQueries - Queries to be sent with the request
Return Type
- ResourcesResponse|error - OK Response
getSchoolsForUser
function getSchoolsForUser(string id, map<string|string[]> headers, *GetSchoolsForUserQueries queries) returns SchoolsResponse|errorList the schools of a user
Parameters
- id string - ID of the user
- queries *GetSchoolsForUserQueries - Queries to be sent with the request
Return Type
- SchoolsResponse|error - OK Response
getSectionsForUser
function getSectionsForUser(string id, map<string|string[]> headers, *GetSectionsForUserQueries queries) returns SectionsResponse|errorList the sections of a user
Parameters
- id string - ID of the user
- queries *GetSectionsForUserQueries - Queries to be sent with the request
Return Type
- SectionsResponse|error - OK Response
createAssignmentForSection
function createAssignmentForSection(string sectionId, AssignmentRequest payload, map<string|string[]> headers) returns AssignmentResponse|errorCreate an assignment in a section
Parameters
- sectionId string - ID of the section
- payload AssignmentRequest - Assignment details to create in the section
Return Type
- AssignmentResponse|error - OK Response
getAssignmentForSection
function getAssignmentForSection(string sectionId, string assignmentId, map<string|string[]> headers) returns AssignmentResponse|errorGet an assignment of a section
Parameters
- sectionId string - ID of the section
- assignmentId string - ID of the assignment in the section
Return Type
- AssignmentResponse|error - OK Response
deleteAssignmentForSection
function deleteAssignmentForSection(string sectionId, string assignmentId, map<string|string[]> headers) returns error?Delete an assignment of a section
Parameters
- sectionId string - ID of the section
- assignmentId string - ID of the assignment in the section
Return Type
- error? - OK Response
updateAssignmentForSection
function updateAssignmentForSection(string sectionId, string assignmentId, AssignmentRequest payload, map<string|string[]> headers) returns AssignmentResponse|errorUpdate an assignment of a section
Parameters
- sectionId string - ID of the section
- assignmentId string - ID of the assignment in the section
- payload AssignmentRequest - Assignment fields to update
Return Type
- AssignmentResponse|error - OK Response
getSubmissionsForAssignment
function getSubmissionsForAssignment(string sectionId, string assignmentId, map<string|string[]> headers, *GetSubmissionsForAssignmentQueries queries) returns SubmissionsResponse|errorList submissions for an assignment
Parameters
- sectionId string - ID of the section
- assignmentId string - ID of the assignment in the section
- queries *GetSubmissionsForAssignmentQueries - Queries to be sent with the request
Return Type
- SubmissionsResponse|error - OK Response
getSubmissionForAssignment
function getSubmissionForAssignment(string sectionId, string assignmentId, string userId, map<string|string[]> headers) returns SubmissionResponse|errorGet the submission of a user for an assignment
Parameters
- sectionId string - ID of the section
- assignmentId string - ID of the assignment in the section
- userId string - ID of the user who owns the submission
Return Type
- SubmissionResponse|error - OK Response
updateSubmissionForAssignment
function updateSubmissionForAssignment(string sectionId, string assignmentId, string userId, SubmissionRequest payload, map<string|string[]> headers) returns SubmissionResponse|errorUpdate the submission of a user for an assignment
Parameters
- sectionId string - ID of the section
- assignmentId string - ID of the assignment in the section
- userId string - ID of the user who owns the submission
- payload SubmissionRequest - Submission fields to update, such as grade or comments
Return Type
- SubmissionResponse|error - OK Response
listAttendanceForSchool
function listAttendanceForSchool(string schoolId, map<string|string[]> headers, *ListAttendanceForSchoolQueries queries) returns AttendanceResponse|errorReturns a list of attendance records for a school
Parameters
- schoolId string - ID of the school
- queries *ListAttendanceForSchoolQueries - Queries to be sent with the request
Return Type
- AttendanceResponse|error - OK Response
listAttendanceForSection
function listAttendanceForSection(string sectionId, map<string|string[]> headers, *ListAttendanceForSectionQueries queries) returns AttendanceResponse|errorReturns a list of attendance records for a section
Parameters
- sectionId string - ID of the section
- queries *ListAttendanceForSectionQueries - Queries to be sent with the request
Return Type
- AttendanceResponse|error - OK Response
getEvents
function getEvents(map<string|string[]> headers, *GetEventsQueries queries) returns EventsResponse|errorList data change events
Parameters
- queries *GetEventsQueries - Queries to be sent with the request
Return Type
- EventsResponse|error - OK Response
getEvent
Get a data change event
Parameters
- id string - ID of the event
Return Type
- EventResponse|error - OK Response
Records
clever.data: Assignment
Fields
- endDate? string? -
- gradingScale? GradingScale[] -
- attachments? Attachment[] -
- created? string? -
- assigneeMode? AssigneeMode -
- dueDate? string? -
- description? string -
- submissionTypes? SubmissionType[] -
- termId? string? -
- title? string -
- categoryId? string? -
- displayDate? string? -
- maxAttempts? int -
- pointsPossible? float? -
- gradingType? GradingType -
- id? string -
- state? AssignmentState -
- lastModified? string? -
- assigneeIds? string[] -
- descriptionPlaintext? string? -
- startDate? string? -
clever.data: AssignmentRequest
Fields
- endDate? string? -
- attachments? AttachmentRequest[] -
- assigneeMode? AssigneeMode -
- dueDate? string? -
- description? string? -
- submissionTypes? SubmissionType[] -
- termId? string? -
- title? string? -
- displayDate? string? -
- pointsPossible? float? -
- maxAttempts? int -
- gradingType? GradingType -
- assigneeIds? string[] -
- descriptionPlaintext? string? -
- startDate? string? -
clever.data: AssignmentResponse
Fields
- data? Assignment -
clever.data: Attachment
Fields
- size? float -
- description? string? -
- 'type? string -
- title? string? -
- thumbnailUrl? string? -
- fileExternalId? string? -
- url? string? -
clever.data: AttachmentRequest
Fields
- description? string? -
- 'type? "file" -
- title? string? -
- url? string? -
clever.data: Attendance
Fields
- excuseCode? string -
- schoolId? string -
- sectionId? string -
- created? string -
- sisId? string -
- studentId? string -
- districtId? string -
- attendanceDate? string -
- lastModified? string -
- attendanceStatus? AttendanceStatus -
- attendanceType? AttendanceType -
clever.data: AttendanceResponse
Fields
- data? Attendance[] -
- links? Link[] -
clever.data: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings(default {}) - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings(default {}) - Configurations related to HTTP/2 protocol
- timeout decimal(default 30) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded/x-forwardedheader
- followRedirects? FollowRedirects - Configurations associated with Redirection
- poolConfig? PoolConfiguration - Configurations associated with request pooling
- cache CacheConfig(default {}) - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding) header
- circuitBreaker? CircuitBreakerConfig - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig? RetryConfig - Configurations associated with retrying
- cookieConfig? CookieConfig - Configurations associated with cookies
- responseLimits ResponseLimitConfigs(default {}) - Configurations associated with inbound response size limits
- secureSocket? ClientSecureSocket - SSL/TLS-related options
- proxy? ProxyConfig - Proxy server related options
- socketConfig ClientSocketConfig(default {}) - Provides settings related to client socket configuration
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
- laxDataBinding boolean(default true) - Enables relaxed data binding on the client side. When enabled,
nilvalues are treated as optional, and absent fields are handled asnilabletypes. Enabled by default.
clever.data: Contact
Fields
- phoneType? "Cell"|"Home"|"Work"|"Other"|""? -
- phone? string? -
- sisId? string? -
- legacyId? string -
- studentRelationships? StudentRelationship[] -
clever.data: Course
Fields
- number? string? -
- district? string -
- name? string? -
- id? string -
clever.data: CourseLink
A link to a related resource. rel identifies the relationship, and uri is the relative path to that resource (including the API version prefix)
Fields
- rel? "self"|"district"|"schools"|"sections" - Relation of the linked page to the current response, one of
next,prevorself
- uri? string - Relative URI of the linked resource or page, including the API version prefix
clever.data: CourseResponse
Fields
- data? Course -
- links? CourseLink[] -
- uri? string - Relative URI of the linked resource or page, including the API version prefix
clever.data: CoursesResponse
Fields
- data? CourseResponse[] -
- links? Link[] -
clever.data: Credentials
Fields
- districtUsername? string -
clever.data: Disability
Fields
- disabilityType? "Autism"|"Deaf-blindness"|"Developmental delay"|"Emotional disturbance"|"Hearing impairment"|"Intellectual Disability"|"Multiple disabilities"|"Orthopedic impairment"|"Other"|"Other health impairment"|"Specific learning disability"|"Speech or language impairment"|"Traumatic brain injury"|"Visual impairment"? -
- disabilityStatus? "Y"|"N"|""? -
- disabilityCode? "aut"|"db"|"dd"|"emn"|"hi"|"id"|"md"|"oi"|"other"|"ohi"|"sld"|"sli"|"tbi"|"vi"? -
clever.data: District
Fields
- loginMethods? string[] -
- mdrNumber? string? -
- lastSync? string? -
- pauseEnd? string? -
- 'error? string -
- lastAttendanceSync? string? -
- lmsType? "canvas"|"schoology"|"google_classroom"|""? -
- ncesId? string? -
- pauseStart? string? -
- lmsState? "initial_sync_processing"|"pending_authorization"|"matching_in_progress"|"error"|"disconnected"|""|"success"? -
- portalUrl? string -
- name? string -
- sisType? string -
- id? string -
- state? "running"|"pending"|"error"|"paused"|""|"success"? -
- launchDate? string -
- districtContact? DistrictContact -
clever.data: DistrictAdmin
Fields
- legacyId? string -
- title? string? -
clever.data: DistrictContact
Fields
- district? string -
- name? Name -
- id? string -
- title? string -
- email? string? -
clever.data: DistrictLink
A link to a related resource. rel identifies the relationship, and uri is the relative path to that resource (including the API version prefix)
Fields
- rel? "self" - Relation of the linked page to the current response, one of
next,prevorself
- uri? string - Relative URI of the linked resource or page, including the API version prefix
clever.data: DistrictResponse
Fields
- data? District -
- links? DistrictLink[] -
- uri? string - Relative URI of the linked resource or page, including the API version prefix
clever.data: DistrictsResponse
Fields
- data? DistrictResponse[] -
- links? Link[] -
clever.data: Event
Fields
- created? string -
- id? string -
- 'type string -
clever.data: EventResponse
Fields
- data? Event -
clever.data: EventsResponse
Fields
- data? EventResponse[] -
- links? Link[] -
clever.data: GetContactsForUserQueries
Represents the Queries record for the operation: getContactsForUser
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetCoursesForResourceQueries
Represents the Queries record for the operation: getCoursesForResource
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetCoursesForSchoolQueries
Represents the Queries record for the operation: getCoursesForSchool
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetCoursesQueries
Represents the Queries record for the operation: getCourses
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- count? ""|"true"|"false"|"undefined" - If "true", returns a CountResponse ({count, links}) instead of the normal list response
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetDistrictsQueries
Represents the Queries record for the operation: getDistricts
Fields
- count? ""|"true"|"false"|"undefined" - If "true", returns a CountResponse ({count, links}) instead of the normal list response
clever.data: GetEventsQueries
Represents the Queries record for the operation: getEvents
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- school? string - ID of a school; only events for this school are returned
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
- recordType? string[] - Restrict the events to these record types, such as
users.updatedorsections.created; may be repeated
clever.data: GetResourcesForCourseQueries
Represents the Queries record for the operation: getResourcesForCourse
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetResourcesForSectionQueries
Represents the Queries record for the operation: getResourcesForSection
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetResourcesForUserQueries
Represents the Queries record for the operation: getResourcesForUser
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetResourcesQueries
Represents the Queries record for the operation: getResources
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetSchoolsForCourseQueries
Represents the Queries record for the operation: getSchoolsForCourse
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetSchoolsForTermQueries
Represents the Queries record for the operation: getSchoolsForTerm
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetSchoolsForUserQueries
Represents the Queries record for the operation: getSchoolsForUser
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
- primary? ""|"true" - Set to
trueto return only users whose relationship to the entity is marked as primary
clever.data: GetSchoolsQueries
Represents the Queries record for the operation: getSchools
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- count? ""|"true"|"false"|"undefined" - If "true", returns a CountResponse ({count, links}) instead of the normal list response
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetSectionsForCourseQueries
Represents the Queries record for the operation: getSectionsForCourse
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetSectionsForResourceQueries
Represents the Queries record for the operation: getSectionsForResource
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetSectionsForSchoolQueries
Represents the Queries record for the operation: getSectionsForSchool
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetSectionsForTermQueries
Represents the Queries record for the operation: getSectionsForTerm
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetSectionsForUserQueries
Represents the Queries record for the operation: getSectionsForUser
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetSectionsQueries
Represents the Queries record for the operation: getSections
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- count? ""|"true"|"false"|"undefined" - If "true", returns a CountResponse ({count, links}) instead of the normal list response
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetStudentsForUserQueries
Represents the Queries record for the operation: getStudentsForUser
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetSubmissionsForAssignmentQueries
Represents the Queries record for the operation: getSubmissionsForAssignment
Fields
- cursor? string - Opaque pagination cursor taken from the
nextlink of the previous page of submissions
- 'limit? int - Maximum number of records to return in one page
clever.data: GetTeachersForUserQueries
Represents the Queries record for the operation: getTeachersForUser
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetTermsForSchoolQueries
Represents the Queries record for the operation: getTermsForSchool
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetTermsQueries
Represents the Queries record for the operation: getTerms
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- 'limit? int - Maximum number of records to return in one page
- count? ""|"true"|"false"|"undefined" - If "true", returns a CountResponse ({count, links}) instead of the normal list response
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetUsersForResourceQueries
Represents the Queries record for the operation: getUsersForResource
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- role? "student"|"teacher" - Restrict the results to users with this role, such as student or teacher
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetUsersForSchoolQueries
Represents the Queries record for the operation: getUsersForSchool
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- role? "staff"|"student"|"teacher" - Restrict the results to users with this role, such as student or teacher
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
- primary? ""|"true" - Set to
trueto return only users whose relationship to the entity is marked as primary
clever.data: GetUsersForSectionQueries
Represents the Queries record for the operation: getUsersForSection
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- role? "student"|"teacher" - Restrict the results to users with this role, such as student or teacher
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GetUsersQueries
Represents the Queries record for the operation: getUsers
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- role? "contact"|"district_admin"|"staff"|"student"|"teacher" - Restrict the results to users with this role, such as student or teacher
- 'limit? int - Maximum number of records to return in one page
- count? ""|"true"|"false"|"undefined" - If "true", returns a CountResponse ({count, links}) instead of the normal list response
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
clever.data: GradingScale
Fields
- entries? GradingScaleEntry[]? -
- name? string -
clever.data: GradingScaleEntry
Fields
- name? string -
- value? string -
clever.data: Link
A link to a related page of results. rel identifies which page this is, and uri is the relative path to it (including the API version prefix). next corresponds to the starting_after parameter, prev to ending_before, and self repeats the current request
Fields
- rel? "next"|"prev"|"self" - Relation of the linked page to the current response, one of
next,prevorself
- uri? string - Relative URI of the linked resource or page, including the API version prefix
clever.data: ListAttendanceForSchoolQueries
Represents the Queries record for the operation: listAttendanceForSchool
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- dateRangeEnd? string - Last attendance date to include, in YYYY-MM-DD format
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
- dateRangeStart? string - First attendance date to include, in YYYY-MM-DD format
- attendanceStatus? "present"|"absent"|"tardy" - Restrict the results to attendance records with this status
clever.data: ListAttendanceForSectionQueries
Represents the Queries record for the operation: listAttendanceForSection
Fields
- endingBefore? string - Cursor for backward pagination: the ID of the first record of the next page, so the page returned ends before it
- dateRangeEnd? string - Last attendance date to include, in YYYY-MM-DD format
- 'limit? int - Maximum number of records to return in one page
- startingAfter? string - Cursor for forward pagination: the ID of the last record of the previous page, so the page returned starts after it
- dateRangeStart? string - First attendance date to include, in YYYY-MM-DD format
- attendanceStatus? "present"|"absent"|"tardy" - Restrict the results to attendance records with this status
clever.data: LmsStatus
Fields
- syncedInLms? boolean -
clever.data: Location
Fields
- zip? string? -
- address? string? -
- city? string? -
- lon? string? -
- state? string? -
- lat? string? -
clever.data: Name
Fields
- middle? string? -
- last? string? -
- first? string? -
clever.data: PreferredName
Fields
- middle? string? -
- last? string? -
- first? string? -
clever.data: Principal
Fields
- name? string? -
- email? string? -
clever.data: Resource
Fields
- created? string -
- district? string -
- roles? ("teacher"|"student")[] -
- resourceId? string -
- id? string -
- title? string -
- updated? string -
clever.data: ResourceResponse
Fields
- data? Resource -
clever.data: ResourcesResponse
Fields
- data? ResourceResponse[] -
- links? Link[] -
clever.data: Roles
Fields
- districtAdmin? DistrictAdmin -
- teacher? Teacher -
- student? Student -
- contact? Contact -
- staff? Staff -
clever.data: School
Fields
- ext? record {} -
- mdrNumber? string? -
- created? string -
- sisId? string -
- lowGrade? "InfantToddler"|"Preschool"|"PreKindergarten"|"TransitionalKindergarten"|"Kindergarten"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"|"10"|"11"|"12"|"13"|"PostGraduate"|"Ungraded"|"Other"|""? -
- principal? Principal -
- ncesId? string? -
- phone? string? -
- district? string -
- schoolNumber? string -
- name? string -
- location? Location -
- id? string -
- stateId? string? -
- lastModified? string -
- highGrade? "InfantToddler"|"Preschool"|"PreKindergarten"|"TransitionalKindergarten"|"Kindergarten"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"|"10"|"11"|"12"|"13"|"PostGraduate"|"Ungraded"|"Other"|""? -
clever.data: SchoolEnrollment
Fields
- endDate? string -
- school? string -
- startDate? string -
clever.data: SchoolLink
A link to a related resource. rel identifies the relationship, and uri is the relative path to that resource (including the API version prefix)
Fields
- rel? "self"|"district"|"courses"|"sections"|"terms"|"users" - Relation of the linked page to the current response, one of
next,prevorself
- uri? string - Relative URI of the linked resource or page, including the API version prefix
clever.data: SchoolResponse
Fields
- data? School -
- links? SchoolLink[] -
- uri? string - Relative URI of the linked resource or page, including the API version prefix
clever.data: SchoolsResponse
Fields
- data? SchoolResponse[] -
- links? Link[] -
clever.data: Section
Fields
- ext? record {} -
- period? string? -
- created? string -
- subject? "english/language arts"|"math"|"science"|"social studies"|"language"|"homeroom/advisory"|"interventions/online learning"|"technology and engineering"|"PE and health"|"arts and music"|"other"|""? -
- sisId? string -
- students? string[] -
- termId? string? -
- teacher? string? -
- school? string -
- teachers? string[] -
- district? string -
- grade? "InfantToddler"|"Preschool"|"PreKindergarten"|"TransitionalKindergarten"|"Kindergarten"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"|"10"|"11"|"12"|"13"|"PostGraduate"|"Ungraded"|"Other"|""? -
- name? string -
- course? string? -
- id? string -
- lmsStatus? LmsStatus -
- lastModified? string -
- sectionNumber? string? -
clever.data: SectionLink
A link to a related resource. rel identifies the relationship, and uri is the relative path to that resource (including the API version prefix)
Fields
- rel? "self"|"district"|"school"|"course"|"term"|"users" - Relation of the linked page to the current response, one of
next,prevorself
- uri? string - Relative URI of the linked resource or page, including the API version prefix
clever.data: SectionResponse
Fields
- data? Section -
- links? SectionLink[] -
- uri? string - Relative URI of the linked resource or page, including the API version prefix
clever.data: SectionsResponse
Fields
- data? SectionResponse[] -
- links? Link[] -
clever.data: Staff
Fields
- ext? record {} -
- credentials? Credentials -
- schools? string[] -
- roles? string[] -
- staffId? string -
- legacyId? string -
- department? string? -
- title? string? -
clever.data: Student
Fields
- gender? "M"|"F"|"X"|""? -
- credentials? Credentials -
- disability? Disability -
- sisId? string -
- frlStatus? "Free"|"Reduced"|"Paid"|"Other"|""? -
- giftedStatus? "Y"|"N"|""? -
- school? string -
- legacyId? string -
- ellStatus? "Y"|"N"|""? -
- stateId? string? -
- iepStatus? string? -
- lastModified? string -
- homeLanguageCode? string? -
- ext? record {} -
- race? "Caucasian"|"Asian"|"Black or African American"|"American Indian"|"Hawaiian or Other Pacific Islander"|"Two or More Races"|"Unknown"|""? -
- created? string -
- graduationYear? string? -
- homeLanguage? "English"|"Albanian"|"Amharic"|"Arabic"|"Bengali"|"Bosnian"|"Burmese"|"Cantonese"|"Chinese"|"Dutch"|"Farsi"|"French"|"German"|"Hebrew"|"Hindi"|"Hmong"|"Ilocano"|"Japanese"|"Javanese"|"Karen"|"Khmer"|"Korean"|"Laotian"|"Latvian"|"Malay"|"Mandarin"|"Nepali"|"Oromo"|"Polish"|"Portuguese"|"Punjabi"|"Romanian"|"Russian"|"Samoan"|"Serbian"|"Somali"|"Spanish"|"Swahili"|"Tagalog"|"Tamil"|"Telugu"|"Thai"|"Tigrinya"|"Turkish"|"Ukrainian"|"Urdu"|"Vietnamese"|""? -
- enrollments? SchoolEnrollment[] -
- hispanicEthnicity? "Y"|"N"|""? -
- section504Status? "Y"|"N"|""? -
- studentNumber? string? -
- schools? string[] -
- dob? string? -
- grade? "InfantToddler"|"Preschool"|"PreKindergarten"|"TransitionalKindergarten"|"Kindergarten"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"|"10"|"11"|"12"|"13"|"PostGraduate"|"Ungraded"|"Other"|""? -
- location? Location -
- weightedGpa? string? -
- unweightedGpa? string? -
- preferredName? PreferredName -
clever.data: StudentRelationship
Fields
- student? string -
- relationship? "Parent"|"Grandparent"|"Self"|"Aunt/Uncle"|"Sibling"|"Other"|""? -
- 'type? "Parent/Guardian"|"Emergency"|"Primary"|"Secondary"|"Family"|"Other"|""? -
clever.data: Submission
Fields
- extraAttempts? int -
- attachments? Attachment[] -
- created? string? -
- flags? SubmissionFlag[] -
- graderId? string? -
- assignmentId? string -
- userId? string -
- grade? string? -
- gradeComment? string? -
- gradePoints? float -
- overrideDueDate? string? -
- id? string - Deprecated. The Clever unique identifier of the submission. Will always be empty if the upstream LMS provider is Google Classroom; it is currently still present for Canvas and Schoology LMSs but will be removed in the near future
- state? SubmissionState -
- lastModified? string? -
clever.data: SubmissionRequest
Fields
- extraAttempts? int -
- attachments? AttachmentRequest[] -
- grade? string? -
- gradeComment? string? -
- flags? SubmissionFlag[] -
- gradePoints? float -
- overrideDueDate? string? -
- graderId? string? -
- state? SubmissionState -
clever.data: SubmissionResponse
Fields
- data? Submission -
clever.data: SubmissionsLink
Fields
- rel? "next" - Relation of the linked page to the current response, one of
next,prevorself
- uri? string - Relative URI of the linked resource or page, including the API version prefix
clever.data: SubmissionsResponse
Fields
- data? Submission[] -
- links? SubmissionsLink[] -
clever.data: Teacher
Fields
- ext? record {} -
- credentials? Credentials -
- created? string -
- sisId? string -
- title? string? -
- teacherNumber? string? -
- school? string -
- schools? string[] -
- district? string -
- name? Name -
- legacyId? string -
- stateId? string? -
- lastModified? string -
clever.data: Term
Fields
- endDate? string? -
- district? string -
- name? string? -
- id? string -
- startDate? string? -
clever.data: TermLink
A link to a related resource. rel identifies the relationship, and uri is the relative path to that resource (including the API version prefix)
Fields
- rel? "self"|"district"|"schools"|"sections" - Relation of the linked page to the current response, one of
next,prevorself
- uri? string - Relative URI of the linked resource or page, including the API version prefix
clever.data: TermResponse
Fields
- data? Term -
- links? TermLink[] -
- uri? string - Relative URI of the linked resource or page, including the API version prefix
clever.data: TermsResponse
Fields
- data? TermResponse[] -
- links? Link[] -
clever.data: User
Fields
- created? string -
- district? string -
- roles? Roles -
- name? Name -
- id? string -
- lmsStatus? LmsStatus -
- lastModified? string -
- email? string? -
clever.data: UserLink
A link to a related resource. rel identifies the relationship, and uri is the relative path to that resource (including the API version prefix)
Fields
- rel? "self"|"district"|"schools"|"sections"|"myContacts"|"myStudents"|"myTeachers" - The relation this link represents. The user's role determines which enum values are present and valid (e.g., myTeachers only appears for student users, etc.)
- uri? string - Relative URI of the linked resource or page, including the API version prefix
clever.data: UserResponse
Fields
- data? User -
- links? UserLink[] -
- uri? string - Relative URI of the linked resource or page, including the API version prefix
clever.data: UsersResponse
Fields
- data? UserResponse[] -
- links? Link[] -
Union types
clever.data: SubmissionState
SubmissionState
clever.data: AssigneeMode
AssigneeMode
clever.data: AttendanceType
AttendanceType
clever.data: SubmissionFlag
SubmissionFlag
clever.data: AssignmentState
AssignmentState
clever.data: GradingType
GradingType
clever.data: AttendanceStatus
AttendanceStatus
clever.data: SubmissionType
SubmissionType
Import
import ballerinax/clever.data;Metadata
Released date: about 16 hours ago
Version: 2.0.0
License: Apache-2.0
Security
Direct vulnerabilities: No known direct vulnerabilities
Indirect vulnerabilities:
Checked on 2026-11-20 via OSV.dev
Compatibility
Platform: any
Ballerina version: 2201.12.0
GraalVM compatible: Yes
Pull count
Total: 41
Current verison: 1
Weekly downloads
Keywords
Vendor/Clever
Area/Productivity & Collaboration
Type/Connector
Contributors