API Reference

The API commands and calls available for Central.

Host actions

List hosts

GET https://secure.logmein.com/public-api/v2/hosts
Returns a list of all hosts to which the given profile has access.

Result


On success:


{
  "hosts": [
    {
       "description": "<host-name1>",
       "id": <host-id1>,
       "isHostOnline" : true
    },
    {
       "description": "<host-name2>",
       "id": <host-id2>,
       "isHostOnline" : false
    },
  ... ]
}

On failure:
HTTP - 429

Examples
The JSON response may be in a non-breaking format; that is, it may or may not be indented:


 $ curl https://server/public-api/v2/hosts -i -H "Content-type: application/JSON; charset=utf-8" -H "Accept: application/JSON; charset=utf-8" -H "Authorization: <...>"

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 74
Content-Type: application/JSON; charset=utf-8
Server: Microsoft-IIS/7.5
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
X-Powered-By: ASP.NET
Date: Mon, 11 Nov 2013 15:33:31 GMT

{"hosts":[{"description": "DEVWIN7HOST","id": 1234567890,"isHostOnline": true}]}
$

This example shows what happens when credentials are missing:


$ curl https://server/public-api/v2/hosts -i -H "Content-type: application/JSON; charset=utf-8" -H "Accept: application/JSON; charset=utf-8"

HTTP/1.1 401 Unauthorized
Cache-Control: private
Content-Length: 32
Content-Type: application/JSON
Server: Microsoft-IIS/7.5
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
X-Powered-By: ASP.NET
Date: Mon, 11 Nov 2013 15:40:40 GMT

{"message":"Not authenticated."}
$

The status-code and body both contain useful error messages to aid the debugging process.

List hosts and their groups

GET https://secure.logmein.com/public-api/v2/hostswithgroups

Returns the list of all groups and a list of all hosts to which the given profile has access.

Input

No special input parameters.

Result


On success:


{
    "groups": [
    {
      "id": 49932,
      "name": "Work Computers"
    },
    {
      "id": 49933,
      "name": "Home Computers"
    },
    {
      "id": -1,
      "name": null
    }
  ],
  "hosts": [
    {
       "description": "Workhorse",
       "groupid" : 49932,
       "id": <host-id1>,
       "isHostOnline" : true
    },
    {
       "description": "Kitty's machine",
       "groupid" : 49933,
       "id": <host-id2>,
       "isHostOnline" : false
    },
  ... ]
}

On failure:
HTTP-429

Examples The JSON response may be in a non-breaking format; that is, it may or may not be indented.


$ curl https://server/public-api/v2/hostswithgroups -i -H "Content-type: application/JSON; charset=utf-8" -H "Accept: application/JSON; charset=utf-8" -H "Authorization: <...>"

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 74
Content-Type: application/JSON; charset=utf-8
Server: Microsoft-IIS/7.5
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
X-Powered-By: ASP.NET
Date: Mon, 11 Nov 2013 15:33:31 GMT

{"groups":[{"id":49932,"name":"Work Computers"},{"id":49933,"name":"Home Computers"},{"id":-1,"name":null}],"hosts":[{"description":"Workhorse","groupid":49932,"id":123456,"isHostOnline":true},{"description":"Kitty's machine","groupid":49933,"id":123457,"isHostOnline":false}]}
$

This example shows what happens when credentials are missing:


$ curl https://server/public-api/v2/hostswithgroups -i -H "Content-type: application/JSON; charset=utf-8" -H "Accept: application/JSON; charset=utf-8"

HTTP/1.1 401 Unauthorized
Cache-Control: private
Content-Length: 32
Content-Type: application/JSON
Server: Microsoft-IIS/7.5
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
X-Powered-By: ASP.NET
Date: Mon, 11 Nov 2013 15:40:40 GMT

{"message":"Not authenticated."}
$ 

The status-code and body both contain useful error messages to aid the debugging process.

Change Host description

PUT https://secure.logmein.com/public-api/v1/hosts/{host-id}/description
Note: The host-id is the id of the host you want to update.

Allows you to update the host's description.

