tessera

Spends one retrieval and returns a ticket for the transfer.

POST
/api/v1/shares/{code}/unlock

Why this is a separate step

One authorisation costs one retrieval; the ticket it returns is then good for every request the transfer needs, each Range, resumption and retry. Counting requests instead would let a resumed download spend all three uses of a share that allows three.

Errors

401 when the password is wrong, 404 when nothing has that code, 410 when it has expired or run out.

code*string

The retrieval code. Normalised before lookup: O reads as 0, I and L read as 1, case is folded, spaces and hyphens are dropped, so 0ZPQ4M7K, ozpq-4m7k and OZPQ4M7K are the same share.

X-Share-Password?|

The share's password, if it has one

Response Body

Authorised

application/json
  1. response

What POST /shares/{code}/unlock hands back.

expires_at*string

When the authorisation stops being honoured, RFC 3339.

ticket*string

Present it as X-Share-Ticket, or as ?t= on a download link.

uses_remaining?|

How many retrievals remain after this one.

Formatint32
Range0 <= value
curl -X POST 'https://example.com/api/v1/shares/string/unlock'
{  "expires_at": "string",  "ticket": "string",  "uses_remaining": 0}