First Steps

Get started using the LogMeIn Central API.

Requirements

  • The Public API is a HTTP REST service. So the API can be accessed with any program that can make HTTP requests. For exploring and testing we recommend cURL or the Postman Chrome add-on.
  • LogMeIn Central subscription (paid or trial)
  • You must authenticate each action you call with your CompanyID + PSK pair.
  • Tip: The Account holder must obtain your PSK and CompanyID from the Configuration > API tab.
  • The address of an API action stands from the API-root part and the action specific part. The API-root contains the server address and the path where an API service can be found.

Checking your Credentials

The first call should be GET /v1/authentication to check if your credentials are valid. So if your CompanyID is 1234567890 and your PSK is abcde12345ABCDE12345 (normally an actual PSK would be 128 characters long), the action can be called as:

$ curl https://secure.logmein.com/public-api/v1/authentication -i -H "Accept: application/JSON; charset=utf-8" -H "Authorization: {\"companyId\": 1234567890, \"psk\": \"abcde12345ABCDE12345\"}" 

Where the -H argument sends a HTTP header and the -i argument shows the header of the response.

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 16
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:12:57 GMT

{"success":true}

As you can see, the response body is in JSON, as with every action. It tells us that the authentication was successful.
The credentials can be sent in the Authorization header for any action.


General parameters


Input
For every action, the following HTTP headers must be included in the request:

Header Possible Value User in Notes
Content-Type
  • application/JSON
  • application/JSON; charset=utf-8
Mandatory (except for GET) Content-type is always application/JSON in every request.
Accept
  • application/JSON
  • application/JSON; charset=utf-8
Mandatory Every response is JSON. Content negotiation is not supported.
Authorization Basic Authentication Header Mandatory Either a valid CompanyId + Psk or LoginSessionId + ProfileId pair is necessary for authentication.

Result
Actions can return with the following HTTP status codes

Status Code Meaning Specific to Action
200 The action was successful, and the request data is in the response body. all actions (except actions containing POST)
201 Inventory report successfully created for querying data.
  • POST/inventory/hardware/reports
  • POST/inventory/system/reports
400 Required parameter is missing or invalid. all actions
401 User credentials not present or invalid. all actions
404 Requested Object not found.
  • non-existing actions
  • GET /inventory/hardware/reports/
  • POST /hosts//connections
405 Method not allowed
  • POST /hosts//connections
409 Conflict, another connection session is already in progress.
  • POST /hosts//connections
415 Unsupported Media Type, if the request wasn't in JSON format. all actions
429 Request denied due to rate-limiting.
  • GET /hosts
  • GET /inventory/hardware/reports
  • POST /inventory/system/reports