Page tree

Creates or updates a tape location.

Endpoint

https://<Director_IP_address>:4443/c/router

Tenant Endpoint

For tenants of the multi-tenant product the endpoint must be:

https://<Director_IP_address>:4443/t/<tenant_UUID>/c/router

Request Examples

This is an example of creating a tape location.

curl
 curl --request POST \
    --url https://<Director_IP_address>:4443/c/router \
    --header "content-type: application/json" \
    --cookie @cookies.txt \
    --data "{
             "action": "TapeLocationManagement",
             "method": "createOrUpdate",
             "data": [
                   {
                      "id": null,
                      "name": "Kr",
                      "description": "location in Korea"
                   }
             ],
             "type": "rpc",
             "tid": 1
           }"

This is an example of updating a tape location.

curl
curl --request POST \
    --url https://<Director_IP_address>:4443/c/router \
    --header "content-type: application/json" \
    --cookie @cookies.txt \
    --data "{
             "action": "TapeLocationManagement",
             "method": "createOrUpdate",
             "data": [
                      {
                          "id": 34,
                          "name": "Kr",
                          "description": "location in Korean"
                      }
              ],
             "type": "rpc",
             "tid": 1
           }"

Request Fields

Field
Type
Value(s)
Description
actionstring
TapeLocationManagement
The action that is invoked
methodstring
createOrUpdate
The method that is invoked
dataarray Data of a tape location to be created or updated
typestringrpcType of communication protocol
tidint1Transaction ID. Used to identify the request by both the client and the server

data

Field
Type
Description

id

long

Tape location ID. For the create method, this field is ignored

name

string

Tape location name

description

string

Description of the tape location

Response Sample

 {
    "action": "TapeLocationManagement",
    "method": "createOrUpdate",
    "tid": 1,
    "type": "rpc",
    "message": null,
    "where": null,
    "cause": null,
    "data": 34
}

Response Fields

Field
Value
Description
messagestringMessage if the request failed
wherestringReference to the method where problem occurred
causestringCause of failure

data

long

ID of the tape location

  • No labels