Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

This page refers to End-user REST API version 1 only. See End-user REST API for links to other versions of the End-user REST API.


The following page lists The following page lists the HTTP operations that need to be performed to successfully query 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.

using the End-user REST API version 1. 

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

Panel

GET /licenses/(activation_key)

...

?state=(

...

states) 

where the request parameters are as follows: 

  • activation_key (string) , which is your product activation key, and  
     is your license order activation key

and

  • state (string) indicates a states (string), which are required, comma-separated , and available states, i.e.: activatedvalue. The state can be one of the following: success, failed, in-_progress.

    Note: The order of the states is irrelevant and does not influence the results of the request.

Also note that (Note that request headers are used by default.)

Example request

panel
Code Block
languagejs
firstline1
linenumberstrue
GET
/rest/v1/
licenes
licenses/
4CT1V
25N8D-
4T10N
NC35D-
K3Y1S-C000L/dHlwZTE9dmFsdwUxLHR5cGUyPXZhbHVlPTI=
WD01P-8JI4K?state=success,failed 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 OK
The collection
Collection of licenses for a given state.
400 Bad RequestUnsupported license state.
403 Forbidden
The license
License order has been disabled.
404 Not FoundNo licenses were found for a given state.

 Example response

Example responses

panel
Code Block
languagejs
firstline1
linenumberstrue
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

   }

   ]


