Configuration Template Management API

/api/space/config-template-management/config-templates

The following operations are supported on this resource:

  • GET - Gets all configuration templates
  • POST - Creates a configuration template from a configuration template definition
  • PATCH - Patches the configuration template collection

GET /api/space/config-template-management/config-templates (v1)


This API gets all configuration templates.

Access Control

The following capabilities are required to access this API:
"ManageTemplates"


Example Usage

GET /api/space/config-template-management/config-templates

Content Types

  • Produces content types:
    application/vnd.net.juniper.space.config-template-management.config-templates+xml;version=1;q=0.01
    application/vnd.net.juniper.space.config-template-management.config-templates+json;version=1;q=0.01


  • Sample Output XML:
    <config-templates total="Integer" uri="/api/space/config-template-management/config-templates">
         <config-template
               href="/api/space/config-template-management/config-templates/{id}" uri="/api/space/config-template-management/config-templates/{id}">
               <id>Integer</id>
               <name>String</name>
               <description>String</description>
               <state>String</state>
               <os-version>String</os-version>
               <current-version>Integer</current-version>
               <device-family>String</device-family>
               <last-updated-by>String</last-updated-by>
               <last-update-time>String</last-update-time>
         </config-template>
    </config-templates>


  • Sample Output JSON:
    {
       "config-templates" : {
         "@total" : "Integer" ,
         "@uri" : "/api/space/config-template-management/config-templates" ,
         "config-template" : {
           "@href" : "/api/space/config-template-management/config-templates/{id}" ,
           "@uri" : "/api/space/config-template-management/config-templates/{id}" ,
           "id" : "Integer" ,
           "name" : "String" ,
           "description" : "String" ,
           "state" : "String" ,
           "os-version" : "String" ,
           "current-version" : "Integer" ,
           "device-family" : "String" ,
           "last-updated-by" : "String" ,
           "last-update-time" : "String"
         }
       }
    }



POST /api/space/config-template-management/config-templates (v1)


This API creates a new configuration template from a configuration template definition.

Access Control

The following capabilities are required to access this API:
"CreateTemplate"


Example Usage

POST /api/space/config-template-management/config-templates

Content Types

  • Consumes content types:
    application/vnd.net.juniper.space.config-template-management.config-template+xml;version=1;charset=UTF-8
    application/vnd.net.juniper.space.config-template-management.config-template+json;version=1;charset=UTF-8


  • Produces content types:
    application/vnd.net.juniper.space.config-template-management.config-template+xml;version=1;q=0.01
    application/vnd.net.juniper.space.config-template-management.config-template+json;version=1;q=0.01


  • Sample Input XML:
    <config-template>
         <name>String</name>
         <description>String</description>
         <config-template-definition href="/api/space/config-template-management/config-template-definitions/{id}"/>
    </config-template>


  • Sample Output XML:
    <config-template
         href="/api/space/config-template-management/config-templates/{id}" uri="/api/space/config-template-management/config-templates/{id}">
         <id>Integer</id>
         <name>String</name>
         <description>String</description>
         <state>String</state>
         <os-version>String</os-version>
         <current-version>Integer</current-version>
         <device-family>String</device-family>
         <last-updated-by>String</last-updated-by>
         <last-update-time>String</last-update-time>
         <config-template-definition
               href="/api/space/config-template-management/config-template-definitions/{id}" uri="/api/space/config-template-management/config-templates/{id}">
               <id>Integer</id>
               <name>String</name>
         </config-template-definition>
    </config-template>


  • Sample Input JSON:
    {
       "config-template" : {
         "name" : "String" ,
         "description" : "String" ,
         "config-template-definition" : {
           "@href" :
           "/api/space/config-template-management/config-template-definitions/{id}"
         }
       }
    }


  • Sample Output JSON:
    {
       "config-template" : {
         "@href" : "/api/space/config-template-management/config-templates/{id}" ,
         "@uri" : "/api/space/config-template-management/config-templates/{id}" ,
         "id" : "Integer" ,
         "name" : "String" ,
         "description" : "String" ,
         "state" : "String" ,
         "os-version" : "String" ,
         "current-version" : "Integer" ,
         "device-family" : "String" ,
         "last-updated-by" : "String" ,
         "last-update-time" : "String" ,
         "config-template-definition" : {
           "@href" :
           "/api/space/config-template-management/config-template-definitions/{id}" ,
           "@uri" : "/api/space/config-template-management/config-templates/{id}" ,
           "id" : "Integer" ,
           "name" : "String"
         }
       }
    }



PATCH /api/space/config-template-management/config-templates (v1)


This API patches the configuration template collection. Use this API to make bulk additions and deletions of multiple templates.

Access Control

The following capabilities are required to access this API:
"AddDeployedDevices"


Example Usage

PATCH /api/space/config-template-management/config-templates

Content Types

  • Consumes content types:
    application/vnd.net.juniper.space.config-template-management.config-templates_patch+xml;version=1;charset=UTF-8


  • Sample Patch XML:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <diff>
       <!--What you see below are just a 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="config-templates">
         <config-template>
           <name>String</name>
           <description>String</description>
           <state>String</state>
           <os-version>String</os-version>
           <current-version>Integer</current-version>
           <device-family>String</device-family>
           <last-updated-by>String</last-updated-by>
           <last-update-time>String</last-update-time>
         </config-template>
       </add>
       <!-- or -->
       <remove
         sel="config-templates/config-template[@some attribute='some value']" />
       <!-- or using element selection -->
       <remove sel="config-templates/config-template[some element='some value']" />
    </diff>