Woolf’s Airlock API and SDK are designed to integrate your LMS with Woolf’s Academic Management System (AMS). These tools enable seamless automation of accreditation processes, compliance tracking, and educational data synchronization. Read Woolf API & SDK Overview for understanding the role of API and SDK in Woolf’s integration framework.
This guide will help you:
-
Set up API access and authentication for secure communication.
-
Install and initialize the SDK to track activities in real time.
-
Use the API Explorer to test and interact with API queries dynamically.
Accessing Woolf's Airlock API
The API is available in two environments:
💡 Note: We strongly recommend testing in the sandbox environment before switching to production.
API Authorization
To access the API, you must authenticate using a College Token.
Testing API Access
Add the authorization header👆 and try fetching your college details using the following query:
For understanding and exploring all the mutations and queries supported by Woolf's Airlock API, see API Schema.
Setting Up the Woolf SDK
The Airlock SDK helps track student interactions, such as resource consumption, attendance, and assignment submissions. It ensures that student activities are recorded accurately in Woolf AMS.
We recommend using a CDN to install the SDK in your app. This ensures you’re always on the latest version.
Generating a User Token
Each user must have a User Token for authentication. Use JWT (JSON Web Token) to generate a token:
import jwt from "jsonwebtoken";
const College_Secret = "YOUR_COLLEGE_SECRET_KEY";
const token = jwt.sign({
collegeId: "YOUR_COLLEGE_ID",
id: "USER_ID",
}, College_Secret);
console.log("User Token:", token);
Alternatively, you can also use the generateUserToken
mutation to generate it.
mutation {
generateUserToken(id: "YOUR_EMAIL_OR_USER_ID")
}
💡 Note: User tokens ensure secure interactions between your LMS and Woolf AMS.
Installing the SDK via CDN
Use the snippet below to initialize the SDK:
const initialiseWoolf = (token, namespace = "university") = {
const options = encodeURIComponent(JSON.stringify({ env: namespace }));
const script = document.createElement("script");
script.type = "module";
script.src = `https://sdk.woolf.university/v1/latest?token=${token}&options=${options}`;
document.addEventListener("woolf:created", () = {
// SDK is initialised successfully
console.log(woolf.user);
});
document.head.appendChild(script);
};
// for university environemnt
initialiseWoolf("userToken");
// for sandbox environment
initialiseWoolf("userToken", "sandbox");
(Alternative) Installing the SDK via NPM
Install the SDK using NPM:
npm i -S @woolfuniversity/sdk
Use the generated token to initialize the SDK:
import {
Woolf
} from "@woolfuniversity/sdk";
const woolf = await Woolf.create("userToken");
console.log(woolf.user); // Returns authenticated user details
Next Steps
Once your Airlock API and SDK are set up:
Track Activity in Your LMS
Our
JS SDK automatically tracks student interactions, including: Content consumption (PDFs, videos, lectures), Assignment submissions and attendance tracking, and Assessments and grade updates.
Add Students to AMS
Use the API to register students in Woolf AMS and the SDK to authorize them in your LMS. Woolf Widget guides students through onboarding and compliance requirements.
Manage Course Resources
Use the API to categorize content based on compliance requirements, submit materials for accreditation review, and receive real-time webhook notifications for verification status.
Explore More