Configuration File Management API

/api/space/config-file-management/config-files/{id}

The following operations are supported on this resource:

GET /api/space/config-file-management/config-files/{id} (v1)


This API provides a particular configuration file requested by its ID.

Access Control

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


Example Usage

GET /api/space/config-file-management/config-files/{id}


Parameters

NameTypeURI TypeDescriptionRequired
idintPathThe ID of the configuration file to retrieve. Y

Content Types

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


  • Sample Output XML:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <config-file uri="/api/space/config-file-management/config-files/1540111">
    <device href="/api/space/device-management/devices/655362" rel="device"/>
    <latest-version href="/api/space/config-file-management/config-files/1540111/config-file-versions/2" rel="latest-version"/>
    <deviceFamily>junos-es</deviceFamily>
    <fileName>AT5109AF0621.conf</fileName>
    <latestVersion>2</latestVersion>
    <id>1540111</id>
    <size>16673</size>
    <deviceName>host-srx_100_Sambit</deviceName>
    <deviceId>655362</deviceId>
    <config-file-versions uri="/api/space/config-file-management/config-files/1540111/config-file-versions">
    <config-file-version uri="/api/space/config-file-management/config-files/1540111/config-file-versions/1" *
    href="/api/space/config-file-management/config-files/1540111/config-file-versions/1">
    <id>1540111</id>
    <versionId>1</versionId>
    *
    <creationTime>2012-04-20 08:34:30.0</creationTime>
    <comment>This version of the Config file is imported from the device.</comment>
    </config-file-version>
    <config-file-version uri="/api/space/config-file-management/config-files/1540111/config-file-versions/2" href="/api/space/config-file-management/config-files/1540111/config-file-versions/2">
    <id>1540111</id>
    <versionId>2</versionId>
    <creationTime>2012-04-20 08:35:06.0</creationTime>
    <comment>This is an edited version of the Config file version:1</comment>
    </config-file-version>
    </config-file-versions>
    </config-file>


  • Sample Output JSON:

    {"config-file":
    {
    "@uri":"/api/space/config-file-management/config-files/1540111",
    "device":{"@href":"/api/space/device-management/devices/655362","@rel":"device"}
    ,"latest-version":{"@href":"/api/space/config-file-management/config-files/1540111/config-file-versions/2",
    "@rel":"latest-version"},
    "deviceFamily":"junos-es",
    "fileName":"AT5109AF0621.conf",
    "latestVersion":2,
    "id":1540111,
    "size":16673,
    "deviceName":"host-srx_100_Sambit",
    "deviceId":655362,
    "config-file-versions":
    {
    "@uri":"/api/space/config-file-management/config-files/1540111/config-file-versions",
    "config-file-version":
    [
    {
    "@uri":"/api/space/config-file-management/config-files/1540111/config-file-versions/1",
    "@href":"/api/space/config-file-management/config-files/1540111/config-file-versions/1",
    "id":1540111,
    "versionId":1,
    "creationTime":"2012-04-20 08:34:30.0",
    "comment":"This version of the Config file is imported from the device."
    },
    {
    "@uri":"/api/space/config-file-management/config-files/1540111/config-file-versions/2",
    "@href":"/api/space/config-file-management/config-files/1540111/config-file-versions/2",
    "id":1v540111,
    "versionId":2,
    "creationTime":"2012-04-20 08:35:06.0",
    "comment":"This is an edited version of the Config file version:1"
    }
    ]
    }
    }
    }



DELETE /api/space/config-file-management/config-files/{id} (v1)


This API is used to delete a configuration file from the database.

Access Control

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


Example Usage

DELETE /api/space/config-file-management/config-files/{id}


Parameters

NameTypeURI TypeDescriptionRequired
idintPathID of a configuration file to remove from the database. Y
  • Sample Output XML:
    <task href="/api/space/job-management/jobs/98365">
       <id>884737</id>
    </task>