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

Amanda::Rest::Storages::Labels

NAME

Amanda::Rest::Storages::Labels -- Rest interface to manage label

INTERFACE

List labels of a storage

You can use the /amanda/v1.0/configs/:CONF/labels endpoint and filter with the storage.

 request:
  GET /amanda/v1.0/configs/:CONF/storages/:STORAGE/labels
  You can filter the labels listed with the following query arguments:
            config=CONF
            datestamp=datastamp_range
            storage=STORAGE
            meta=META
            pool=POOL
            reuse=0|1

 reply:
  HTTP status: 200 OK
  [
     {
        "code" : "2600001",
        "message" : "List of labels",
        "severity" : "16",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Storages/Labels.pm",
        "source_line" : "245",
        "tles" : [
           {
              "barcode" : null,
              "blocksize" : "32",
              "comment" : null,
              "config" : "test",
              "datestamp" : "20131118134146",
              "label" : "test-ORG-AA-vtapes-002",
              "meta" : "test-ORG-AA",
              "pool" : "my_vtapes",
              "position" : 45,
              "reuse" : "1",
              "storage" : "my_vtapes"
           }
           ...
        ]
     }
  ]
List one label
 request:
  GET /amanda/v1.0/configs/:CONF/storages/:STORAGE/labels/:LABEL

 reply:
  HTTP status: 200 OK
  [
     {
        "code" : "2600001",
        "message" : "List of labels",
        "severity" : "16",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Storages/Labels.pm",
        "source_line" : "245",
        "tles" : [
           {
              "barcode" : null,
              "blocksize" : "32",
              "comment" : null,
              "config" : "test",
              "datestamp" : "20131118134146",
              "label" : "test-ORG-AA-vtapes-002",
              "meta" : "test-ORG-AA",
              "pool" : "my_vtapes",
              "position" : 45,
              "reuse" : "1",
              "storage" : "my_vtapes"
           }
        ]
     }
  ]
Modify label setting
 request:
  POST /amanda/v1.0/configs/:CONF/storages/:STORAGE/labels/:LABEL
    query arguments:
        force=0|1
        config=CONFIG
        storage=STORAGE
        meta=META
        barcode=BARCODE
        comment=COMMENT
        reuse=0|1

 reply:
  HTTP status: 200 OK
  [
     {
        "code" : "1000045",
        "label" : "test-ORG-AC-vtapes2-001",
        "message" : "marking tape 'test-ORG-AC-vtapes2-001' as reusable.",
        "severity" : "16",
        "source_filename" : "/amanda/h1/linux/lib/amanda/perl/Amanda/Label.pm",
        "source_line" : "1315"
     },
     {
        "code" : "1000006",
        "label" : "test-ORG-AC-vtapes2-001",
        "message" : "Setting test-ORG-AC-vtapes2-001",
        "severity" : "16",
        "source_filename" : "/amanda/h1/linux/lib/amanda/perl/Amanda/Label.pm",
        "source_line" : "408"
     }
  ]
Label a volume
 request:
  POST /amanda/v1.0/configs/:CONF/storages/:STORAGE/labels

 reply:
  HTTP status: 200 OK
  [
     {
        "code" : "1000008",
        "message" : "Reading label...",
        "severity" : "16",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Label.pm",
        "source_line" : "513"
     },
     {
        "code" : "1000009",
        "message" : "Found an empty tape.",
        "severity" : "16",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Label.pm",
        "source_line" : "574"
     },
     {
        "code" : "1000020",
        "label" : "test-ORG-AA-vtapes-002",
        "message" : "Writing label 'test-ORG-AA-vtapes-002'...",
        "severity" : "16",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Label.pm",
        "source_line" : "707"
     },
     {
        "code" : "1000021",
        "message" : "Checking label...",
        "severity" : "16",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Label.pm",
        "source_line" : "727"
     },
     {
        "code" : "1000022",
        "message" : "Success!",
        "severity" : "16",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Label.pm",
        "source_line" : "769"
     }
  ]
Remove a label
 request:
  DELETE /amanda/v1.0/configs/:CONF/storages/:STORAGE/labels
  DELETE /amanda/v1.0/configs/:CONF/storages/:STORAGE/labels/:LABEL
    query arguments:
        remove_no_retention
        labels=LABEL1   # can be repeated
        cleanup
        dry_run
        erase
        external_copy
        keep_label

 reply:
  HTTP status: 200 OK
  [
    {
        "code" : "1000052",
        "label" : "test-ORG-AA-vtapes-002",
        "message" : "Removed label 'test-ORG-AA-vtapes-002 from tapelist file.",
        "severity" : "16",
        "source_filename" : "/usr/lib/amanda/perl/Amanda/Label.pm",
        "source_line" : "1070",
        "tapelist_filename" : "/usr/amanda/test/tapelist"
     }
  ]

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