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

The following operations are supported on this resource:

  • GET - Get configuration file by its ID
  • DELETE - Delete configuration file by ID
GET /config-files/{id}Version 1

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

Sample Usage

GET /config-files/{id}


  • Parameters:
    NameTypeURI TypeDescriptionRequired
    idintPathThe ID of the configuration file. Y
  • 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"
          }]
        }
      }

  • Access Control

    The following capabilities are required to access this API: ViewConfigFilesCap

    DELETE /config-files/{id}Version 1

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

    Sample Usage

    DELETE /config-files/{id}


    • Parameters:
      NameTypeURI TypeDescriptionRequired
      idintPathThe ID of a configuration file Y
  • Sample Output XML:
    <task href="/api/space/job-management/jobs/98365">
       <id>884737</id>
    </task>

  • Access Control

    The following capabilities are required to access this API: DeleteConfigFilesCap