4.0.0alpha.svn.7719
Amanda::Rest modules list
Amanda modules list
List of All Modules
All Amanda Releases

Amanda::Rest::Configs

NAME

Amanda::Rest::Configs -- Rest interface to Amanda::Config

INTERFACE

Get a list of config
 request:
  GET /amanda/v1.0/configs

 reply:
  HTTP status: 200 OK
  [
     {
        "code" : "1500003",
        "config" : [
          "test",
        ],
        "message" : "config name",
        "severity" : "16",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Configs.pm",
        "source_line" : "187"
     }
  ]

 reply:
  HTTP status: 404 Not found
  [
     {
        "code" : "1500004",
        "message" : "no config",
        "severity" : "16",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Configs.pm",
        "source_line" : "193"
     }
  ]

 reply:
  HTTP status: 404 Not found
  [
     {
        "code" : "1500006",
        "dir" : "/etc/amanda",
        "errno" : "No such file or directory",
        "message" : "Can't open config directory '/etc/amanda': No such file or directory",
        "severity" : "16",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Configs.pm",
        "source_line" : "176"
     }
  ]
Get the values of all global parameters
 request:
  GET /amanda/v1.0/configs/:CONF

 result:
  [
     {
        "code" : "1500008",
        "message" : "Parameters values",
        "result" : {
           "RUNTAPES" : 3,
           "TAPECYCLE" : 50
           ...
        },
        "severity" : "16",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Configs.pm",
        "source_line" : "151"
     }
  ]
Get the value of one or more global parameters
 request:
  GET /amanda/v1.0/configs/:CONF?fields=runtapes&fields=foo&fields=tapecycle&fields=bar

 result:
  [
     {
        "code" : "1500007",
        "message" : "Not existant parameters",
        "parameters" : [
           "foo",
           "bar"
        ],
        "severity" : "16",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Configs.pm",
        "source_line" : "144"
     },
     {
        "code" : "1500008",
        "message" : "Parameters values",
        "result" : {
           "RUNTAPES" : 3,
           "TAPECYCLE" : 50
        },
        "severity" : "16",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Configs.pm",
        "source_line" : "151"
     }
  ]
Get a list of all item in a section
 request:
  GET /amanda/v1.0/configs/:CONF/SECTION
  eg. /amanda/v1.0/configs/:CONF/dumptypes

 where SECTION is applications
                  changers
                  devices
                  dumptypes
                  holdingdisks
                  interfaces
                  interactivitys
                  policys
                  taperscans
                  tapetypes
                  scripts
                  storages

 reply:
  HTTP status: 200 OK
  [
     {
        "code" : "1500022", #code differ for each section
        "dumptypes_list" : [
          "name1",
          "name2",
          ...
        ],
        "message" : "Dumptype list",
        "severity" : "success",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Configs.pm",
        "source_line" : "397"
     }
  ]
Get the values of all parameters of a section
 request:
  GET /amanda/v1.0/configs/:CONF/SECTION/:SECTION
  eg. /amanda/v1.0/configs/:CONF/dumptypes/global
 query arguments:
  expand_application=1
  expand_device=1
  expand_dumptype=1
  expand_changer=1
  expand_holdingdisk=1
  expand_interface=1
  expand_interactivity=1
  expand_policy=1
  expand_script=1
  expand_storage=1
  expand_taperscan=1
  expand_tapetype=1

 result:
  [
     {
        "code" : "1500037", #code differ for each section
        "message" : "Dumptype 'global' parameters values",
        "result" : {
           "RUNTAPES" : 3,
           "TAPECYCLE" : 50
           ...
        },
        "severity" : "success",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Configs.pm",
        "source_line" : "271"
     }
  ]
Get the value of one or more parametes of a section
 request:
  GET /amanda/v1.0/configs/:CONF/SECTION/:SECTION?fields=index&fields=foo
  eg. /amanda/v1.0/configs/:CONF/dumptypes/global?fields=index&fields=foo'

 result:
  [
     {
        "code" : "1500058",
        "message" : "invalid 'FOO' field specified",
        "field" : "FOO",
        "severity" : "error",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Configs.pm",
        "source_line" : "263"
     },
     {
        "code" : "1500037", #code differ for each section
        "message" : "Dumptype 'global' parameters values",
        "result" : {
           "INDEX" : "YES",
        },
        "severity" : "success",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Configs.pm",
        "source_line" : "271"
     }
  ]
Configure overrides
 The way to add configuration overrides is by using %3D in the override

   config_overrides=ctimeout%3D1000

ABOUT THIS PAGE

This page was automatically generated Tue Mar 19 07:08:16 2019 from the Amanda source tree, and documents the most recent development version of Amanda. For documentation specific to the version of Amanda on your system, use the 'perldoc' command.


4.0.0alpha.svn.7719