Request body:

{
    "newDescription" : "< New Description >"
}

Result

On Success
HTTP 204 - No Content

On failure

  • HTTP 400 - Bad Request - The given ID or the input string is invalid.
  • HTTP 401 - Unauthorized - The CompanyID or PSK is invalid.
  • HTTP 409 - Conflict - The new description is already in use.

Example


$ curl https://secure.logmein.com/public-api/v1/hosts/<host-id>/description -X PUT -i 
-H "Accept: application/JSON; charset=utf-8" 
-H "Content-Type: application/json" 
-H 'Authorization: basic <basic authorization>' 
-d '{ "newDescription" : "<New Description>"}'

HTTP/1.1 204 No Content
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
Server: Microsoft-IIS/8.5
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
Date: Fri, 14 Jul 2017 14:45:07 GMT

Move hosts into different groups

PUT https://secure.logmein.com/public-api/v1/host-groups/{groupid}/hosts
Note: The {groupid} is the target groupId and datatype is int.

Allows you to select host machines to move into different groups.

Request body:

{ 
"hostIds" : [<hostId1>, <hostId2>,...]
}

Note:: The host id is in an int64 format.

Result

On Success
HTTP 204 - No Content

On Failure
HTTP 400 -Bad Request

Connect to host


POST https://secure.logmein.com/public-api/v1/hosts/{host-id}/connection

Input
Url part:

  • host-id is the id of the host you want to connect to
Request body:


{
    "directLink": true|false,
    "failWhenRaSessionInProgress": true|false
}

directLink

  • When true returns the direct link to the Host for establishing the connection without installing the browser extensions.
  • When false returns the gatewayUrl giving you the option to download a separate link to connect to a host or else install the browser extensions.

failWhenRaSessionInProgress

  • When true the error code returned is: HTTP 409 - Conflict status code.
  • When false the session tries to connect regardless of the in session status.

Result

On success:
HTTP 200 - OK


{
    "gatewayUrl": "<url>",
    "sessionTicketId": <ticketId>
}

On failure

  • HTTP 404 - Not found - The given host is nonexistent, or does not belong to the company.
  • HTTP 405 - Method not allowed - The host is offline.
  • HTTP 409 - Conflict - Remote Access session is already in progress - and the failWhenRaSessionInProgress option was set true.

Response body:


{
    "message": "<human readable error message>",
    "hostId": <host-id>
}

Example
For this example, the host was offline so the response had a status of HTTP 405 - Method not allowed


$ curl https://<server>/public-api/v1/hosts/<host-id>/connection -i \
-H "Accept: application/JSON; charset=utf-8" \
-H "Content-type: application/JSON; charset=utf-8" \
-H 'Authorization: basic <basic authorization>' 
-d '{ "directLink":false, "failWhenRaSessionInProgress":true }'

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 59
Content-Type: text/html
Expires: -1
Server: Microsoft-IIS/8.5
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
Date: Thu, 14 Apr 2016 16:57:06 GMT

{"gatewayUrl":"https://<server>/ws/forwardtopc.asp?gateway=IE11WIN7--1--launvhyskh.dev-app01.3amlabs.net&hostid=<host-id>&hostdesc=IE11WIN7%20(1)&ticket=cg16zciixgyyv9hmqbwlm4tp1qxh1gk189ak6fgy37d4ajq7y70gl9pxf88223ydk9627dn0f9tjcvx9j1dgfd1qnnl2d4c541rpat6t3mqsk0ni4a70ofyipj5t0pzmn8jpgzjiob360lcb4kt3mapie2dkd897qzhhqew8bop2g7zxaywaold8o5g1hrvu6sbia9p6&buildnumber=7432","sessionTicketId":829487}
$

If the host was actually offline, the response would have also included this:


HTTP/1.1 405 Method Not Allowed
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 59
Content-Type: text/html
Expires: -1
Server: Microsoft-IIS/8.5
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
Date: Thu, 14 Apr 2016 16:57:06 GMT

{
  "message": "Host is offline.",
  "hostId": <the same host id that was given in the url>
}

