Normally metadata keys are set through PUT /datasets/<id>/metadata using an application/json request body, allowing the full expressiveness of JSON, specifically to specify sub-objects, integers, floating point numbers, and boolean literals.
I added the ?metadata query parameter on PUT /upload/<name> to allow a client to specify metadata during the upload instead of waiting; however the nature of the HTTP interface constrains these to text strings, which can be limiting.
This PR generalizes the typed "metadata expression" syntax developed to support generalized metadata ?filter expressions on GET /datasets to allow both quoting value strings and typing them. For example, one could now set a JSON value using
(P.S.: when updating the upload.md I noticed that I'd somehow missed ever writing a metadata.md for the /datasets/<id>/metadata APIs, and I corrected that oversight. I think we're now also missing visualize and compare API documentation, but that's a bit too far disconnected from this topic.)
PBENCH-1283
Normally metadata keys are set through
PUT /datasets/<id>/metadata
using anapplication/json
request body, allowing the full expressiveness of JSON, specifically to specify sub-objects, integers, floating point numbers, and boolean literals.I added the
?metadata
query parameter onPUT /upload/<name>
to allow a client to specify metadata during the upload instead of waiting; however the nature of the HTTP interface constrains these to text strings, which can be limiting.This PR generalizes the typed "metadata expression" syntax developed to support generalized metadata
?filter
expressions onGET /datasets
to allow both quoting value strings and typing them. For example, one could now set a JSON value usingWe support
str
,int
,float
,bool
, andjson
types; e.g.,?metadata=global.tester.run_id:100:int,global.tester.good:true:bool
(P.S.: when updating the
upload.md
I noticed that I'd somehow missed ever writing ametadata.md
for the/datasets/<id>/metadata
APIs, and I corrected that oversight. I think we're now also missingvisualize
andcompare
API documentation, but that's a bit too far disconnected from this topic.)