Mint a signed URL
cloudcdn_signedGenerate a time-limited signed URL to share a private file without making it public; the HMAC-SHA256 signature is computed locally and works offline.
Instructions
Create a time-limited link to a private file, to share it without making it public. Runs offline: it computes an HMAC-SHA256 signature locally, makes no network call and stores nothing, so it works when the API is down; find the path with cloudcdn_assets or cloudcdn_search, and check the API with cloudcdn_health. Returns one line of text, not JSON: <CLOUDCDN_URL>/api/signed?path=...&expires=...&sig=..., where path is the URL-encoded file path, expires the expiry as given, and sig the 64-character lowercase hex HMAC of ":", the message GET /api/signed checks with the same secret. expires is an absolute Unix time in seconds (e.g. now + 3600 for one hour), not a duration, and is not compared with the clock here: a past value gives a link the API answers with 403 "URL expired". The API also answers 403 to a path that does not start with "/" or that contains "..", "//" or a NUL byte. The secret comes from secret, else SIGNED_URL_SECRET from the environment, the stratos profile or the OS keychain. Fails: no path or expires, exit code 64; no secret, exit code 78.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"expires": "<expires>"
},
"name": "cloudcdn_signed"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path to sign, with a leading slash: the path field from cloudcdn_assets or cloudcdn_search with "/" put in front, e.g. "/acme/v1/report.pdf". Signed exactly as given. | |
| secret | No | Signing secret shared with the API. Leave it unset so SIGNED_URL_SECRET is used and the secret stays out of the conversation. | |
| expires | Yes | Expiry as Unix time in seconds: the current time plus the lifetime you want, e.g. 1767225600. |