Execute Object Operation

POST /node/api/objects/:obj_id/operations/:op_id/execute

Executes an object operation.
Permissions: objectPermissions & execute-operations.

Request parameters

Path parameters

Parameter
Type
Description
obj_id
string
required
The ID of an object whose operation should be executed.
op_id
string
required
The ID of an operation to be executed.

Body parameters

...

Response description

...

Examples

Request examples

Bash
JavaScript
NodeJS
Python
1
login=<...>
2
password=<...>
3
saymon_hostname=<...>
4
object_id=<...>
5
operation_id=<...>
6
url=https://$saymon_hostname/node/api/objects/$object_id/operations/$operation_id/execute
7
8
curl -X POST $url -u $login:$password
Copied!
1
let login = <...>
2
let password = <...>
3
let saymonHostname = <...>
4
let objectId = <...>
5
let operationId = <...>
6
let path = "/node/api/objects/" + objectId + "/operations/" +
7
operationId + "/execute";
8
let auth = "Basic " + btoa(login + ":" + password);
9
10
let headers = new Headers();
11
headers.append("Authorization", auth);
12
13
let requestOptions = {
14
method: "POST",
15
headers: headers
16
};
17
18
fetch(saymonHostname + path, requestOptions)
19
.then(response => response.text())
20
.then(result => console.log(result))
21
.catch(error => console.log("error", error));
Copied!
1
const http = require("http");
2
3
let login = <...>
4
let password = <...>
5
let saymonHostname = <...>
6
let objectId = <...>
7
let operationId = <...>
8
let path = "/node/api/objects/" + objectId + "/operations/" +
9
operationId + "/execute";
10
let auth = "Basic " + Buffer.from(login + ":" + password).toString("base64");
11
12
let options = {
13
"method": "POST",
14
"hostname": saymonHostname,
15
"headers": {
16
"Authorization": auth
17
},
18
"path": path
19
};
20
21
let req = http.request(options, function (res) {
22
let chunks = [];
23
24
res.on("data", function (chunk) {
25
chunks.push(chunk);
26
});
27
28
res.on("end", function (chunk) {
29
let body = Buffer.concat(chunks);
30
console.log(body.toString());
31
});
32
33
res.on("error", function (error) {
34
console.error(error);
35
});
36
});
37
38
req.end();
Copied!
1
import requests
2
3
login = <...>
4
password = <...>
5
saymon_hostname = <...>
6
object_id = <...>
7
operation_id = <...>
8
url = "https://" + saymon_hostname + "/node/api/objects/" + \
9
object_id + "/operations/" + operation_id + "/execute"
10
11
response = requests.request("POST", url, auth=(login, password))
12
print(response.text)
Copied!