Partner API

This article covers the setup, workflow steps, and the Partner Integration API details in GG4L. 

In this article

Technical Flow​

Authentication

Discovery API

The Partner API provides access to data in the Vendor`s dashboard. It consists of Discovery API that allows you as a partner to automatically retrieve any district setup data with your app.

Technical Flow

  1. Log in with your Vendor`s user credentials to the School Passport.
  2. Go to Application Settings > Delivery Config > Show Onboarding API Credentials to obtain Partner API Credentials.
  3. Use Partner API Credentials for authorization.
  4. Using Discovery API, get connected districts' integration data, such as Client ID and Client Secret.
  5. Fetch the roster of the specific shared districts with the OneRosterAPI.

Authentication

Once your app environment in GG4L Connect is created, GG4L generates a unique OAuth Client ID and Client Secret for them. To generate an OAuth token, you need to first copy these credentials from the Application Settings > Delivery Config > Show Onboarding API Credentials.

Access the Partner API by using a REST client such as the Postman, with the following parameters.

METHOD

POST

URL

https://{hostname}/datahub/oauth/token

BODY

grant_type=client_credentials

HEADERS

Authorization: Basic Base64.encode(‘{client_id}:{client secret}’)

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's type. Always ‘bearer’

expires_in

Integer

Expiration time in seconds

scope

String

List of scopes that define data access level

Discovery API

GG4L Connect provides an API for retrieving district setup data (including API Client ID and Secret). The API allows for the automation of access to roster data of the new customers.

Request:

METHOD

GET

URL

/datahub/services/vendor/onboarding/credentials

BODY

empty

HEADERS

Authorization: bearer {access_token_value}

Response (on successful authorization):

[
  {
    "districtName": "District 1",
    "clientId": "app.abc",
    "clientSecret": "mmmmmmm=",
    "createdTimestamp": "2024-02-27T15:28:47.147Z",
    "lastDataProcessingCompleteTimestamp": "2024-03-05T19:03:07.903Z",
    "tokenUrl": "{connect-host}/ep-url",
    "apiUrl": "{data-api-host}/ep-url",
    "districtGuid": "District 1 GUID",
    "expiryDate": "2027-12-31T21:59:59.000Z",
    "hasAccessIssues": false,
    "ncesId": "0000000"
  },
  {
    "districtName": "District 2",
    "clientId": "app.qwer",
    "clientSecret": "zzzzzzzzz=",
    "createdTimestamp": "2024-02-27T15:28:47.147Z",
    "lastDataProcessingCompleteTimestamp": "2024-03-05T19:03:07.903Z",
    "tokenUrl": "{connect-host}/ep-url",
    "apiUrl": "{data-api-host}/ep-url",
    "districtGuid": "District 2 GUID",
    "expiryDate": "2027-12-31T21:59:59.000Z",
    "hasAccessIssues": false,
    "ncesId": "1234567"
},
   ...
]

Field

Type

Description

clientId

String

OAuth Client ID (for access to district’s roster data)

clientSecret

String

OAuth Client secret (for access to district’s roster data)

createdTimestamp

Instant

A timestamp of partner’s application activation for a district

lastDataProcessingCompleteTimestamp

Instant

A timestamp of district’s data being ready for consumption for partner’s application

tokenUrl

String

URL of the endpoint to retrieve access token

apiUrl

String

A base URL of One Roster API endpoints

districtGuid

String

GG4L’s ID of the district that shares data with the Vendor