Differences

This shows you the differences between two versions of the page.

Link to this comparison view

api:api_institutions [2016/09/08 14:49]
Lauri Elevant [Parameters]
api:api_institutions [2021/01/21 12:51]
Line 1: Line 1:
-====== /api/institutions ====== 
  
-===== HEAD, GET ===== 
- 
-List institutions using the filters set as parameters. The number of institutions is represented in the ''X-Count'' header - use the ''HEAD'' request to simply count the number of institutions matching the filters. Use the ''GET'' request to actually fetch them. 
- 
-**Note that in most use cases there will only be one institution in the system.** However, in exchange management setups as well as collaborative systems there may be a larger number of institutions. 
- 
-==== Syntax ==== 
- 
-  GET /api/institutions 
-  Host: apply.example.edu 
-  Authorization: DREAM apikey="..." 
- 
-==== Parameters ==== 
- 
-^ Name ^  ^ Description ^ Notes ^ 
-| ''byStatuses'' | Optional | List of statuses, currently limited to: ''Online'', ''Draft'' | [1] | 
-| ''byModes'' | Optional | ''Internal'' (DA user) or ''External'' (not users of DA, partner etc.) | [1] | 
-| ''byCountries'' | Optional | List of [[http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2|ISO 3166-1 alpha-2 country codes]] | [1] | 
- 
-  * // Note [1]: Lists can be either comma or space separated. All list items are combined with logical ''OR'' operators - in other words an institution is considered matching if it matches to any of the values in the list.// 
- 
-==== Response headers ==== 
- 
-  Content-Type: application/json 
-  Content-Length: 1456 
-  X-Count: 1 
- 
-==== Response example ==== 
- 
-  { 
-    "1": { 
-        "status": "Online", 
-        "mode": "Internal", 
-        "name": "Sample university", 
-        "country": "EE", 
-        "location": "Tallinn", 
-        "www": null, 
-        "erasmus": null, 
-        "registration": null, 
-        "departments": "/api/institutions/1/departments", 
-        "contacts": "/api/institutions/1/contacts" 
-    } 
-  }