How to export a list of events

I need to export a complete list of events, but i cant find appropriate endpoint. I went through documentation https://docs.getindico.io/en/stable/http_api/exporters/event/# and also google but i did not find anything like get all events. Could anybody help?

Use https://docs.getindico.io/en/stable/http_api/exporters/categ/ with category ID 0 (root category).

hi,

Somehow exporting event information is returning the codes not the actual text in Cyrillic.
url: https://www/export/event/2.json?detail=sessions&pretty=yes
Exported text sample:

\u0414\u043e\u043a\u0442\u043e\u0440\u044b\u043d \u0437\u044d\u0440\u044d\u0433 \u0445\u0430\u043c\u0433\u0430\u0430\u043b\u0430\u0445 \u0445\u0443\u0440\u043b\u044b\u043d \u0437\u0430\u0440, \u0414\u044d\u044d\u0434 \u0431\u043e\u043b\u043e\u0432\u0441\u0440\u043e\u043b

"location":"\u042d\u0417\u0428\u0423\u0418\u0421-\u0438\u0439\u043d \u042d\u0440\u0434\u043c\u0438\u0439\u043d \u04e8\u0440\u0433\u04e9\u04e9 ",

What’s the problem there? JSON may encode unicode as \uXXXX escape sequences. Any standards-compliant JSON parser will correctly parse that location as ЭЗШУИС-ийн Эрдмийн Өргөө.

1 Like

hi,

sorry, i am still confused how to get list of the events. I have read the docs but can figure it out my bad. What would be the exact URL for getting the list of public events?

thanks

/export/categ/0.json would export events from all categories.

i have registered 3 events but /export/categ/0.json returns below result

{"count":0,"additionalInfo":{},"_type":"HTTPAPIResult","url":"https:\/www\/export\/event\/0.json","results":[],"ts":1616745632}

Should I use https://www/category/0/events.ics instead?

That will be empty as well if the JSON dump is empty.

Are you sure those events are public? Otherwise only authenticated API requests will return them…

That list is not empty it shows all 3 events. All three events are public.

Try ?nc=yes in case API response caching is enabled and you have a cached response from before those events existed/were public.

1 Like

thanks, that did it.

You may want to disable caching (setting it to 0) in the admin area. Especially on small instances it’s not particularly useful.

Cache TTL = 600 to Cache TTL = 0 ?

yes, that will do the job

1 Like

hi Gurus,

Do we have an API to get the total number of all events (past, present and future) registered on the indico database including all types? The one I found in the documentation returns whole data about the event, I could calculate it from there but just checking if such API is available.

thank you.
Batpurev

Does /category/0/statistics.json contain enough data for you? Otherwise the answer is no.