{
    "_links": {
        "success": [
            {
                "href": "https://license.x-formation.com/rest/v1/licenses/25N8D-NC35D-WD01P-8JI4K/Q1VTVE9NPWE="
            },
            {
                "href": "https://license.x-formation.com/rest/v1/licenses/25N8D-NC35D-WD01P-8JI4K/Q1VTVE9NPWI="
            }
        ],
        "failed": [
            {
                "href": "https://license.x-formation.com/rest/v1/license-errors/25N8D-NC35D-WD01P-8JI4K/Q1VTVE9NPXNkZnNkZnNkZg=="
            }
        ]
    },
    "_embedded": {
        "success": [
            {
                "activationKey": "25N8D-NC35D-WD01P-8JI4K",
                "activationTime": "2014-04-29T11:31:51+00:00",
                "expirationDate": null,
                "maintenanceEndDate": null,
                "hostids": [
                    {
                        "nameRaw": "CUSTOM",
                        "name": "Custom",
                        "value": "a"
                    }
                ],
                "content": "# This license is generated using X-Formation License Activation Center
                            # Generation Time: 2014-04-29 11:31:50 GMT
                            # Activation Key: 25N8D-NC35D-WD01P-8JI4K

                            FEATURE feature-1
                            {
                            VENDOR=X-FORMATION VERSION=1.0
                            KEY=QQkUjKBGw6vPmoNM7cQIeHriCThHSD7psQSp0]YRAibvJbD]hrxC]fiZ1VyAnjb9uJuNivH67TIn7ygcOzO4AUNfVrgQ0oooFlhh \
                                 tapNGT0hc1xe2UdTxxFt2y0S1Zi6uZ[JDpFc27Bjq3AIDSI7br[VrUqYGovQvkGnqwFk9ADKt9lEvTmirWz27FjEg2WIpGh[Qaatc \
                                 te2tEXcIvy[iFH1e]jj18LQcHXnp8ze4zzeHyoGfXeqIL[BdELtQQ6q5oKJ8ACmrfZF2Rh2tKZOWKq4xXs4xmn0XsdRT3QDco2o9d \
                                 ttwtPAh2ABimjNbrlPF8V9sabGw5]GU4poT7rq]pyDjnckbLTZ9z5f]4K[Tbb]Aa7406K8gx4dO6wFITq0NRgmmfFOLSEn6KHdwFf \
                                 tERlqVXGzGjU7R490iA6cc43cnbHom[qMGboDOmIysXreBLgrWJ2wURL97U83njRQaL4qSHXXIVGTSxSvVCoWFcVq3urCHHAMhsaw
                            }",
                "filename": "license_2014_04_29-11_31.lic",
                "_links": {
                    "self": {
                        "href": "https://license.x-formation.com/rest/v1/licenses/25N8D-NC35D-WD01P-8JI4K/Q1VTVE9NPWE="
                    }
                }
            },
            {
                "activationKey": "25N8D-NC35D-WD01P-8JI4K",
                "activationTime": "2014-05-06T13:42:16+00:00",
                "expirationDate": null,
                "maintenanceEndDate": null,
                "hostids": [
                    {
                        "nameRaw": "CUSTOM",
                        "name": "Custom",
                        "value": "b"
                    }
                ],
                "content": "# This license is generated using X-Formation License Activation Center
                            # Generation Time: 2014-04-29 11:31:50 GMT
                            # Activation Key: 25N8D-NC35D-WD01P-8JI4K

                            FEATURE feature-2
                            {
                            VENDOR=X-FORMATION VERSION=1.0
                            KEY=QQkUjKBGw6vPmoNM7cQIeHriCThHSD7psQSp0]YRAibvJbD]hrxC]fiZ1VyAnjb9uJuNivH67TIn7ygcOzO4AUNfVrgQ0oooFlhh \
                                 tapNGT0hc1xe2UdTxxFt2y0S1Zi6uZ[JDpFc27Bjq3AIDSI7br[VrUqYGovQvkGnqwFk9ADKt9lEvTmirWz27FjEg2WIpGh[Qaatc \
                                 te2tEXcIvy[iFH1e]jj18LQcHXnp8ze4zzeHyoGfXeqIL[BdELtQQ6q5oKJ8ACmrfZF2Rh2tKZOWKq4xXs4xmn0XsdRT3QDco2o9d \
                                 ttwtPAh2ABimjNbrlPF8V9sabGw5]GU4poT7rq]pyDjnckbLTZ9z5f]4K[Tbb]Aa7406K8gx4pO6wFITq0NRgmmfFOLSEn6KHdwFf \
                                 tERlqVXGzGjU7R490iA6cc43cnbHom[qMGboDOmIysXreBLgrWJ2wURL97U83njRQaL4qSHXXIVGTSxSvVCoWFcVq3urCHHAMhsaw
                            }",
                "filename": "license_2014_06_05-13_42.lic",
                "_links": {
                    "self": {
                        "href": "https://license.x-formation.com/rest/v1/licenses/25N8D-NC35D-WD01P-8JI4K/Q1VTVE9NPWI="
                    }
                }
            }
        ],
        "failed": [
            {
                "errors": [
                    {
                        "message": "LM-X XML License Generator v4.5.3
                                    Copyright (C) 2002-2013 X-Formation. All rights reserved.

                                    LM-X Error: Unable to parse and load xml file /tmp/lgtmp_id_2/1400064446_139933.in!
                                    LM-X Error: /tmp/lgtmp_id_2/1400064446_139933.in(7): not well-formed (invalid token)!",
                        "creationTime": "2014-05-08T07:17:41+00:00"
                    }
                ],
                "_links": {
                    "self": {
                        "href": "https://license.x-formation.com/rest/v1/license-errors/25N8D-NC35D-WD01P-8JI4K/Q1VTVE9NPXNkZnNkZnNkZg=="
                    }
                }
            }
        ]
    }
}
Code Block
languagejs
firstline1
linenumberstrue
HTTP/1.1 400 Bad Request
Content-Type: application/hal+json
 
{
    "message": "License state value \"abc\" is not valid"
}
Code Block
languagejs
firstline1
linenumberstrue
HTTP/1.1 403 Forbidden
Content-Type: application/hal+json
 
{
    "message": "License order has been disabled."
}
Code Block
languagejs
firstline1
linenumberstrue
HTTP/1.1 404 Not Found
Content-Type: application/hal+json

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