Create Application to Institution Links

POST /app/:appID/links/institutions



Create application to institution links. This will add the provided set of institutions to the current set of linked institutions and make it possible for the given application to read data associated with those institutions.

Institution information can be collected via the GET /institutions REST end-point.

Resource URL

https://api.ideasystem.org/v1/app/appID/links/institutions

Data Parameters (JSON Body)

The JSON body will contain a list of institution IDs that should be linked to the specified application.

Note: All institution IDs that are invalid or unknown will be ignored.

Response

The response will be an HTTP 200 with a JSON body. HTTP 200 does NOT imply all the given institutions were linked to the application. The body will contain the list of currently linked institutions.

HTTP Error Status Codes

  • If the given application ID cannot be found, a HTTP 404 (Not Found) will be returned.

  • If the application name/key you are using doesn't have access to this REST end-point, you will get a HTTP 403 (Forbidden) error.

  • If the application name/key you are using has read-only access, you will get a HTTP 401 (Unauthorized) error.

  • If the application name/key you are using has does not have app admin access, you will get a HTTP 401 (Unauthorized) error.

  • If there is an issue with the backend, a HTTP 500 (Internal Server Error) is returned.

Response Parameters (JSON Body)

The JSON body will contain a list of the currently linked institution IDs.

Example

This will update an application with ID 1234 to include links to institutions 654321 and 654322. Note: application 1234 currently links to institution 543210.

Request

POST /v1/app/1234/links/institutions

POST Data (as JSON)

[
    654321, 654322
]

Response (as JSON)

HTTP 200
[
    543210, 654321, 654322
]