How to export Event Logo using the REST API?

Hi,

I’m developing a procedure that exports events from Indico to import them into a CMS.

I’m using the REST API to achieve this goal.

However, it seems that the JSON files of both the category and the event don’t contain the URL of the logo of the event.

Is it possible to retrieve the URL of the event logo using the REST API?

Thank you very much

Claudio

Which endpoint are you using? And what’s the JSON you get?

Hi,
I’m using these endpoints:

  • export/event/69.json?occ=yes&pretty=yes:
  • export/categ/1.json?pretty=yes

I can’t see the event logo.

Claudio B.

Oh, I missed the logo, I thought you meant the event URL itself. The logo URL is indeed not included in any of the APIs.

1 Like

ok, thank you.
We are using Indico as management tool for events, and we want populate the web sites of the organisation without inserting them again with a brief description of the event and the link to Indico event.
I can find all the fields needed in the category endpoint except for the logo of the event. I will get it in a different way.

Claudio

Try applying this patch:

diff --git a/indico/modules/events/api.py b/indico/modules/events/api.py
index 3f1315cc47..96a8a27121 100644
--- a/indico/modules/events/api.py
+++ b/indico/modules/events/api.py
@@ -600,6 +600,7 @@ class CategoryEventFetcher(IteratedDataFetcher, SerializerBase):
             'note': build_note_api_data(event.note),
             'roomFullname': event.room_name,
             'url': event.external_url,
+            'logo': event.external_signed_logo_url,
             'creationDate': self._serialize_date(event.created_dt),
             'creator': self._serialize_person(event.creator, person_type='Avatar', can_manage=can_manage),
             'hasAnyProtection': event.effective_protection_mode != ProtectionMode.public,

That should add a logo key in both the event and category API endpoints you’re using.

I wouldn’t mind adding this in the next release.

1 Like

Hi,
thank you I didn’t kow you are a developer of Indico.
Thank you that’s very kind.

Claudio B.

If you need a more fine-grained control, maybe take at this plugin, which we use to either provide a custom image, the event logo or the category logo to an external application.

Björn

1 Like

Hi thank you @bpedersen2,
I’ll take a look at your plugin.
I needed only a simple way to import a few fields of an event into a project of our organization that allows to create small sites for laboratories or research groups.
The goal is to populate a section of these WordPress sites with events without having to create them a second time.
I’ve solved it for now using the web service that returns the categories and with a quick parse of the page to retrieve the logo.
It seems to work correctly.
Since I don’t manage the Indico serve I can’t modify its code.
If I understand correctly I could use your plugin to achieve the same thing.

Thank you

Claudio B.