Delete hosts

DELETE https://secure.logmein.com/public-api/v1/hosts
Deletes list of hosts.

Important: The hostid numbers must be Int64.

Request body:

{ 
  "hostIds" : [<hostId1>, <hostId2>,...]
}

Result
On Success
HTTP 204 - No Content

On Failure
HTTP 400 -Bad Request

Hardware Inventory

Get the list of available Hardware Inventory fields

GET https://secure.logmein.com/public-api/v1/inventory/hardware/fields
Returns a list of the field names. These fields can be queried in an Inventory report.

Result


[
    "BatteryName",
    "CpuNumberOfCores",
    "CpuNumberOfProcessors",
    "CpuSpeed",
    "CpuType",
    "DisplayDate",
    "DisplayProvider",
    "DisplayType",
    "DisplayVersion",
    "DriveCapacity",
    "DriveDiskType",
    "DriveMediaType",
    "DriveName",
    "DriveSerialNumber",
    "HardwareAssetTag",
    "HardwareManufacturer",
    "HardwareModel",
    "MemoryModules",
    "MemorySize",
    "MotherboardChipset",
    "MotherboardMemorySlots",
    "NetworkConnectionMacAddress",
    "NetworkConnectionName",
    "PartitionDrive",
    "PartitionFileSystem",
    "PartitionFreeSpace",
    "PartitionName",
    "PartitionRaid",
    "PartitionRaidFailingDiskNumber",
    "PartitionRaidStatus",
    "PartitionTotalSize",
    "ServiceTag"
]

Create a Hardware Inventory report

POST https://secure.logmein.com/public-api/v1/inventory/hardware/reports
Creates a new report-token that can be used for Inventory data requests. The expires snippet indicates when a new report-token can be created -it is also present even when previous tokens have no hosts left to query.

Input

Request body:


{
  "hostIds": [<id1>, <id2>, ...],
  "fields": ["<field1>", "<field2>", ...]
}

Here is a list of current fields at the time of publication. A full up to date list can be retrieved by using
GET https://secure.logmein.com/public-api/inventory/hardware/fields

  • BatteryName
  • CpuNumberOfCores
  • CpuNumberOfProcessors
  • CpuSpeed
  • CpuType
  • DisplayDate
  • DisplayProvider
  • DisplayType
  • DisplayVersion
  • DriveCapacity
  • DriveDiskType
  • DriveMediaType
  • DriveName
  • DriveSerialNumber
  • HardwareAssetTag
  • HardwareModel
  • MemoryModules
  • MemorySize
  • MotherboardChipset
  • MotherboardMemorySlots
  • NetworkConnectionMacAddress
  • NetworkConnectionName
  • PartitionDrive
  • PartitionFileSystem
  • PartitionFreeSpace
  • PartitionName
  • PartitionRaid
  • PartitionRaidFailingDiskNumber
  • PartitionRaidStatus
  • PartitionTotalSize
  • ServiceTag

If the fields snippet is omitted, then all fields will be queried.

Result

On Success:
HTTP 201 -Created


{
  "token": <...>,
  "expires": <UTC-datetime>
}

On Failure:
HTTP 429- Previous report-token is not expired yet.

Example


$ curl https://server/public-api/v1/inventory/hardware/reports -i \
-H 'Content-type: application/JSON; charset=utf-8' \
-H 'Accept: application/JSON; charset=utf-8' \
-H 'Authorization: <...>'
-d '{ \
      "hostIds": [1234567890, 1234567891], \
      "fields": ["cpuType", "cpuSpeed", "cpuNumberOfCores"] \
}'

HTTP/1.1 201 Created
Cache-Control: private
Content-Length: 85
Content-Type: application/JSON; charset=utf-8
Server: Microsoft-IIS/7.5
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
X-Powered-By: ASP.NET
Date: Mon, 11 Nov 2013 16:15:46 GMT

{
    "expires": "2013-11-11 16:16:47Z",
    "token": "ZMxfBT6VFRExcepoeapUgQg7SalYP7o2eSesbDrm"
}
$

