Quick Start

This section shows how to use Postman in place of your own Smart Licensing Application, to try out the IOS-XE SLP REST APIs.
Postman is a freely available application that enables you to create and execute REST queries to a product instance running SLP, from within Postman.

First configure the product instance, and download the executable file to install Postman. Then refer to any one of the examples to know how to execute an IOS-XE SLP REST API. Examples are provided for both GET and POST methods.

  1. Configure the product instance.

    See the Product Instance Configuration section in this document.

  2. Download and install the Postman API Client from: https://www.postman.com

    Note: Do not use the Chrome extension; download and install the executable file for the standalone application instead.

  3. Enter the show ip interface brief privileged EXEC command on the product instance to retrieve the management IP address of the product instance.

Device# show ip interface brief
Interface                 IP-Address      OK?    Method Status                 Protocol
GigabitEthernet0/0/0    unassigned      YES    NVRAM  administratively down down
GigabitEthernet0/0/1    unassigned      YES    NVRAM  administratively down down
GigabitEthernet0/0/2    unassigned      YES    NVRAM  administratively down down
GigabitEthernet0/0/3    unassigned      YES    NVRAM  administratively down down
GigabitEthernet0        175.25.212.187  YES    NVRAM  up                     up

You can now refer to any one of the examples below to send an API request by using Postman.

Example for the POST method (Close Reports)

In this example we are executing the REST query to close all open RUM reports on the product instance.

a. Click "+ New" to create a new request.

b. Select method POST.

c. Enter the host and context path for this API request: https://<pi-mgmt-ip>/smartlic-service/close-reports

For <pi-mgmt-ip>, enter the management IP address of your product instance.

d. Enter values in the tabs as shown below.

  • Params: no entry required.

  • Authorization:
    From the Type dropdown list, select Basic Auth.
    Enter the username and password you configured as part of Enabling an HTTP Server with an Authentication Method.

    alt text

  • Headers: Only the following keys are required; the remaining keys may be removed or left as is.
    Content-type: application/json
    alt text

  • Body:
    Select the "raw" radio button. Remove existing content if any.
    Enter open and close curly brackets "{}".
    alt text

  • Pre-requisite Script: no entry required.

  • Tests: no entry required.

  • Settings: no entry required.

e. Click Send.

alt text

Response: All open RUM reports on the product instance are closed. The response body will be blank because nothing is being retrieved with this API.

To verify that this API request is succesfully completed, check that no errors are displayed, and the Status is displayed as"200 Ok".

Example for the GET method (List Reports)

In this example we are executing the REST query to get the list of all available RUM reports with the report ID and timestamp.

a. Click "+ New" to create a new request.

b. Select method GET.

c. Enter the host and context path for this API request: https:///smartlic-service/list

For <pi-mgmt-ip>, enter the management IP address of your product instance.

d. Enter values in the tabs as shown below.

  • Params: no entry required.
  • Authorization:
    From the Type dropdown list, select Basic Auth.
    Enter the username and password you configured as part of Enabling an HTTP Server with an Authentication Method.
    alt text
  • Headers: Only the following key is required; the remaining keys may be removed or left as is.
    Content-type: application/json
    alt text
  • Body: Select the "none" radio button.
    alt text
  • Pre-requisite Script: no entry required.
  • Tests: no entry required.
  • Settings: no entry required.

e. Click Send.

alt text

Response: The response window in Postman displays the list of available RUM reports on the product instance, with the timestamp for each report ID.

Example for the POST method (Import SLAC, or RUM ACK or Custom Policy)

In this example we are executing the REST query to import a SLAC on to the product instance. The same procedure applies to importing a RUM ACK or Custom Policy as well.

Before you begin:
Log in to the CSSM Web UI at https://software.cisco.com and generate an authorization code and save the contents in a .txt file.
Convert the contents of the .txt file to a base64 encoded format.

a. Click "+ New" to create a new request.

b. Select method POST

c. Enter the host and context path for this API request: https://<pi-mgmt-ip>/smartlic-service/import

For <pi-mgmt-ip>, enter the management IP address of your product instance.

d. Enter values in the tabs as shown below.

  • Params: no entry required.
  • Authorization:
    From the Type dropdown list, select Basic Auth.
    Enter the username and password you configured as part of Enabling an HTTP Server with an Authentication Method.
    alt text
  • Headers: Only the following keys are required; the remaining keys may be removed or left as is.
    Content-type: application/json
    alt text
  • Body:
    Select the "raw" radio button.
    Paste the base64 encoded format of the SLAC file within a pair of double quotes - "".
    alt text
  • Pre-requisite Script: no entry required.
  • Tests: no entry required.
  • Settings: no entry required.

e. Click Send.

alt text

Response: The response window in Postman displays 200 OK.
To verify that the SLAC has been imported successfully, on the product instance, enter the show license authorization command in privileged EXEC mode. In the output look for an updated timestamp in the Status field.