Open API

Infinite Education exposes open API which could be easily integrated with your application or web site

Protocols: REST, GraphQL


Authentication

Data query could be made without any authentication

In order to use any modification queries, you should pass JWT token to the API. To get JWT token, you should first pass your credentials to special authentication API, which will return you the token and its lifetime:

POST https://infinite.education/auth/authenticate
Content-Type: application/json

{
    "email": "<your login here>",
    "password": "******"
}
Server would return the response:
{
  "success": true,
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjxpZCBvZiB5b3VyIHVzZXI+IiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjpbInVzZXIiLCIiXSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoiPHlvdXIgbG9naW4+IiwiZXhwIjoxNjcyODgyNTQ3LCJpc3MiOiJodHRwczovL2luZmluaXRlLmVkdWNhdGlvbiIsImF1ZCI6IkluZkVkdSJ977+9Bu+/vXUX77+9MgJ3Y++/vQ0K77+977+9EGsM77+9N++/ve+/ve+/ve+/vQNu77+977+977+95KKtBQ==",
  "expirationDate": "2023-01-05T04:35:47.0612444+03:00",
  "userId": "<id if your user>"
}

Take the token from above result and pass it in Authorization header with "Bearer" schema, e.g:

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjxpZCBvZiB5b3VyIHVzZXI+IiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjpbInVzZXIiLCIiXSwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvZW1haWxhZGRyZXNzIjoiPHlvdXIgbG9naW4+IiwiZXhwIjoxNjcyODgyNTQ3LCJpc3MiOiJodHRwczovL2luZmluaXRlLmVkdWNhdGlvbiIsImF1ZCI6IkluZkVkdSJ977+9Bu+/vXUX77+9MgJ3Y++/vQ0K77+977+9EGsM77+9N++/ve+/ve+/ve+/vQNu77+977+977+95KKtBQ==


Making queries

Infinite Education exposes GraphQL API with open schema. You could make requests to it via simple REST calls, e.g.

POST https://infinite.education/g
Content-Type: application/json

{
    "query": "query($text: String!) { searchSkills(text: $text) { id, name }}",
    "variables": {
        "text": "test"
    }
}
                
Please read more about GraphQL on https://graphql.org/learn/

Detailed API & data specification could be found on https://infinite.education/g/