Get currently active Hardware Inventory report


GET https://secure.logmein.com/public-api/v1/inventory/hardware/reports
Returns the current report-token, or null if no valid report-token is set for the profile. The expires output in the result will tell when a new report-token can be created, while null means it can be created immediately.

Input
No additional parameters.

Result


{
  "token": <...>|null,
  "expires": <UTC-datetime>|null
}

Example


$ curl https://server/public-api/v1/inventory/hardware/reports -i -H "Content-type: application/JSON; charset=utf-8" -H "Accept: application/JSON; charset=utf-8" -H "Authorization: <...>"

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 85
Content-Type: application/JSON; charset=utf-8
Server: Microsoft-IIS/7.5
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
X-Powered-By: ASP.NET
Date: Mon, 11 Nov 2013 16:15:46 GMT

{
    "expires": "2013-11-11 16:16:47Z",
    "token": "ZMxfBT6VFRExcepoeapUgQg7SalYP7o2eSesbDrm"
}
$

Get data from an active Hardware Inventory report


GET https://secure.logmein.com/public-api/v1/inventory/hardware/reports/{report-token}


Returns the inventory data for a batch of hosts. 50 is the limit of hosts visible from an active inventory report. There may be hosts missing if they do not have Inventory reporting enabled.

If the report contains more inventory data for the host then allowed for one request, the client can make a subsequent request for the remaining data. The next request should be addressed with the report-token given back in the response. This is the same token with which the report started.
If all desired data is returned, the last response will have null for the next report-token. The token will be kept in cache for rate-limiting tracking, but will no longer be usable by the client. If a request is made with expired or invalid token server will return a 404 - Not found.

Input
No additional parameters.

Result:

On Success:


{
  "report": {
    "token": "<...>"|null,
    "expires": "<UTC-datetime>"
  },
  "hosts": {
    "<host-id1>": {
      "hostId": <host-id1>,
      "serviceTag": "<value>",
      "motherboard": {
        "id": "<value>",
        "chipset": "<value>",
        "memorySlots": "<value>"
      },
      "processors": [
        {
          "id": "<value>",
          "type": "<value>",
          "speed": "<value>",
          "numberOfCores": "<value>",
          "numberOfProcessors": "<value>"
        },
        ...
      ],
      "memories": [
        {
          "size": "<value>",
          "modules": "<value>"
        },
        ...
      ],
      "drives": [
        {
          "id": "<value>",
          "name": "<value>",
          "diskType": "<value>",
          "serialNumber": "<value>",
          "capacity": "<value>",
          "mediaType": "<value>"
        },
        ...
      ],
      "partitions": [
        {
          "id": "<value>",
          "drive": "<value>",
          "name": "<value>",
          "fileSystem": "<value>",
          "totalSize": "<value>",
          "freeSpace": "<value>",
          "raid": "<value>",
          "raidStatus": "<value>",
          "raidFailingDiskNumber": "<value>"
        },
        ...
      ],
      "networkConnections":  [
        {
          "name": "<value>",
          "macAddress": "<value>"
        },
        ...
      ],
      "displays": [
         {
           "type": "<value>",
           "provider": "<value>",
           "version": "<value>",
           "date": "<UTC-datetime>"
         },
         ...
      ],
      "hardwareInfo": {
        "manufacturer": "<value>",
        "model": "<value>",
        "assetTag": "<value>"
      },
      "batteries": [
        "<battery-name>",
        ...
      ]
    },
    "<host-id2>": {
      ...
    },
    ...
  }
}

On failure:
HTTP 404 - The report-token is not found

System inventory

Get the list of available System Inventory fields


GET https://secure.logmein.com/public-api/v1/inventory/system/fields
Returns a list of the field names. These fields can be queried in an inventory report.

Result


[
    "ExternalIp",
    "JournalEntries",
    "LastBootDate",
    "LastLogonUserName",
    "LocalUserCreated",
    "LocalUserGroup",
    "LocalUserLastLogin",
    "LocalUserName",
    "LocalUserStatus",
    "OsInstallDate",
    "OsType",
    "SettingsTimezone",
    "WindowsProfileModified",
    "WindowsProfileName",
    "WindowsProfileSize"
]

