[#1276] Detailed report not working in new version of the APIs

Migrated from Redmine #1276 | Author: Matteo Frigerio
Status: Feedback | Priority: Immediate, there is BUG! | Created: 2024-09-10


Creating the report with the sequent post


curl --location 'https://user-api-v2.simplybook.pro/admin/detailed-report' \
--header 'Content-Type: application/json' \
--header 'X-Company-Login: mycompany' \
--header 'X-Token: tokenfromauthentication' \
--data '{
  "filter": {
    "created_date_from": "2024-01-01",
    "created_date_to": "2024-08-08",
    "date_from": "2024-01-01",
    "date_to": "2024-08-08",
    "event_id": "32",
    "booking_type": "non_cancelled"  },
  "export_columns": ["user_id", "is_confirmed" , "additional_fields", "start_datetime", "end_datetime", "category", "client", "can_be_edited","status"]
}'

I obtain


{
    "id": "136"
}

But then sending


curl --location 'https://user-api-v2.simplybook.pro/admin/detailed-report/136' \
--header 'Content-Type: application/json' \
--header 'X-Company-Login: mycompany' \
--header 'X-Token: tokenfromauthentication'

I obtain


{
    "code": 404,
    "message": "The report file does not exist or was deleted",
    "data": [],
    "message_data": []
}

Matteo Frigerio wrote:

Any news about this issue? It’s quite urgent

Dmytro Bondarev wrote:

Hi, could you please provide company login to further checking?

Matteo Frigerio wrote:

Dmytro Bondarev wrote:

Hi, could you please provide company login to further checking?

bbooking (in this case; we also use provaub and unibocconi)

Dmytro Bondarev wrote:

Hi, you passed invalid columns in export_columns, you can just pass empty array to the export_columns to get all data.

Matteo Frigerio wrote:

Dmytro Bondarev wrote:

Hi, you passed invalid columns in export_columns, you can just pass empty array to the export_columns to get all data.

thanks, but why an error was raised at the moment of the retrieval of the report and not at the creation? I assumed it has been created correctly, since an id has been returned

Dmytro Bondarev wrote:

Sorry for the inconvenience
The issue on our side, we will fix it.

Matteo Frigerio wrote:

Dmytro Bondarev wrote:

Sorry for the inconvenience
The issue on our side, we will fix it.

Thanks; another issue is that I just received “The limit of one report per 30 minutes was exceeded” even if it’s the first time a call the api today

Dmytro Bondarev wrote:

Hi, you can try again.

Matteo Frigerio wrote:

Now different calls (with different body) the detailed report api return the same report id and not a new one (this in bbocconi, in provaub it returns an id which leads to a “The report file does not exist or was deleted” when calling the get report)

Matteo Frigerio wrote:

Now different calls (with different body) the detailed report api return the same report id and not a new one (this in *bbooking, in provaub it returns an id which leads to a “The report file does not exist or was deleted” when calling the get report)

Dmytro Bondarev wrote:

Hi could you please provide HTTP request.

Matteo Frigerio wrote:


curl --location 'https://user-api-v2.simplybook.pro/admin/detailed-report' \
--header 'Content-Type: application/json' \
--header 'X-Company-Login: provaub' \
--header 'X-Token: myToken' \
--data '{
  "filter": {
    "created_date_from": "2024-01-01",
    "created_date_to": "2024-08-08",
    "date_from": "2024-05-01",
    "date_to": "2024-06-01",
    "event_id": "32",
    "booking_type": "non_cancelled"  },
  "export_columns": ["event_name","client_email","is_cancelled","Status"]
}'

resulted in id 23

curl --location 'https://user-api-v2.simplybook.pro/admin/detailed-report/23' \
--header 'Content-Type: application/json' \
--header 'X-Company-Login: provaub' \
--header 'X-Token: myToken' \
--data ''

resulted in


{
    "code": 404,
    "message": "The report file does not exist or was deleted",
    "data": [],
    "message_data": []
}

Matteo Frigerio wrote:

Any update on this one?

Matteo Frigerio wrote:

I’m still encountering this issue (“The report file does not exist or was deleted”) on report id returned by freshly created report in provaub (report id 28). Can you fix it somehow?

Dmytro Bondarev wrote:

Hi, please double check your filters. it result is empty file will not be returned.

Matteo Frigerio wrote:

Would not that be an error on the creation requests? The creation requests answer with a report id

Dmytro Bondarev wrote:

No, report generated in background thread. It is not possible to return result right away.

Matteo Frigerio wrote:

So the returned id is a lie?

Dmytro Bondarev wrote:

no, it is correct. but it will not be generated, because it is empty.