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
Header | Type | Required | Description |
---|---|---|---|
Authorization | String | Yes | API Key for authenticating the connection |
WebSocket API
Reserve a Resource
Command: RESERVE_RESOURCE
Request a reservation for a specific named resource.
Parameters
Field | Type | Required | Description |
---|---|---|---|
command | String | Yes | Must be RESERVE_RESOURCE |
requestId | String | Yes | Unique ID to track the request |
resourceId | String | Yes | The 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
Field | Type | Required | Description |
---|---|---|---|
command | String | Yes | Must be RELEASE_RESOURCE |
requestId | String | Yes | Unique ID to track the release |
leaseId | String | Yes | The 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
Action | Command | Response |
---|---|---|
Reserve Resource | RESERVE_RESOURCE | RESERVE_RESOURCE_OK → RESOURCE_GRANTED |
Release Resource | RELEASE_RESOURCE | RELEASE_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.