/api/space/configuration-management/cli-configlets

The following operations are supported on this resource:

  • GET - This API is used to fetch all the configlets (Configlet is a configuration template which is transformed to CLI configuration string before being applied to a device)
  • GET - Gets all CLI configlets
  • POST - This API is used to create a new configlet
  • POST - Adds a CLI configlet
  • PATCH - Configlets could be Patched i.e, list of configlets could be created here
GET /cli-configletsVersion 3

This API is used to fetch all the configlets (Configlet is a configuration template which is transformed to CLI configuration string before being applied to a device).

Sample Usage

GET /cli-configlets


  • Sample Output XML:
    <cli-configlets total="Integer" uri="/api/space/configuration-management/cli-configlets">
         <cli-configlet
               href="/api/space/configuration-management/cli-configlets/{id}" uri="/api/space/configuration-management/cli-configlets/{id}">
               <id>Integer</id>
               <name>String</name>
               <latest-version>String</latest-version>
               <category>String</category>
               <description>String</description>
               <device-family>String</device-family>
               <execution-type>SINGLE</execution-type>
               <reference-number>Integer</reference-number>
               <domain-id>Integer</domain-id>
               <domain-name>String</domain-name>
               <creation-time>java.util.Date</creation-time>
               <last-updated-time>java.util.Date</last-updated-time>
               <last-modified-by>String</last-modified-by>
         </cli-configlet>
    </cli-configlets>

  • Sample Output JSON:
    {
       "cli-configlets" : {
         "@total" : "Integer" ,
         "@uri" : "/api/space/configuration-management/cli-configlets" ,
         "cli-configlet" : {
           "@href" : "/api/space/configuration-management/cli-configlets/{id}" ,
           "@uri" : "/api/space/configuration-management/cli-configlets/{id}" ,
           "id" : "Integer" ,
           "name" : "String" ,
           "latest-version" : "String" ,
           "category" : "String" ,
           "description" : "String" ,
           "device-family" : "String" ,
           "execution-type" : "SINGLE" ,
           "reference-number" : "Integer" ,
           "domain-id" : "Integer" ,
           "domain-name" : "String" ,
           "creation-time" : "java.util.Date" ,
           "last-updated-time" : "java.util.Date" ,
           "last-modified-by" : "String"
         }
       }
    }

  • Access Control

    The following capabilities are required to access this API: ManageCliTemplatesCap

    GET /cli-configletsVersion 2

    This API is used to get all CLI configlets.

    Sample Usage

    GET /cli-configlets


    Access Control

    The following capabilities are required to access this API: ManageCliTemplatesCap

      For other non-deprecated versions of this API, refer to :
    • version 1


    POST /cli-configletsVersion 3

    This API is used to create a new configlet.

    Sample Usage

    POST /cli-configlets


  • Sample Input XML:
    <cli-configlet>
         <name>String</name>
         <category>String</category>
         <description>String</description>
         <context>String</context>
         <reference-number>Integer</reference-number>
         <device-family>String</device-family>
         <execution-type>SINGLE</execution-type>
         <preview-show-parameters>Boolean</preview-show-parameters>
         <preview-show-configuration>Boolean</preview-show-configuration>
         <postview-show-parameters>Boolean</postview-show-parameters>
         <postview-show-configuration>Boolean</postview-show-configuration>
         <cli-text>String</cli-text>
         <cli-configlet-params total="Integer">
               <cli-configlet-param>
                   <parameter>String</parameter>
                   <display-name>String</display-name>
                   <description>String</description>
                   <parameter-scope>GLOBAL</parameter-scope>
                   <parameter-type>READWRITE</parameter-type>
                   <regex-value>String</regex-value>
                   <configured-value-xpath>String</configured-value-xpath>
                   <default-value>String</default-value>
                   <selection-values-xpath>String</selection-values-xpath>
                   <selection-values>String</selection-values>
                   <order>Integer</order>
               </cli-configlet-param>
         </cli-configlet-params>
    </cli-configlet>

  • Sample Output XML:
    <cli-configlet
         href="/api/space/configuration-management/cli-configlets/{id}" uri="/api/space/configuration-management/cli-configlets/{configlet-id}">
         <id>Integer</id>
         <name>String</name>
         <latest-version>String</latest-version>
         <category>String</category>
         <description>String</description>
         <context>String</context>
         <reference-number>Integer</reference-number>
         <device-family>String</device-family>
         <execution-type>SINGLE</execution-type>
         <preview-show-parameters>Boolean</preview-show-parameters>
         <preview-show-configuration>Boolean</preview-show-configuration>
         <postview-show-parameters>Boolean</postview-show-parameters>
         <postview-show-configuration>Boolean</postview-show-configuration>
         <domain-id>Integer</domain-id>
         <domain-name>String</domain-name>
         <creation-time>java.util.Date</creation-time>
         <last-updated-time>java.util.Date</last-updated-time>
         <last-modified-by>String</last-modified-by>
         <cli-text>String</cli-text>
         <cli-configlet-params total="Integer" uri="/api/space/configuration-management/cli-configlets/{configlet-id}/cli-configlet-params">
               <cli-configlet-param>
                   <id>Integer</id>
                   <parameter>String</parameter>
                   <display-name>String</display-name>
                   <description>String</description>
                   <parameter-scope>GLOBAL</parameter-scope>
                   <parameter-type>READWRITE</parameter-type>
                   <regex-value>String</regex-value>
                   <configured-value-xpath>String</configured-value-xpath>
                   <default-value>String</default-value>
                   <selection-values-xpath>String</selection-values-xpath>
                   <selection-values>String</selection-values>
                   <order>Integer</order>
               </cli-configlet-param>
         </cli-configlet-params>
    </cli-configlet>

  • Sample Input JSON:
    {
       "cli-configlet" : {
         "name" : "String" ,
         "category" : "String" ,
         "description" : "String" ,
         "context" : "String" ,
         "reference-number" : "Integer" ,
         "device-family" : "String" ,
         "execution-type" : "SINGLE" ,
         "preview-show-parameters" : "Boolean" ,
         "preview-show-configuration" : "Boolean" ,
         "postview-show-parameters" : "Boolean" ,
         "postview-show-configuration" : "Boolean" ,
         "cli-text" : "String" ,
         "cli-configlet-params" : {
           "@total" : "Integer" ,
           "cli-configlet-param" : {
             "parameter" : "String" ,
             "display-name" : "String" ,
             "description" : "String" ,
             "parameter-scope" : "GLOBAL" ,
             "parameter-type" : "READWRITE" ,
             "regex-value" : "String" ,
             "configured-value-xpath" : "String" ,
             "default-value" : "String" ,
             "selection-values-xpath" : "String" ,
             "selection-values" : "String" ,
             "order" : "Integer"
           }
         }
       }
    }

  • Sample Output JSON:
    {
       "cli-configlet" : {
         "@href" : "/api/space/configuration-management/cli-configlets/{id}" ,
         "@uri" : "/api/space/configuration-management/cli-configlets/{configlet-id}"
         ,
         "id" : "Integer" ,
         "name" : "String" ,
         "latest-version" : "String" ,
         "category" : "String" ,
         "description" : "String" ,
         "context" : "String" ,
         "reference-number" : "Integer" ,
         "device-family" : "String" ,
         "execution-type" : "SINGLE" ,
         "preview-show-parameters" : "Boolean" ,
         "preview-show-configuration" : "Boolean" ,
         "postview-show-parameters" : "Boolean" ,
         "postview-show-configuration" : "Boolean" ,
         "domain-id" : "Integer" ,
         "domain-name" : "String" ,
         "creation-time" : "java.util.Date" ,
         "last-updated-time" : "java.util.Date" ,
         "last-modified-by" : "String" ,
         "cli-text" : "String" ,
         "cli-configlet-params" : {
           "@total" : "Integer" ,
           "@uri" :
           "/api/space/configuration-management/cli-configlets/{configlet-id}/cli-configlet-params"
           ,
           "cli-configlet-param" : {
             "id" : "Integer" ,
             "parameter" : "String" ,
             "display-name" : "String" ,
             "description" : "String" ,
             "parameter-scope" : "GLOBAL" ,
             "parameter-type" : "READWRITE" ,
             "regex-value" : "String" ,
             "configured-value-xpath" : "String" ,
             "default-value" : "String" ,
             "selection-values-xpath" : "String" ,
             "selection-values" : "String" ,
             "order" : "Integer"
           }
         }
       }
    }

  • Access Control

    The following capabilities are required to access this API: NewCliTemplateCap

    POST /cli-configletsVersion 2

    This API is used to add a CLI configlet.

    Sample Usage

    POST /cli-configlets


  • Sample Input XML:

    <cli-configlet>
      <name>m</name>
      <category>catmodi</category>
      <context>context</context>
      <device-family>EX</device-family>
      <reference-number>12</reference-number>
      <description>description</description>
      <cli-configlet-params>
        <cli-configlet-param>
          <parameter> variable </parameter>
          <xpath> xpath</xpath>
          <display-name> dispaly name </display-name>
          <default-value> default </default-value>
          <param-order>1</param-order>
          <param-type>READWRITE</param-type>
        </cli-configlet-param>
        <cli-configlet-param>
          <parameter> variable </parameter>
          <xpath> xpath</xpath>
          <display-name> dispaly name </display-name>
          <default-value> default </default-value>
          <param-order>sdfsf</param-order>
          <param-type>READWRITE</param-type>
        </cli-configlet-param>
      </cli-configlet-params>
      <cli-configlet-pages>
        <cli-configlet-page>
          <cli-text>page1</cli-text>
          <pagenumber>2</pagenumber>
        </cli-configlet-page>
        <cli-configlet-page>
          <cli-text>page2</cli-text>
          <pagenumber>2</pagenumber>
        </cli-configlet-page>
      </cli-configlet-pages>
    </cli-configlet>

  • Sample Output XML:

    <cli-configlet uri="/api/space/configuration-management/cli-configlets/3145734">
      <id>3145734</id>
      <name>ramesh</name>
      <context>tr</context>
      <device-family>EX</device-family>
      <reference-number>12</reference-number>
      <description>mb</description>
      <creation-time>Nov 27, 2012 3:19:09 PM</creation-time>
      <last-updated-time>Nov 28, 2012 4:46:38 PM</last-updated-time>
      <last-modified-by>super</last-modified-by>
      <cli-configlet-params href= "/api/space/configuration-management/cli-configlets/3145734/cli-configlet-params"; rel="view cli configlet params"/>
      <cli-configlet-pages href= "/api/space/configuration-management/cli-configlets/3145734/cli-configlet-pages" rel="view configuration pages";/>
      <apply-configlet href="/api/space/configuration-management/cli-configlets/3145734/apply-configlet" rel="apply cli configlet";/>
    </cli-configlet>

  • Access Control

    The following capabilities are required to access this API: NewCliTemplateCap

      For other non-deprecated versions of this API, refer to :
    • version 1


    PATCH /cli-configletsVersion 3

    Configlets could be Patched i.e, list of configlets could be created here.

    Sample Usage

    PATCH /cli-configlets


  • Sample Patch XML:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <diff>
       <!--What you see below are just samples of patch operations that may be performed on this DTO.-->
       <!--For more information about patch document format please look at http://http://www.rfc-editor.org/rfc/rfc5261.txt-->
       <add sel="cli-configlets">
           <cli-configlet>
             <name>String</name>
             <device-family>String</device-family>
           </cli-configlet>
       </add>
       <!-- or -->
       <remove sel="cli-configlets/cli-configlet[@some attribute='some value']"/>
       <!-- or using element selection-->
       <remove sel="cli-configlets/cli-configlet[some element='some value']"/>
    </diff>