Using `uplink share` outside of CLI?

I’m trying to figure out the easiest way to generate a shareable link programmatically. Ideally, it’d be great to use s3-compatible APIs (e.g. GetSignedUrl), but I’m guessing that’s not possible due to s3’s strict spec of pointing specifically to objects (vs wildcard paths, which is what I’m interested in).

I looked into the SDKs but they all require linking to Golang, which is admittedly annoying. Do I have any other option?

You are correct, presigned URLs are only for objects.
There is a several bindings for uplink, but you need GO to use them, at least to compile uplink-c.
See also:

The other way is to generate an URL with uplink share --url for the bucket and use the resulted link to build paths to the needed objects, or use a custom domain.

1 Like

Interesting. Calling the /access REST endpoint to obtain an access_key_id certainly works. Do you know if I can set an expiration with this method?

If not, can I call an API endpoint to generate an access grant with an expiration? I could then call the first endpoint ( with the generated access grant.

Access grant need to be generated either by SDKs, or by uplink share. The mentioned endpoint is only to register the provided access grant, it cannot generate it, because you need a satellite URL, API Key and the encryption phrase, not only caveats and path limits.
See Understand and Manage Access Grants - Storj Docs

1 Like