@datafire/clever v4.0.0
@datafire/clever
Client library for Data API
Installation and Usage
npm install --save @datafire/cleverlet clever = require('@datafire/clever').create({
access_token: "",
refresh_token: "",
client_id: "",
client_secret: "",
redirect_uri: ""
});
.then(data => {
console.log(data);
});Description
Serves the Clever Data API
Actions
oauthCallback
Exchange the code passed to your redirect URI for an access_token
clever.oauthCallback({
"code": ""
}, context)Input
- input
object- code required
string
- code required
Output
- output
object- access_token
string - refresh_token
string - token_type
string - scope
string - expiration
string
- access_token
oauthRefresh
Exchange a refresh_token for an access_token
clever.oauthRefresh(null, context)Input
This action has no parameters
Output
- output
object- access_token
string - refresh_token
string - token_type
string - scope
string - expiration
string
- access_token
getContacts
Returns a list of student contacts
clever.getContacts({}, context)Input
- input
object- limit
integer - starting_after
string - ending_before
string
- limit
Output
- output StudentContactsResponse
getContact
Returns a specific student contact
clever.getContact({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output StudentContactResponse
getDistrictForStudentContact
Returns the district for a student contact
clever.getDistrictForStudentContact({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output DistrictResponse
getStudentForContact
Returns the student for a student contact
clever.getStudentForContact({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output StudentResponse
getDistrictAdmins
Returns a list of district admins
clever.getDistrictAdmins({}, context)Input
- input
object- starting_after
string - ending_before
string - show_links
string
- starting_after
Output
- output DistrictAdminsResponse
getDistrictAdmin
Returns a specific district admin
clever.getDistrictAdmin({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output DistrictAdminResponse
getDistricts
Returns a list of districts
clever.getDistricts(null, context)Input
This action has no parameters
Output
- output DistrictsResponse
getDistrict
Returns a specific district
clever.getDistrict({
"id": ""
}, context)Input
- input
object- id required
string - include
string
- id required
Output
- output DistrictResponse
getAdminsForDistrict
Returns the admins for a district
clever.getAdminsForDistrict({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output DistrictAdminsResponse
getSchoolsForDistrict
Returns the schools for a district
clever.getSchoolsForDistrict({
"id": ""
}, context)Input
- input
object- id required
string - limit
integer - starting_after
string - ending_before
string - where
string
- id required
Output
- output SchoolsResponse
getSectionsForDistrict
Returns the sections for a district
clever.getSectionsForDistrict({
"id": ""
}, context)Input
- input
object- id required
string - limit
integer - starting_after
string - ending_before
string - where
string
- id required
Output
- output SectionsResponse
getDistrictStatus
Returns the status of the district
clever.getDistrictStatus({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output DistrictStatusResponses
getStudentsForDistrict
Returns the students for a district
clever.getStudentsForDistrict({
"id": ""
}, context)Input
- input
object- id required
string - limit
integer - starting_after
string - ending_before
string - where
string
- id required
Output
- output StudentsResponse
getTeachersForDistrict
Returns the teachers for a district
clever.getTeachersForDistrict({
"id": ""
}, context)Input
- input
object- id required
string - limit
integer - starting_after
string - ending_before
string - where
string
- id required
Output
- output TeachersResponse
getSchoolAdmins
Returns a list of school admins
clever.getSchoolAdmins({}, context)Input
- input
object- limit
integer - starting_after
string - ending_before
string - where
string
- limit
Output
- output SchoolAdminsResponse
getSchoolAdmin
Returns a specific school admin
clever.getSchoolAdmin({
"id": ""
}, context)Input
- input
object- id required
string - include
string
- id required
Output
- output SchoolAdminResponse
getSchoolsForSchoolAdmin
Returns the schools for a school admin
clever.getSchoolsForSchoolAdmin({
"id": ""
}, context)Input
- input
object- id required
string - limit
integer - starting_after
string - ending_before
string
- id required
Output
- output SchoolsResponse
getSchools
Returns a list of schools
clever.getSchools({}, context)Input
- input
object- limit
integer - starting_after
string - ending_before
string - where
string
- limit
Output
- output SchoolsResponse
getSchool
Returns a specific school
clever.getSchool({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output SchoolResponse
getDistrictForSchool
Returns the district for a school
clever.getDistrictForSchool({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output DistrictResponse
getSectionsForSchool
Returns the sections for a school
clever.getSectionsForSchool({
"id": ""
}, context)Input
- input
object- id required
string - limit
integer - starting_after
string - ending_before
string - where
string
- id required
Output
- output SectionsResponse
getStudentsForSchool
Returns the students for a school
clever.getStudentsForSchool({
"id": ""
}, context)Input
- input
object- id required
string - limit
integer - starting_after
string - ending_before
string - where
string
- id required
Output
- output StudentsResponse
getTeachersForSchool
Returns the teachers for a school
clever.getTeachersForSchool({
"id": ""
}, context)Input
- input
object- id required
string - limit
integer - starting_after
string - ending_before
string - where
string
- id required
Output
- output TeachersResponse
getSections
Returns a list of sections
clever.getSections({}, context)Input
- input
object- limit
integer - starting_after
string - ending_before
string - where
string
- limit
Output
- output SectionsResponse
getSection
Returns a specific section
clever.getSection({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output SectionResponse
getDistrictForSection
Returns the district for a section
clever.getDistrictForSection({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output DistrictResponse
getSchoolForSection
Returns the school for a section
clever.getSchoolForSection({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output SchoolResponse
getStudentsForSection
Returns the students for a section
clever.getStudentsForSection({
"id": ""
}, context)Input
- input
object- id required
string - limit
integer - starting_after
string - ending_before
string
- id required
Output
- output StudentsResponse
getTeacherForSection
Returns the primary teacher for a section
clever.getTeacherForSection({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output TeacherResponse
getTeachersForSection
Returns the teachers for a section
clever.getTeachersForSection({
"id": ""
}, context)Input
- input
object- id required
string - limit
integer - starting_after
string - ending_before
string
- id required
Output
- output TeachersResponse
getStudents
Returns a list of students
clever.getStudents({}, context)Input
- input
object- limit
integer - starting_after
string - ending_before
string - where
string
- limit
Output
- output StudentsResponse
getStudent
Returns a specific student
clever.getStudent({
"id": ""
}, context)Input
- input
object- id required
string - include
string
- id required
Output
- output StudentResponse
getContactsForStudent
Returns the contacts for a student
clever.getContactsForStudent({
"id": ""
}, context)Input
- input
object- id required
string - limit
integer
- id required
Output
getDistrictForStudent
Returns the district for a student
clever.getDistrictForStudent({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output DistrictResponse
getSchoolForStudent
Returns the primary school for a student
clever.getSchoolForStudent({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output SchoolResponse
getSectionsForStudent
Returns the sections for a student
clever.getSectionsForStudent({
"id": ""
}, context)Input
- input
object- id required
string - limit
integer - starting_after
string - ending_before
string
- id required
Output
- output SectionsResponse
getTeachersForStudent
Returns the teachers for a student
clever.getTeachersForStudent({
"id": ""
}, context)Input
- input
object- id required
string - limit
integer - starting_after
string - ending_before
string
- id required
Output
- output TeachersResponse
getTeachers
Returns a list of teachers
clever.getTeachers({}, context)Input
- input
object- limit
integer - starting_after
string - ending_before
string - where
string
- limit
Output
- output TeachersResponse
getTeacher
Returns a specific teacher
clever.getTeacher({
"id": ""
}, context)Input
- input
object- id required
string - include
string
- id required
Output
- output TeacherResponse
getDistrictForTeacher
Returns the district for a teacher
clever.getDistrictForTeacher({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output DistrictResponse
getGradeLevelsForTeacher
Returns the grade levels for sections a teacher teaches
clever.getGradeLevelsForTeacher({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output GradeLevelsResponse
getSchoolForTeacher
Retrieves school info for a teacher.
clever.getSchoolForTeacher({
"id": ""
}, context)Input
- input
object- id required
string
- id required
Output
- output SchoolResponse
getSectionsForTeacher
Returns the sections for a teacher
clever.getSectionsForTeacher({
"id": ""
}, context)Input
- input
object- id required
string - limit
integer - starting_after
string - ending_before
string
- id required
Output
- output SectionsResponse
getStudentsForTeacher
Returns the students for a teacher
clever.getStudentsForTeacher({
"id": ""
}, context)Input
- input
object- id required
string - limit
integer - starting_after
string - ending_before
string
- id required
Output
- output StudentsResponse
Definitions
BadRequest
- BadRequest
object- message
string
- message
Credentials
- Credentials
object- district_username
string
- district_username
District
- District
object- id
string - mdr_number
string - name
string
- id
DistrictAdmin
- DistrictAdmin
object- district
string - email
string - id
string - name Name
- title
string
- district
DistrictAdminResponse
- DistrictAdminResponse
object- data DistrictAdmin
DistrictAdminsResponse
- DistrictAdminsResponse
object- data
array- items DistrictAdmin
- data
DistrictResponse
- DistrictResponse
object- data District
DistrictStatus
- DistrictStatus
object- error
string - id
string - instant_login
boolean - last_sync
string - launch_date
string - pause_end
string - pause_start
string - sis_type
string - state
string(values: running, pending, error, paused)
- error
DistrictStatusResponse
- DistrictStatusResponse
object- data DistrictStatus
DistrictStatusResponses
- DistrictStatusResponses
object- data
array- items DistrictStatusResponse
- data
DistrictsResponse
- DistrictsResponse
object- data
array- items DistrictResponse
- data
GradeLevelsResponse
- GradeLevelsResponse
object- data
array- items
string
- items
- data
InternalError
- InternalError
object- message
string
- message
Location
- Location
object- address
string - city
string - lat
string - lon
string - state
string - zip
string
- address
Name
- Name
object- first
string - last
string - middle
string
- first
NotFound
- NotFound
object- message
string
- message
Principal
- Principal
object- email
string - name
string
- email
School
- School
object- created
string - district
string - high_grade
string(values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, PreKindergarten, Kindergarten, PostGraduate, Other) - id
string - last_modified
string - location Location
- low_grade
string(values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, PreKindergarten, Kindergarten, PostGraduate, Other) - mdr_number
string - name
string - nces_id
string - phone
string - principal Principal
- school_number
string - sis_id
string - state_id
string
- created
SchoolAdmin
- SchoolAdmin
object- credentials Credentials
- district
string - email
string - id
string - name Name
- schools
array- items
string
- items
- staff_id
string - title
string
SchoolAdminResponse
- SchoolAdminResponse
object- data SchoolAdmin
SchoolAdminsResponse
- SchoolAdminsResponse
object- data
array- items SchoolAdminResponse
- data
SchoolResponse
- SchoolResponse
object- data School
SchoolsResponse
- SchoolsResponse
object- data
array- items SchoolResponse
- data
Section
- Section
object- course_description
string - course_name
string - course_number
string - created
string - district
string - grade
string(values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, PreKindergarten, Kindergarten, PostGraduate, Other) - id
string - last_modified
string - name
string - period
string - school
string - section_number
string - sis_id
string - students
array- items
string
- items
- subject
string(values: english/language arts, math, science, social studies, language, homeroom/advisory, interventions/online learning, technology and engineering, PE and health, arts and music, other) - teacher
string - teachers
array- items
string
- items
- term Term
- course_description
SectionResponse
- SectionResponse
object- data Section
SectionsResponse
- SectionsResponse
object- data
array- items SectionResponse
- data
Student
- Student
object- created
string - credentials Credentials
- district
string - dob
string - ell_status
string(values: Y, N, ) - email
string - gender
string(values: M, F, ) - grade
string(values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, PreKindergarten, Kindergarten, PostGraduate, Other) - graduation_year
string - hispanic_ethnicity
string(values: Y, N, ) - id
string - last_modified
string - location Location
- name Name
- race
string(values: Caucasian, Asian, Black or African American, American Indian, Hawaiian or Other Pacific Islander, Two or More Races, Unknown, ) - school
string - schools
array- items
string
- items
- sis_id
string - state_id
string - student_number
string
- created
StudentContact
- StudentContact
object- district
string - email
string - id
string - name
string - phone
string - phone_type
string - relationship
string - sis_id
string - student
string - type
string
- district
StudentContactResponse
- StudentContactResponse
object- data StudentContact
StudentContactsForStudentResponse
- StudentContactsForStudentResponse
object- data
array- items StudentContact
- data
StudentContactsResponse
- StudentContactsResponse
object- data
array- items StudentContactResponse
- data
StudentResponse
- StudentResponse
object- data Student
StudentsResponse
- StudentsResponse
object- data
array- items StudentResponse
- data
Teacher
- Teacher
object- created
string - credentials Credentials
- district
string - email
string - id
string - last_modified
string - name Name
- school
string - schools
array- items
string
- items
- sis_id
string - state_id
string - teacher_number
string - title
string
- created
TeacherResponse
- TeacherResponse
object- data Teacher
TeachersResponse
- TeachersResponse
object- data
array- items TeacherResponse
- data
Term
- Term
object- end_date
string - name
string - start_date
string
- end_date