For more details https://oss.openrport.io/docs/no02-api-auth.html
/verify-2fa
endpoint. Requires the user to have a valid two_fa_send_to
delivery option/verify-2fa
endpoint and also to create and read a totp secret for the first time (see /me/totp-secret
)/auth/provider
and /auth/ext/settings
or /auth/ext/settings/device
endpoints instead.token-lifetime | integer <= 7776000 Default: 600 initial lifetime of JWT token in seconds. Max value is 90 days. Default: 10 min |
{- "data": {
- "token": "string",
- "two_fa": {
- "send_to": "string",
- "delivery_method": "email",
- "totp_key_status": "pending"
}
}
}
If 2FA is disabled: returns authorization JWT token.
If 2FA is enabled: triggers sending 2FA token to the user. 2fa token can be further verified using /verify-2fa
endpoint. Requires the user to have a valid two_fa_send_to
delivery option.
username
and password
should be provided in request body either in JSON either in x-www-formurlencoded format.
If fields username
, password
and new_password
are provided: a new password will be set for the user, the user will be logged in and password_expired
flag will be reset to false.
If time based one time passwords (TotP) are enabled (Google/Microsoft authenticator app), it returns a login token, which should be used to call /verify-2fa
endpoint and also to create and totp secret key for the first time (see /me/totp-secret
)
To understand if TotP is enabled, delivery_method
field will contain totp_authenticator_app
value, that indicates the limited scope of the JWT token validity.
If user has already a TotP secret key, the value of totp_key_status field will be 'pending' or 'exists' otherwise.
IfRport Plus OAuth is enabled, then this API will be disabled and a 403
status response will be returned. Login using the /auth/provider
and
/auth/ext/settings
endpoints instead.
token-lifetime | integer <= 7776000 Default: 600 initial lifetime of JWT token in seconds. Max value is 90 days. Default: 10 min |
{- "data": {
- "token": "string",
- "two_fa": {
- "send_to": "string",
- "delivery_method": "email",
- "totp_key_status": "pending"
}
}
}
Returns authorization JWT token if athe provided username and his 2fa token are valid. If totp_enabled is true, you should provide one time password as 2fa token. If both 2FA and TotP are disabled, this api will return 400.
token-lifetime | integer <= 7776000 Default: 600 initial lifetime of JWT token in seconds. Max value is 90 days. Default: 10 min |
Username and his 2FA token
username | string Unique username |
token | string 2FA or TotP options should be enabled. Requires JWT bearer token received from |
{- "data": {
- "token": "string"
}
}
For more details https://oss.openrport.io
This API allows clients to determine how to login to Rport.
If the auth_provider
is built-in
then the regular OSS Rport login API can be used.
If the auth_provider
is one of the Rport Plus OAuth providers (e.g. github
, microsoft
or google
) then either the settings_uri
or device_settings_uri
endpoint must be must be queried for login related links/info. Which uri should be used depends on whether the api client is a web app or device style (e.g. cli) app.
{- "data": {
- "auth_provider": "string",
- "settings_url": "string",
- "device_settings_url": "string"
}
}
This API provides client with the necessary links to authorize a user and then perform an Rport login to obtain an Rport JWT Bearer token.
{- "data": {
- "message": "string",
- "authorize_url": "string",
- "login_uri": "string",
- "state": "string",
- "expiry": "2019-08-24T14:15:22Z"
}
}
This API provides client with the necessary information for a user to authorize via an OAuth device flow. Typically the device flow is used with limited UI/input apps such as CLI apps.
{- "data": {
- "auth_provider": "string",
- "details": {
- "login_uri": "string",
- "auth_info": {
- "device_code": "string",
- "verification_uri": "string",
- "user_code": "string",
- "interval": 0,
- "expires_in": 0
}
}
}
}
{- "data": {
- "username": "string",
- "groups": [
- "string"
], - "two_fa_send_to": "string",
- "group_permissions_enabled": true,
- "effective_user_permissions": {
- "commands": true,
- "monitoring": true,
- "scheduler": true,
- "scripts": true,
- "tunnels": true,
- "uploads": true,
- "vault": true,
- "auditlog": true
}, - "effective_extended_permissions": {
- "tunnels_restricted": { },
- "commands_restricted": { }
}
}
}
your own parameters that you would like to update
username | string new username, empty if keep the same |
password | string new password, empty if keep the same |
old_password | string old password, required only on password change |
two_fa_send_to | string applicable only when 2FA is enabled, ignored otherwise. New two_fa_send_to, empty if keep the same |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
scope | any Enum: "read" "read+write" "clients-auth" what this token is authorized for |
expires_at | string <date-time> date and time when this token will expire |
{- "scope": "read",
- "expires_at": "2019-08-24T14:15:22Z"
}
{- "prefix": "string",
- "name": "string",
- "token": "b5507016-7da2-4777-a161-1e8042a6a377",
- "created_at": "2019-08-24T14:15:22Z",
- "expires_at": "2019-08-24T14:15:22Z",
- "scope": "read"
}
prefix | string token id prefix |
name | string token name, 250 chars max description, unique per user |
expires_at | string <date-time> date and time when this token will expire |
{- "prefix": "string",
- "name": "string",
- "expires_at": "2019-08-24T14:15:22Z"
}
{- "prefix": "string",
- "expires_at": "2019-08-24T14:15:22Z"
}
Show health status, server version, etc
{- "data": {
- "version": "string",
- "clients_connected": 0,
- "clients_disconnected": 0,
- "clients_auth_source": "Static Credentials",
- "clients_auth_mode": "Read Only",
- "fingerprint": "string",
- "connect_url": [
- "string"
], - "users_auth_source": "Static Credentials",
- "two_fa_enabled": true,
- "two_fa_delivery_method": "email",
- "tunnel_proxy_enabled": true,
- "used_ports": [
- "string"
], - "excluded_ports": [
- "string"
], - "password_min_length": 0
}, - "meta": { }
}
Shows secret key and qr image in base64 format for an Authenticator app. Requires a token received from /verify-2fa
endpoint.
{- "secret": "string",
- "qr": "string"
}
Creates a new secret key for an Authenticator app only for the first time! If another totP secret already exists for this user, an error will appear. Requires a valid JWT token received from the /login
endpoint.
{- "secret": "string",
- "qr": "string"
}
For more details https://oss.openrport.io/docs/no09-managing-tunnels.html
sort | string Sort option |
filter | string Filter option You can use |
fields[<RESOURCE>] | string Fields to be returned. It should be provided in the format as |
page | integer Pagination options |
{- "data": [
- {
- "id": "string",
- "name": "string",
- "os": "string",
- "os_full_name": "string",
- "os_version": "string",
- "os_arch": "string",
- "os_family": "string",
- "os_kernel": "string",
- "os_virtualization_system": "string",
- "os_virtualization_role": "string",
- "hostname": "string",
- "cpu_family": "string",
- "cpu_model": "string",
- "cpu_vendor": "string",
- "cpu_model_name": "string",
- "num_cpus": 0,
- "mem_total": 0,
- "timezone": "string",
- "ipv4": [
- "string"
], - "ipv6": [
- "string"
], - "tags": [
- "string"
], - "labels": {
- "property1": "string",
- "property2": "string"
}, - "version": "string",
- "address": "string",
- "tunnels": [
- {
- "id": "string",
- "client_id": "string",
- "lhost": "string",
- "lport": "string",
- "rhost": "string",
- "rport": "string",
- "lport_random": true,
- "scheme": "string",
- "protocol": "string",
- "acl": "string",
- "http_proxy": true,
- "host_header": "string",
- "tunnel_url": "string"
}
], - "connection_state": "connected",
- "disconnected_at": "string",
- "last_heartbeat_at": "string",
- "client_auth_id": "string",
- "allowed_user_groups": [
- "string"
], - "updates_status": {
- "refreshed": "2019-08-24T14:15:22Z",
- "updates_available": 0,
- "security_updates_available": 0,
- "updates_summaries": [
- {
- "title": "string",
- "description": "string",
- "reboot_required": true,
- "is_security_update": true
}
], - "reboot_pending": true,
- "error": "string",
- "hint": "string"
}, - "ext_ip_addresses": {
- "ipv4": "string",
- "ipv6": "string",
- "updated_at": "2019-08-24T14:15:22Z",
- "errors": "string"
}, - "client_configuration": { }
}
], - "meta": {
- "count": 0
}
}
{- "data": [
- {
- "id": "string",
- "client_id": "string",
- "lhost": "string",
- "lport": "string",
- "rhost": "string",
- "rport": "string",
- "lport_random": true,
- "scheme": "string",
- "protocol": "string",
- "acl": "string",
- "http_proxy": true,
- "host_header": "string",
- "tunnel_url": "string"
}
]
}
client_id required | string unique client ID |
fields[<RESOURCE>] | string Fields to be returned. It should be provided in the format as |
{- "data": {
- "id": "string",
- "name": "string",
- "os": "string",
- "os_full_name": "string",
- "os_version": "string",
- "os_arch": "string",
- "os_family": "string",
- "os_kernel": "string",
- "os_virtualization_system": "string",
- "os_virtualization_role": "string",
- "hostname": "string",
- "cpu_family": "string",
- "cpu_model": "string",
- "cpu_vendor": "string",
- "cpu_model_name": "string",
- "num_cpus": 0,
- "mem_total": 0,
- "timezone": "string",
- "ipv4": [
- "string"
], - "ipv6": [
- "string"
], - "tags": [
- "string"
], - "labels": {
- "property1": "string",
- "property2": "string"
}, - "version": "string",
- "address": "string",
- "tunnels": [
- {
- "id": "string",
- "client_id": "string",
- "lhost": "string",
- "lport": "string",
- "rhost": "string",
- "rport": "string",
- "lport_random": true,
- "scheme": "string",
- "protocol": "string",
- "acl": "string",
- "http_proxy": true,
- "host_header": "string",
- "tunnel_url": "string"
}
], - "connection_state": "connected",
- "disconnected_at": "string",
- "last_heartbeat_at": "string",
- "client_auth_id": "string",
- "allowed_user_groups": [
- "string"
], - "updates_status": {
- "refreshed": "2019-08-24T14:15:22Z",
- "updates_available": 0,
- "security_updates_available": 0,
- "updates_summaries": [
- {
- "title": "string",
- "description": "string",
- "reboot_required": true,
- "is_security_update": true
}
], - "reboot_pending": true,
- "error": "string",
- "hint": "string"
}, - "ext_ip_addresses": {
- "ipv4": "string",
- "ipv6": "string",
- "updated_at": "2019-08-24T14:15:22Z",
- "errors": "string"
}, - "client_configuration": { }
}
}
Deletes a client by a given id. This API requires the current client to be offline. Returns 400 otherwise.
client_id required | string unique client ID |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
Updates client's attributes, they are persisted on the client if the client has configured and writeable attributes file
client_id required | string Unique client ID |
value in the json format
tags | Array of strings |
object additional key-value metadata stored in client attributes file |
{- "tags": [
- "string"
], - "labels": {
- "property1": "string",
- "property2": "string"
}
}
{- "data": "string"
}
client_id required | string unique client id retrieved previously |
local | string local refers to the local port of the rport server to use for a new tunnel, e.g. '3390' or '0.0.0.0:3390'. If local is not specified, a random free server port will be selected automatically |
remote required | string remote address endpoint, e.g. '3389', '0.0.0.0:22' or '192.168.178.1:80', etc |
scheme | string URI scheme to be used. For example, 'ssh', 'rdp', etc. |
acl | string ACL, IP v4 addresses or ranges who is allowed to use the tunnel (ipv6 is not supported yet). For example, '142.78.90.8,201.98.123.0/24' |
check_port | string A flag whether to check availability of a public port (remote). By default check is enabled. To disable it specify 'check_port=0'. |
idle-timeout-minutes | integer [ 0 .. 10080 ] Default: 5 Auto-close the tunnel after given period of inactivity in minutes. If not provided, default value is 5 minutes. This parameter should not be used with a non empty |
auto-close | string if > 0 then auto-close the tunnel after given duration. Valid time units are 's'(seconds), 'm'(minutes), 'h'(hours). For example, '20m', '1m30s', '1h', etc |
protocol | string Protocol for the tunnel. Can be |
skip-idle-timeout | integer Disables the auto-close time of the tunnel (see |
http_proxy | boolean If true, triggers the start of a reverse proxy in front of the tunnel to handle ssl offloading. Default is false. |
host_header | string If http_proxy is true, you can specify a host name which will be added as header field |
auth_user | string If present together with |
auth_password | string see |
{- "data": {
- "id": "string",
- "client_id": "string",
- "lhost": "string",
- "lport": "string",
- "rhost": "string",
- "rport": "string",
- "lport_random": true,
- "scheme": "string",
- "protocol": "string",
- "acl": "string",
- "http_proxy": true,
- "host_header": "string",
- "tunnel_url": "string"
}
}
client_id required | string unique client id retrieved previously |
tunnel_id required | string unique tunnel id retrieved previously |
force | boolean If true, terminate a tunnel even when it is still active. |
client_id required | string unique client id retrieved previously |
tunnel_id required | string unique tunnel id retrieved previously |
acl | string ACL, IP v4 addresses or ranges who is allowed to use the tunnel (ipv6 is not supported yet). For example, '142.78.90.8,201.98.123.0/24' |
{- "acl": "string"
}
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
client_id required | string unique client id retrieved previously |
allowed_user_groups | Array of strings list of user groups that are allowed to access this client. Empty means only Administrators can access it. You must always specify the entire list of allowed groups, partial updates are not supported |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
client_id required | string Unique client ID |
sort | string Sort field to be used for sorting, the sorting direction is by default ASC.
To change the direction add |
filter[<FIELD>] | string Filter to find stored tunnels. It should be provided in the format as |
page | integer Pagination options |
{- "data": [
- {
- "id": "string",
- "created_at": "string",
- "name": "string",
- "remote_ip": "string",
- "remote_port": 0,
- "public_port": 0,
- "scheme": "string",
- "acl": "string",
- "further_options": { }
}
], - "meta": {
- "count": 0
}
}
client_id required | string Unique client ID |
value in the json format
name | string Name of the stored tunnel |
remote_ip | string Remote for the stored tunnel |
remote_port | integer Remote port for the stored tunnel |
public_port | integer Public port for the stored tunnel |
scheme | string URI scheme for the stored tunnel |
acl | string ACL for the stored tunnel |
further_options | object Further options for the stored tunnel |
{- "data": {
- "id": "string",
- "created_at": "string",
- "name": "string",
- "remote_ip": "string",
- "remote_port": 0,
- "public_port": 0,
- "scheme": "string",
- "acl": "string",
- "further_options": { }
}
}
Updates an existing stored tunnel by the provided id
parameter.
You need to provide all fields like those you used to create the stored tunnel. Partial updates are not supported. You can get id
by using the listing API. You get the id also when you store a new value.
client_id required | string Unique client ID |
id required | string Unique script ID |
value in the json format
name | string Name of the stored tunnel |
remote_ip | string Remote for the stored tunnel |
remote_port | integer Remote port for the stored tunnel |
public_port | integer Public port for the stored tunnel |
scheme | string URI scheme for the stored tunnel |
acl | string ACL for the stored tunnel |
further_options | object Further options for the stored tunnel |
For more details https://oss.openrport.io/docs/no04-client-groups.html
Return a list of all existing client groups sorted by ID in asc order
sort | string Sort option |
filter | string Filter option |
fields[<RESOURCE>] | string Fields to be returned. It should be provided in the format as |
page | integer Pagination options |
{- "data": [
- {
- "id": "string",
- "description": "string",
- "client_ids": [
- "string"
], - "params": {
- "client_id": [
- "string"
], - "name": [
- "string"
], - "os": [
- "string"
], - "os_arch": [
- "string"
], - "os_family": [
- "string"
], - "os_kernel": [
- "string"
], - "hostname": [
- "string"
], - "ipv4": [
- "string"
], - "ipv6": [
- "string"
], - "tag": [
- "string"
], - "version": [
- "string"
], - "address": [
- "string"
], - "client_auth_id": [
- "string"
]
}, - "allowed_user_groups": [
- "string"
]
}
], - "meta": {
- "count": 0
}
}
Create a new client group.
Client group to create. Note: ClientGroup.client_ids field should not be set. It's read-only.
id | string Client Group ID |
description | string Client Group description |
client_ids | Array of strings Read Only field. Shows active and disconnected clients that belong to this group. |
object Parameters that define what clients belong to a given client group. Each parameter can be specified by:
For more details please see https://oss.rport.io/get-started/client-groups/ | |
allowed_user_groups | Array of strings List of user groups that are allowed to access the client. For more details please see https://oss.rport.io/get-started/permissions-model/ |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
Return a detailed info about a client group by a given id
group_id required | string unique client group ID |
fields[<RESOURCE>] | string Fields to be returned. It should be provided in the format as |
{- "data": {
- "id": "string",
- "description": "string",
- "client_ids": [
- "string"
], - "params": {
- "client_id": [
- "string"
], - "name": [
- "string"
], - "os": [
- "string"
], - "os_arch": [
- "string"
], - "os_family": [
- "string"
], - "os_kernel": [
- "string"
], - "hostname": [
- "string"
], - "ipv4": [
- "string"
], - "ipv6": [
- "string"
], - "tag": [
- "string"
], - "version": [
- "string"
], - "address": [
- "string"
], - "client_auth_id": [
- "string"
]
}, - "allowed_user_groups": [
- "string"
]
}
}
Update an existing client group or save a new client group
group_id required | string unique client group ID |
Client group to save. Note: ClientGroup.client_ids field should not be set.
id | string Client Group ID |
description | string Client Group description |
client_ids | Array of strings Read Only field. Shows active and disconnected clients that belong to this group. |
object Parameters that define what clients belong to a given client group. Each parameter can be specified by:
For more details please see https://oss.rport.io/get-started/client-groups/ | |
allowed_user_groups | Array of strings List of user groups that are allowed to access the client. For more details please see https://oss.rport.io/get-started/permissions-model/ |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
Delete a client group by a given id
group_id required | string unique client group ID |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
For more details https://oss.openrport.io/docs/no03-client-auth.html
filter | string Filter option |
page | integer Pagination options |
{- "data": [
- {
- "id": "string",
- "password": "string"
}
], - "meta": {
- "count": 0
}
}
Client auth credentials to add
id | string client auth ID |
password | string client auth password |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
For more details https://oss.openrport.io/docs/no06-command-execution.html
Return a list of all running and finished commands sorted by finished time in desc order with running commands at the beginning
client_id required | string unique client id retrieved previously |
sort | string Sort field to be used for sorting, the default sorting is by finished time in desc order.
To change the direction add |
filter[<FIELD>] | string Filter option |
page | integer Pagination options |
fields[<RESOURCE>] | string Fields to be returned. It should be provided in the format as |
{- "data": [
- {
- "jid": "string",
- "status": "running",
- "finished_at": "string",
- "result": {
- "summary": "string"
}
}
], - "meta": {
- "count": 0
}
}
NOTE: if command limitation is enabled by an rport client then a full path command can be required to use. See https://oss.rport.io/docs/no06-command-execution.html for more details
client_id required | string unique client id retrieved previously |
remote command to execute by the rport client
command | string remote command to execute by the rport client. NOTE: if command limitation is enabled by an rport client then a full path command can be required to use. See https://oss.rport.io/docs/no06-command-execution.html for more details |
interpreter | string Enum: "cmd" "powershell" "tacoscript" command interpreter to use to execute the command. If not set 'cmd' is used by default on Windows and /bin/sh on Linux |
cwd | string current working directory for the executable command |
is_sudo | boolean execute a command as sudo user |
timeout_sec | integer timeout in seconds to observe the command execution. If not set a default timeout (60 seconds) is used |
{- "data": {
- "jid": "string"
}
}
Return a detailed info about a command by given job id
client_id required | string unique client id retrieved previously |
job_id required | string unique job id retrieved previously |
{- "data": {
- "jid": "string",
- "client_id": "string",
- "client_name": "string",
- "pid": 0,
- "status": "running",
- "command": "string",
- "cwd": "string",
- "is_sudo": true,
- "interpreter": "string",
- "started_at": "string",
- "finished_at": "string",
- "created_by": "string",
- "timeout_sec": 0,
- "multi_job_id": "string",
- "error": "string",
- "result": {
- "stdout": "string",
- "stderr": "string",
- "summary": "string"
}
}
}
Return a list of all running and finished commands sorted by started time in desc order
sort | string Sort field to be used for sorting, the default sorting is by started time in desc order.
To change the direction add |
filter[<FIELD>] | string Filter option |
page | integer Pagination options |
{- "data": [
- {
- "jid": "string",
- "started_at": "string",
- "created_by": "string",
- "schedule_id": "8929bb67-0da1-406c-99d2-5447376a4f58"
}
], - "meta": {
- "count": 0
}
}
NOTE: if command limitation is enabled by an rport client then a full path command can be required to use. See https://oss.rport.io/docs/no06-command-execution.html for more details
properties and remote command to execute by rport clients
command | string remote command to execute by rport clients. NOTE: if command limitation is enabled by an rport client then a full path command can be required to use. See https://oss.rport.io/docs/no06-command-execution.html for more details |
client_ids | Array of strings list of client IDs where to run the command. Min items is 2 if group_ids is not specified |
group_ids | Array of strings list of client group IDs. A command will be executed on all clients that belong to given group(s) |
object (Tags) list of client tags to target for execution, plus an operator either OR (for any matching tags) or AND (for all tags must match). Tags cannot be used in conjunction with client_ids or group_ids. | |
interpreter | string Enum: "cmd" "powershell" command interpreter to use to execute the command. Is applicable only for windows clients. If not set 'cmd' is used by default |
timeout_sec | integer timeout in seconds to observe the command execution on each client separately. If not set a default timeout (60 seconds) is used |
execute_concurrently | boolean Default: false if true - execute the command concurrently on clients. If false - sequentially in order that is in 'client_ids'. By default is false |
abort_on_error | boolean Default: true applicable only if 'execute_concurrently' is false. If true - abort the entire cycle if the execution fails on some client. By default is true |
cwd | string current working directory for an executable command |
is_sudo | boolean execute the command as a sudo user |
{- "data": {
- "jid": "string"
}
}
Return a detailed info about a multi-client command by given id with child jobs as well
job_id required | string unique multi job id retrieved previously |
{- "data": {
- "jid": "string",
- "started_at": "string",
- "created_by": "string",
- "schedule_id": "8929bb67-0da1-406c-99d2-5447376a4f58",
- "client_ids": [
- "string"
], - "group_ids": [
- "string"
], - "tags": {
- "tags": [
- "string"
], - "operator": "string"
}, - "command": "string",
- "cwd": "string",
- "is_sudo": true,
- "interpreter": "string",
- "timeout_sec": 0,
- "concurrent": true,
- "abort_on_err": true,
- "jobs": [
- {
- "jid": "string",
- "client_id": "string",
- "client_name": "string",
- "pid": 0,
- "status": "running",
- "command": "string",
- "cwd": "string",
- "is_sudo": true,
- "interpreter": "string",
- "started_at": "string",
- "finished_at": "string",
- "created_by": "string",
- "timeout_sec": 0,
- "multi_job_id": "string",
- "error": "string",
- "result": {
- "stdout": "string",
- "stderr": "string",
- "summary": "string"
}
}
]
}
}
Return a list of all running and finished jobs sorted by finished time in desc order with running commands at the beginning
job_id required | string unique multi-client command id |
sort | string Sort field to be used for sorting, the default sorting is by finished time in desc order.
To change the direction add |
filter[<FIELD>] | string Filter option |
page | integer Pagination options |
fields[<RESOURCE>] | string Fields to be returned. It should be provided in the format as |
{- "data": [
- {
- "jid": "string",
- "status": "running",
- "finished_at": "string",
- "result": {
- "summary": "string"
}
}
], - "meta": {
- "count": 0
}
}
NOTE: swagger is not designed to document WebSocket API. This is a temporary solution. A new web socket is created for each new request to execute a remote command on rport client(s). Steps:
ExecuteCmdRequest
(see in 'Models')
For example,{
"command": "/usr/bin/whoami",
"client_ids": [ "qa-lin-debian9", "qa-lin-debian10", "qa-lin-centos8", "qa-lin-ubuntu18", "qa-lin-ubuntu16" ],
"group_ids": [ "group-1"],
"timeout_sec": 30,
"cwd": "/root",
"execute_concurrently": true,
"is_sudo": true
}
ErrorPayload
(see in 'Models') and closes the connection.JobPartial
(see in 'Models').Job
(see in 'Models').
The final result contains full stdout and stderr outputs.
It can contain a non-empty 'error' field if server wasn't able to send the command to the rport client.
Number of final outbound messages is expected to be as many as rport clients. Or less if it's not a concurrent mode and 'abort_on_error' is turned on.There is a simple UI for testing. Try it out on http://127.0.0.1:3000/api/v1/test/commands/ui.
access_token required | string JWT token that is created by 'login' API endpoint. Required to pass the authentication. |
{ }
For more details https://oss.openrport.io/docs/no12-user.html
Return a list of all existing users sorted by username in asc order. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment
{- "data": [
- {
- "username": "string",
- "groups": [
- "string"
], - "two_fa_send_to": "string",
- "group_permissions_enabled": true,
- "effective_user_permissions": {
- "commands": true,
- "monitoring": true,
- "scheduler": true,
- "scripts": true,
- "tunnels": true,
- "uploads": true,
- "vault": true,
- "auditlog": true
}, - "effective_extended_permissions": {
- "tunnels_restricted": { },
- "commands_restricted": { }
}
}
]
}
Create a new user. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment
User to create.
username | string Username for the credentials pair |
password | string Password for the credentials pair |
password_expired | boolean Password expired flag. Setting this to true, sessions are invalidated and user is forced to create a new password on next login |
groups | Array of strings List of groups to which the current user belongs |
two_fa_send_to | string Holds either the email or the pushover token of the user. It's used to deliver 2FA token to user when 2FA is enabled |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
Update an existing user. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment.
user_id required | string unique user ID |
User to update. Please note, that if you provide some key/values like username: login1
, the not mentioned keys won't be changed, e.g. password
username | string Username for the credentials pair |
password | string Password for the credentials pair |
password_expired | boolean Password expired flag. Setting this to true, sessions are invalidated and user is forced to create a new password on next login |
groups | Array of strings List of groups to which the current user belongs |
two_fa_send_to | string Holds either the email or the pushover token of the user. It's used to deliver 2FA token to user when 2FA is enabled |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
Deletes a user by a given id. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment
user_id required | string unique user ID |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
Gets all the API sessions for the user specified. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment
user_id required | string unique user ID |
{- "data": [
- {
- "session_id": 0,
- "token": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "last_access_at": "2019-08-24T14:15:22Z",
- "username": "string",
- "user_agent": "string",
- "ip_address": "string"
}
]
}
Deletes all the API sessions for the user specified. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment
user_id required | string unique user ID |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
Deletes the API session with the session id specified. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment
user_id required | string unique user ID |
session_id required | string session ID |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
Deletes private key for an Authenticator app. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment
user_id required | string unique user ID |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
This API is only enabled if the Rport Plus plugin is loaded and running. For more information, see Rport Plus.
It allows an authorization code (code
) returned by an OAuth provider callback to be used to login to RPort and obtain an Rport Authorization JWT Token. The state
parameter also received in the callback must also be provided and will be validated by the Rport server.
Note that security will be increased if clients verify that the state
parameter returned in the callback matches the state
parameter supplied initially as part of the OAuth authorize
url. To obtain an authorize
url, the Rport /auth/ext/settings
endpoint must be called. It will return two additional APIs that can be used to perform OAuth based logins.
code | string the authorization code received via the OAuth provider callback |
state | string the state received via the OAuth provider callback |
token-lifetime | integer <= 7776000 Default: 600 initial lifetime of JWT token in seconds. Max value is 90 days. Default: 10 min |
{- "data": {
- "token": "string",
- "two_fa": { }
}
}
This API is only enabled if the Rport Plus plugin is loaded and running. For more information, see Rport Plus.
Before this API can be called, the api client must have previously called the /auth/ext/settings/device
endpoint and presented the returned verification_uri
and user_code
to the user. The user is then responsible for proceeding independently to the verification_uri
page and entering the user_code
to authorize the api client for use with Rport.
Once the user is authorized then this API call will return an Rport authentication token which will be stored in the config.json
. The user will not need to authenticate again until the Rport token expires.
If the user has not authorized yet, then an error will be returned indicating that the authorization is authorization_pending
. The api client must wait for the interval
period (in seconds) after which they may try to login again. If the api client retries too quickly then the OAuth provider will rate limit the client and a slow_down
error message will be returned.
Only the authorization_pending
and slow_down
error messages are soft errors that can be retried. The api client should abort the authorization on receiving any other errors.
NOTE: Some OAuth providers return http error status codes while others always return 200. If the response is 200, then the api client should still check the error
value in the response for non-empty text. If non- empty then there is an error to be handled.
device_code | string the |
token-lifetime | integer <= 7776000 Default: 600 initial lifetime of JWT token in seconds. Max value is 90 days. Default: 10 min |
{- "data": {
- "token": "string",
- "two_fa": { },
- "error": "string",
- "error_description": "string",
- "error_uri": "string"
}
}
Rport server will copy script contents to a temp folder on an rport client. Then it will implicitly execute shell script as a command e.g. sh /tmp/script.sh. NOTE: if command limitation is enabled by an rport client then it should allow execution commands like sh script.sh or cmd script.bat or powershell -executionpolicy bypass -file script.ps1. See https://oss.rport.io/docs/no06-command-execution.html#securing-your-environment for more details
client_id required | string unique client id retrieved previously |
script to execute by the rport client, the format depends on the client's OS
script | string base64 encoded script which should be executed on a remote client |
interpreter | string Enum: "cmd" "powershell" "tacoscript" command interpreter to use to execute the script. If not set 'cmd' is used by default on Windows and /bin/sh on Linux. For tacoscript interpreter you should install tacoscript binary from here: https://github.com/realvnc-labs/tacoscript#installation. It should also be available in the system path. Additionally, you can use interpreter aliases or full absolute paths to an interpreter of your choice (see https://oss.rport.io/docs/no14-scripts.html#scripts-execution for details). |
cwd | string current working directory for the executable script |
is_sudo | boolean execute a command as sudo user, applicable only for Linux systems |
timeout_sec | integer timeout in seconds to observe the script execution. If not set a default timeout (60 seconds) is used |
{- "script": "string",
- "interpreter": "cmd",
- "cwd": "string",
- "is_sudo": true,
- "timeout_sec": 0
}
This API executes the provided script on multiple clients similar to the command execution
properties and remote command to execute by rport clients
object (ExecuteScriptRequest) Request that contains a remote script to execute by rport client(s) and other related properties |
{- "data": {
- "jid": "string"
}
}
NOTE: swagger is not designed to document WebSocket API. This is a temporary solution. A new web socket is created for each new request to execute a script on rport client(s). Steps:
ExecuteScriptRequest
(see in 'Models'):
For example,{
"script": "Y2QgL1VzZXJzL2JyZWF0aGJhdGgvc3NsCmxzIC1sYQpjZCBnb2tleQpjYXQgTElDRU5TRQ==",
"client_ids": [ "qa-lin-debian9", "qa-lin-debian10", "qa-lin-centos8", "qa-lin-ubuntu18", "qa-lin-ubuntu16" ],
"group_ids": [ "group-1"],
"timeout_sec": 30,
"cwd": "/users/root",
"execute_concurrently": true,
"is_sudo": true
}
/tmp/f68a779d-1d46-414a-b165-d8d2df5f348c.sh
or f68a779d-1d46-414a-b165-d8d2df5f348.ps1
).
Then it will run this script as a regular command e.g. sh /tmp/f68a779d-1d46-414a-b165-d8d2df5f348c.sh
If it fails, the server sends an outbound JSON message ErrorPayload
(see in 'Models') and closes the connection. The temp script will be deleted anyway.JobPartial
(see in 'Models').Job
(see in 'Models').
The final result contains full stdout and stderr outputs.
It can contain a non-empty 'error' field if server wasn't able to send the command to the rport client.
Number of final outbound messages is expected to be as many as rport clients. Or less if it's not a concurrent mode and 'abort_on_error' is turned on. There is a simple UI for testing. Try it out on http://127.0.0.1:3000/api/v1/test/scripts/ui. You can enable this api by setting enable_ws_test_endpoints=true
in the configuration file.
access_token required | string JWT token that is created by 'login' API endpoint. Required to pass the authentication. |
{ }
NOTE: swagger is not designed to document WebSocket API. This is a temporary solution.
The web socket API tracks uploads for all clients and all requests. Steps:
enable_ws_test_endpoints=true
in the configuration fileaccess_token required | string JWT token that is created by 'login' API endpoint. Required to pass the authentication. |
{- "data": {
- "uuid": "string",
- "client_id": "string",
- "filepath": "string",
- "size": 0,
- "message": "string",
- "status": "success"
}
}
Handles file uploads as a multipart/form-data.
upload required | string <binary> The file to upload |
client_id required | string Client ID where the file should be placed. You can repeat 'client' parameter to indicate multiple clients |
group_id | string ID of a client group where the file should be placed. You can repeat 'group_id' parameter to indicate multiple groups |
object (Tags) list of client tags to target for execution, plus an operator either OR (for any matching tags) or AND (for all tags must match). Tags cannot be used in conjunction with client_ids or group_ids. | |
dest required | string Absolute path with the file name on the client where the file should be placed |
force | string If true, rport client will overwrite destination file if it exists or fail otherwise. You can provide values like true or 1 or on to enable this flag |
sync | string If true and the destination file exists, rport client will compare md5 checksum of the provided file with the destination file and will overwrite it if it's not matching. On Unix it will also compare file mode, owner and group of the existing file with the provided values and if they don't match, rport client will execute chmod/chown operations on the destination path. if false or file doesn't exists, the provided file will be copied to the destination. |
mode | string For Unix only, indicates the desired file mode of the target file on the client. If the file doesn't exist, it will be created with the provided mode. If file exists (and sync is true), rport client will run chmod operation with the provided file mode. |
user | string For Unix only, indicates the desired owner name the target file on the client.
The uploaded file will be created with the default owner in a temp folder. If |
group | string For Unix only, indicates the group name the target file on the client. The uploaded file will be created with the default group in a temp folder. Then rport client will chown the temp file with the provided group name. Then it will be moved to the target path. Please make sure that the provided group exists on the client. Since changing group of a file requires sudo rights, the rport client user should have the necessary permissions to chown and move file to the target location. |
{- "data": {
- "uuid": "string",
- "filepath": "string",
- "size": 0
}
}
{- "data": [
- {
- "name": "string",
- "permissions": {
- "property1": true,
- "property2": true
}, - "tunnels_restricted": {
- "local": [
- "string"
], - "remote": [
- "string"
], - "scheme": [
- "string"
], - "acl": [
- "string"
], - "idle-timeout-minutes": {
- "min": 0,
- "max": 0
}, - "auto-close": {
- "min": "string",
- "max": "string"
}, - "protocol": [
- "string"
], - "skip-idle-timeout": true,
- "http_proxy": true,
- "host_header": "string",
- "auth_allowed": true
}, - "commands_restricted": {
- "allow": [
- "string"
], - "deny": [
- "string"
], - "is_sudo": true
}
}
]
}
name required | string group name |
{- "data": {
- "name": "string",
- "permissions": {
- "property1": true,
- "property2": true
}, - "tunnels_restricted": {
- "local": [
- "string"
], - "remote": [
- "string"
], - "scheme": [
- "string"
], - "acl": [
- "string"
], - "idle-timeout-minutes": {
- "min": 0,
- "max": 0
}, - "auto-close": {
- "min": "string",
- "max": "string"
}, - "protocol": [
- "string"
], - "skip-idle-timeout": true,
- "http_proxy": true,
- "host_header": "string",
- "auth_allowed": true
}, - "commands_restricted": {
- "allow": [
- "string"
], - "deny": [
- "string"
], - "is_sudo": true
}
}
}
name required | string group name |
object permissions with boolean values | |
object restriction with values | |
object command restrictions with values |
{- "permissions": {
- "property1": true,
- "property2": true
}, - "tunnels_restricted": {
- "local": [
- "string"
], - "remote": [
- "string"
], - "scheme": [
- "string"
], - "acl": [
- "string"
], - "idle-timeout-minutes": {
- "min": 0,
- "max": 0
}, - "auto-close": {
- "min": "string",
- "max": "string"
}, - "protocol": [
- "string"
], - "skip-idle-timeout": true,
- "http_proxy": true,
- "host_header": "string",
- "auth_allowed": true
}, - "commands_restricted": {
- "allow": [
- "string"
], - "deny": [
- "string"
], - "is_sudo": true
}
}
{- "data": {
- "name": "string",
- "permissions": {
- "property1": true,
- "property2": true
}, - "tunnels_restricted": {
- "local": [
- "string"
], - "remote": [
- "string"
], - "scheme": [
- "string"
], - "acl": [
- "string"
], - "idle-timeout-minutes": {
- "min": 0,
- "max": 0
}, - "auto-close": {
- "min": "string",
- "max": "string"
}, - "protocol": [
- "string"
], - "skip-idle-timeout": true,
- "http_proxy": true,
- "host_header": "string",
- "auth_allowed": true
}, - "commands_restricted": {
- "allow": [
- "string"
], - "deny": [
- "string"
], - "is_sudo": true
}
}
}
Reads all vault entries or find some based on the input parameters
sort | string Sort field to be used for values, the sorting direction is by default ASC.
To change the direction add |
filter[<FIELD>] | string Filter to find vault entries. It should be provided in the format as |
{- "data": [
- {
- "client_id": "string",
- "key": "string",
- "id": 0,
- "created_at": "string",
- "created_by": "string"
}
]
}
Creates a new entry in vault with the encrypted value field. If another entry with the same key and client id combination exists, an error will be returned.
value in the json format
client_id | string Used to tie a document to a specific client where 0 means the document can be accessed from any client. |
required_group | string if filled, users not belonging to this group are not allowed to store or read the decrypted value |
key | string [required] some string to identify the document |
value | string [required] value represents the encrypted |
type | string Enum: "text" "secret" "markdown" "string" [required] Type of the secret value |
{- "data": {
- "id": 0
}
}
Reads a vault entry with a decrypted value field. If required_group
value of the stored vault entry is not emtpy,
only users of this group can read this value.
id required | integer Unique vault entry ID |
{- "data": {
- "client_id": "string",
- "required_group": "string",
- "key": "string",
- "type": "text",
- "value": "string",
- "id": 0,
- "created_at": "string",
- "updated_at": "string",
- "created_by": "string",
- "updated_by": "string"
}
}
Updates an existing vault entry by the provided id
parameter.
If required_group
value of the stored vault entry is not empty, only users of this group can change this value.
You need to provide all fields like those you used to create a vault entry. Partial updates are not supported. You can get id
it by using the listing API. You get the id also when you store a new value.
id required | integer Unique vault entry ID |
value in the json format
client_id | string Used to tie a document to a specific client where 0 means the document can be accessed from any client. |
required_group | string if filled, users not belonging to this group are not allowed to store or read the decrypted value |
key | string [required] some string to identify the document |
value | string [required] value represents the encrypted |
type | string Enum: "text" "secret" "markdown" "string" [required] Type of the secret value |
Initializes vault database and stores password for further requests. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment
Password to unlock the vault
password | string A string of printed symbols 32 and 256 bits long |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
Unlocks vault to make it functional. If vault is locked, it won't accept any API requests. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment
Password to unlock the vault. It should be the same password, which was provided when the vault was initialized.
password | string A string of printed symbols 32 and 256 bits long |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
Locks vault and delets it's password from server's memory. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
Reads all scripts or find some based on the input parameters
sort | string Sort field to be used for values, the sorting direction is by default ASC.
To change the direction add |
filter[<FIELD>] | string Filter to find scripts. It should be provided in the format as |
fields[<RESOURCE>] | string Fields to be returned. It should be provided in the format as |
page | integer Pagination options |
{- "data": [
- {
- "name": "string",
- "id": "string",
- "created_at": "string",
- "created_by": "string",
- "updated_at": "string",
- "updated_by": "string",
- "interpreter": "string",
- "cwd": "string",
- "script": "string",
- "is_sudo": true,
- "tags": [
- "string"
], - "timeout_sec": 0
}
], - "meta": {
- "count": 0
}
}
Creates a new script. If another entry with the same name exists, an error will be returned.
value in the json format
name | string [required] User-friendly name of a script |
script | string [required] text of the script |
interpreter | string how will the script be executed on the client, e.g. /bin/sh, cmd.exe, powershell, tacoscript |
cwd | string current working directory, where the script should be executed |
is_sudo | boolean if true, this script will be executed as a sudo user |
tags | Array of strings List of tags for the script |
timeout_sec | integer Timout of the script in seconds |
{- "data": {
- "name": "string",
- "id": "string",
- "created_at": "string",
- "created_by": "string",
- "updated_at": "string",
- "updated_by": "string",
- "interpreter": "string",
- "cwd": "string",
- "script": "string",
- "is_sudo": true,
- "tags": [
- "string"
], - "timeout_sec": 0
}
}
Reads a script by the provided ID
id required | string Unique script ID |
fields[<RESOURCE>] | string Fields to be returned. It should be provided in the format as |
{- "data": {
- "name": "string",
- "id": "string",
- "created_at": "string",
- "created_by": "string",
- "updated_at": "string",
- "updated_by": "string",
- "interpreter": "string",
- "cwd": "string",
- "script": "string",
- "is_sudo": true,
- "tags": [
- "string"
], - "timeout_sec": 0
}
}
Updates an existing script by the provided id
parameter.
You need to provide all fields like those you used to create a script. Partial updates are not supported. You can get id
by using the listing API. You get the id also when you store a new value.
id required | string Unique script ID |
value in the json format
name | string [required] User-friendly name of a script |
script | string [required] text of the script |
interpreter | string how will the script be executed on the client, e.g. /bin/sh, cmd.exe, powershell, tacoscript |
cwd | string current working directory, where the script should be executed |
is_sudo | boolean if true, this script will be executed as a sudo user |
tags | Array of strings List of tags for the script |
timeout_sec | integer Timout of the script in seconds |
Reads all commands or find some based on the input parameters
sort | string Sort field to be used for values, the sorting direction is by default ASC.
To change the direction add |
filter[<FIELD>] | string Filter to find commands. It should be provided in the format as |
fields[<RESOURCE>] | string Fields to be returned. It should be provided in the format as |
page | integer Pagination options |
{- "data": [
- {
- "name": "string",
- "id": "string",
- "created_at": "string",
- "created_by": "string",
- "updated_at": "string",
- "updated_by": "string",
- "cmd": "string",
- "tags": [
- "string"
], - "timeout_sec": 0
}
], - "meta": {
- "count": 0
}
}
Creates a new command. If another entry with the same name exists, an error will be returned.
value in the json format
name | string [required] User-friendly name of a commend |
script | string [required] text of the command |
tags | Array of strings List of tags for the script |
timeout_sec | integer Timout of the command in seconds |
{- "data": {
- "name": "string",
- "id": "string",
- "created_at": "string",
- "created_by": "string",
- "updated_at": "string",
- "updated_by": "string",
- "cmd": "string",
- "tags": [
- "string"
], - "timeout_sec": 0
}
}
Reads a command by the provided ID
id required | string Unique command ID |
fields[<RESOURCE>] | string Fields to be returned. It should be provided in the format as |
{- "data": {
- "name": "string",
- "id": "string",
- "created_at": "string",
- "created_by": "string",
- "updated_at": "string",
- "updated_by": "string",
- "cmd": "string",
- "tags": [
- "string"
], - "timeout_sec": 0
}
}
Updates an existing command by the provided id
parameter.
You need to provide all fields like those you used to create a command. Partial updates are not supported. You can get id
by using the listing API. You get the id also when you store a new value.
id required | string Unique command ID |
value in the json format
name | string [required] User-friendly name of a commend |
script | string [required] text of the command |
tags | Array of strings List of tags for the script |
timeout_sec | integer Timout of the command in seconds |
List auditlog entries using the provided filters
sort | string Sort option |
filter | string Filter option |
page | integer Pagination options |
{- "data": [
- {
- "timestamp": "2019-08-24T14:15:22Z",
- "username": "string",
- "remote_ip": "string",
- "application": "string",
- "action": "string",
- "affected_id": "string",
- "client_id": "string",
- "client_hostname": "string",
- "request": "string",
- "response": "string"
}
], - "meta": {
- "count": 0
}
}
List downsampled monitoring data about client metrics for the provided clientID
client_id required | string Unique client ID |
sort | string There is only |
filter[timestamp][<OPERATOR>] | string Filter entries by field Downsampling data is available for a period |
{- "data": [
- {
- "timestamp": "2019-08-24T14:15:22Z",
- "cpu_usage_percent": {
- "avg": 0,
- "min": 0,
- "max": 0
}, - "memory_usage_percent": {
- "avg": 0,
- "min": 0,
- "max": 0
}, - "io_usage_percent": {
- "avg": 0,
- "min": 0,
- "max": 0
}
}
], - "links": {
- "cpu_usage_percent": "string",
- "mem_usage_percent": "string",
- "io_usage_percent": "string",
- "net_usage_percent_lan": "string",
- "net_usage_bps_lan": "string",
- "net_usage_percent_wan": "string",
- "net_usage_bps_wan": "string"
}
}
List downsampled monitoring data about client metrics for the provided clientID and graph name
client_id required | string Unique client ID |
graph_name required | string Unique graph name
Possible values are |
sort | string There is only |
filter[timestamp][<OPERATOR>] | string Filter entries by field Downsampling data is available for a period |
{- "data": [
- {
- "timestamp": "2019-08-24T14:15:22Z",
- "cpu_usage_percent": {
- "avg": 0,
- "min": 0,
- "max": 0
}, - "memory_usage_percent": {
- "avg": 0,
- "min": 0,
- "max": 0
}, - "io_usage_percent": {
- "avg": 0,
- "min": 0,
- "max": 0
}, - "net_usage_percent_lan": {
- "in_avg": 0,
- "in_min": 0,
- "in_max": 0,
- "out_avg": 0,
- "out_min": 0,
- "out_max": 0
}, - "net_usage_bps_lan": {
- "in_avg": 0,
- "in_min": 0,
- "in_max": 0,
- "out_avg": 0,
- "out_min": 0,
- "out_max": 0
}, - "net_usage_percent_wan": {
- "in_avg": 0,
- "in_min": 0,
- "in_max": 0,
- "out_avg": 0,
- "out_min": 0,
- "out_max": 0
}, - "net_usage_bps_wan": {
- "in_avg": 0,
- "in_min": 0,
- "in_max": 0,
- "out_avg": 0,
- "out_min": 0,
- "out_max": 0
}
}
]
}
List monitoring data about client metrics for the provided clientID
client_id required | string Unique client ID |
sort | string There is only |
filter[timestamp][<OPERATOR>] | string Filter entries by field |
fields[<RESOURCE>] | string Fields to be returned. It should be provided in the format as |
page | integer Pagination options |
{- "data": [
- {
- "timestamp": "2019-08-24T14:15:22Z",
- "cpu_usage_percent": 0,
- "memory_usage_percent": 0,
- "io_usage_percent": 0
}
], - "meta": {
- "count": 0
}
}
List monitoring data about client mountpoints for the provided clientID
client_id required | string Unique client ID |
sort | string There is only |
filter[timestamp][<OPERATOR>] | string Filter entries by field |
page | integer Pagination options |
{- "data": [
- {
- "timestamp": "2019-08-24T14:15:22Z",
- "mountpoints": "string"
}
], - "meta": {
- "count": 0
}
}
List monitoring data about client processes for the provided clientID
client_id required | string Unique client ID |
sort | string There is only |
filter[timestamp][<OPERATOR>] | string Filter entries by field Fetching data for a period greater than |
page | integer Pagination options |
{- "data": [
- {
- "timestamp": "2019-08-24T14:15:22Z",
- "processes": "string"
}
], - "meta": {
- "count": 0
}
}
sort | string Sort option |
filter | string Filter option You can use The Examples: |
fields[<RESOURCE>] | string Fields to be returned. It should be provided in the format as |
page | integer Pagination options |
{- "data": [
- {
- "problem_id": "string",
- "rule_id": "string",
- "client_id": "string",
- "actions": [
- {
- "notify": [
- "string"
], - "ignore": [
- "string"
], - "log": "string"
}
], - "active": true,
- "created_at": "string",
- "resolved_at": "string",
- "client_update_id": "string",
- "measurement_update_id": "string"
}
]
}
problem_id required | string unique problem ID |
{- "data": {
- "problem_id": "string",
- "rule_id": "string",
- "client_id": "string",
- "actions": [
- {
- "notify": [
- "string"
], - "ignore": [
- "string"
], - "log": "string"
}
], - "active": true,
- "created_at": "string",
- "resolved_at": "string",
- "client_update_id": "string",
- "measurement_update_id": "string"
}
}
Allows manual update of the active state for a problem. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment.
problem_id required | string problem ID |
New active state for the problem
active | boolean |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
{- "data": {
- "vars": [
- "string"
], - "rules": [
- {
- "id": "string",
- "severity": "Information",
- "expr": "string",
- "actions": [
- {
- "notify": [
- "string"
], - "ignore": [
- "string"
], - "log": "string"
}
]
}
]
}
}
Update the existing rules. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment.
The new rules.
vars | Array of strings |
Array of objects (Rule) |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
Delete the existing rules. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
Allows a set of rules to be tested against a set of test data. If successful then will include problems raised / resolved and notification requests (if applicable) that would be generated. If unsuccessful then will include the relevant errors, including any rules validation errors.
Rules and test data to test.
object (RuleSet) | |
Array of objects (Template) | |
Array of objects (Client) | |
Array of objects (Measurement) | |
delay_ms | number |
{- "data": {
- "problems": [
- {
- "problem_id": "string",
- "rule_id": "string",
- "client_id": "string",
- "actions": [
- {
- "notify": [
- "string"
], - "ignore": [
- "string"
], - "log": "string"
}
], - "active": true,
- "created_at": "string",
- "resolved_at": "string",
- "client_update_id": "string",
- "measurement_update_id": "string"
}
], - "notifications": [
- {
- "ref_id": "string",
- "notification": {
- "target": "smtp",
- "subject": "string",
- "recipients": [
- "string"
], - "content": "string",
- "content_type": "string"
}
}
], - "log_output": "string",
- "validation_errors": [
- {
- "prefix": "string",
- "err": "string"
}
], - "error": "string"
}
}
template_id required | string unique template ID |
{- "data": {
- "id": "string",
- "transport": "smtp",
- "subject": "string",
- "body": "string",
- "html": true,
- "data": {
- "subject": "string",
- "severity": "string",
- "client": "string",
- "webhook_url": "string"
}, - "recipients": [
- "string"
]
}
}
Update an existing template. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment.
template_id required | string unique template ID |
Template to update.
transport | string |
subject | string |
body | string |
html | boolean |
object | |
recipients | Array of strings |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
Deletes a template by a given id. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment
template_id required | string unique template ID |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
{- "data": [
- {
- "id": "string",
- "transport": "smtp",
- "subject": "string",
- "body": "string",
- "html": true,
- "data": {
- "subject": "string",
- "severity": "string",
- "client": "string",
- "webhook_url": "string"
}, - "recipients": [
- "string"
]
}
]
}
Create a new template. This API requires the current user to be member of group Administrators
. Returns 403 otherwise. The Administrators
group name is hardcoded and cannot be changed at the moment.
Template to update.
id | string |
transport | any (Transport) Enum: "smtp" "name of script" |
subject | string |
body | string |
html | boolean |
object | |
recipients | Array of strings |
{- "errors": [
- {
- "code": "string",
- "title": "string",
- "detail": "string"
}
]
}
Reads all schedules or find some based on the input parameters
sort | string Sort field to be used for sorting, the sorting direction is by default ASC.
To change the direction add |
filter[<FIELD>] | string Filter the results. It should be provided in the format as |
page | integer Pagination options |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "string",
- "created_by": "string",
- "name": "string",
- "schedule": "* * * * *",
- "type": "command",
- "client_ids": [
- "string"
], - "group_ids": [
- "string"
], - "tags": {
- "tags": [
- "string"
], - "operator": "string"
}, - "command": "string",
- "script": "string",
- "interpreter": "string",
- "cwd": "string",
- "is_sudo": true,
- "timeout_sec": 0,
- "execute_concurrently": true,
- "abort_on_error": true,
- "overlaps": true,
- "last_execution": {
- "started_at": "string",
- "client_count": 0,
- "success_count": 0,
- "status": "string",
- "summary": "string"
}
}
], - "meta": {
- "count": 0
}
}
Creates a new schedule.
value in the json format
name | string Name of the schedule |
schedule | string Schedule in the cron format |
type | string 'command' or 'script' |
client_ids | Array of strings Client IDs that schedule will be executed on |
group_ids | Array of strings Group IDs that schedule will be executed on |
object (Tags) list of client tags to target for execution, plus an operator either OR (for any matching tags) or AND (for all tags must match). Tags cannot be used in conjunction with client_ids or group_ids. | |
command | string Command to be executed, only for type 'command' |
script | string Base64 encoded script to be executed, only for type 'script' |
interpreter | string Interpreter for schedule execution, for details on this and other params see commands or scripts |
cwd | string Cwd for schedule execution |
is_sudo | boolean Is sudo for schedule execution |
timeout_sec | number Timeout for schedule execution |
execute_concurrently | boolean Whether to execute concurrently on all clients |
abort_on_error | boolean Abort on error for schedule execution |
overlaps | boolean Whether to start another schedule execution when previous is still in progress |
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "string",
- "created_by": "string",
- "name": "string",
- "schedule": "* * * * *",
- "type": "command",
- "client_ids": [
- "string"
], - "group_ids": [
- "string"
], - "tags": {
- "tags": [
- "string"
], - "operator": "string"
}, - "command": "string",
- "script": "string",
- "interpreter": "string",
- "cwd": "string",
- "is_sudo": true,
- "timeout_sec": 0,
- "execute_concurrently": true,
- "abort_on_error": true,
- "overlaps": true,
- "last_execution": {
- "started_at": "string",
- "client_count": 0,
- "success_count": 0,
- "status": "string",
- "summary": "string"
}
}
}
Get a schedule by the provided ID
id required | string Unique schedule ID |
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "string",
- "created_by": "string",
- "name": "string",
- "schedule": "* * * * *",
- "type": "command",
- "client_ids": [
- "string"
], - "group_ids": [
- "string"
], - "tags": {
- "tags": [
- "string"
], - "operator": "string"
}, - "command": "string",
- "script": "string",
- "interpreter": "string",
- "cwd": "string",
- "is_sudo": true,
- "timeout_sec": 0,
- "execute_concurrently": true,
- "abort_on_error": true,
- "overlaps": true,
- "last_execution": {
- "started_at": "string",
- "client_count": 0,
- "success_count": 0,
- "status": "string",
- "summary": "string"
}
}
}
Updates an existing schedule by the provided id
parameter.
You need to provide all fields like those you used to create a schedule. Partial updates are not supported. You can get id
by using the listing API. You get the id also when you store a new value.
id required | string Unique schedule ID |
value in the json format
name | string Name of the schedule |
schedule | string Schedule in the cron format |
type | string 'command' or 'script' |
client_ids | Array of strings Client IDs that schedule will be executed on |
group_ids | Array of strings Group IDs that schedule will be executed on |
object (Tags) list of client tags to target for execution, plus an operator either OR (for any matching tags) or AND (for all tags must match). Tags cannot be used in conjunction with client_ids or group_ids. | |
command | string Command to be executed, only for type 'command' |
script | string Base64 encoded script to be executed, only for type 'script' |
interpreter | string Interpreter for schedule execution, for details on this and other params see commands or scripts |
cwd | string Cwd for schedule execution |
is_sudo | boolean Is sudo for schedule execution |
timeout_sec | number Timeout for schedule execution |
execute_concurrently | boolean Whether to execute concurrently on all clients |
abort_on_error | boolean Abort on error for schedule execution |
overlaps | boolean Whether to start another schedule execution when previous is still in progress |
sort | string Sort option |
filter | string Filter option You can use The |
fields[<RESOURCE>] | string Fields to be returned. It should be provided in the format as |
page | integer Pagination options |
{- "data": {
- "state": "queued",
- "notification_id": "string",
- "transport": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "out": "string",
- "err": "string"
}
}
notification_id required | string unique notification ID |
{- "data": {
- "RefID": "string",
- "Data": {
- "ContentType": "string",
- "Body": "string"
}, - "State": "queued",
- "ID": "string",
- "Out": "string",
- "Target": "Mail",
- "Err": "string"
}
}