REST Resources

/api/space/device-management/devices/{device-id}/apply-cli-configlet

The following operations are supported on this resource:

  • POST - This API is used to apply a configlet on the device
  • POST - Apply CLI configlet to a device
POST /devices/{device-id}/apply-cli-configletVersion 5

This API is used to apply a configlet on the device.

Sample Usage

This API makes an asynchronous method call; so, you can optionally specify queue and schedule parameters:

POST /devices/{device-id}/apply-cli-configlet?queue=<queue>&schedule=<schedule>


Note: The queue URL denoted by <queue> must have been created already.


  • Parameters:
    NameTypeURI TypeDescriptionRequired
    device-idIntegerPathDevice ID Y
    queueQueue URLQueryA fully qualified queue URL, where job progress notifications will be sent (See Asynchronous API Usage)N
    schedulecron-like-expressionQuerySchedule this API in the future, by specifying a cron-like-expression (See Job Scheduling)N
  • Sample Input XML:
    <apply-cli-configlet>
         <configlet href="/api/space/configuration-management/cli-configlets/491568"/>
         <cli-configlet-params>
               <cli-configlet-param>
                   <parameter href="/api/space/configuration-management/cli-configlets/491568/cli-configlet-params/2588696"/>
                   <parameter-value>Param_value</parameter-value>
               </cli-configlet-param>
         </cli-configlet-params>
    </apply-cli-configlet>

  • Sample Output XML:
    <task href="/api/space/job-management/jobs/884749">
      <id>884749</id>
    </task>

  • Sample Input JSON:
    {
      "apply-cli-configlet": {
        "configlet": {
          "@href": "/api/space/configuration-management/cli-configlets/491568"
        },
        "cli-configlet-params": {
          "cli-configlet-param": [
            {
              "parameter": {
                "@href": "/api/space/configuration-management/cli-configlets/491568/cli-configlet-params/2588696"
              },
              "parameter-value": "Param_value"
            }
          ]
        }
      }
    }

  • Sample Output JSON:
    {
      "task": {
        "@href":"/api/space/job-management/jobs/884749",
        "id":"884749"
      }
    }

  • Access Control

    The following capabilities are required to access this API: ApplyCliTemplateCap

    POST /devices/{device-id}/apply-cli-configletVersion 1

    This API is used to apply a CLI configlet to a device.

    Sample Usage

    POST /devices/{device-id}/apply-cli-configlet


    • Parameters:
      NameTypeURI TypeDescriptionRequired
      device-idIntegerPathThe ID of the device to which the CLI configlet will be applied. Y
  • Sample Input XML:
    <cli-configlet-mgmt>
      <configletId>393218</configletId>
      <cli-configlet-param>
        <parameter>param1</parameter>
        <param-value>value2</param-value>
      </cli-configlet-param>
      <cli-configlet-param>
        <parameter>param2</parameter>
        <param-value>value2</param-value>
      </cli-configlet-param>
    </cli-configlet-mgmt>

  • Sample Output XML:
    <task href="/api/space/job-management/jobs/3997704">
      <id>3997704</id>
    </task>

  • Sample Input JSON:
    {
      "cli-configlet-mgmt": {
        "configletId": "393218",
        "cli-configlet-param": [
          {
            "parameter": "param1",
            "param-value": "value2"
          },
          {
            "parameter": "param2",
            "param-value": "value2"
          }
        ]
      }
    }

  • Sample Output JSON:
    {
      "task": {
        "@href":"/api/space/job-management/jobs/3997704",
        "id":3997704
      }
    }

  • Access Control

    The following capabilities are required to access this API: ApplyCliTemplateCap

      For the deprecated versions of this API, refer to :
    • version 2