Understanding Organization Hierarchies

Introduction to Organizations

Currently, there are two types of organizations in MAP: schools and districts. Districts are the top level of the hierarchy. Schools always belong to a district. 

Note: all of the endpoints mentioned below require these header parameters:

  1. Content-Type (This would be 'application/json')
  2. apikey (The unique Consumer Key for the App)
  3. Authorization (The OAuth2 bearer access token obtained from /auth/v1/token)

Districts

To retrieve the list of districts an App has access to, issue a GET call to the following endpoint:

https://api.nwea.org/organizations/v1/districts

 

Example cURL command and response:

curl -X GET --header "grant_type: client_credentials" --header "apikey: xNM70DRInasXls8lc8vWViHE6bCYyAAw" --header "Authorization: Bearer CtAmOTflfA9t9aEnR2jFwv2nj8Pu" "https://api.nwea.org/organizations/v1/districts"

HTTP/1.1 200 OK

Connection:
keep-alive
Content-Length:
198
Content-Type:
application/json; charset=utf-8
Date:
Wed, 19 Jul 2017 21:41:24 GMT
ETag:
W/"c6-0oYOur2I9JpNbGI/UPF9pFWUzuY"
Server:
Apigee Router
X-Powered-By:
Express
[
  {
    "districtBid": "fdcb5f6a-51c1-4368-82e6-d177da98791f",
    "districtName": "NWEA Sample District"
  },
  {
    "districtBid": "6b8a094c-f946-41a1-8176-522523959263",
    "districtName": "Portland Public School District"
  }
]

 

To get information on a single district, issue a GET call to the following endpoint:

https://api.nwea.org/organizations/v1/districts/{districtBid}

 

Example cURL command and response:

curl -X GET --header "grant_type: client_credentials" --header "apikey: xNM70DRInasXls8lc8vWViHE6bCYyAAw" --header "Authorization: Bearer CtAmOTflfA9t9aEnR2jFwv2nj8Pu" "https://api.nwea.org/organizations/v1/districts/fdcb5f6a-51c1-4368-82e6-d177da98791f"

HTTP/1.1 200 OK

Connection:
keep-alive
Content-Length:
92
Content-Type:
application/json; charset=utf-8
Date:
Wed, 19 Jul 2017 21:42:59 GMT
ETag:
W/"5c-rl39SztVsaeE21SIn2FLOF7OU9U"
Server:
Apigee Router
X-Powered-By:
Express
{
  "districtBid": "fdcb5f6a-51c1-4368-82e6-d177da98791f",
  "districtName": "NWEA Sample District"
}

Schools

To retrieve the list of all schools an App has access to, issue a GET call to the following endpoint:

https://api.nwea.org/organizations/v1/schools

 

Example cURL command and response:

curl -X GET --header "grant_type: client_credentials" --header "apikey: xNM70DRInasXls8lc8vWViHE6bCYyAAw" --header "Authorization: Bearer CtAmOTflfA9t9aEnR2jFwv2nj8Pu" "https://api.nwea.org/organizations/v1/schools"

HTTP/1.1 200 OK

Connection:
keep-alive
Content-Length:
594
Content-Type:
application/json; charset=utf-8
Date:
Wed, 19 Jul 2017 21:43:46 GMT
ETag:
W/"252-y7pxxFMhtYy3gDdXerQ+QGjS0jA"
Server:
Apigee Router
X-Powered-By:
Express
[
  {
    "schoolBid": "deda443f-f59a-4822-bea5-e782521bbc49",
    "schoolName": "Mt. Bachelor Middle School",
    "districtBid": "fdcb5f6a-51c1-4368-82e6-d177da98791f"
  },
  {
    "schoolBid": "7d9511fb-12c9-4838-a80e-1dc1ce8a3d8e",
    "schoolName": "Mt. Hood High School",
    "districtBid": "fdcb5f6a-51c1-4368-82e6-d177da98791f"
  },
  {
    "schoolBid": "fbea5e90-55a6-4f28-afff-73a790bb2e66",
    "schoolName": "St. Helens Elementary School",
    "districtBid": "6b8a094c-f946-41a1-8176-522523959263"
  },
  {
    "schoolBid": "16a2f795-f5b6-4df0-bdab-39348be67be3",
    "schoolName": "Three Sisters Elementary School",
    "districtBid": "6b8a094c-f946-41a1-8176-522523959263"
  }
]

 

To retrieve the information on a single school, issue a GET call to the following endpoint:

https://api.nwea.org/organizations/v1/schools/{schoolBid}

 

Example cURL command and response:

curl -X GET --header "grant_type: client_credentials" --header "apikey: xNM70DRInasXls8lc8vWViHE6bCYyAAw" --header "Authorization: Bearer CtAmOTflfA9t9aEnR2jFwv2nj8Pu" "https://api.nwea.org/organizations/v1/schools/deda443f-f59a-4822-bea5-e782521bbc49"

HTTP/1.1 200 OK

Connection:
keep-alive
Content-Length:
147
Content-Type:
application/json; charset=utf-8
Date:
Wed, 19 Jul 2017 21:44:55 GMT
ETag:
W/"93-J1CY1kIGQGjWHcrxDmx7WBW+W80"
Server:
Apigee Router
X-Powered-By:
Express
{
  "schoolBid": "deda443f-f59a-4822-bea5-e782521bbc49",
  "schoolName": "Mt. Bachelor Middle School",
  "districtBid": "fdcb5f6a-51c1-4368-82e6-d177da98791f"
}

Up next: Gathering Student Data