SAYMON REST API
Search…
SAYMON REST API
General
Methods
Agents [WIP]
Authentication
Bulks [?]
Classes
Configuration
Dictionaries [?]
Event Log
Flows
History Annotations
Incidents
Incident Levels
Jobs
Limits
Links
Metric Tokens [?]
MQTT
Notification Templates [?]
Objects
Operations
Create Class Operation
Create Link Operation
Create Object Operation
Delete Class Operation
Delete Link Operation
Delete Object Operation
Execute Link Operation
Execute Object Operation
Update Class Operation
Update Link Operation
Update Object Operation
Presets
Properties
References
Reports [?]
Scripts
Service
Stat
Stat Rules
State History
States
Tags
Users
User Groups
Models
Misc
Powered By
GitBook
Execute Link Operation
POST /node/api/links/:link_id/operations/:op_id/execute
Executes a link operation.
Permissions
: linkPermissions & execute-operations.
Request parameters
Path parameters
Parameter
Type
Description
link_id
string
required
The ID of a link 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
link_id
=<
..
.
>
5
operation_id
=<
..
.
>
6
url
=
https://
$saymon_hostname
/node/api/links/
$link_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
linkId
=
<...>
5
let
operationId
=
<...>
6
let
path
=
"/node/api/objects/"
+
linkId
+
"/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
linkId
=
<...>
7
let
operationId
=
<...>
8
let
path
=
"/node/api/links/"
+
linkId
+
"/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
link_id
=
<
...
>
7
operation_id
=
<
...
>
8
url
=
"https://"
+
saymon_hostname
+
"/node/api/links/"
+
\
9
link_id
+
"/operations/"
+
operation_id
+
"/execute"
10
​
11
response
=
requests
.
request
(
"POST"
,
url
,
auth
=
(
login
,
password
))
12
print
(
response
.
text
)
Copied!
Previous
Delete Object Operation
Next
Execute Object Operation
Last modified
2yr ago
Copy link
Contents
POST /node/api/links/:link_id/operations/:op_id/execute
Request parameters
Path parameters
Body parameters
Response description
Examples
Request examples