Get users this user is an agent for
curl --request GET \
--url https://api.alpha-1edtech.ai/ims/oneroster/rostering/v1p2/users/{userId}/agentFor \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.alpha-1edtech.ai/ims/oneroster/rostering/v1p2/users/{userId}/agentFor"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.alpha-1edtech.ai/ims/oneroster/rostering/v1p2/users/{userId}/agentFor', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.alpha-1edtech.ai/ims/oneroster/rostering/v1p2/users/{userId}/agentFor",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.alpha-1edtech.ai/ims/oneroster/rostering/v1p2/users/{userId}/agentFor"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.alpha-1edtech.ai/ims/oneroster/rostering/v1p2/users/{userId}/agentFor")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpha-1edtech.ai/ims/oneroster/rostering/v1p2/users/{userId}/agentFor")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"users": [
{
"sourcedId": "<string>",
"givenName": "<string>",
"familyName": "<string>",
"roles": [],
"agents": [],
"userProfiles": [],
"email": "jsmith@example.com",
"dateLastModified": "2023-11-07T05:31:56Z",
"metadata": {},
"userMasterIdentifier": "<string>",
"username": "<string>",
"userIds": [
{
"type": "<string>",
"identifier": "<string>"
}
],
"middleName": "<string>",
"primaryOrg": {
"href": "<string>",
"sourcedId": "<string>",
"type": "<string>",
"name": "<string>"
},
"identifier": "<string>",
"preferredFirstName": "<string>",
"preferredMiddleName": "<string>",
"preferredLastName": "<string>",
"pronouns": "<string>",
"grades": [
"3"
],
"password": "<string>",
"sms": "<string>",
"phone": "<string>",
"demographics": {
"sourcedId": "<string>",
"birthDate": "<string>",
"americanIndianOrAlaskaNative": "<string>",
"asian": "<string>",
"blackOrAfricanAmerican": "<string>",
"nativeHawaiianOrOtherPacificIslander": "<string>",
"white": "<string>",
"demographicRaceTwoOrMoreRaces": "<string>",
"hispanicOrLatinoEthnicity": "<string>",
"countryOfBirthCode": "<string>",
"stateOfBirthAbbreviation": "<string>",
"cityOfBirth": "<string>",
"publicSchoolResidenceStatus": "<string>",
"dateLastModified": "2023-11-07T05:31:56Z",
"metadata": {}
}
}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "invaliddata"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "unauthorisedrequest"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "forbidden"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "unknownobject"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "invaliddata"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "server_busy"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "internal_server_error"
}
]
},
"imsx_error_details": [
{}
]
}Users Management
Get users this user is an agent for
Get users this user is an agent for (eg. parents getting the children list)
GET
/
ims
/
oneroster
/
rostering
/
v1p2
/
users
/
{userId}
/
agentFor
Get users this user is an agent for
curl --request GET \
--url https://api.alpha-1edtech.ai/ims/oneroster/rostering/v1p2/users/{userId}/agentFor \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.alpha-1edtech.ai/ims/oneroster/rostering/v1p2/users/{userId}/agentFor"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.alpha-1edtech.ai/ims/oneroster/rostering/v1p2/users/{userId}/agentFor', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.alpha-1edtech.ai/ims/oneroster/rostering/v1p2/users/{userId}/agentFor",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.alpha-1edtech.ai/ims/oneroster/rostering/v1p2/users/{userId}/agentFor"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.alpha-1edtech.ai/ims/oneroster/rostering/v1p2/users/{userId}/agentFor")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpha-1edtech.ai/ims/oneroster/rostering/v1p2/users/{userId}/agentFor")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"users": [
{
"sourcedId": "<string>",
"givenName": "<string>",
"familyName": "<string>",
"roles": [],
"agents": [],
"userProfiles": [],
"email": "jsmith@example.com",
"dateLastModified": "2023-11-07T05:31:56Z",
"metadata": {},
"userMasterIdentifier": "<string>",
"username": "<string>",
"userIds": [
{
"type": "<string>",
"identifier": "<string>"
}
],
"middleName": "<string>",
"primaryOrg": {
"href": "<string>",
"sourcedId": "<string>",
"type": "<string>",
"name": "<string>"
},
"identifier": "<string>",
"preferredFirstName": "<string>",
"preferredMiddleName": "<string>",
"preferredLastName": "<string>",
"pronouns": "<string>",
"grades": [
"3"
],
"password": "<string>",
"sms": "<string>",
"phone": "<string>",
"demographics": {
"sourcedId": "<string>",
"birthDate": "<string>",
"americanIndianOrAlaskaNative": "<string>",
"asian": "<string>",
"blackOrAfricanAmerican": "<string>",
"nativeHawaiianOrOtherPacificIslander": "<string>",
"white": "<string>",
"demographicRaceTwoOrMoreRaces": "<string>",
"hispanicOrLatinoEthnicity": "<string>",
"countryOfBirthCode": "<string>",
"stateOfBirthAbbreviation": "<string>",
"cityOfBirth": "<string>",
"publicSchoolResidenceStatus": "<string>",
"dateLastModified": "2023-11-07T05:31:56Z",
"metadata": {}
}
}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "invaliddata"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "unauthorisedrequest"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "forbidden"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "unknownobject"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "invaliddata"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "server_busy"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "internal_server_error"
}
]
},
"imsx_error_details": [
{}
]
}⌘I