Create a System Inventory report


POST https://secure.logmein.com/public-api/v1/inventory/system/reports
The expires output in the result will tell when a new report-token can be created. It is always present, even if the previous token has no hosts left to query.

Input

Request body:


{
  "hostIds": [<id1>, <id2>, ...],
  "fields": ["<field1>", "<field2>", ...]
}

Here is a list of current fields at the time of publication. A full up to date list can be retrieved by using GET https://secure.logmein.com/public-api/inventory/system/fields.
If fields is omitted, then all the fields will be queried.

  • ExternalIP
  • JournalEntries
  • LastBootDate
  • LastLogonUserName
  • LocalUserCreated
  • LocalUserGroup
  • LocalUserLastLogin
  • LocalUserName
  • LocalUserStatus
  • OsInstallDate
  • OsType
  • SettingsTimezone
  • WindowsProfileModified
  • WindowsProfileName
  • WindowsProfileSize

Result:

On Success:
HTTP 201 - Created


{
  "token": <...>,
  "expires": <UTC-datetime>
}

On failure:
HTTP 429 - Previous report-token is not yet expired.

Get currently active System Inventory report


GET https://secure.logmein.com/public-api/v1/inventory/system/reports
Returns the current report-token, or null if no valid report-token is set for the profile. This action puts the token back in the cache. The expires output in the result will tell when can a new report-token be created, or null if it can be created without delay.

Input
No additional parameters.

Result


{
  "token": <...>|null,
  "expires": <UTC-datetime>|null
}

Examples


$ curl https://server/public-api/v1/inventory/system/reports -i -H "Content-type: application/JSON; charset=utf-8" -H "Accept: application/JSON; charset=utf-8" -H "Authorization: <...>"

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 85
Content-Type: application/JSON; charset=utf-8
Server: Microsoft-IIS/7.5
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
X-Powered-By: ASP.NET
Date: Mon, 11 Nov 2013 16:15:46 GMT

{
    "expires": "2013-11-11 16:16:47Z",
    "token": "ZMxfBT6VFRExcepoeapUgQg7SalYP7o2eSesbDrm"
}
$

Get data from an active System Inventory report


GET https://secure.logmein.com/public-api/v1/inventory/system/reports/.

Returns the inventory data for a batch of hosts. 50 is the limit of hosts visible from an active inventory report. There may be hosts missing if they do not have Inventory reporting enabled.
If the report contains more inventory data for the wanted hosts then the limit for one request, the client can make a subsequent request to get all the data. The next request should be addressed with the report-token given back in the response. This is the same token with which the report started.
If all wanted data is returned, the last response will have null for the next report-token. The token will be kept in cache for rate-limit tracking, but will not be usable. If a request is made with an expired or invalid token server will return a:
404 - Not found.

Input
No additional parameters.

Result
On success:


{
  "report": {
    "token": "<...>"|null,
    "expires": "<UTC-datetime>"
  },
  "hosts": {
    "<host-id>": {
      "hostId": "<host-id>",
      "windowsProfiles": [
        {
          "id": "<value>",
          "name": "<value>",
          "size": "<value>",
          "modified": "<UTC-datetime>"
        },
        ...
      ],
      "lastBootDate": "<UTC-datetime>",
      "journalEntries": [
        "<jurnal-entry-text>",
        ...
      ],
      "localUsers": [
        {
          "id": "<value>",
          "name": "<value>",
          "created": "<UTC-datetime>",
          "lastLogin": "<UTC-datetime>",
          "status": "<value>",
          "group": "<value>"
        },
        ...
      ],
      "operatingSystem": {
        "type": "<value>",
        "installDate": "<UTC-datetime>"
      },
      "settingTimeZone": "<value>",
      "lastLogonUserName": "<value>",
      "externalIp": "<value>"
    },
    ...
  }
}

On failure:
HTTP 404 - The report-token is not found.

Custom Fields

