Hello,
I’ve been asked to get a list of all our users, with emails and affiliations. I thought this would be a good use for the web api, so I’ve pip installed indico-client (version 6.8.0) and I’m trying one of the examples.
I’ve generated an api token for an admin account and saved it locally. The start of the script is:
#!/usr/bin/python3
from datetime import datetime, timedelta
from indico import IndicoClient, IndicoConfig
from indico.queries import JobStatus, RetrieveStorageObject
from indico.queries.usermetrics import (
GetUserSummary,
GetUserSnapshots,
GenerateChangelogReport,
GetUserChangelog,
)
from indico.types.user_metrics import UserSummary
config = IndicoConfig(
host='indico.esa.int', # or your custom app location
api_token_path='/home/cro/.config/indico.token' # path to your API token
)
client = IndicoClient(config=config)
However, here it fails, trying to access “/auth/users/refresh_token”. Indeed this suburl does not exist.
Can someone please tell me what I have missed?
Alternatively, would I be better to use an sql quey on the database itself? In this case, is the database schema available?
Thanks for any help.
Chris