File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
docs/technical-details/reference Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -282,4 +282,25 @@ Find a resource that matches the path. For example:
282
282
server.resources.getMatch('/NewResource/some-id');
283
283
// or specify the export/protocol type, to allow it to be limited:
284
284
server.resources.getMatch('/NewResource/some-id', 'my-protocol');
285
- ```
285
+ ```
286
+
287
+ ### ` server.operation(operation: Object, context?: Object, authorize?: boolean) `
288
+
289
+ Execute an operation from the [ Operations API] ( https://docs.harperdb.io/docs/developers/operations-api )
290
+
291
+ Parameters:
292
+
293
+ - ** operation** - ` Object ` - Object matching desired operation's request body
294
+ - ** context** - ` Object ` - ` { username: string} ` - _ optional_ - The specified user
295
+ - ** authorize** - ` boolean ` - _ optional_ - Indicate the operation should authorize the user or not. Defaults to ` false `
296
+
297
+ Returns a ` Promise ` with the operation's response as per the [ Operations API documentation] ( https://docs.harperdb.io/docs/developers/operations-api ) .
298
+
299
+ ### ` server.nodes `
300
+ Returns an array of node objects registered in the cluster
301
+
302
+ ### ` server.shards `
303
+ Returns map of shard number to an array of its associated nodes
304
+
305
+ ### ` server.hostname `
306
+ Returns the hostname of the current node
You can’t perform that action at this time.
0 commit comments