Error: No data Xibo Remote Dataset

Hi,

I’m recieving a successful JSON response from my API on postman.
I am trying to connect to this api from Xibo remote dataset, it gives me the following error:
"Unable to get Data for TimeTable because cURL error 0: The cURL request was retried 3 times and did not succeed. The most likely reason for the failure is that cURL was unable to rewind the body of the request and subsequent retries resulted in the same error. Turn on the debug option to see what went wrong.

JSON Response on postman:
{
    "Status": {
        "StatusCode": 200,
        "Reason": "OK",
        "X-bla-Event-Id": "3ff8525c-5433-11ea-abb1-0a2835080000-1"
    },
    "TeachingSessions": [
        {
            "AcademicYear": "2020",
            "StaffUID": null,
            "StaffName": null,
            "StaffDisplayName": null,
            "ActivityName": "ECON1101_S1-TutA/51",
            "ActivityType": "Tutorial",
            "ActivityTypeDescription": "Tutorial",
            "ModuleName": "ECON1101_S1",
            "ModuleDescription": "Microeconomics 1",
            "ModuleConvener": "Dr Dana",
            "ModuleHAL": "programsandcoursescom/2019/course/ECON1101",
            "ActivityDuration": 120,
            "TeachingSessionStartDateTime": null,
            "TeachingSessionEndDateTime": null,
            "LocationCampus": null,
            "LocationCampusName": null,
            "LocationID": null,
            "LocationName": null,
            "LocationDescription": null,
            "LocationCapacity": null,
            "LocationURL": null
        },
        {
            "AcademicYear": "2020",
            "StaffUID": null,
            "StaffName": null,
            "StaffDisplayName": null,
            "ActivityName": "ECON1102_S1-TutA/11",
            "ActivityType": "Tutorial",
            "ActivityTypeDescription": "Tutorial",
            "ModuleName": "ECON1102_S1",
            "ModuleDescription": "Macroeconomics 1",
            "ModuleConvener": "Dr Timo Henckel",
            "ModuleHAL": "programsandcoursescom/2019/course/ECON1102",
            "ActivityDuration": 60,
            "TeachingSessionStartDateTime": null,
            "TeachingSessionEndDateTime": null,
            "LocationCampus": null,
            "LocationCampusName": null,
            "LocationID": null,
            "LocationName": null,
            "LocationDescription": null,
            "LocationCapacity": null,
            "LocationURL": null
        },
        {
            "AcademicYear": "2020",
            "StaffUID": null,
            "StaffName": null,
            "StaffDisplayName": null,
            "ActivityName": "ECON1101_S1-TutA/33",
            "ActivityType": "Tutorial",
            "ActivityTypeDescription": "Tutorial",
            "ModuleName": "ECON1101_S1",
            "ModuleDescription": "Microeconomics 1",
            "ModuleConvener": "Dr Dana",
            "ModuleHAL": "programsandcoursescom/2019/course/ECON1101",
            "ActivityDuration": 120,
            "TeachingSessionStartDateTime": null,
            "TeachingSessionEndDateTime": null,
            "LocationCampus": null,
            "LocationCampusName": null,
            "LocationID": null,
            "LocationName": null,
            "LocationDescription": null,
            "LocationCapacity": null,
            "LocationURL": null
        },
        {
            "AcademicYear": "2020",
            "StaffUID": null,
            "StaffName": null,
            "StaffDisplayName": null,
            "ActivityName": "ECON1101_S1-TutA/42",
            "ActivityType": "Tutorial",
            "ActivityTypeDescription": "Tutorial",
            "ModuleName": "ECON1101_S1",
            "ModuleDescription": "Microeconomics 1",
            "ModuleConvener": "Dr Dana",
            "ModuleHAL": "programsandcoursescom/2019/course/ECON1101",
            "ActivityDuration": 120,
            "TeachingSessionStartDateTime": null,
            "TeachingSessionEndDateTime": null,
            "LocationCampus": null,
            "LocationCampusName": null,
            "LocationID": null,
            "LocationName": null,
            "LocationDescription": null,
            "LocationCapacity": null,
            "LocationURL": null
        },
        {
            "AcademicYear": "2020",
            "StaffUID": null,
            "StaffName": null,
            "StaffDisplayName": null,
            "ActivityName": "ECON1101_S1-TutA/06",
            "ActivityType": "Tutorial",
            "ActivityTypeDescription": "Tutorial",
            "ModuleName": "ECON1101_S1",
            "ModuleDescription": "Microeconomics 1",
            "ModuleConvener": "Dr Dana",
            "ModuleHAL": "programsandcoursescom/2019/course/ECON1101",
            "ActivityDuration": 120,
            "TeachingSessionStartDateTime": null,
            "TeachingSessionEndDateTime": null,
            "LocationCampus": null,
            "LocationCampusName": null,
            "LocationID": null,
            "LocationName": null,
            "LocationDescription": null,
            "LocationCapacity": null,
            "LocationURL": null
        }
]
}

Here is my xibo setup:

Authentication is basic auth, it works with postman.

My data root is set as TeachingSessions

Please help me with what I’m missing here.

Regards,
Harish

Hi and welcome to the community and Xibo.

That error is a raw CURL error passed up to Xibo from curl, so its not one of our errors directly. A little Googling shows there are various posts about the error, but the most common theme is that the remote server is returning a body without headers (perhaps you can verify that in Postman to see if it is happening)?

Hi Dan,

Thanks for your response.

These are the headers that are being returned:

Is there anything missing or anything that Xibo will not recognise?

Our integration team is unable to find out the root cause for that issue and I’m seeking help to see if there are other ways of debugging this.

Regards,
Harish

My guess is that the Content-Length header is missing and this is the cause of the problem - but I hasten to add that this is only a guess.

Hi Dan,

Thank for your response.

Do you know if Xibo expects a standard set of headers? If so is there any documentation on it?

I assumed content-Length would only be returned if we are calling a web-service? In this case we are trying to call an API.
Long shot but wondering if there is an easy way to turn off this header on our xibo instance in any way?

Thanks so much for your prompt responses.

Regards,
Harish

Content-Length isn’t an optional header - we’re talking about the HTTP spec here and not anything to do with Xibo :slight_smile:

If you look at any response from any web server you would expect to see a Content-Length header.

I hope you find a resolution!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.