Central lets you store custom (user defined) data to your hosts. This user defined data is then displayed on the website's computer-grid. The data is organized into Categories that show up as columns on the computer-grid. Each Category has its own user-defined value set. Each host in each Category can be labeled with one of those values. These labels are called Custom Fields.

List Categories (aka Custom Field Columns)

GET https://secure.logmein.com/public-api/v1/hosts/custom-fields/categories

Input
No special input parameters.

Result

On success:


{
  "metadataCategories": [
    {
      "id": "<categoryid>",
      "name": "<categoryname>",
      "values": [
        {
          "id": "<value1 id>",
          "name": "<value1 name>"
        },
        {
          "id": "<value2 id>",
          "name": "<value2 name>"
        },
        ...
      ]
    },
    ...
  ]
}

On failure:
HTTP - 429

Examples

The JSON response may be in a non-breaking format; that is, it may or may not be indented.


$ curl https://secure.logmein.com/public-api/v1/hosts/custom-fields/categories -i -H "Content-type: application/JSON; charset=utf-8" -H "Accept: application/JSON; charset=utf-8" -H "Authorization: <...>"

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-UA-Compatible: IE=edge
X-Frame-Options: SAMEORIGIN
Date: Fri, 15 Apr 2016 15:50:41 GMT
Content-Length: 678

)]}',
{"metadataCategories":[{"id":"e0d75eea-cd96-48e3-bc77-c94903353fed","name":"Operating

System","values":[{"id":"12cc40bf-ee74-4f74-8b31-d9f9d6a1be4f","name":"Windows
 10"},{"id":"c0b4f33f-66a8-4e7f-a22a-6dde6a79e814","name":"Windows
8"},{"id":"6dd6b463-3c0a-4cd4-a701-a96afc5dc1f0","name":"Old
Windows"},{"id":"60896f9d-5aa1-4a0c-b20d-ea33cc99a356","name":"Mac"}]},{"id":"393e66ad-9620-4b21-8d6d-a2f592448636","name":"Location","values":[{"id":"a3e4edad-9e6e-45ea-8ab1-6083560a39b0","name":"Boston"},{"id":"59146814-8500-45eb-abeb-64508f90e1d4","name":"Los

Angeles"},{"id":"225344df-a4e8-432f-b220-977a16e023fe","name":"Amsterdam"},{"id":"dcc75a3e-37f1-48b9-b584-c98f79fe4f17","name":"Frankfurt"}]}]}
$

This example shows what happens when credentials are missing:


$ curl https://secure.logmein.com/public-api/v1/hosts/custom-fields/categories -i -H "Content-type: application/JSON; charset=utf-8" -H "Accept: application/JSON; charset=utf-8"

HTTP/1.1 403 Forbidden
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-UA-Compatible: IE=edge
X-Frame-Options: SAMEORIGIN
Date: Mon, 18 Apr 2016 09:26:45 GMT
Content-Length: 29
)]}',
{"message":"Forbidden"}
$

The status-code and body both contain useful error messages to aid the debugging process.

List Custom Field Values

GET https://secure.logmein.com/public-api/v1/hosts/custom-fields

Returns a list of all Custom Field values of all Computers.

Input
No special input parameters.

Result

On success:


{
    "hosts": [
    {
      "id": 1700482460,
      "metadata": [
        {
          "categoryId": "e0d75eea-cd96-48e3-bc77-c94903353fed",
          "valueId": "12cc40bf-ee74-4f74-8b31-d9f9d6a1be4f"
        },
        ...
      ]
    },
    ...
  ]
}

In the example above categoryId identifies the Custom Column (e.g. as 'Operating systems') and valueId identifies th Custom Field value (e.g. 'Windows 10'). You can get the text representation for these values by calling the 'List Categories' API.


On Failure:
HTTP - 429

Example
The JSON response may be in a non-breaking format; that is, it may or may not be indented.


