Product: Partner Portal
Audience: Partner Administrator & Developer
Overview
GET - https://nodeapi.classlink.com/v2/oneroster/my/classes/:class_id:/students
cURL
curl --request GET \
--url https://nodeapi.classlink.com/v2/oneroster/my/classes/class_id/students \
--header 'authorization: Bearer {bearer_token}'
Node
const request = require('request');
const options = {
method: 'GET',
url: 'https://nodeapi.classlink.com/v2/oneroster/my/classes/class_id/students',
headers: {authorization: 'Bearer {bearer_token}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Ruby
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://nodeapi.classlink.com/v2/oneroster/my/classes/class_id/students")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {bearer_token}'
response = http.request(request)
puts response.read_body
JavaScript
const data = null;
const xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://nodeapi.classlink.com/v2/oneroster/my/classes/class_id/students");
xhr.setRequestHeader("authorization", "Bearer {bearer_token}");
xhr.send(data);
Python
import requests
url = "https://nodeapi.classlink.com/v2/oneroster/my/classes/class_id/students"
headers = {"authorization": "Bearer {bearer_token}"}
response = requests.request("GET", url, headers=headers)
print(response.text)
Path Params
class_id (string)
ID of the class
OneRoster Endoints
All OneRoster endpoints conform to the IMS Global specification, which can be found here http://www.imsglobal.org/lis/imsonerosterv1p0/imsOneRoster-v1p0.html
Updated: September 2020