Storj IconSTORJ | DCS Docs
meta get

meta get #

Usage #

./uplink.exe meta get PATH [KEY] [flags]
uplink meta get PATH [KEY] [flags]
uplink meta get PATH [KEY] [flags]

Flags #

FlagDescription
--access stringthe serialized access, or name of the access to use
--help, -hhelp for get

Retrieve all metadata of an object #

Suppose you have uploaded your object with metadata using this command:

./uplink.exe cp cheesecake.jpg sj://cakes --metadata '{\"baker\":\"cheeseman\", "\pictur
e-author\": "\picman\"}'
uplink cp cheesecake.jpg sj://cakes --metadata '{"baker":"cheeseman", "pictur
e-author": "picman"}'
uplink cp cheesecake.jpg sj://cakes --metadata '{"baker":"cheeseman", "pictur
e-author": "picman"}'

Retrieving all metadata defined for object sj://cakes/cheesecake.jpg is done with:

./uplink.exe meta get sj://cakes/cheesecake.jpg
uplink meta get sj://cakes/cheesecake.jpg
uplink meta get sj://cakes/cheesecake.jpg

Query for a specific key in metadata #

You can retrieve the value of key baker for object sj://cakes/cheesecake.jpg using:

./uplink.exe meta get sj://cakes/cheesecake.jpg baker
uplink meta get sj://cakes/cheesecake.jpg baker
uplink meta get sj://cakes/cheesecake.jpg baker

Querying for a non-existent key will raise an error.