---
title: Data API
description: This article provides an overview of the Data API schema OAuth 2 authorization.
---

[Skip to content](https://help.schoolday.com/knowledge/data-api#main-content)

English

Show submenu for translations

[More support](https://help.schoolday.com/knowledge/kb-tickets/new?hsLang=en) [Customer portal](https://help.schoolday.com/support?hsLang=en)

![gg4l logo](https://help.schoolday.com/hs-fs/hubfs/Automated%20emails/gg4l%20logo.png?width=100&height=33&name=gg4l%20logo.png)

- [Go to Knowledge Base](https://help.schoolday.com/knowledge)

Open main navigation

Close main navigation

- [Go to Knowledge Base](https://help.schoolday.com/knowledge)
- English
  
  Show submenu for translations
- [More support](https://help.schoolday.com/knowledge/kb-tickets/new)
- [Customer portal](https://help.schoolday.com/support)

 What are you looking for?

- There are no suggestions because the search field is empty.

1. [SchoolDay Help Center](https://help.schoolday.com/knowledge?hsLang=en)
2. [Reference](https://help.schoolday.com/knowledge/reference?hsLang=en)
3. [APIs](https://help.schoolday.com/knowledge/reference?hsLang=en#apis)

April 3, 2025

# Data API

## This article provides an overview of the Data API schema OAuth 2 authorization.

**In this article**

> [Data API schema](https://help.schoolday.com/knowledge/data-api#Data-API-schema)
> 
> [OAuth 2 authorization - “Client credentials” grant](https://help.schoolday.com/knowledge/data-api#OAuth-2)
> 
> [API Overview](https://help.schoolday.com/knowledge/data-api#API-Overview)
> 
> [Typical request parameters](https://help.schoolday.com/knowledge/data-api#Typical-request-parameters)
> 
> [Structure of JSON response from API](https://help.schoolday.com/knowledge/data-api#JSON-response)
> 
> [Pagination](https://help.schoolday.com/knowledge/data-api#Pagination)

### **Data API schema**

Data API schema reflected in [SSO Passport API data schema](https://docs.google.com/spreadsheets/d/1CsPg1d-kycuj4lmWqxR2KgpCpwzdV3Ru8mB2GL6eleQ/pubhtml?gid=0&single=true) document.

### OAuth 2 Authorization

**Request:**

The request for client credentials must contain WWW BASIC authorization with both the client\_id and client secret key in the request header, such as: ‘Authorization’: ‘Basic {data}’, where data = Base64.encode(‘{client\_id}:{client secret}’).

| **POST** | datahub/oauth/token | Endpoint for authenticating a client. |
| --- | --- | --- |

| **Parameter** | **Mode** | **Type** | **Description** |
| --- | --- | --- | --- |
| grant\_type | required | String | The type of the response (should be: ‘client\_credentials’) |

**Example:**

| **Method** | POST |
| --- | --- |
| **URL** | https://{hostname}/datahub/oauth/token |
| **Body** | grant\_type=client\_credentials |
| **Headers** | Authorization: Basic Y2xpZW50aWQ6Y2xpZW50c2VjcmV0 |

**Response:**

The API returns the following response on successful authentication:

```
{"access_token": "zyx","token_type": "bearer","expires_in": 7199}
```

| **Field** | **Type** | **Description** |
| --- | --- | --- |
| access\_token | String | OAuth 2.0 Access Token |
| token\_type | String | Token type, which is always 'bearer.’ |
| expires\_in | Integer | Expiration time in seconds |
| scope | String | Expiration time in seconds |

### API Overview

#### Districts

| **GET** | /v1/districts | Retrieves a list of districts you have access to |
| --- | --- | --- |
| **GET** | /v1/districts/{id} | Retrieves information of a specific district |
| **GET** | /v1/districts/{id}/schools | Retrieves a list of schools you have access to for a specific district |
| **GET** | /v1/districts/{id}/teachers | Retrieves a list of teachers you have access to for a specific district |
| **GET** | /v1/districts/{id}/students | Retrieves a list of students you have access to for a specific district |
| **GET** | /v1/districts/{id}/sections | Retrieves a list of sections you have access to for a specific district |
| **GET** | /v1/districts/{id}/groups | Retrieves a list of groups you have access to for a specific district. These can be LDAP or Google groups. Manually created groups in Passport will not be listed here |
| **GET** | /v1/districts/{id}/admins | Retrieves all the users with admin access to a district |
| **GET** | /v1/districts/{id}/status | Retrieves the status of a district |
| **GET** | /v1/districts/{id}/events | Retrieves all events for all resources belonging to this district |
| **GET** | /v1/districts/{id}/contacts | Retrieves all contacts of all students belonging to this district |

#### Teachers

| **GET** | /v1/teachers | Gets a list of teachers you have access to |
| --- | --- | --- |
| **GET** | /v1/teachers/{id} | Get only a specific teacher's information |
| **GET** | /v1/teachers/{id}/events | Retrieves events for teachers |
| **GET** | /v1/teachers/{id}/sections | Retrieves a list of all sections for a teacher |
| **GET** | /v1/teachers/{id}/school | Retrieves information about the school for a teacher |
| **GET** | /v1/teachers/{id}/district | Retrieves district information for a teacher |
| **GET** | /v1/teachers/{id}/students | Retrieves all students that a teacher has in their sections |
| **GET** | /v1/teachers/{id}/grade\_levels | Retrieves a list of all grade levels taught by a specific teacher |

#### Students

| **GET** | /v1/students | Gets a list of students you have access to |
| --- | --- | --- |
| **GET** | /v1/students/{id} | Get only a specific student's information |
| **GET** | /v1/students/{id}/events | Retrieves events for students |
| **GET** | /v1/students/{id}/sections | Retrieves a list of all sections for a student |
| **GET** | /v1/students/{id}/school | Retrieves information about the school for a student |
| **GET** | /v1/students/{id}/district | Retrieves district information for a student |
| **GET** | /v1/students/{id}/teachers | Retrieves all teachers for a student |
| **GET** | /v1/students/{id}/contacts | Retrieves all contacts for a student |

#### Sections

| **GET** | /v1/sections | Gets a list of sections you have access to |
| --- | --- | --- |
| **GET** | /v1/sections/{id} | Get only a specific section's information |
| **GET** | /v1/sections/{id}/events | Retrieves events for sections |
| **GET** | /v1/sections/{id}/school | Retrieves information about the school for a section |
| **GET** | /v1/sections/{id}/district | Retrieves district information for a section |
| **GET** | /v1/sections/{id}/students | Retrieves a list of all the section's students |
| **GET** | /v1/sections/{id}/teachers | Retrieves a list of all the section's teachers |
| **GET** | /v1/sections/{id}/teacher | Retrieves information about the primary teacher of a section |

#### Schools

| **GET** | /v1/schools | Gets a list of schools you have access to |
| --- | --- | --- |
| **GET** | /v1/schools/{id} | Get only a specific school's information |
| **GET** | /v1/schools/{id}/events | Retrieves events for schools |
| **GET** | /v1/schools/{id}/teachers | Retrieves a list of all teachers for a specific school |
| **GET** | /v1/schools/{id}/students | Retrieves a list of all students for a specific school |
| **GET** | /v1/schools/{id}/sections | Retrieves a list of all sections for a specific school |
| **GET** | /v1/schools/{id}/groups | Retrieves a list of groups you have access to for a specific school. These can be LDAP or Google groups. Manually created groups in Passport will not be listed here |
| **GET** | /v1/schools/{id}/district | Retrieves district information for a school |
| **GET** | /v1/schools/{id}/contacts | Retrieves all contacts of all students belonging to this school |

#### Groups

| **GET** | /v1/groups | Retrieves a list of groups you have access to. These can be LDAP or Google groups. Manually created groups in Passport will not be listed here |
| --- | --- | --- |
| **GET** | /v1/groups/{id} | Get only a specific group's information |
| **GET** | /v1/schools/{id}/members | Retrieves a list of members belonging to this group. Can be teachers, students, etc. |

#### District\_admins

| **GET** | /v1/district\_admins | Retrieves all users with admin access to a district |
| --- | --- | --- |
| **GET** | /v1/district\_admins/{id} | Retrieves a district admin |

#### School\_admins

| **GET** | /v1/school\_admins | Gets a list of school admins you have access to |
| --- | --- | --- |
| **GET** | /v1/school\_admins/{id} | Get only a specific school admin's information |
| **GET** | /v1/school\_admins/{id}/schools | Retrieves all schools for a school admin |

#### Contacts

| **GET** | /v1/contacts | Gets a list of student contacts you have access to |
| --- | --- | --- |
| **GET** | /v1/contacts/{id} | Get only a specific student contact's information |
| **GET** | /v1/contacts/{id}/student | Retrieves the student for a contact |
| **GET** | /v1/contacts/{id}/district | Retrieves the district for a contact |

#### Events

| **GET** | /v1/events | Gets a list of all events that have occurred within data you have access to see |
| --- | --- | --- |
| **GET** | /v1/events/{id} | Retrieves specific event information |

**Caution**:

Navigation using "page" parameter is not supported in combination with starting\_after or created\_since. Use "rel": "NEXT" in “links” section of JSON API response.

#### **Supported event types**

| **Created** | **Updated** | **Deleted** |
| --- | --- | --- |
| schools.created students.created studentcontacts.created teachers.created sections.created schooladmins.created groups.created | schools.updated students.updated studentcontacts.updated teachers.updated sections.updated schooladmins.updated groups.updated | schooladmins.deleted sections.deleted teachers.deleted studentcontacts.deleted students.deleted schools.deleted groups.deleted |

| **Access Granted** | **Access Revoked** |
| --- | --- |
| schools.access\_granted students.access\_granted studentcontacts.access\_granted teachers.access\_granted sections.access\_granted schooladmins.access\_granted groups.access\_granted | schools.access\_revoked students.access\_revoked studentcontacts.access\_revoked teachers.access\_revoked sections.access\_revoked schooladmins.access\_revoked groups.access\_revoked |

### **Typical request parameters**

| **Parameter** | **Mode** | **Type** | **Description** |
| --- | --- | --- | --- |
| access\_token | Required | String | The access token obtained during authorization |
| id | Required | GUID | An ID of a requested entity |
| limit | Optional | Number | Max records returned (default 100) |
| created\_since | Optional | ISO 8601 | Applies to /events API. Example: created\_since=2016-07-26T16:35:04.084Z **Support for “since” query parameter is being deprecated. SchoolDay encourages use of “starting\_after” parameter instead.** |
| starting\_after | Optional | Number | {miliseconds\_from\_epoch} Example=1548944937314 |
| ending\_before | Optional | Number | {miliseconds\_from\_epoch} Example=1548944937314 |
| page | Optional | Number | Which page of results to return (default 1) **Navigation using the "page" parameter is not supported in combination with starting\_after or created\_since.** **Use "rel": "NEXT" in the “links” section of JSON API response.** |
| access\_events | Optional | Boolean | **This parameter is applicable only to /events API** **If it set** (access\_events=true) - **API will be returning ALL types of events, including Access Events.** In case if it is not set - API won’t be returning Access Events |

**An example of an Access Event:**

With a single data entity:

```
{  "data": {    "id": "5457f15e-2023-43c1-8d07-bbf788a0f84c",// GUID of the Event itself    "type": "students.access_granted",// Event type    "data": {      "object": {        "id": "0a909db2-5180-4601-9908-bfd14c0a9eb9"// GUID of the object      }    },    "created": "2020-08-12T10:46:02.730Z"// Time  },  "uri": "/v1/events/5457f15e-2023-43c1-8d07-bbf788a0f84c"// Endpoint to get this event by guid}
```

### Structure of JSON response from API

With a single data entity:

```
{  "data": {     "id": "000bc9f5-8496-4b40-92d5-97d74f9b21f8",     "attribute1": "value of attribute 1",     "attribute2": "value of attribute 2",     "attribute3": "value of attribute 3"  },  "links": [    {      "rel": "self",      "uri": "/v1/entityname/000bc9f5-8490-4b4c-92d5-97d74f9b21f8"    },    {      "rel": "related-entity1",      "uri": "/v1/entityname/000bc9f5-8490-4b4c-92d5-97d74f9b21f8/related-entity1"    },    {      "rel": "related-entity2",      "uri": "/v1/districts/000bc9f5-8496-4b40-92d5-97d74f9b21f8/related-entity2"    }  ]}
```

With multiple data entities:

```
{  "data": [    {      "data": {        "id": "000bc9f5-8496-4b40-92d5-97d74f9b21f8",        "attribute1": "value of attribute 1",        "attribute2": "value of attribute 2",        "attribute3": "value of attribute 3"      },      "uri": "/v1/entityname/000bc9f5-8496-4b4c-92d5-97d74f9b21f8"    },    {      "data": {        "id": "111ac1f5-8496-4b40-92d5-97d74f9b21f9",        "attribute1": "value of attribute 1",        "attribute2": "value of attribute 2",        "attribute3": "value of attribute 3"      },      "uri": "/v1/entityname/111ac1f5-8490-4b4c-92d5-97d74f9b21f9"    },    ...  ],   "links": [    {      "rel": "NEXT",      "uri": /v1/entityname?search_token=2.2.148.FORWARD.111ac1f5-8490-4b4c-92d5-97d74f9b21f9"    },    {      "rel": "SELF",      "uri": "/v1/entityname"    }  ]}
```

### **Pagination**

Every response contains element **links** that contains URLs to retrieve related data.  

| **rel** | **Description** |
| --- | --- |
| SELF | URI that was sent for this request |
| PREV | URI that can be used to retrieve previous bunch of data |
| NEXT | URI that can be used to retrieve next bunch of data |

 

- [Getting Started](https://help.schoolday.com/knowledge/getting-started?hsLang=en#main-content)

    - [Introduction](https://help.schoolday.com/knowledge/getting-started?hsLang=en#introduction)
    - [Getting Started by Role](https://help.schoolday.com/knowledge/getting-started?hsLang=en#getting-started-by-role)
    - [Get Support](https://help.schoolday.com/knowledge/getting-started?hsLang=en#get-support)
    - [Legal](https://help.schoolday.com/knowledge/getting-started?hsLang=en#legal)
- [Data Management (Connect)](https://help.schoolday.com/knowledge/data-management-connect?hsLang=en#main-content)

    - [Introduction](https://help.schoolday.com/knowledge/data-management-connect?hsLang=en#introduction)
    - [Applications](https://help.schoolday.com/knowledge/data-management-connect?hsLang=en#applications)
    - [Data Mapping](https://help.schoolday.com/knowledge/data-management-connect?hsLang=en#data-mapping)
    - [Data Synchronization](https://help.schoolday.com/knowledge/data-management-connect?hsLang=en#data-synchronization)
    - [Data-Sharing Requests](https://help.schoolday.com/knowledge/data-management-connect?hsLang=en#data-sharing-requests)
    - [Data Quality](https://help.schoolday.com/knowledge/data-management-connect?hsLang=en#data-quality)
    - [Data Privacy (Privacy Shield)](https://help.schoolday.com/knowledge/data-management-connect?hsLang=en#data-privacy-privacy-shield)
    - [Grade Sync Service](https://help.schoolday.com/knowledge/data-management-connect?hsLang=en#grade-sync-service)
    - [Miscellaneous](https://help.schoolday.com/knowledge/data-management-connect?hsLang=en#miscellaneous)
- [Roster Integrations](https://help.schoolday.com/knowledge/roster-integrations?hsLang=en#main-content)

    - [Introduction](https://help.schoolday.com/knowledge/roster-integrations?hsLang=en#introduction)
    - [SFTP](https://help.schoolday.com/knowledge/roster-integrations?hsLang=en#sftp)
    - [PowerSchool Integration](https://help.schoolday.com/knowledge/roster-integrations?hsLang=en#powerschool-integration)
    - [Import Integrations](https://help.schoolday.com/knowledge/roster-integrations?hsLang=en#import-integrations)
    - [Export Integrations](https://help.schoolday.com/knowledge/roster-integrations?hsLang=en#export-integrations)
- [Administration & Account Settings](https://help.schoolday.com/knowledge/administration-account-settings?hsLang=en#main-content)

    - [Account Settings](https://help.schoolday.com/knowledge/administration-account-settings?hsLang=en#account-settings)
    - [Organization Management](https://help.schoolday.com/knowledge/administration-account-settings?hsLang=en#organization-management)
- [SSO](https://help.schoolday.com/knowledge/sso?hsLang=en#main-content)

    - [Introduction](https://help.schoolday.com/knowledge/sso?hsLang=en#introduction)
    - [Identity provider (IdP) Setup](https://help.schoolday.com/knowledge/sso?hsLang=en#identity-provider-idp-setup)
    - [SSO Applications](https://help.schoolday.com/knowledge/sso?hsLang=en#sso-applications)
    - [MFA for Administrators](https://help.schoolday.com/knowledge/sso?hsLang=en#mfa-for-administrators)
    - [MFA for Users (SchoolDay Login)](https://help.schoolday.com/knowledge/sso?hsLang=en#mfa-for-users-schoolday-login)
    - [ID Card Login](https://help.schoolday.com/knowledge/sso?hsLang=en#id-card-login)
    - [SSO Troubleshooting](https://help.schoolday.com/knowledge/sso?hsLang=en#sso-troubleshooting)
- [LMS Integrations](https://help.schoolday.com/knowledge/lms-integrations?hsLang=en#main-content)

    - [Coursera Integration Video Guides](https://help.schoolday.com/knowledge/lms-integrations?hsLang=en#coursera-integration-video-guides)
    - [Coursera Platform Integration](https://help.schoolday.com/knowledge/lms-integrations?hsLang=en#coursera-platform-integration)
    - [Qwiklabs Platform Integration](https://help.schoolday.com/knowledge/lms-integrations?hsLang=en#qwiklabs-platform-integration)
    - [LMS Integrations instructions](https://help.schoolday.com/knowledge/lms-integrations?hsLang=en#lms-integrations-instructions)
- [Resource Management (App Store)](https://help.schoolday.com/knowledge/resource-management-app-store?hsLang=en#main-content)

    - [Users & Classes](https://help.schoolday.com/knowledge/resource-management-app-store?hsLang=en#users-classes)
    - [Resources](https://help.schoolday.com/knowledge/resource-management-app-store?hsLang=en#resources)
    - [Access & Security](https://help.schoolday.com/knowledge/resource-management-app-store?hsLang=en#access-security)
- [Privacy Governance Console (PGC)](https://help.schoolday.com/knowledge/privacy-governance-console-pgc?hsLang=en#main-content)

    - [Get Started](https://help.schoolday.com/knowledge/privacy-governance-console-pgc?hsLang=en#get-started)
    - [Monitor and Report](https://help.schoolday.com/knowledge/privacy-governance-console-pgc?hsLang=en#monitor-and-report)
    - [Govern Apps](https://help.schoolday.com/knowledge/privacy-governance-console-pgc?hsLang=en#govern-apps)
- [For Parents/Students](https://help.schoolday.com/knowledge/for-parents-students?hsLang=en)
- [For Vendors](https://help.schoolday.com/knowledge/for-vendors?hsLang=en)
- [Updates](https://help.schoolday.com/knowledge/updates?hsLang=en#main-content)

    - [2026](https://help.schoolday.com/knowledge/updates?hsLang=en#2026)
    - [2025](https://help.schoolday.com/knowledge/updates?hsLang=en#2025)
    - [2024](https://help.schoolday.com/knowledge/updates?hsLang=en#2024)
    - [2023](https://help.schoolday.com/knowledge/updates?hsLang=en#2023)
    - [2022](https://help.schoolday.com/knowledge/updates?hsLang=en#2022)
- [Reference](https://help.schoolday.com/knowledge/reference?hsLang=en#main-content)

    - [APIs](https://help.schoolday.com/knowledge/reference?hsLang=en#apis)
    - [CSV File Formats](https://help.schoolday.com/knowledge/reference?hsLang=en#csv-file-formats)

[![SchoolDay logo](https://help.schoolday.com/hs-fs/hubfs/schoolday-logo%20(300%20x%20100%20px)%20(1).png?width=300&height=100&name=schoolday-logo%20(300%20x%20100%20px)%20(1).png "SchoolDay logo")](http://schoolday.com)

<https://www.linkedin.com/company/schooldayinc> <https://x.com/schooldayinc> <http://facebook.com/schooldayinc> [mailto:support@schoolday.com](mailto:support@schoolday.com)

Copyright © 2025, SchoolDay, Inc.