Account Management
Account Owners
Arkansas Civics Test
Student Transcripts
Community Service Learning
Data Services Agreements
Online Testing
Smart Core
Advanced Searching
OneRoster API
OneRoster Sample District
OneRoster is a district API. A unique Consumer Key and a Consumer Secret is issued for each vendor to have access to a specific district's data.
Use the OneRoster OAuth2 Host with the Consumer Key and Consumer Secret to retrieve an OAuth2 token.
Use the OAuth2 token when making calls to the OneRoster API Host for the OneRoster API.
Description | URL |
---|---|
OAuth2 Host | https://oneroster-oauth2.triand.com/oauth2/token |
OneRoster Host | https://oneroster-api.triand.com |
The Sample Distric is a medium sized school district with all the Personal Identifying Information (PII) masked.
To access the Sample District use the following credentials:
Credential | Value |
---|---|
Consumer Key | eiXL0llJYV0LALeUQIfHfvicRy |
Consumer Secret | myoyVtA0ef0M0zslrLUalqtSChtalnpyaQyPgEiifXAWuDehGBtq |
When requesting your OAuth2 token you are required to provide the scopes you would like to access. The scopes you provide determine the OneRoster API version you will use and the types and amounts of OneRoster data.
OneRoster Scope | Version | Allows |
---|---|---|
https://purl.imsglobal.org/spec/or/v1p1/scope/roster-core.readonly | v1.1 | Get object, or collection, calls getSchool, getAllSchools |
https://purl.imsglobal.org/spec/or/v1p1/scope/roster.readonly | v1.1 | Core above plus get collections for an object getStudentsForSchool |
https://purl.imsglobal.org/spec/or/v1p1/scope/roster-demographics.readonly | v1.1 | Get demographics |
https://purl.imsglobal.org/spec/or/v1p2/scope/roster-core.readonly | v1.2 | Get object, or collection, calls getSchool, getAllSchools |
https://purl.imsglobal.org/spec/or/v1p2/scope/roster.readonly | v1.2 | Core above plus get collections for an object getStudentsForSchool |
https://purl.imsglobal.org/spec/or/v1p2/scope/roster-demographics.readonly | v1.2 | Get demographics |
https://oneroster.triand.com/guardians.readonly | both | Include student guardians in user collection |
https://oneroster.triand.com/guardians-metadata.readonly | both | Include additional guardian information with user object |
https://oneroster.triand.com/students-metadata.readonly | both | Include additional student information with user object |
https://oneroster.triand.com/demographic-metadata.readonly | both | Include additional demographic information with demographic model |
https://oneroster.triand.com/orgs-metadata.readonly | both | Include additional org information with org model |
To have full access to all OneRoster version 1.2 API calls, and full access to all available district data, the scope parameter would consisting of the following scopes concatenated and separated by spaces:
- https://purl.imsglobal.org/spec/or/v1p2/scope/roster.readonly
- https://purl.imsglobal.org/spec/or/v1p2/scope/roster-demographics.readonly
- https://oneroster.triand.com/guardians.readonly
- https://oneroster.triand.com/guardians-metadata.readonly
- https://oneroster.triand.com/students-metadata.readonly
- https://oneroster.triand.com/demographic-metadata.readonly
- https://oneroster.triand.com/orgs-metadata.readonly
Example Usage
First get an OAuth2 access token
curl -X POST \ -u eiXL0llJYV0LALeUQIfHfvicRy:myoyVtA0ef0M0zslrLUalqtSChtalnpyaQyPgEiifXAWuDehGBtq \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d 'grant_type=client_credentials&scope=https://purl.imsglobal.org/spec/or/v1p2/scope/roster.readonly https://purl.imsglobal.org/spec/or/v1p2/scope/roster-demographics.readonly https://oneroster.triand.com/guardians.readonly https://oneroster.triand.com/guardians-metadata.readonly https://oneroster.triand.com/students-metadata.readonly https://oneroster.triand.com/demographic-metadata.readonly https://oneroster.triand.com/orgs-metadata.readonly' \ 'https://oneroster-oauth2.triand.com/oauth2/token' // Response: { "access_token":"eyJ....really long string...ItCJA", "expires_in":3600, "token_type":"Bearer", "scope":"http://purl.imsglobal.org/spec/or/v1p2/scope/roster.readonly http://purl.imsglobal.org/spec/or/v1p2/scope/roster-demographics.readonly https://oneroster.triand.com/guardians.readonly https://oneroster.triand.com/guardians-metadata.readonly https://oneroster.triand.com/students-metadata.readonly https://oneroster.triand.com/demographic-metadata.readonly https://oneroster.triand.com/orgs-metadata.readonly" }
Now, do a OneRoster request with the access_token from above
curl https://oneroster-api.triand.com/ims/oneroster/rostering/v1p2/users \ -H 'Accept: application/json' \ -H "Authorization: Bearer {{token from above}}" // Response: {"users": [ { "username":"******", "orgs":[ {"type":"org", "href":"https://oneroster-api.triand.com/ims/oneroster/rostering/v1p2/orgs/ar-9999703", "sourcedId":"ar-9999703" } ], "enabledUser":"true", "givenName":"******", "familyName":"LastName_Z500537705", "middleName":"*****", "identifier":"Z500537705", "email":"**********", "agents":"", "grades":"09", "metadata": { "addr1":"*********************", "addr2":"", "city":"*******", "state":"AR", "country":"***", "zip":"*****", "dob":"********", "localid":"303015248" }, "sourcedId":"ar-9999000-z500537705", "status":"active", "dateLastModified":"2022-02-09T11:03:58.431Z", "roles":[ { "roleType":"primary", "role":"student", "org": {"type":"org", "href":"https://oneroster-api.triand.com/ims/oneroster/rostering/v1p2/orgs/ar-9999703", "sourcedId":"ar-9999703" } } ] }, // ...more users... ] }