schema-registry icon indicating copy to clipboard operation
schema-registry copied to clipboard

timestamp of creation of a schema version

Open faladu opened this issue 3 years ago • 2 comments

Wanted to ask if there is any way to get the timestamp a schema was created at? From what I know internally the data is stored as kafka messages for which I can get such timestamps if the broker is new enough so I wanted to ask if there is any way to also receive this value over the rest api. Wasn't able to find anything regarding timestamps in the calls I've seen so far but wanted to ask if I missed something.

faladu avatar Jun 06 '21 14:06 faladu

This feature is currently not present in the REST API of the confluent schema-registry , that would be a nice feature.

But since the topic _schemas is compacted , it mean that you'll get the timestamp of the latest entry for a schema subject and version , not necessary the first-time inserted timestamp

example :

by curl to REST API of the schema-registry : subject toto version 1 ( timestamp 2020-08-20T00:21:00.0Z )

by curl to REST API of the schema-registry : hard delete the subject toto version 1

by curl to REST API of the schema-registry : subject toto version 1 ( timestamp 2020-08-20T00:25:00.0Z )

you will get the latest timestamp

also if there is a manual write on the _schemas topic at 2020-08-20T00:40:00.0Z

key : {"keytype":"SCHEMA","subject":"toto","version":1,"magic":1}
value : {
  "subject": "toto",
  "version": 1,
  "id": 30,
  "schema": ".....",
  "deleted": false
}

The compaction of the _schemas topic will only store the latest msg ( and the associated timestamp )

raphaelauv avatar Aug 07 '21 12:08 raphaelauv

Hi there - just wanted to add a +1 for this feature request; in our case, it'd be fairly helpful to track down when a given change was registered, to help compare to changes since that time.

It looks like this was acknowledged in https://github.com/redpanda-data/redpanda/issues/1878, but not necessarily added to the requested list of features - is that accurate for the time being? Thanks for all of the existing functionality, it's super helpful 🙇

jackkoppa avatar Jul 08 '22 17:07 jackkoppa

Hi folks, even we need the timestamp associated with the subject/version on schema registry for a given subject for our metadata tool so we can compare the deltas for only the ones that changed since our last scan of the metadata.

If this feature is implemented would be a big +.

www-viveksharma avatar Jan 19 '23 04:01 www-viveksharma

Also plus 1 for managing deletion of old schemas.

Matt-S6 avatar Jun 21 '23 00:06 Matt-S6

Plus +1 for this feature

ohsamarth avatar Aug 23 '23 08:08 ohsamarth

plus +1 for this feature

wurthmvnn avatar Aug 31 '23 19:08 wurthmvnn