Skip to main content

Reserving a Resource over Websocket

These commands allows a robot or fleet system to reserve access to a shared resource — such as a lift, door, or path segment — through the BellRMF WebSocket API. Once the resource is granted, the robot may proceed. After using the resource, it must release it so others may use it.


Connecting to the WebSocket Server​

To interact with BellRMF, establish a WebSocket connection using the secure endpoint below. You must provide an API key via the Authorization header.

WebSocket Endpoint​


wss\://comingsoon

Connection Headers​

HeaderTypeRequiredDescription
AuthorizationStringYesAPI Key for authenticating the connection

WebSocket API

Reserve a Resource​

Command: RESERVE_RESOURCE​

Request a reservation for a specific named resource.

Parameters​

FieldTypeRequiredDescription
commandStringYesMust be RESERVE_RESOURCE
requestIdStringYesUnique ID to track the request
resourceIdStringYesThe name of the resource to reserve (e.g. "lift_3", "door_W")

Expected Server Responses​

✅ Reservation Acknowledged​

{
"requestId": "abc123",
"code": "RESERVE_RESOURCE_OK"
}

This confirms your request has been received and queued.

✅ Resource Granted​

{
"requestId": "abc123",
"code": "RESOURCE_GRANTED",
"leaseId": "lease_789",
"validUntil": 1715720012345
}

BellRMF grants access to the resource. Your robot now holds the lease. Use the leaseId when releasing the resource later.

❌ Error​

{
"requestId": "abc123",
"status": "error",
"error_code": "RESOURCE_NOT_FOUND",
"message": "The specified resource does not exist."
}

Release a Resource​

Command: RELEASE_RESOURCE​

Used to release a resource after use. Required to prevent deadlocks and allow other robots to proceed.

Parameters​

FieldTypeRequiredDescription
commandStringYesMust be RELEASE_RESOURCE
requestIdStringYesUnique ID to track the release
leaseIdStringYesThe lease ID received from the grant

Expected Server Response​

{
"requestId": "abc123",
"code": "RELEASE_RESOURCE_OK"
}

Confirms the resource has been released and is now available for other robots.


Summary​

ActionCommandResponse
Reserve ResourceRESERVE_RESOURCERESERVE_RESOURCE_OK → RESOURCE_GRANTED
Release ResourceRELEASE_RESOURCERELEASE_RESOURCE_OK

⚠️ If a robot disconnects or fails to release a resource within the lease timeout, the resource will be automatically released after validUntil. Repeated failure to release resources may result in rate limiting or rejection of future requests.