Skip to content
AbloAblo
Esc
navigateopen⌘Jpreview

Claim a row (acquire lease)

POST/v1/models/{model}/{id}/claim
Path parameters
modelstringrequired
A model name from your pushed schema, e.g. `task`.
idstringrequired
Request body
application/json
claimIdstring
targetobject | any
Show properties
Any of:
object
modelstring
idstring | any
Show properties
Any of:
string
string
any
any
fieldstring
fieldsstring[]
metaobject
any
any
reasonstring
descriptionstring
metaobject
ttlnumber | string | any
Show properties
Any of:
number | string
Any of:
number
number
string
string
any
any
queueboolean
Responses
201The lease is yours. `claim.fenceToken` is set when the coordinator minted one; carry it on writes made under the lease.
One of:
ClaimAcquired
idstringrequired
objectstringrequired
statusstringrequired
fenceTokeninteger
min -9007199254740991 · max 9007199254740991
expiresAtinteger
min -9007199254740991 · max 9007199254740991
claimClaimrequired
Show properties
idstringrequired
actorstringrequired
participantKindstringrequired
Allowed:useragentsystem
onBehalfOfIdstring | any
Show properties
Any of:
string
string
any
any
onBehalfOfKindstring | any
Show properties
Any of:
string
string
any
any
capabilityIdstring | any
Show properties
Any of:
string
string
any
any
descriptionstring
statusstring
Allowed:activequeued
positioninteger
min 0 · max 9007199254740991
expiresAtintegerrequired
min -9007199254740991 · max 9007199254740991
fenceTokeninteger
min -9007199254740991 · max 9007199254740991
targetobjectrequired
Show properties
modelstringrequired
idstringrequired
fieldstring
fieldsstring[]
metaobject
metaobject
fieldstring
ClaimQueued
idstringrequired
objectstringrequired
statusstringrequired
positionintegerrequired
min 0 · max 9007199254740991
heldBystring
expiresAtinteger
min -9007199254740991 · max 9007199254740991
heldByClaimobject
Show properties
entityTypestringrequired
entityIdstringrequired
fieldstring
fieldsstring[]
metaobject
claimIdstringrequired
descriptionstring
declaredAtnumberrequired
expiresAtnumberrequired
onBehalfOfIdstring | any
Show properties
Any of:
string
string
any
any
onBehalfOfKindstring | any
Show properties
Any of:
string
string
any
any
capabilityIdstring | any
Show properties
Any of:
string
string
any
any
202The row was already held and you asked to queue. You are in line at `position` — heartbeat to keep the slot, and poll `GET /v1/claims/{claimId}` for the grant.
One of:
ClaimAcquired
idstringrequired
objectstringrequired
statusstringrequired
fenceTokeninteger
min -9007199254740991 · max 9007199254740991
expiresAtinteger
min -9007199254740991 · max 9007199254740991
claimClaimrequired
Show properties
idstringrequired
actorstringrequired
participantKindstringrequired
Allowed:useragentsystem
onBehalfOfIdstring | any
Show properties
Any of:
string
string
any
any
onBehalfOfKindstring | any
Show properties
Any of:
string
string
any
any
capabilityIdstring | any
Show properties
Any of:
string
string
any
any
descriptionstring
statusstring
Allowed:activequeued
positioninteger
min 0 · max 9007199254740991
expiresAtintegerrequired
min -9007199254740991 · max 9007199254740991
fenceTokeninteger
min -9007199254740991 · max 9007199254740991
targetobjectrequired
Show properties
modelstringrequired
idstringrequired
fieldstring
fieldsstring[]
metaobject
metaobject
fieldstring
ClaimQueued
idstringrequired
objectstringrequired
statusstringrequired
positionintegerrequired
min 0 · max 9007199254740991
heldBystring
expiresAtinteger
min -9007199254740991 · max 9007199254740991
heldByClaimobject
Show properties
entityTypestringrequired
entityIdstringrequired
fieldstring
fieldsstring[]
metaobject
claimIdstringrequired
descriptionstring
declaredAtnumberrequired
expiresAtnumberrequired
onBehalfOfIdstring | any
Show properties
Any of:
string
string
any
any
onBehalfOfKindstring | any
Show properties
Any of:
string
string
any
any
capabilityIdstring | any
Show properties
Any of:
string
string
any
any
400The request did not satisfy the published contract.
typestringrequired
codestring
paramstring
messagestringrequired
doc_urlstring
request_idstring
errorsobject[]
Show properties
Array of object
codestring
messagestringrequired
paramstring
401The Bearer credential is missing, malformed, or expired.
typestringrequired
codestring
paramstring
messagestringrequired
doc_urlstring
request_idstring
errorsobject[]
Show properties
Array of object
codestring
messagestringrequired
paramstring
403The credential does not authorize this operation.
typestringrequired
codestring
paramstring
messagestringrequired
doc_urlstring
request_idstring
errorsobject[]
Show properties
Array of object
codestring
messagestringrequired
paramstring
404The addressed resource does not exist in the credential scope.
typestringrequired
codestring
paramstring
messagestringrequired
doc_urlstring
request_idstring
errorsobject[]
Show properties
Array of object
codestring
messagestringrequired
paramstring
409The request conflicts with current claim, version, or idempotency state.
typestringrequired
codestring
paramstring
messagestringrequired
doc_urlstring
request_idstring
errorsobject[]
Show properties
Array of object
codestring
messagestringrequired
paramstring
429The caller exceeded an enforced rate limit.
typestringrequired
codestring
paramstring
messagestringrequired
doc_urlstring
request_idstring
errorsobject[]
Show properties
Array of object
codestring
messagestringrequired
paramstring
500The server could not complete the request.
typestringrequired
codestring
paramstring
messagestringrequired
doc_urlstring
request_idstring
errorsobject[]
Show properties
Array of object
codestring
messagestringrequired
paramstring
503A required service is temporarily unavailable.
typestringrequired
codestring
paramstring
messagestringrequired
doc_urlstring
request_idstring
errorsobject[]
Show properties
Array of object
codestring
messagestringrequired
paramstring
defaultAn HTTP error not otherwise listed; decoded through the canonical envelope.
typestringrequired
codestring
paramstring
messagestringrequired
doc_urlstring
request_idstring
errorsobject[]
Show properties
Array of object
codestring
messagestringrequired
paramstring
Request
curl -X POST "https://api.abloatai.com/api/v1/models/string/string/claim" \
  -H "Content-Type: application/json" \
  -d '{
  "claimId": "string",
  "target": {
    "model": "string",
    "id": "string",
    "field": "string",
    "fields": [
      "string"
    ],
    "meta": {}
  },
  "reason": "string",
  "description": "string",
  "meta": {},
  "ttl": 0,
  "queue": true
}'
Response
{
  "id": "string",
  "object": "claim",
  "status": "active",
  "fenceToken": 0,
  "expiresAt": 0,
  "claim": {
    "id": "string",
    "actor": "string",
    "participantKind": "user",
    "onBehalfOfId": "string",
    "onBehalfOfKind": "user",
    "capabilityId": "string",
    "description": "string",
    "status": "active",
    "position": 0,
    "expiresAt": 0,
    "fenceToken": 0,
    "target": {
      "model": "string",
      "id": "string",
      "field": "string",
      "fields": [
        "string"
      ],
      "meta": {}
    },
    "meta": {},
    "field": "string"
  }
}