Skip to content

Provisioning API

Version: 1.0.0

Status: ⚫⚪⚪

Provisioning interface for Thunder framework.

(Defined by Provisioning.json)

Table of Contents

Introduction

Scope

This document describes purpose and functionality of the Provisioning interface (version 1.0.0). It includes detailed specification about its methods and properties as well as sent notifications.

Case Sensitivity

All identifiers of the interfaces described in this document are case-sensitive. Thus, unless stated otherwise, all keywords, entities, properties, relations and actions should be treated as such.

Acronyms, Abbreviations and Terms

The table below provides and overview of acronyms used in this document and their definitions.

Acronym Description
API Application Programming Interface
HTTP Hypertext Transfer Protocol
JSON JavaScript Object Notation; a data interchange format
JSON-RPC A remote procedure call protocol encoded in JSON

The table below provides and overview of terms and abbreviations used in this document and their definitions.

Term Description
callsign The name given to an instance of a plugin. One plugin can be instantiated multiple times, but each instance the instance name, callsign, must be unique.

References

Ref ID Description
HTTP HTTP specification
JSON-RPC JSON-RPC 2.0 specification
JSON JSON specification
Thunder Thunder API Reference

Description

Provisioning JSON-RPC interface.

Methods

The following methods are provided by the Provisioning interface:

Provisioning interface methods:

Method Description
provision Trigers platform provision process
index Set the index for a provisioning key

provision method

Trigers platform provision process.

Parameters

This method takes no parameters.

Result

Name Type M/O Description
result null mandatory Always null (default: None)

Errors

Message Description
ERROR_INPROGRESS Provisioning in progress
ERROR_UNAVAILABLE Provisioning Back Office Client not available

Example

Request

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "<callsign>.1.provision"
}

Response

{
  "jsonrpc": "2.0",
  "id": 42,
  "result": null
}

index method

Set the index for a provisioning key.

Parameters

Name Type M/O Description
params object mandatory ...
params?.label string optional The label name for which the index should be changed
params?.index integer optional Index to be used for the key

Result

Name Type M/O Description
result null mandatory Always null (default: None)

Errors

Message Description
ERROR_UNAVAILABLE Provisioning Back Office Client not available

Example

Request

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "<callsign>.1.index",
  "params": {
    "label": "cobalt",
    "index": 0
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 42,
  "result": null
}

Properties

The following properties are provided by the Provisioning interface:

Provisioning interface properties:

Property R/W Description
id read-only Provision ID
state read-only Platform provision state

id property

Provides access to the provision ID.

This property is read-only.

Value

Name Type M/O Description
(property) string mandatory Provision ID

Example

Get Request

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "<callsign>.1.id"
}

Get Response

{
  "jsonrpc": "2.0",
  "id": 42,
  "result": "WPE00000uCfrLF45"
}

state property

Provides access to the platform provision state.

This property is read-only.

Value

Name Type M/O Description
(property) object mandatory Platform provision state
(property).id string mandatory Provision ID value
(property).status integer mandatory Provision status
(property).tokens array mandatory List of provisioned systems
(property).tokens[#] string mandatory ...

Errors

Message Description
ERROR_UNAVAILABLE Provisioning Back Office Client not available

Example

Get Request

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "<callsign>.1.state"
}

Get Response

{
  "jsonrpc": "2.0",
  "id": 42,
  "result": {
    "id": "WPE00000uCfrLF45",
    "status": 200,
    "tokens": [
      "netflix, playready"
    ]
  }
}

Notifications

Notifications are autonomous events triggered by the internals of the implementation and broadcasted via JSON-RPC to all registered observers. Refer to [Thunder] for information on how to register for a notification.

The following events are provided by the Provisioning interface:

Provisioning interface events:

Notification Description
provisioningchange Signals a provisioning change

provisioningchange notification

Signals a provisioning change.

Notification Parameters

Name Type M/O Description
params object mandatory ...
params.status integer mandatory Provision status

Example

Registration

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "<callsign>.1.register",
  "params": {
    "event": "provisioningchange",
    "id": "myid"
  }
}

Notification

{
  "jsonrpc": "2.0",
  "method": "myid.provisioningchange",
  "params": {
    "status": 200
  }
}

The client ID parameter is passed within the notification designator, i.e. <client-id>.provisioningchange.