Feljegyzések lekérése
Kérés a szervertől
GEThttps://[instituteCode].e-kreta.hu/ellenorzo/v3/sajat/Feljegyzesek?datumTol={datumTol}&datumIg={datumIg} (opcionális)
HEADERapiKey = 21ff6c25-d1da-4a68-a811-c881a6057463 (opcionális)
HEADERAuthorization = Bearer xxxxxxxxxx (Bearer tokened)
Válasz a szervertől
Sikeres lekérdezés: (200 OK)
[
{
"Tartalom": "xxxxxxxxxx",
"KeszitesDatuma": "xxxxxxxxxx",
"Datum": "xxxxxxxxxx",
"OsztalyCsoport": {
"Uid": "xxxxxxxxxx"
},
"LattamozasDatuma": "xxxxxxxxxx",
"KeszitoTanarNeve": "xxxxxxxxxx",
"Cim": "xxxxxxxxxx",
"Tipus": {
"Leiras": "xxxxxxxxxx",
"Nev": "xxxxxxxxxx",
"Uid": "xxxxxxxxxx"
},
"Uid": "xxxxxxxxxx"
},
...
]
A datumTol és a datumIg paraméter között több van mint 1 hónap: (400 Bad Request)
{
"ExceptionId": "xxxxxxxxxx",
"ExceptionType": "ModelValidacio",
"Message": "Validációs hiba történt!",
"ErrorList": [
{
"PropertyName": "custom_1",
"Message": "A DatumTol és a DatumIg paraméterek meg vannak adva, de maximum 1 hónap intervallum kérdezhető le!",
"ExceptionType": "ModelValidacio"
}
]
}
A datumTol paraméter nagyobb, mint a datumIg paraméter: (400 Bad Request)
{
"ExceptionId": "xxxxxxxxxx",
"ExceptionType": "ModelValidacio",
"Message": "Validációs hiba történt!",
"ErrorList": [
{
"PropertyName": "custom_1",
"Message": "A DatumTol és a DatumIg paraméterek meg vannak adva, de a DatumTol nagyobb, mint a DatumIg értek!",
"ExceptionType": "ModelValidacio"
}
]
}
Ismeretlen hiba: (500 Internal Server Error)
{
"ExceptionId": "xxxxxxxxxx",
"ExceptionType": "None",
"Message": "Ismeretlen hiba történt!",
"ErrorList": null
}
Helytelen bearer token: (401 Unauthorized)
invalid_grant
Structure: List<Note>
C# class file: Note.cs
| Field name | Variable name | Variable type |
|---|---|---|
| Tartalom | content | string |
| KeszitesDatuma | creatingTimeAsString | string |
| Datum | dateAsString | string |
| OsztalyCsoport | group | UidStructure |
| LattamozasDatuma | seenByTutelaryAsString | string |
| KeszitoTanarNeve | teacher | string |
| Cim | title | string |
| Tipus | type | ValueDescriptor |
| Uid | uid | string |
cURL:
curl "https://{instituteCode}.e-kreta.hu/ellenorzo/v3/sajat/Feljegyzesek?datumTol={datumTol}&datumIg={datumIg}" -H "apiKey: 21ff6c25-d1da-4a68-a811-c881a6057463" --oauth2-bearer "{accessToken}"