Migrated from Redmine #683 | Author: Radim Keske Status: New | Priority: Normal | Created: 2021-04-12
Following message with questions should be directed to Ingvar, which communicates with me on upwork.
to summarize if I understand what you want, here are steps to accomplish your target
1. create a GUI program with settings and editable api host, api secret. Apart from settings there should be presented list of databases the user wants to fetch (user can check mark db he/she is interested in) - I assume those settings should be preserved to next sessions, unless user changes them
2. is not much clear to me, if reports should be generated periodically or only on user interaction - e.g. user clicks on button and script will fire requests to API endpoints, collecting data, and serveing them as CSV back to user, or displaying error if sync was unsucessfull, and next attempt should be done in 5 minutes
questions I have
--------------------
- where do I get list of databases to choose from
- by call id you mean authentication header? with which user is allowed to request details API endpoint, if we do not have it, we cant make that request.. so I assume I will get so called `call id` by authenticating to cluster and once I have that `id` I can freely request details data
- should be returned CSV data stored onto hard drive, and override last results file, or user should have control about the file name/location e.g. display download Dialog as in browser downloads
- where do I get variables called - [[ host ]], [[ cluster ]], [[ key ]], [[ status ]], [[ token ]], [[ company_login ]]
also how to decide with which params API request for details should be fired? should user have options to alter following fields
{
"filter": {
"created_date_from": "2021-01-01",
"created_date_to": "2021-03-31",
"date_from": "2021-01-02",
"date_to": "2021-03-29",
"event_id": "2",
"unit_group_id": "7",
"client_id": "12",
"booking_type": "non_cancelled"
},
"export_columns": [
],
"order_direction": "asc",
"order_field": "record_date"
}
before firing the request? or it should be presettted with some default values?
Cool, I think I already know what needs to be accomplished, thank you for providing me with endpoints, if I stumble upon some api issues, I will add comment here.
ok got my testing account radim.keske@gmail.com at demoaccount.cluster.simplybook.pro but I cant auth myself as cluster here are my headers and endpoint URI
POST https://cluster.simplybook.pro/auth (I have also tried https://demoaccount.cluster.simplybook.pro/auth without success)
HEADERS
{"Content-Type": "application/json", "X-Cluster": "demoaccount"}
BODY
{"key": }
Either I am getting html response, or unathorized error. Could you please specify the full uri instead of {{ host }}/auth' could you please write down what the correct uri should be if I want to auth as cluster demoaccount.cluster.simplybook.pro. Also what should be in {{ cluster }} variable, is it demoaccount`? the same with variable {{ key }} is it API_KEY that I generated in my user profile in that cluster? Cant see cluster auth in docummentations, thats why I am asking.
Thank you Dmitry! exactly what I was looking for - so to be sure what URIs then I should use for getting list of companies in that cluster? is it still cluster-api.simplybook.pro/companies?filter[status]=active?