$ curl https://secure.logmein.com/public-api/v1/hosts/custom-fields -i -H "Content-type: application/JSON; charset=utf-8" -H "Accept: application/JSON; charset=utf-8" -H "Authorization: <...>"

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-UA-Compatible: IE=edge
X-Frame-Options: SAMEORIGIN
Date: Mon, 18 Apr 2016 09:25:57 GMT
Content-Length: 1058

)]}',
{"hosts":[{"id":1700482460,"metadata":[{"categoryId":"e0d75eea-cd96-48e3-bc77-c94903353fed","valueId":"12cc40bf-ee74-4f74-8b31-d9f9d6a1be4f"}]},{"id":1700482461,"metadata":[{"categoryId":"393e66ad-9620-4b21-8d6d-a2f592448636","valueId":"59146814-8500-45eb-abeb-64508f90e1d4"}]},{"id":1700485411,"metadata":[{"categoryId":"393e66ad-9620-4b21-8d6d-a2f592448636","valueId":"dcc75a3e-37f1-48b9-b584-c98f79fe4f17"}]},{"id":1700482453,"metadata":[{"categoryId":"e0d75eea-cd96-48e3-bc77-c94903353fed","valueId":"60896f9d-5aa1-4a0c-b20d-ea33cc99a356"}]},{"id":1700482463,"metadata":[{"categoryId":"393e66ad-9620-4b21-8d6d-a2f592448636","valueId":"a3e4edad-9e6e-45ea-8ab1-6083560a39b0"}]},{"id":1700482464,"metadata":[{"categoryId":"393e66ad-9620-4b21-8d6d-a2f592448636","valueId":"225344df-a4e8-432f-b220-977a16e023fe"},{"categoryId":"e0d75eea-cd96-48e3-bc77-c94903353fed","valueId":"6dd6b463-3c0a-4cd4-a701-a96afc5dc1f0"}]},{"id":1700482458,"metadata":[{"categoryId":"e0d75eea-cd96-48e3-bc77-c94903353fed","valueId":"c0b4f33f-66a8-4e7f-a22a-6dde6a79e814"}]}]}
$

This example shows what happens when credentials are missing:


$ curl https://secure.logmein.com/public-api/v1/hosts/custom-fields -i -H "Content-type: application/JSON; charset=utf-8" -H "Accept: application/JSON; charset=utf-8"

HTTP/1.1 403 Forbidden
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-UA-Compatible: IE=edge
X-Frame-Options: SAMEORIGIN
Date: Mon, 18 Apr 2016 09:26:45 GMT
Content-Length: 29

)]}',
{"message":"Forbidden"}
$

The status-code and body both contain useful error messages to aid in the debugging process.

Anti-Virus

Get Anti-Virus details


GET https://secure.logmein.com/public-api/v1/hosts/anti-virus/details
Returns the Anti-Virus details.

Input
Nothing.

Result


{
    "hostGroups": [
        { "groupId": number, "groupName": string }
    ],
    "hosts": [
        {
            "hostId": number,
            "hostDescription": string,
            "groupId": number,
            "isOnline": boolean,
            "buildNumber": number|null,
            "isMac": boolean,
            "antiVirusStatus": AvStatus|null,
            "antiVirusName": string|null,
            "isRealTimeProtectionOn": boolean,
            "isVirusDefinitionUpToDate": boolean|null,
            "virusDefinitionVersion": string|null,
            "lastFullScanTime": string|null, // ISO 8601 date string
            "numberOfThreats": number, // integer
            "isMultipleAntiVirusDetected": boolean,
            "capabilities": HostAntiVirusCapabilities,
            "kasperskyInstallSupported": boolean,
            "hasKasperskyInstalled": boolean,
        }
    ]
}

enum AvStatus
{
    ActionRequired = 0,
    Warning = 1,
    Unknown = 2,
    Ok = 3,
    FreeOk = 4,
    PartialOk = 5
}

interface HostAntiVirusCapabilities {
    canReportThreatLog: boolean,
    canReportRealTimeProtectionStatus: boolean
}

Example:


$ curl https://secure.logmein.com/public-api/v1/hosts/anti-virus/details -i -H 'Accept: application/json; charset=utf-8' -H 'Authorization: <...>'

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-UA-Compatible: IE=edge
X-Frame-Options: SAMEORIGIN
Date: Tue, 27 Sep 2016 13:56:27 GMT
Content-Length: 12409

