I’m a Indico user with no access to server configuration. But I have editing rights on some event and it seems I have some API access. My goal is to use the API to do tedious timetable work. I created an API key. Following this page, I try to use the
/api/roomBooking/bookRoom.json entry point. But it requires a “roomid” which seems hard to get since everything else uses a room name. Of course I tried to use this entrypoint but I get a 403 error (despite this webpage claiming this information is guest allowed). I tried to use devtools to inspect a couple of requests, hoping to this this magic number somewhere, but no luck, even when I do use the website to create something in the timetable. Is there any place on the public website that leaks this roomid? Does the web interface uses this room booking API at all? Or you should I give on using the API as an end-user?
Thanks in advance for any clue!
You still need API access, so depending on the server config this may or may not require using an API token. “guest allowed” just means that it does not require you to be authenticated to access it at all.
If you want to get the room id manually I’d recommend to go in the room booking menu (
/rooms/) - if you check the requests there you should find it easily (e.g. when viewing the details of some room).
However, I’m pretty sure this API is not what you are looking for. It is part of the room booking module which is very separate from event management itself. You cannot use this API to create timetable entries etc.
If you want to automated that part, there is unfortunately no nice API yet - while all new developments are API-based (React frontend, RESTful API backend), the timetable is pretty legacy and thus still uses classic web forms (with some AJAX). However, sending those requests programmatically is not too hard - you just need to send a valid
indico_session cookie and the CSRF token (either in a header or as form data - just check how the various forms do it).
Thank you very much for this very fast response! Indeed it looks like this API is not what I am looking for, and what I’m looking for doesn’t exist. That explains why nothing seemed to fit and I was puzzled.
I’m not sure I’ll have the patience to spy on how forms create those timetable events. This is too bad because those forms are really painful for a three months long special trimester. Probably we are misusing this tool (but I don’t get to choose here).
Thanks for all your work!