Client web API 3.5

Request and response reference for the elm client licensing endpoints. Most integrations use an SDK instead; this is for other languages and for debugging.

Preview — API v3.5, not yet released. The endpoints and properties on this page (custom_data and validate_user) are not available on production servers and may change before release. The latest released version is 3.4.

Table of Contents

Other versions: 1.0 · 2.0 · 3.0 · 3.1 · 3.2 · 3.3 · 3.4 · 3.5 (preview)

Introduction

Web API v3.5 is a superset of version 3.4 of the web API. It is a preview and has not been released. It returns the license's custom data (key/value license properties) with successful session and validation results, and adds a method that lets a server check whether a user is still entitled to a product without starting a session. All v3.4 endpoints are available under /api/v3.5/auth/, including check_out_webapi_components.

Calling conventions, encryption and status codes are the same as in version 3.0. As in v3.2, every request must include product_guid in its data, otherwise the server responds with 400 Bad Request.

Custom data

The following property is added to successful results (status is 0) of begin_app_session, begin_user_session, validate_instance, extend_session, check_out_license, check_out_full_license and validate_user:

{
    ...
    "custom_data" : {
        "key1" : <string>,
        "key2" : <string>,
        ...
    },
    ...
}

custom_data contains the custom properties configured on the license, as an object mapping each property key to its value. Keys contain only letters, digits, underscores, hyphens and dots; values are strings (or null if no value is set). The object is empty if the license has no custom properties. Because custom properties may hold sensitive values, they are never included in failed results.

validate_user

Checks whether a registered user, on a registered instance, is currently entitled to use the product. It is intended for servers (for example, a SaaS application) that act on behalf of their users without holding a session for each of them. This is a status check, not a session start: it issues no token, does not use a seat, and does not check instance or user identity. The validation is recorded like any other validation.

Endpoint

/api/v3.5/auth/validate_user

Data

{
    "product_guid" : <string>,
    "instance_guid" : <string>,
    "user_guid" : <string>,
    "version" : <string>
}

Value on success

{
    "status" : 0,
    "time" : <string>,
    "features" : [ <string>, <string>, ... ],
    "feature_groups" : [ <string>, <string>, ... ],
    "custom_data" : { ... }
}

features and feature_groups are those in effect for the given instance and user.

Value on failure

{
    "status" : <non-zero number>,
    "time" : <string>,
    "error" : <string>
}

Typical failure statuses:

Status Reason
-5Unknown product.
-1The product is a Web API product, which cannot be validated.
-8Unknown instance, or the instance belongs to a different product.
-2, -17The license has expired or is fully checked out.
-4, -13, -18The instance is disabled, pending activation, or checked out.
-7Unknown user.
-9The user is not registered to the instance.
-3, -2The user is disabled, or the user's temporary access has expired.

Endpoint summary

All client licensing endpoints available in v3.5 (preview), each called with POST /api/v3.5/auth/<method>:

Method Introduced in
register_instance3.0
validate_instance3.0
register_user3.0
register_app3.0
begin_user_session3.0 (changed in 3.2)
begin_app_session3.0 (changed in 3.1)
extend_session3.0
end_session3.0
current_release3.0
check_out_components3.1
components_status3.1
check_out_license3.2
check_in_license3.2
check_out_component_tokens3.2
check_in_component_tokens3.2
get_user_license3.2
check_out_consumable_component3.2
check_out_webapi_components (API token, unencrypted)3.2
get_license_info3.3
check_in_components3.3
check_out_full_license3.4
validate_user3.5