You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

To get a License Statistics report of your choosing, you can use any browser or an HTTP client (cURL). cURL is a library and command-line tool that PHP uses to access HTTP-based web services and websites. 

Every successful API request returns the HTTP status code "200", which indicates that the request was fulfilled. On failure, in turn, you get HTTP status information and one of the following error codes in the body of the response.

  - INVALID_PARAMETER(code: 2, http status: 400)

- FORBIDDEN(code: 3, http status: 403)

- UNKNOWN(code: 0, http status: 500)

- INTERRUPTED(code: 1, http status: 500)

The error code is embedded in the response in a way similar to the following:

{success: false, data:[], code: ${errorCode}, msg: ${message}}

To make a request, you need to generate an access token and install cURL, as described here.

Example request

curl -H "X-Auth-token: abcd" "http://yourdomain/url-to-api"

where

"yourdomain" is the domain where License Statistics is installed. (Note that if your installation uses either a port different than 80, or port 443 for SSL-secured HTTPS, you will need to provide them as well.)

Example

curl -H "X-Auth-token: abcd" "https://yourdomain:888/url-to-api"
  • No labels