Table of Contents

Introduction

Web API v3.2 is a superset of version 3.1 of the web API. It adds support for offline checkouts of concurrent licenses and component tokens, as well as support for recording information about sessions that occur while the client is not connected to the network, such as during a validation grace period or when a concurrent license is checked out.

begin_user_session

Changes from 3.0:

Added additional data input version

{
  "version": <string>,
  ...
}  
  

The additional outputs added to begin_app_session in version 3.1 were also added to begin_user_sessionbegin_user_session

check_out_license

Attempts to check out a license to the specified instance for a specified duration of time. Only licenses using the concurrent license model can be checked out.

Endpoint

/api/v3.2/auth/check_out_license

Data

{
  "product_guid" : <string>,
  "instance_guid" : <string>,
  "instance_identity" : <instance_identity>
  "user_guid" : <string>,
  "user_identity" : {
    "key1" : "value1",
    "key2" : "value2",
    ...
  },
  "version" : <string>,
  "duration" : <integer>,
  "session_key" : <string>
}

Note: session_key is optional. When specified, the license in use by that session is the one that will be checked out.

Note: The instance_identity parameter is optional. When present, it is used to verify that the instance's current identity matches the identity when the instance was registered.

Note: The user_identity parameter is optional only if user_guid is specified. If user_guid is not specified (for backward compatibility reasons), user_identity is required.

Value on success

{
  "status" : 0,
  "time" : <string>,
  "checkout_key" : <string>,
  "expiration_time" : <string>,
  "features" : [ <string>, <string>, <string>, ... ]
}

Value on failure

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

check_in_license

Returns a checked out license to the pool of available licenses. Only supported for licenses checked out via the check_out_license method.

Endpoint

/api/v3.2/auth/check_in_license

Data

{
  "product_guid" : <string>,
  "checkout_key" : <string>
}

Value on success

{
  "time" : <string>
}

Value on failure

HTTP error code 400 Bad Request or similar.

Additional component status information

In addition to the v3.0 values, the following properties are added to any call that returns component status information. For an example, see the check_out_component_tokens method.

{
  "component_entitlements" : [
    {
      "id" : <number>,
      "tokens_checked_out" : <number>,
      ...
    }
  ]
}

check_out_component_tokens

Attempts to check out a set of components for offline use. The checkout will last for a specified time duration instead of for the duration of a session.

Endpoint

/api/v3.2/auth/check_out_component_tokens

Data

{
  "product_guid" : <string>,
  "instance_guid" : <string>,
  "instance_identity" : <instance_identity>
  "user_guid" : <string>,
  "user_identity" : {
    "key1" : "value1",
    "key2" : "value2",
    ...
  },
  "version" : <string>,
  "duration" : <integer>,
  "component_entitlement_id" : <integer>,
  "token_count" : <integer>,
  "session_key" : <string>
}

Note: session_key is optional. When specified, the tokens in use by that session will be checked out before tokens available in the pool.

Note: The instance_identity parameter is optional. When present, it is used to verify that the instance's current identity matches the identity when the instance was registered.

Note: The user_identity parameter is optional only if user_guid is specified. If user_guid is not specified (for backward compatibility reasons), user_identity is required.

Value on success

{
    "status" : 0,
    "time" : <string>,
    "checkout_key" : <string>,
    "expiration_time" : <string>
}

Value on failure

{
  "success" : false,
  "time" : <string>,
  "error" : <string>
}

check_in_component_tokens

Returns checked out components to the pool of available components. Only supported for components checked out via the check_out_component_tokens method.

Endpoint

/api/v3.2/auth/check_in_component_tokens

Data

{
  "product_guid" : <string>,
  "checkout_key" : <string>
}

Value on success

{
  "time" : <string>
}

Value on failure

HTTP error code 400 Bad Request or similar.

check_out_webapi_components

Checks out components assigned to Web API products using an API token instead of the traditional method of checking out components using an encrypted POST body.

Endpoint

/api/v3.2/auth/check_out_webapi_components

Headers

{
  Authorization : "Bearer <API token>",
}

Data

{
  "version" : <string>,
  "components" : [ <string>,...]
}

Value on success

{
  "status" : 0
}

Value on failure

{
  "status" : integer_status_code
}

get_user_license

Returns licenses held by user given user information.

Endpoint

/api/v3.2/auth/get_user_license

Data

{
"product_guid" : <string>,
"user_identity" : {
  "key1" : "value1",
  "key2" : "value2",
  ...
  }
}

Value on success

{
  "success" : true,
  "time" : <string>,
  "licenses": [
  {
    "license" : <string>
  },
  ...
]
}

Value on failure

{
  "success" : false,
  "time" : <string>,
  "licenses": []
}

check_out_consumable_component

Allows for the checking out of a specified number of consumable tokens.

Endpoint

/api/v3.2/auth/check_out_consumable_component

Data

{
  "token_count" : <integer>,
  "session_key" : <string>,
  "component" : <component>
}

Value on success

{
    "time" : <string>,
    "status" : 0,
    "components" : [
        {
            "name" : <string>,
            "license_model" : <session|token|consumable token|none>,
            "tokens_required" : <number>,
            "free_trial" : <boolean>,
            "free_trial_expiration" : <string>,
            "original_tokens_required" : <number>
        },
        ...
    ],
    "component_entitlements" : [
        {
            "components" : <string_array>,
            "tokens_entitled" : <number>,
            "tokens_in_use" : <number>,
            "tokens_in_use_by_session" : <number>,
            "sessions_entitled" : <number>,
            "sessions_in_use" : <number>,
            "in_use_by_session" : <boolean>
        },
        ...
    ]
}

Value on failure

{
  "time" : <string>,
  "status" : integer_status_code,
  "error" :  <string>
}