Bejelentett számonkérések lekérése
Kérés a szervertől
GEThttps://[instituteCode].e-kreta.hu/ellenorzo/v3/sajat/BejelentettSzamonkeresek?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)
[
{
"Uid": "12345",
"Datum": "2022-01-01T12:00:00Z",
"BejelentesDatuma": "2023-02-02T00:00:30Z",
"RogzitoTanarNeve": "Gipsz Jakab",
"OrarendiOraOraszama": 2,
"Tantargy": {
"Uid": "123456",
"Nev": "Történelem",
"Kategoria": {
"Uid": "9876,Tortenelem",
"Nev": "Tortenelem",
"Leiras": "Történelem"
},
"SortIndex": 0
},
"TantargyNeve": "Történelem",
"Temaja": "Magyarország pusztulása a 21. században",
"Modja": {
"Uid": "987654,AdatszotarElem",
"Nev": "AdatszotarElem",
"Leiras": "Rövid dolgozat"
},
"OsztalyCsoport": {
"Uid": "876543"
}
},
...
]
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"
}
]
}
Helytelen bearer token: (401 Unauthorized)
invalid_grant
Structure: List<AnnouncedTest>
C# class file: AnnouncedTest.cs
| Field name | Variable name | Variable type |
|---|---|---|
| TantargyNeve | subjectName | string |
| BejelentesDatuma | announcedAtAsString | string |
| OrarendiOraOraszama | classScheduleNumber | int |
| Datum | dateAsString | string |
| OsztalyCsoport | group | UidStructure |
| Modja | mode | ValueDescriptor |
| Tantargy | subject | SubjectDescriptor |
| RogzitoTanarNeve | teacher | string |
| Temaja | theme | string |
| Uid | uid | string |
cURL:
curl "https://{instituteCode}.e-kreta.hu/ellenorzo/v3/sajat/BejelentettSzamonkeresek?datumTol={datumTol}&datumIg={datumIg}" -H "apiKey: 21ff6c25-d1da-4a68-a811-c881a6057463" --oauth2-bearer "{accessToken}"