Result
Depending on the amount of data, an import may take some seconds. As the response will be sent after the import is finished, make sure to allow a request duration of at least 30 seconds.
Each import will return a result in JSON format. If the import was successful, the returned http-status code will be 200 OK
. Any other
status code means that there were some issues with the import. Warnings in the JSON indicate inconsistent data, however the import
succeeds even with warnings.
field | type | description |
---|---|---|
importResult | String | Result of the import. Either SUCCESS or ERROR . |
importWarnings | String[] | Warnings regarding the imported data. Empty list if there were no warnings. |
globalValidationResult | String? | Result of the global data validation. Either SUCCESS , ERROR or null . |
globalValidationWarnings | object? | Cross entity integrity warnings. null when validation did not run or failed. |
globalValidationWarnings.user | String[] | Integrity warnings regarding users. |
globalValidationWarnings.student | String[] | Integrity warnings regarding students. |
globalValidationWarnings.organization | String[] | Integrity warnings regarding organizations. |
globalValidationWarnings.course | String[] | Integrity warnings regarding courses. |
globalValidationWarnings.group | String[] | Integrity warnings regarding groups. |
globalValidationWarnings.event | String[] | Integrity warnings regarding events. |
exception | String? | Contains the error message if importResult is ERROR . |
Success example
e.g. importing events HTTP-Status: 200
{
"importResult": "SUCCESS",
"importWarnings": [
"Could not import some events as the corresponding course is missing. Events that could not be imported: <idOfEventWithMissingCourse> (Course: <idOfMissingCourse>)"
],
"globalValidationResult": "SUCCESS",
"globalValidationWarnings": {
"user": [],
"student": [
"Some students have no corresponding user object: <userIdOfStudentWithMissingUser>"
],
"organization": [],
"course": [],
"group": [],
"event": []
},
"exception": null
}
Error example
HTTP-Status: 400
{
"importResult": "ERROR",
"importWarnings": [],
"globalValidationResult": null,
"globalValidationWarnings": null,
"exception": "Tried to import an empty list, please check payload format."
}