API Reference
Use the pre-programmed API Reference material by Backbench when developing your applications.
REST API
Memory
Send aPOST
request to endpoint https://memory.backbench.io.
The request body/payload has the following format:
{
"cmd": "",
"auth": {
"benchId": "",
"userId": "",
"accessKey": ""
},
"args": {
},
"json": true
}
cmd, args: are operation depedent.
auth: Used as security for API, It has 3 mandatory properties - benchId, userId, accessKey
. accessKey
value can be accessed from environment variable ACCESS_KEY
.
Setting Memory
"cmd" : "bb:mem:set"
"args": {"key": "", "value": ""}
Getting Memory
"cmd" : "bb:mem:get"
"args": {"key": ""}
Deleting Memory
"cmd" : "bb:mem:del"
"args": {"key": ""}
An example payload for setting up memory in backbench.
{
"cmd": "bb:mem:set",
"auth": {
"benchId": "aaaaa0",
"userId": "mybench",
"accessKey": "c72d2f3a91b80c1e7fb46f4332383795facd8e99df31b689513c2fa11a699adb"
},
"args": {
"key": "jlo",
"value": "one the floor"
}
}
Logs
Payload for logs goes like this;
"cmd" : "bb:log"
"args": {"message": ""}
Last updated