Service

Set write protection

POST
Restricts all write operations and forbids collection creation. This endpoint also returns previous lock options.

Request

This endpoint expects an object.
write
booleanRequired
error_message
stringOptional

Response

This endpoint returns an object
time
doubleOptional
Time spent to process this request
status
stringOptional
result
objectOptional
POST
1curl -X POST http://localhost:6333/locks \
2 -H "api-key: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "write": true
6}'
200Successful
1{
2 "time": 1.1,
3 "status": "status",
4 "result": {
5 "write": true,
6 "error_message": "error_message"
7 }
8}