EndpointsCogents

Claim cogent lease

POST/v2/cogents/{cogent_id}/lease/{name}

Takes the lease for holder, or renews it when holder already holds it. While someone else holds an unexpired lease the answer is claimed: false with who holds it and until when.

Authorization

BearerAuth
AuthorizationBearer <token>

Bearer token issued by Softmax

In: header

Path Parameters

cogent_id*Cogent Id

Cogent ID (its player ID).

Match^ply_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
name*Name

Lease name, such as practice.

Match^[a-z][a-z0-9-]{0,63}$

Request Body

application/json

holder*Holder

Who claims it: an agent name, unique per process.

Match^[^\x00]*$
Length1 <= length <= 200
ttl_seconds?Ttl Seconds

How long the claim lasts unless renewed. Renew by claiming again before it ends.

Range0 < value <= 600
Default120
curl -X POST "https://softmax.com/api/observatory/v2/cogents/string/lease/string" \  -H "Content-Type: application/json" \  -d '{    "holder": "string"  }'
{  "name": "string",  "claimed": true,  "holder": "string",  "until": "2019-08-24T14:15:22Z"}