Add a license

post

/rest/{version}/system/features

Adds a license to the configuration using a key obtained from your service representative. The client making the POST request must already possess the configuration lock or the request fails.

Request

Path Parameters
Header Parameters
  • The value in the Authorization header must be the string "Bearer {access token}", where {access token} is a valid, unexpired token received in response to a prior /rest/{version}/auth/token request.
Back to Top

Response

200 Response

OK - Requested successful

400 Response

The request is malformed in some way or is missing required information and therefore cannot be processed.

401 Response

Unauthorized - Request lacks valid authentication credentials.

403 Response

This request requires the client credentials to have administrator privileges.

404 Response

Resource not found

423 Response

The request requires the configuration lock and failed because the client does not currently own the lock. If another client or user currently owns the configuration lock, the error message is "Resource locked by another user". If no client or user owns the configuration lock, the error message is "User does not have the lock".
Back to Top

Examples

Examples of Accessing the API

See Authenticate for how to acquire a token.

The following example shows how to add a license using curl.

curl -X POST \
    -d@request.xml \
    --header "Accept: application/xml" \
    --header "Authorization: Bearer $TOKEN" \
    "https://${SBCIP}/rest/v1.2/system/features"

The following example shows how to add a license using Python.

import requests
from lxml import etree
headers = { "Accept":"application/xml", "Authorization":"Bearer " + token }
data = etree.tostring(etree.parse("request.xml"), xml_declaration=True, encoding='utf-8')
url  = "https://" + sbcip + "/rest/v1.2/system/features"
resp = requests.post(url, headers=headers, data=data)

The following shows an example of the contents of the request.xml file sent as the request body.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<sysFeatures>
  <licenses>
    <license>
      <key>rsdrlurdjbh9sudedjnq6bbuq9v6nmpbdjl5ftkfjbrslmpqineo3p3kro9gqaacatu9sjc05h6ur6tb3oj6t42mlbl4tl8c089uab0</key>
    </license>
  </licenses>
</sysFeatures>

Example of the Response Body

The following example shows the contents of the response body in XML.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
  <data>
    <licenses>
      <license>
        <name>SIP, Software TLS, H248, DoS, IPSEC, RTSP, IDS, Transcode Codec EVRCB (uncapped EVRCB transcoding sessions), SIP Authorization/Authentication, Software SRTP, Diameter Director, TSCF (0 TSCF tunnel), Transcode Codec AMR-WB (uncapped AMRWB transcoding sessions), CX, Transcode Codec Opus (uncapped OPUS transcoding sessions), Transcode Codec SILK (uncapped SILK transcoding sessions), Fraud Protection, GTP, BFD</name>
        <key>rsdrlurdjbh9sudedjnq6bbuq9v6nmpbdjl5ftkfjbrslmpqineo3p3kro9gqaacatu9sjc05h6ur6tb3oj6t42mlbl4tl8c089uab0</key>
        <installationDate>2019-01-17T14:28:37+0000</installationDate>
        <startDate/>
        <expireDate/>
      </license>
    </licenses>
  </data>
  <messages/>
  <links/>
</response>
Back to Top