The Woolf API is a GraphQL-based interface that allows seamless integration with Woolf's Academic Management System (AMS). This reference guide provides detailed information on queries, mutations, schema structure, and how to interact with the API efficiently.
API Authorization
To access the API, you must authenticate using a College Token.
GraphQL Schema Overview
The Woolf API follows the GraphQL specification, which is structured into different core elements.
Element |
Description |
API Schema |
Queries |
Used to fetch data from the API, such as retrieving student records, course details, and activities. |
# === Queries ===
# Retrieves a list of activities based on filters
type Query {
activities(
courseId: String,
kinds: [ActivityKind!],
pagination: Pagination = {skip: 0, take: 100},
resourceId: String,
resourceKinds: [ResourceKind!],
statuses: [ActivityStatus!],
studentId: String
): ActivityPaginationResult!
# Retrieve a specific activity by ID
activity(id: ID!): Activity!
# Retrieve details of the authenticated college
college: College!
# Retrieve details of a specific course by ID
course(id: ID!): Course!
# Retrieve multiple courses with optional filters
courses(
degreeId: ID,
pagination: Pagination = {skip: 0, take: 200},
statuses: [CourseStatus!]
): CoursePaginationResult!
# Retrieve a specific resource by ID
resource(id: String!): Resource!
# Retrieve multiple resources
resources(
courseId: ID,
kinds: [ResourceKind!],
pagination: Pagination = {skip: 0, take: 200},
statuses: [ResourceStatus!]
): ResourcePaginationResult!
# Retrieve a student by ID
student(id: String!): Student!
# Retrieve a list of students with optional filters
students(
courseId: ID,
degreeId: ID,
pagination: Pagination = {skip: 0, take: 200}
): StudentPaginationResult!
}
# === Mutations ===
# API operations that modify data
type Mutation {
addAttendance(attendance: AttendanceInput!): ActivityOutput!
addFeedback(feedback: FeedbackInput!): ActivityOutput!
addGrade(grade: GradeInput!): ActivityOutput!
addResource(courseId: ID!, resource: ResourceCreateInput!): ResourceOutput!
addStudentToCollege(email: String!, student: StudentInput): Student!
addStudentToDegree(
currency: Currency,
degreeId: ID!,
email: String!,
student: StudentInput,
tuitionCost: Int
): Student!
addSubmission(submission: SubmissionInput!): ActivityOutput!
archiveActivity(activityId: ID!): Boolean
archiveCourseProgress(courseId: ID!, studentId: ID!): Boolean
changeEmail(email: String!, id: ID!): Boolean!
generateUserToken(id: String!): String!
modifyResource(id: ID!, resource: ResourceModifyInput!): ResourceOutput!
}
# === Input Types ===
# Defines input for uploading assets (e.g., files, images)
input AssetInput {
contentType: String
fileName: String
importUrl: String
}
# Used for recording student attendance in an activity
input AttendanceInput {
studentId: String! # ID of the student
resourceId: String! # ID of the resource
timestamp: String # Optional timestamp of attendance
}
# Used to submit feedback on an activity
input FeedbackInput {
activityId: ID # ID of the activity
resourceId: String # ID of the resource
studentId: String! # ID of the student submitting feedback
teacherId: String # ID of the teacher
content: String # Feedback content
assets: [AssetInput!] # Optional attached assets
evidenceAssets: [AssetInput!]
}
# Used to assign a grade to an activity
input GradeInput {
activityId: ID
resourceId: String
studentId: String!
teacherId: String
weightId: ID
value: Float! # Grade value
assets: [AssetInput!] # Attached supporting assets
evidenceAssets: [AssetInput!]
}
# Defines the input format for creating a new resource
input ResourceCreateInput {
name: String! # Resource name
kind: ResourceKind! # Type of resource
isGradeRequired: Boolean = true
externalId: String
content: String
workload: Int
weightIds: [ID!]
assets: [AssetInput!]
tags: [String!]
teacherIds: [ID!]
}
# Defines input structure for modifying an existing resource
input ResourceModifyInput {
name: String
kind: ResourceKind
isGradeRequired: Boolean
externalId: String
content: String
workload: Int
weightIds: [ID!]
assets: [AssetInput!]
tags: [String!]
teacherIds: [ID!]
}
# Defines student input fields for API operations
input StudentInput {
externalId: String
nameFirst: String
nameLast: String
}
# Used for submitting an assignment
input SubmissionInput {
activityId: ID
resourceId: String
studentId: String
content: String
assets: [AssetInput!]
evidenceAssets: [AssetInput!]
}
# === Enums ===
# Represents different types of activities
enum ActivityKind {
addFeedback
addGrade
submitAssignment
consumeResource
attendMeeting
}
# Represents possible statuses of an activity
enum ActivityStatus {
ACTIVE
ARCHIVED
PENDING
}
# Represents verification and operational statuses of a college
enum CollegeStatus {
DRAFT
VERIFIED
REJECTED
ARCHIVED
}
# Represents student status within a course
enum CourseStudentStatus {
ACTIVE
SUBMITTED
PASSED
FAILED
}
# Represents possible states of a course
enum CourseStatus {
DRAFT
REJECTED
VERIFIED
ARCHIVED
}
# Represents different types of resources
enum ResourceKind {
ASSIGNMENT
ASSIGNMENT_SUMMATIVE
MEETING
GENERAL
PUBLICATION
PUBLICATION_REVIEWED
}
# Represents the status of a resource
enum ResourceStatus {
DRAFT
REJECTED
SUBMITTED
VERIFIED
ARCHIVED
}
# === Objects ===
# Represents an academic activity linked to a student and resource
type Activity {
id: ID!
created: DateTime!
updated: DateTime!
userId: ID!
collegeId: ID!
degreeId: ID
weightId: ID
courseId: ID
resourceId: ID
data: Json!
kind: ActivityKind!
status: ActivityStatus!
resourceKind: ResourceKind
grade: Float
assets: [Asset!]!
evidenceAssets: [Asset!]!
}
# Represents a course within a degree program
type Course {
id: ID!
updated: DateTime!
created: DateTime!
status: CourseStatus!
rejectionReason: String
name: String!
descr: String!
weights: [Weight!]!
workloadRequired: Int!
workload: Int!
}
# Represents a student enrolled in a college
type Student {
id: ID!
externalId: String
name: String!
email: String!
updated: DateTime!
created: DateTime!
degrees: [DegreeStudent!]!
courses: [CourseStudent!]!
}
# === Pagination Types ===
# Pagination result for retrieving activities
type ActivityPaginationResult {
count: Int!
list: [Activity]!
}
# Pagination result for retrieving courses
type CoursePaginationResult {
count: Int!
list: [Course]!
}
# Pagination result for retrieving resources
type ResourcePaginationResult {
count: Int!
list: [Resource]!
}
# Pagination result for retrieving students
type StudentPaginationResult {
count: Int!
list: [Student]!
}
|
Mutations |
Used to modify data, such as adding students, updating grades, and submitting assignments. |
Objects |
Represents structured data returned by queries and mutations |
Input Types |
Defines structured objects used as inputs for mutations. |
Enums |
Defines a fixed set of values. |
Scalars |
Built-in primitive types. |
Queries
Queries in GraphQL are allows fetching and retrieving data from the Woolf API. You can use them to:
-
Retrieve structured information (e.g., get student details, fetch course lists, check resource data).
-
Filter and refine results using parameters (e.g., filter students by course, fetch active resources only).
-
Request specific fields to optimize API responses and reduce data load.
π Get Activities
The activities query retrieves a list of academic activities for students and courses. You can filter results by course, resource, student, and status.
Parameters
Parameter |
Type |
Description |
courseId |
ID |
Filter activities by a specific course. |
kinds |
[ActivityKind!] |
Filter activities by type (e.g., addFeedback , submitAssignment ). |
pagination |
Pagination |
Define skip and take values to limit results. |
resourceId |
ID |
Retrieve activities linked to a specific resource. |
resourceKinds |
[ResourceKind!] |
Filter activities by resource type (e.g., MEETING ). |
statuses |
[ActivityStatus!] |
Filter by activity status (ACTIVE , ARCHIVED , PENDING ). |
studentId |
ID |
Retrieve activities associated with a specific student. |
Response Fields
Field |
Type |
Description |
count |
Int! |
Total number of matching activities. |
list |
[Activity!]! |
List of retrieved activities. |
id |
ID! |
Unique activity identifier. |
created |
DateTime! |
Timestamp when the activity was created. |
updated |
DateTime! |
Timestamp when the activity was last updated. |
userId |
ID! |
User linked to the activity. |
collegeId |
ID! |
College associated with the activity. |
degreeId |
ID |
Degree linked to the activity. |
weightId |
ID |
Weight assigned to the activity. |
courseId |
ID |
Course related to the activity. |
resourceId |
ID |
Resource associated with the activity. |
kind |
ActivityKind! |
Type of activity (addFeedback , attendMeeting , submitAssignment , consumeResource , attendMeeting ). |
status |
ActivityStatus! |
Current activity status (ACTIVE , ARCHIVED , PENDING ). |
resourceKind |
ResourceKind |
Type of linked resource (ASSIGNMENT , ASSIGNMENT_SUMMATIVE , MEETING , GENERAL , PUBLICATION , PUBLICATION_REVIEWED ). |
grade |
Float |
Grade assigned for the activity (if applicable). |
π Request (Try It)
π Get Activity by ID
The activity query retrieves detailed information about a specific academic activity using its unique ID.
Parameters
Parameter |
Type |
Description |
id |
ID! |
Unique identifier of the activity to retrieve. |
Response Fields
Field |
Type |
Description |
id |
ID! |
Unique activity identifier. |
created |
DateTime! |
Timestamp when the activity was created. |
updated |
DateTime! |
Timestamp when the activity was last updated. |
userId |
ID! |
ID of the user who performed the activity. |
collegeId |
ID! |
College associated with the activity. |
degreeId |
ID |
Degree linked to the activity. |
weightId |
ID |
Weight assigned to the activity. |
courseId |
ID |
Course related to the activity. |
resourceId |
ID |
Resource associated with the activity. |
kind |
ActivityKind! |
Type of activity (addFeedback , attendMeeting , submitAssignment , consumeResource , attendMeeting ). |
status |
ActivityStatus! |
Current activity status (ACTIVE , ARCHIVED , PENDING ). |
resourceKind |
ResourceKind |
Type of linked resource (ASSIGNMENT , ASSIGNMENT_SUMMATIVE , MEETING , GENERAL , PUBLICATION , PUBLICATION_REVIEWED ). |
grade |
Float |
Grade assigned for the activity (if applicable). |
πRequest (Try It)
ποΈ Get College Details
The college query retrieves details of the authenticated college, including its name, status, dean information, and associated degrees and teachers.
Parameters
This query does not require any parameters.
Response Fields
Field |
Type |
Description |
id |
ID! |
Unique identifier of the college. |
name |
String! |
Official name of the college. |
descr |
Json |
Description of the college. |
deanId |
ID |
ID of the dean associated with the college. |
deanName |
String |
Name of the dean. |
deanEmail |
String |
Email address of the dean. |
status |
CollegeStatus! |
Verification status of the college (DRAFT , VERIFIED , REJECTED , ARCHIVED ). |
rejectionReason |
String |
Reason for rejection, if applicable. |
updated |
DateTime! |
Timestamp of the last update. |
created |
DateTime! |
Timestamp of when the college was created. |
degrees |
[Degree!]! |
List of degrees offered by the college. |
teachers |
[CollegeStaff!]! |
List of teachers associated with the college. |
π Request (Try It)
π Get Course Details
The course query retrieves details of a specific course using its unique ID. This includes its name, status, workload, and grading weights.
Parameters
Parameter |
Type |
Description |
id |
ID! |
Unique identifier of the course to retrieve. |
Response Fields
Field |
Type |
Description |
id |
ID! |
Unique identifier of the course. |
updated |
DateTime! |
Timestamp when the course was last updated. |
created |
DateTime! |
Timestamp when the course was created. |
status |
CourseStatus! |
Current status of the course (DRAFT , VERIFIED , ARCHIVED ). |
rejectionReason |
String |
Reason for course rejection, if applicable. |
name |
String! |
Course name. |
descr |
String! |
Description of the course. |
weights |
[Weight!]! |
List of grading weight categories for the course. |
workloadRequired |
Int! |
Minimum workload required to complete the course. |
workload |
Int! |
Total workload assigned to the course. |
publicationRequired |
Int! |
Number of publications required for completion. |
publicationReviewedRequired |
Int! |
Number of reviewed publications required. |
meetingRequired |
Int! |
Number of meetings required for course completion. |
assignmentRequired |
Int! |
Number of assignments required to pass the course. |
assignmentSummativeRequired |
Int! |
Number of summative assignments required. |
π Request (Try It)
π Get Multiple Courses
The courses query retrieves a list of courses with optional filters for degree, pagination, and status.
Parameters
Parameter |
Type |
Description |
degreeId |
ID |
Filter courses by degree ID. |
pagination |
Pagination |
Define skip and take values to limit results. |
statuses |
[CourseStatus!] |
Filter courses by status (DRAFT , VERIFIED , ARCHIVED ). |
Response Fields
Field |
Type |
Description |
count |
Int! |
Total number of matching courses. |
list |
[Course!]! |
List of retrieved courses. |
id |
ID! |
Unique identifier of the course. |
updated |
DateTime! |
Timestamp when the course was last updated. |
created |
DateTime! |
Timestamp when the course was created. |
status |
CourseStatus! |
Current status of the course (DRAFT , VERIFIED , ARCHIVED ). |
rejectionReason |
String |
Reason for course rejection, if applicable. |
name |
String! |
Course name. |
descr |
String! |
Description of the course. |
weights |
[Weight!]! |
List of grading weight categories for the course. |
workloadRequired |
Int! |
Minimum workload required to complete the course. |
workload |
Int! |
Total workload assigned to the course. |
π Request (Try It)
ποΈ Get Resource by ID
The resource query retrieves details of a specific resource using its unique ID. This includes resource name, type, workload, and status.
Parameters
Parameter |
Type |
Description |
id |
String! |
Unique identifier of the resource to retrieve. |
Response Fields
Field |
Type |
Description |
id |
ID! |
Unique identifier of the resource. |
externalId |
String |
External identifier linked to the resource. |
created |
DateTime! |
Timestamp when the resource was created. |
updated |
DateTime! |
Timestamp when the resource was last updated. |
courseId |
ID! |
Course associated with the resource. |
rejectionReason |
String |
Reason for resource rejection, if applicable. |
name |
String! |
Resource name. |
content |
String |
Text content of the resource. |
workload |
Int! |
Workload value assigned to the resource. |
workloadMultiplier |
Float! |
Multiplier applied to workload calculations. |
workloadExecution |
Int! |
Workload execution value. |
kind |
ResourceKind! |
Type of resource (ASSIGNMENT , ASSIGNMENT_SUMMATIVE , MEETING , GENERAL , PUBLICATION , PUBLICATION_REVIEWED ). |
status |
ResourceStatus! |
Current status of the resource (DRAFT , REJECTED , SUBMITTED , VERIFIED , ARCHIVED ). |
weights |
[Weight!] |
List of grading weight categories for the resource. |
assets |
[Asset!] |
List of associated assets linked to the resource. |
π Request (Try It)
π Get Multiple Resources
The resources query retrieves a list of resources with optional filters for course, type, pagination, and status.
Parameters
Parameter |
Type |
Description |
courseId |
ID |
Filter resources by course ID. |
kinds |
[ResourceKind!] |
Filter resources by type (ASSIGNMENT , MEETING , PUBLICATION ). |
pagination |
Pagination |
Define skip and take values to limit results. |
statuses |
[ResourceStatus!] |
Filter resources by status (DRAFT , VERIFIED , ARCHIVED ). |
Response Fields
Field |
Type |
Description |
count |
Int! |
Total number of matching resources. |
list |
[Resource!]! |
List of retrieved resources. |
id |
ID! |
Unique identifier of the resource. |
externalId |
String |
External identifier linked to the resource. |
created |
DateTime! |
Timestamp when the resource was created. |
updated |
DateTime! |
Timestamp when the resource was last updated. |
courseId |
ID! |
Course associated with the resource. |
rejectionReason |
String |
Reason for resource rejection, if applicable. |
name |
String! |
Resource name. |
content |
String |
Text content of the resource. |
workload |
Int! |
Workload value assigned to the resource. |
kind |
ResourceKind! |
Type of resource (ASSIGNMENT , ASSIGNMENT_SUMMATIVE , MEETING , GENERAL , PUBLICATION , PUBLICATION_REVIEWED ). |
status |
ResourceStatus! |
Current status of the resource (DRAFT , REJECTED , SUBMITTED , VERIFIED , ARCHIVED ). |
weights |
[Weight!] |
List of grading weight categories for the resource. |
assets |
[Asset!] |
List of associated assets linked to the resource. |
π Request (Try It)
π Get Student by ID
The student query retrieves details of a specific student using their unique ID. This includes name, email, degree enrollments, and course progress.
Parameters
Parameter |
Type |
Description |
id |
String! |
Unique identifier of the student to retrieve. |
Response Fields
Field |
Type |
Description |
id |
ID! |
Unique identifier of the student. |
externalId |
String |
External identifier linked to the student. |
name |
String! |
Full name of the student. |
email |
String! |
Email address of the student. |
updated |
DateTime! |
Timestamp when the student record was last updated. |
created |
DateTime! |
Timestamp when the student record was created. |
degrees |
[DegreeStudent!]! |
List of degrees in which the student is enrolled. |
courses |
[CourseStudent!]! |
List of courses in which the student is enrolled. |
π Request (Try It)
π₯ Get Multiple Students
The students query retrieves a list of students with optional filters for course, degree, and pagination.
Parameters
Parameter |
Type |
Description |
courseId |
ID |
Filter students by course ID. |
degreeId |
ID |
Filter students by degree ID. |
pagination |
Pagination |
Define skip and take values to limit results. |
Response Fields
Field |
Type |
Description |
count |
Int! |
Total number of matching students. |
list |
[Student!]! |
List of retrieved students. |
id |
ID! |
Unique identifier of the student. |
externalId |
String |
External identifier linked to the student. |
name |
String! |
Full name of the student. |
email |
String! |
Email address of the student. |
updated |
DateTime! |
Timestamp when the student record was last updated. |
created |
DateTime! |
Timestamp when the student record was created. |
degrees |
[DegreeStudent!]! |
List of degrees in which the student is enrolled. |
courses |
[CourseStudent!]! |
List of courses in which the student is enrolled. |
π Request (Try It)
Mutations
Mutations in GraphQL are used to modify or add data in the Woolf API.
Unlike queries, which retrieve data, mutations allow you to:
-
Create new records (e.g., enroll students, add resources, submit assignments).
-
Update existing records (e.g., modify student details, change emails, update grades).
-
Perform actions (e.g., submit feedback, archive progress, generate authentication tokens).
β Add Resource
The addResource mutation allows an instructor to create a new learning resource for a course. Resources can include assignments, meetings, publications, and more.
Input Parameters
Parameter |
Type |
Description |
courseId |
ID! |
ID of the course to which this resource belongs. |
resource |
ResourceCreateInput! |
Resource details, including name, type, and optional attributes. |
Input Object: ResourceCreateInput
Field |
Type |
Description |
name |
String! |
Name of the resource. |
kind |
ResourceKind! |
Type of resource (ASSIGNMENT , MEETING , PUBLICATION ). |
isGradeRequired |
Boolean |
Indicates whether grading is required for this resource (default: true ). |
externalId |
String |
External system identifier for this resource. |
content |
String |
Text content or instructions for the resource. |
workload |
Int |
Estimated workload required to complete the resource. |
weightIds |
[ID!] |
List of grading weight categories applicable to this resource. |
assets |
[AssetInput!] |
List of uploaded attachments related to the resource. |
tags |
[String!] |
Tags assigned to categorize the resource. |
teacherIds |
[ID!] |
List of teacher IDs assigned to manage this resource. |
Response Fields
Field |
Type |
Description |
resource |
Resource! |
Details of the newly created resource. |
assets |
[AssetUpload!]! |
List of uploaded assets linked to the resource. |
π Request (Try It)
βοΈ Modify Resource
The modifyResource mutation allows an instructor to update an existing learning resource within a course. This mutation can be used to change details such as the resource name, type, workload, or add additional assets.
Input Parameters
Parameter |
Type |
Description |
id |
ID! |
ID of the resource to be modified. |
resource |
ResourceModifyInput! |
Details of the modifications to be applied to the resource. |
Input Object: ResourceModifyInput
Field |
Type |
Description |
name |
String |
Updated name of the resource. |
kind |
ResourceKind |
Updated resource type (ASSIGNMENT , MEETING , PUBLICATION ). |
isGradeRequired |
Boolean |
Indicates whether grading is required. |
externalId |
String |
External system identifier for this resource. |
content |
String |
Updated text content or instructions. |
workload |
Int |
Updated estimated workload required. |
weightIds |
[ID!] |
Updated grading weight categories applicable to this resource. |
assets |
[AssetInput!] |
List of updated uploaded attachments related to the resource. |
tags |
[String!] |
Updated tags assigned to categorize the resource. |
teacherIds |
[ID!] |
Updated list of teacher IDs assigned to manage this resource. |
Response Fields
Field |
Type |
Description |
resource |
Resource! |
Details of the modified resource. |
assets |
[AssetUpload!]! |
List of uploaded assets linked to the updated resource. |
π Request (Try It)
π Add Student to College
The addStudentToCollege mutation allows administrators to enroll a new student in a college using their email and personal details.
Input Parameters
Parameter |
Type |
Description |
email |
String! |
Email address of the student to enroll. |
student |
StudentInput! |
Details of the student being added. |
Input Object: StudentInput
Field |
Type |
Description |
externalId |
String |
External system identifier for the student. |
nameFirst |
String |
First name of the student. |
nameLast |
String |
Last name of the student. |
Response Fields
Field |
Type |
Description |
id |
ID! |
Unique identifier of the enrolled student. |
name |
String! |
Full name of the student. |
email |
String! |
Email address of the enrolled student. |
π Request (Try It)
π Add Student to Degree
The addStudentToDegree mutation allows administrators to enroll a student in a degree program, specifying optional tuition cost and currency.
Input Parameters
Parameter |
Type |
Description |
currency |
Currency |
Currency for tuition payment (optional). |
degreeId |
ID! |
ID of the degree program in which the student is enrolling. |
email |
String! |
Email address of the student. |
student |
StudentInput |
Details of the student (optional). |
tuitionCost |
Int |
Tuition cost amount in the specified currency (optional). |
Input Object: StudentInput
Field |
Type |
Description |
externalId |
String |
External system identifier for the student. |
nameFirst |
String |
First name of the student. |
nameLast |
String |
Last name of the student. |
Response Fields
Field |
Type |
Description |
id |
ID! |
Unique identifier of the enrolled student. |
name |
String! |
Full name of the student. |
email |
String! |
Email address of the student. |
degrees |
[DegreeStudent!]! |
List of degrees the student is enrolled in, including compliance steps and status. |
π Request (Try It)
For a detailed explanation of how to use this mutation, including key concepts and best practices, check Inviting Students to a Degree using API.
β
Add Attendance
The addAttendance mutation records a student's attendance for a specific activity. Attendance can be marked as PRESENT
or ABSENT
.
Input Parameters
Parameter |
Type |
Description |
attendance |
AttendanceInput! |
Attendance details including student ID, resource ID, and attendance status. |
Input Object: AttendanceInput
Field |
Type |
Description |
studentId |
ID! |
ID of the student whose attendance is being recorded. |
resourceId |
ID! |
ID of the resource (e.g., lecture, assignment) linked to this attendance. |
timestamp |
String |
Optional timestamp of the attendance record. |
Response Fields
Field |
Type |
Description |
activityId |
ID! |
Unique identifier of the recorded attendance activity. |
assets |
[AssetUpload!]! |
List of assets uploaded as attendance proof. |
evidenceAssets |
[AssetUpload!]! |
List of evidence assets attached to the attendance record. |
π Request (Try It)
π¬ Add Feedback
The addFeedback mutation allows a student or teacher to submit feedback for an activity, including comments and attached evidence.
Input Parameters
Parameter |
Type |
Description |
feedback |
FeedbackInput! |
Feedback details, including student ID, content, and optional attachments. |
Input Object: FeedbackInput
Field |
Type |
Description |
activityId |
ID |
ID of the activity associated with this feedback. |
resourceId |
ID |
ID of the resource linked to this feedback. |
studentId |
ID! |
ID of the student submitting the feedback. |
teacherId |
ID |
ID of the teacher submitting the feedback (optional). |
content |
String |
Text content of the feedback. |
assets |
[AssetInput!] |
List of uploaded attachments related to the feedback. |
evidenceAssets |
[AssetInput!] |
List of evidence assets used to support the feedback. |
Response Fields
Field |
Type |
Description |
activityId |
ID! |
Unique identifier of the feedback activity. |
assets |
[AssetUpload!]! |
List of uploaded assets attached to the feedback. |
evidenceAssets |
[AssetUpload!]! |
List of evidence assets supporting the feedback. |
π Request (Try It)
π Add Grade
The addGrade mutation allows an instructor to assign a grade to a student's activity. Grades can be numeric and optionally include supporting evidence.
Input Parameters
Parameter |
Type |
Description |
grade |
GradeInput! |
Grade details, including student ID, activity ID, and score. |
Input Object: GradeInput
Field |
Type |
Description |
activityId |
ID |
ID of the activity being graded. |
resourceId |
ID |
ID of the associated resource. |
studentId |
ID! |
ID of the student receiving the grade. |
teacherId |
ID |
ID of the instructor assigning the grade. |
weightId |
ID |
Weight category assigned to the grade. |
value |
Float! |
Numerical grade assigned to the student. |
assets |
[AssetInput!] |
List of uploaded documents supporting the grade. |
evidenceAssets |
[AssetInput!] |
List of evidence assets linked to the grade. |
Response Fields
Field |
Type |
Description |
activityId |
ID! |
Unique identifier of the graded activity. |
assets |
[AssetUpload!]! |
List of uploaded assets linked to the grade. |
evidenceAssets |
[AssetUpload!]! |
List of evidence assets supporting the grade. |
π Request (Try It)
π€ Add Submission
The addSubmission mutation allows a student to submit an assignment or task for an activity. The submission can include textual content and uploaded assets.
Input Parameters
Parameter |
Type |
Description |
submission |
SubmissionInput! |
Submission details, including student ID, activity ID, and content. |
Input Object: SubmissionInput
Field |
Type |
Description |
activityId |
ID |
ID of the activity the submission is for. |
resourceId |
ID |
ID of the resource linked to this submission. |
studentId |
ID |
ID of the student submitting the assignment. |
content |
String |
Text content of the submission. |
assets |
[AssetInput!] |
List of uploaded attachments related to the submission. |
evidenceAssets |
[AssetInput!] |
List of evidence assets used to support the submission. |
Response Fields
Field |
Type |
Description |
activityId |
ID! |
Unique identifier of the submission activity. |
assets |
[AssetUpload!]! |
List of uploaded assets attached to the submission. |
evidenceAssets |
[AssetUpload!]! |
List of evidence assets supporting the submission. |
π Request (Try It)
ποΈ Archive Activity
The archiveActivity mutation allows an instructor or administrator to archive an activity. Archiving prevents any further updates or modifications to the activity.
Input Parameters
Parameter |
Type |
Description |
activityId |
ID! |
ID of the activity to be archived. |
Response Fields
Field |
Type |
Description |
success |
Boolean |
Returns true if the activity was successfully archived. |
π Request (Try It)
π Archive Course Progress
The archiveCourseProgress mutation allows an instructor or administrator to archive a studentβs progress in a course. This prevents any further updates or modifications to the studentβs records within that course.
Input Parameters
Parameter |
Type |
Description |
courseId |
ID! |
ID of the course in which progress will be archived. |
studentId |
ID! |
ID of the student whose progress is being archived. |
Response Fields
Field |
Type |
Description |
success |
Boolean |
Returns true if the studentβs course progress was successfully archived. |
π Request (Try It)
βοΈ Change Email
The changeEmail mutation allows an administrator to update a userβs email address. This action requires authentication and may have verification steps depending on the platform's policies.
Input Parameters
Parameter |
Type |
Description |
email |
String! |
New email address to assign to the user. |
id |
ID! |
ID of the user whose email is being updated. |
Response Fields
Field |
Type |
Description |
success |
Boolean! |
Returns true if the email change was successful. |
π Request (Try It)
π Generate User Token
The generateUserToken mutation generates an authentication token for a specific user. This token is required to authorize API requests on behalf of the user.
Input Parameters
Parameter |
Type |
Description |
id |
String! |
ID of the user for whom the token is being generated. |
Response Fields
Field |
Type |
Description |
token |
String! |
A newly generated authentication token for the user. |
π Request (Try It)
Best Practices for Using the Woolf API
-
Use the API Sandbox for Testing: Before deploying to production, test your API queries and mutations using the API Sandbox.
-
Secure API Authentication:
- Always include a valid Bearer Token in the
Authorization
header.
-
Optimize Queries for Performance:
- Request only the fields you need to avoid unnecessary data retrieval.
- Use pagination for queries returning large datasets.
- Apply filters to narrow down results and reduce response times.
-
Handle API Errors Gracefully: Check for common error codes and log errors for debugging and notify the Woolf of persistent failures.
-
401 Unauthorized
β Invalid or missing API token.
-
403 Forbidden
β Insufficient permissions.
-
400 Bad Request
β Incorrect query structure or missing fields.
FAQs
How do I authenticate API requests?
All requests require a valid API token passed in the Authorization
header.
{
"Authorization": "Bearer YOUR_COLLEGE_TOKEN"
}
To obtain a token, refer to the authentication steps in the Getting Started for Developers.
How do I add a new student using the API?
Use the addStudentToCollege
or addStudentToDegree
mutations.
How do I handle API rate limits?
The Woolf API may have rate limits. If you encounter a 429 Too Many Requests
error:
- Reduce request frequency.
- Implement exponential backoff for retries.
Explore More