{
    "hostGroups": [
        {
            "groupId": 2414753,
            "groupName": "PCs"
        },
        {
            "groupId": -1,
            "groupName": ""
        }
    ],
    "hosts": [
        {
            "hostId": 1929075,
            "hostDescription": "TR_150110_1500_RMTCRJ",
            "groupId": 2414753,
            "isOnline": true,
            "buildNumber": 4500,
            "isMac": false,
            "antiVirusStatus": 2,
            "antiVirusName": null,
            "isRealTimeProtectionOn": false,
            "isVirusDefinitionUpToDate": false,
            "virusDefinitionVersion": null,
            "lastFullScanTime": null,
            "numberOfThreats": 0,
            "isMultipleAntiVirusDetected": false,
            "capabilities": {
                "canReportThreatLog": false,
                "canReportRealTimeProtectionStatus": false
            },
            "kasperskyInstallSupported": false,
            "hasKasperskyInstalled": false
        },
        {
            "hostId": 1929076,
            "hostDescription": "TR_150110_1500_YQTGQL",
            "groupId": -1,
            "isOnline": false,
            "buildNumber": 4500,
            "isMac": false,
            "antiVirusStatus": 2,
            "antiVirusName": "Kaspersky Endpoint Security",
            "isRealTimeProtectionOn": true,
            "isVirusDefinitionUpToDate": true,
            "virusDefinitionVersion": "v1.0",
            "lastFullScanTime": "2016-12-14T10:23:21Z",
            "numberOfThreats": 10,
            "isMultipleAntiVirusDetected": false,
            "capabilities": {
                "canReportThreatLog": true,
                "canReportRealTimeProtectionStatus": true
            },
            "kasperskyInstallSupported": true,
            "hasKasperskyInstalled": true
        }
    ]
}

Anti-virus actions

Available actions:


Input
List the hosts you want to apply the action to:


{
    "targetHostIds": Array<number>
}

Result


{
    "commandStatuses": [
        { "targetHostId": number, "sentSuccessfully": boolean }
    ]
}

Example The example below will run the refresh-status command on multiple hosts.


$ curl https://secure.logmein.com/public-api/v1/anti-virus/actions/refresh-status -i \
-H 'Content-type: application/json; charset=utf-8' \
-H 'Accept: application/json; charset=utf-8' \
-H 'Authorization: <...>'
-d '{ \
      "targetHostIds": [1234567890, 1234567891], \
}'

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-UA-Compatible: IE=edge
X-Frame-Options: SAMEORIGIN
Date: Tue, 27 Sep 2016 10:08:21 GMT
Content-Length: 120

{"commandStatuses":[{"targetHostId":1234567890,"sentSuccessfully":false},{"targetHostId":1234567891,"sentSuccessfully":true}]}

Install Kaspersky Endpoint Security


POST https://secure.logmein.com/public-api/v1/anti-virus/actions/install-kaspersky-endpoint-security
Performs the install-kaspersky-endpoint-security task.

Input
List the hosts you want to apply the action to:


{
    "targetHostIds": Array<number>
}

Result


{
    "status": InstallKasperskyResponseStatus
}

enum InstallKasperskyResponseStatus
{
    Unavailable = 0,
    Accepted = 1,
    Pending = 2,
    QuotaReached = 3,
}

Example
The example below will run the install-kaspersky-endpoint-security command for multiple hosts:


$ curl https://secure.logmein.com/public-api/v1/anti-virus/actions/install-kaspersky-endpoint-security -i \
-H 'Content-type: application/json; charset=utf-8' \
-H 'Accept: application/json; charset=utf-8' \
-H 'Authorization: <...>'
-d '{ \
      "targetHostIds": [1234567890, 1234567891], \
}'

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-UA-Compatible: IE=edge
X-Frame-Options: SAMEORIGIN
Date: Wed, 28 Sep 2016 09:23:46 GMT
Content-Length: 12

{"status":2}