fetching metadata from the web service

56 views
Skip to first unread message

Steve Mansfield

unread,
May 14, 2026, 4:19:16 AM (yesterday) May 14
to golden-cheetah-users
Hello

Had a serious look through the docs and not seeing the answer to this.

I've added a metadata field "Strava_ID" and populated it for some rides, however when I try to query via the web service it returns nothing. The weird thing is that if I query for "metadata=all" it returns

"Strava_ID", "Calendar_Text", "Data", "Interval_Notes", "Interval_Goal"

but no actual value for Strava_ID

So I tried adding some text to the built-in metadata field Interval_Notes, and same thing, nothing back.

I looked in the activity JSON, and rideDB.json to see where else this field might be stored

What else to try?

TIA

Steve

Steve Mansfield

unread,
May 14, 2026, 7:30:26 AM (yesterday) May 14
to golden-cheetah-users
seems that the metadata field is only retrieved only after I restart GC, which is sub-optimal.

Ale Martinez

unread,
May 14, 2026, 8:19:35 AM (yesterday) May 14
to golden-cheetah-users
El jueves, 14 de mayo de 2026 a la(s) 8:30:26 a.m. UTC-3, quit...@gmail.com escribió:
seems that the metadata field is only retrieved only after I restart GC, which is sub-optimal.


To access unsaved data from an open athlete you can use the Python/R APIs.

Steve Mansfield

unread,
May 14, 2026, 6:45:08 PM (24 hours ago) May 14
to golden-cheetah-users
Hi, yes I did find that page, and the only reference to metadata is

"List Athlete Rides with Metrics and Metadata"

but nothing about how to access such data using Python (my preferred framework). I used the Github search facility and there is very little about metadata and python.

Also, can you help me understand the definition of the word "unsaved" data? I can save the activity, but that is not enough, the athlete needs to be closed and then re-opened?

Ale Martinez

unread,
May 14, 2026, 7:06:30 PM (23 hours ago) May 14
to golden-cheetah-users
El jueves, 14 de mayo de 2026 a la(s) 7:45:08 p.m. UTC-3, quit...@gmail.com escribió:
Hi, yes I did find that page, and the only reference to metadata is

"List Athlete Rides with Metrics and Metadata"

but nothing about how to access such data using Python (my preferred framework). I used the Github search facility and there is very little about metadata and python.

Also, can you help me understand the definition of the word "unsaved" data? I can save the activity, but that is not enough, the athlete needs to be closed and then re-opened?

This paragraph at the beginning of the page is the relevant part:
Data is made available for all athletes regardless of who GC is currently working with (i.e. which athlete you selected) based on the on-disk repository, so data modifications when an athlete is open will be available only after athlete close when the activity cache is written to disk.”

Steve Mansfield

unread,
May 14, 2026, 8:11:25 PM (22 hours ago) May 14
to golden-cheetah-users
OK, I see, so even though the activity.json is updated, this data is not available to the webserver until the athlete is closed

Its takes nearly a minute for the query to complete - can that be sped up?

Ale Martinez

unread,
May 14, 2026, 8:39:11 PM (22 hours ago) May 14
to golden-cheetah-users
El jueves, 14 de mayo de 2026 a la(s) 9:11:25 p.m. UTC-3, quit...@gmail.com escribió:
OK, I see, so even though the activity.json is updated, this data is not available to the webserver until the athlete is closed

Its takes nearly a minute for the query to complete - can that be sped up?

GoldenCheetah uses an on-memory cache to speed up access to metadata and metrics for open athletes in formulas and Python/R APIs, using them you can have fast access to latest modifications, as I commented in my first response.
Rest API it is not intended for that purpose.
Reply all
Reply to author
Forward
0 new messages