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

Compare with Current View Page History

« Previous Version 3 Next »

The following page lists the HTTP operations that need to be performed to successfully query an LAC license. The client can successfully use the methods described below if the server is configured to support a given combination of methods.

Each web service that a client wishes to interact with has two parts: request parameters and the response, as described below.

To obtain a license for a given activation key filetered by its state, use the following request. (Note that the order of states is optional.)

GET /licenses/(activation_key)/(hostids)

where the request parameters are as follows: 

  • activation_key (string), which is your product activation key, and  
     
  • states (string), which are required, comma-separated, and available states, i.e.: activated, failed, in-progress.

(Note that request headers are used by default.)

Example request

GET /rest/v1/licenes/4CT1V-4T10N-K3Y1S-C000L/dHlwZTE9dmFsdwUxLHR5cGUyPXZhbHVlPTI= HTTP/1.1 
Host: license.x-formation.com
Accept: application/hal_json

Response

The LAC REST API returns standard HTTP response codes as described in the following table.

Status CodeHeader FieldDescription
200 OKThe collection of licenses for a given state.
400 Bad RequestUnsupported license state.
403 ForbiddenThe license order has been disabled.
404 Not FoundNo licenses were found for a given state.

 Example response

HTTP/1.1 200 OK

Content-Type: application/hal+json

[

    {     

       "request_time": "2012-05-03 02:10:48",

       "activation_time: "2012-05-03 02:12:48",

       "license": "3qfhb34q89g-7bqh-qhff3fg379n6349mzfeuoylgaw4807g*&

GQWEdf806VGQ#F807gQF87g"

   },

   {            

      "request_time": "2012-05-03 02:10:48",

      "activation_time": null,

      "license": null

   }

   ]

For more information about HTTP methods, see Supported HTTP methods. 

  • No labels