Skip to main content
POST

Create a request to buy traffic. Note that this only creates the request to do so. Refer to the status endpoint to check if the request succeeded.

Authorizations

walletUserAuth

string
required
HTTP bearer authentication. Send the token as Authorization: Bearer <token>. Bearer format: JWT. JWT token as described by the spliceAppBearerAuth security scheme. The subject of the token must be ledger API user of the user whose wallet the endpoint affects.

Body

application/json
string
required
Traffic will be purchased for the validator hosting this party. If the party is hosted on multiple participants, the request will fail with 400 Bad Request.
string
required
The domain to purchase traffic for.
number
required
OpenAPI type: integer (int64).traffic to purchase in bytes.
string
required
Tracking id to support exactly once submission. Once submitted, all succeessive calls with the same tracking id will get rejected with a 409 or 429 status code unless the command fails and the traffic did not get purchased. Clients should create a fresh tracking id when they try to send a new request to buy traffic. If that command submission fails with a retryable error or the application crashed and got restarted, successive command submissions must reuse the same tracking id to ensure they don’t purchase traffic multiple times.
number
required
OpenAPI type: integer (int64).Expiry time of the request to buy traffic as unix timestamp in microseconds. If the request does not succeed before this time, the wallet automation will reject and expire it. Note that this time is compared against the ledger effective time of the Daml transaction accepting or expiring an offer, and can skew from the wall clock time measured on the caller’s machine. See https://docs.daml.com/concepts/time.html for how ledger effective time is bound to the record time of a transaction on a domain.

Responses

200

Request to buy traffic got created
application/json
string
required

400

Request was invalid, adjust parameters
application/json
string
required

409

A request to buy traffic with the same tracking id has been created. Check the status endpoint for the current status.
application/json
string
required

429

A request to buy traffic with the same tracking id is currently being processed. Check the status endpoint and resubmit if it returns 404.
application/json
string
required

500

Internal server error that requires operator investigation. Retrying for a small number of times with exponential back-off MAY work.
application/json
string
required

History

Added0.5.10