GET educators - ocariot/api-gateway GitHub Wiki

Description

Returns a list with educators.

Permissions:

  • Only Admin user can list information of all educators.

Scope

educators:readAll

URL

GET https://localhost/v1/educators

Curl example

curl -X GET "https://localhost/v1/educators" -H "accept: application/json" -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response body

  • 200 Successful requisition.

    [
      {
        "id": "5db06595e59316737e2878a2",
        "username": "educator01",
        "institution_id": "5db05279fcfefe5c3de20497",
        "children_groups": [
          {
            "id": "5db065a5e59316737e2878a3",
            "name": "Group One",
            "children": [
              {
                "id": "5db05289fcfefe5c3de20498",
                "username": "BR0001",
                "institution_id": "5db05279fcfefe5c3de20497",
                "gender": "male",
                "age": 11
              }
            ],
            "school_class": "4th Grade"
          }
        ]
      }
    ]
    
  • 401 Unauthorized Error

  • 403 Permission Error

  • 429 Too Many Requests Error

  • 500 Internal Server Error

Query Strings (Optional)

Query strings are used as follows: there must be a question mark following the URL and providing the parameters for the desired operations. There are four possible operations: filtering, paging, limiting, and sorting.

All parameters can also be used together concatenated by the & character as follows:

https://localhost/v1/educators?username=*BR*&sort=username&page=1&limit=10

For more details about using Query Strings click here.