Get session

REQUEST
GET /id=<session id> or /idChannel=<channel id>

RESPONSE
200 OK
{
id: xxxxxxxxxxxxxxxxx,
idChannel: xxx,
idAgent: xxxxxxxxxxxxxxxxx,
initTime: Fri Oct 19 15:19:48 UTC 2018,
frozen: false,
ipAddress: xxx.xxx.xxx.xx
}

List all sessions

REQUEST
GET

RESPONSE
200 OK
[
{
id: xxxxxxxxxxxxxxxxx,
idChannel: xxx,
idAgent: xxxxxxxxxxxxxxxxx,
initTime: Fri Oct 19 15:19:48 UTC 2018,
frozen: false,
ipAddress: xxx.xxx.xxx.xx
},
{
id: xxxxxxxxxxxxxxxxx,
idChannel: xxx,
initTime: Fri Oct 19 15:19:48 UTC 2018,
frozen: false,
ipAddress: xxx.xxx.xxx.xx
},
...
]

Create a new session

REQUEST
POST
{
idChannel: 0,
idAgent: xxxxxxxxxxxxxxxx
locale: en
fullAccess: false,
hideAppsBar: true,
postMessageOrigin: www.mysite.com,
applications: {
desktop: {
fullAccess: true,
},
filesystem: {
fullAccess: false,
paths: [
{
name: path1,
path: c:\\test,
edit: true,
download: true,
upload: true
},
...
],
...
},
...
}
}

RESPONSE
200 OK
{
idChannel: channel id (same of request),
url: url of session
tempcode: temporary code (present only if idAgent is empty).
}

The information to create a session is:

idChannel:Identify the channel id.
idAgent:Identify the agent id (if omitted, create a temporary session).
fullAccess:true or false
applications:List of application allowed. (Valid if fullAccess=false). The available applications are: desktop, filesystem, texteditor, resource, logwatch, shell
hideAppsBar:true/false (default false) hide menu apps.
showAppOnLoad:Show app specified when session is loaded. (valid only if you have defined more of one app in applications)
postMessageOrigin:If you want show content inside of IFrame you have to set your domain (e.g. https://www.company.com).

If fullAccess is false, you have to specify the list of allowed applications :

Desktop :

fullAccess:true or false
allowScreenInput:Allow user input. (Valid if fullAccess=false)
allowAudio:Allow remote audio. (Valid if fullAccess=false)
hideToolBar:Hide the toolbar. (true/false)
backgroundColor:Change background color. (e.g. "#ffffff")
messageBackgroundColor:Change message background color. (e.g. "#ffffff")
messageColor:Change message color. (e.g. "#000000")

FileSystem:

fullAccess:true or false
paths:Shows to user only specified path list.(Valid if fullAccess=false).
The path information are:
  • name: Name shown to the user.
  • path: The real directory path.
  • edit: Allow edit (true or false).
  • download: Allow download (true or false).
  • upload: (true or false).

TextEditor:

fullAccess:true or false
paths:Shows to user only specified path list. (Valid if fullAccess=false).
The path information are:
  • name: Name shown to the user.
  • path: The real directory path.
  • edit: Allow edit (true or false).

LogWatch:

fullAccess:true or false
paths:Shows to user only specified path list. (Valid if fullAccess=false).
The path information are:
  • name: Name shown to the user.
  • path: The real directory path.

Resource:

fullAccess:true

Shell:

fullAccess:true

Sessions resource

The url to perform operations on sessions resource is:

https://www.apiremoteaccess.com/en/api/json/sessions

This resource allows you to manage user sessions to agent. When you create a user session, the server returns a URL that you can publish inside the IFrame of your web application or you can open it in new window. Every user session is identified by unique IDChannel, if you create a new user session with IDChannel already connected, the previous session with same IDChannel will be closed.
The DELETE method allows you to close a session, but you don’t need to close the session by API because the correct way is to close the session is within your web application.

The session resource information is:

id:Identify the session id.
idChannel:Identify the channel id.
idAgent:Identify the agent id (if missing, is a temporary session).
initTime:UTC time when session is started.
ipAddress:IP address of the user.
frozen:true/false. After 20 minute of inactivity the session will be frozen. After 24 hours the session will be destroyed.
frozenTime:UTC time when session is frozen. (valid if frozen=true).

Get agent

REQUEST
GET /id=<agent id> or /name=<agent name>

RESPONSE
200 OK
{
state: N,
osType: 1,
id: xxxxxxxxxxxxxxxxxx,
supportedApplications: filesystem;texteditor;logwatch;resource;desktop,
description: Description,
name: Name
}

List all agents

REQUEST
GET

RESPONSE
200 OK
[
{
state: W,
installCode: 123456789,
id: xxxxxxxxxxxxxxxxxx,
description: Description 1,
name: Name 1
},
{
state: N,
osType: 1,
id: xxxxxxxxxxxxxxxxxx,
supportedApplications: filesystem;texteditor;logwatch;resource;desktop,
description: Description 2,
name: Name 2
},
...
]

Delete an agent

REQUEST
DELETE /id=<agent id>

RESPONSE
200 OK
{
status: 200
}

Modify an agent

REQUEST
PUT
{
name: <name of agent>,
description: <description of agent>
}

RESPONSE
200 OK
{
status: 200
}

Create an agent

REQUEST
POST
{
name: <name of agent>,
description: <description of agent>
}

RESPONSE
200 OK
{
id: <id of agent created>,
installCode: <code to install agent>
}

Agent resource

The url to perform operations on agents resource is:

https://www.apiremoteaccess.com/en/api/json/agents

The agent resource information is:

id:Identify the agent id.
name:Name of agent.
description:Description of agent.
state:Indicates the state of an agent:
W = Wait installation
N = Online
F = Offline
D = Disabled
osType:Indicates the OS where agent is installed:
1 = Windows
2 = Linux
3 = Mac OS
installCode:This code enables to install agent (Available is state=W).
supportedApplications:List of applications supported by agent: filesystem;texteditor;logwatch;resource;desktop