Requests
You can create, edit, and delete system resources through RESTful API requests.
All RESTful API requests have the following fields:
- Action
- This field determines the type of the requested action. Available values are
POST
(create),PUT
(update), andDELETE
. - Params
- This field specifies the parameters that are required for the action (for example, the size of a volume that the system is required to create).
The general structure of a request, for example, is
POST /v1/volumes
. The
following two examples show the requests for the deletion and updating of a specified volume.- Deletion
- Deleting a volume named
0000:
DELETE /v1/volumes/0000
- Update
- Updating a volume named
0000:
PUT /v1/volumes/0000
Note: In this release, only a single update request in the body is supported.
The following information provides the content for requests on various system objects and includes their parameter options.
FlashCopy
- Create
-
POST /v1/cs/flashcopies { "request": { "params" : { "volume_pairs" : [ { "source_volume" : "0000", "target_volume" : "1000" }, ... ], "options" : [ "freeze_consistency", "inhibit_target_writes", "record_changes", "no_background_copy", "persistent", "allow_pprc_target_primary", "reverse_restore", "fast_reverse_restore", "permit_space_efficient_target", "fail_space_efficient_target_out_of_space" ] } } }
- Delete
-
DELETE /v1/cs/flashcopies?ids={flashcopy_id},{flashcopy_id},...,{flashcopy_id} #max 32 flashcopy ids are supported
- Unfreeze
-
POST /v1/cs/flashcopies/unfreeze { "request": { "params" : { "lss_ids" : [ "00", "01", ... ] } } }
Hosts
- Create
-
POST /v1/hosts { "request" : { "params" : { "name" : "testHost_1", "hosttype" : "Win2003" } } }
- Update
-
PUT /v1/hosts/{host_name} { "request": { "params" : { "ioports" : [portID1,portID2,...] | all #"ioports" : [] means remove all } ioports from a specific host } }
- Delete
-
POST /v1/hosts/{host_name}
Host mapping
- Create
-
POST /v1/hosts/{host_name}/mappings { "request" : { "params" : { "volumes" : [0001,0002], "mappings" : [ {00:0001}, {01:0002} ] } } }
- Delete
-
DELETE /v1/hosts/{host_name}/mappings/{mapping_id}
Host ports
- Create
-
POST /v1/host_ports { "request" : { "params" : { "wwpn" : "50050763030813A2", "host" : "myhost1" } } }
- Update
-
PUT /v1/host_ports/{wwpn} { "request" : { "params" : { "host" : "myhost1" } } }
- Delete
-
DELETE /v1/host_ports/{wwpn}
Logical subsystem
- Create
-
POST /v1/lss { "request" : { "params" : { "id" : "00", "type" : "ckd" "sub_system_identifier" : "FF00" "ckd_base_cu_type" : "3990-3" | "3990-tpf" | "3990-6" | "bs2000" } } }
- Update
-
PUT /v1/lss/{lss_id} { "request" : { "params" : { "sub_system_identifier" : "FF01", "pprc_consistency_group" : "enable" | "disable", "critical_mode" : "enable" | "disable", "extended_long_busy_time" : "60", "cc_session_timeout" : "300", "xrc_session_timeout" : "300", "ckd_base_cu_type" : "3990-3" | "3990-tpf" | "3990-6" | "bs2000" } } }
- Delete
-
DELETE /v1/lss/{lss_id}
ODD files (DS8880, only)
- Create
-
POST /v1/odd/offload { "request" : { "params" : { "file_names" : [ "cpssdump17_ODDdump.150625_141348.1.0.tar.gz" , "cpssdump17_ODDdump.150625_141339.1.1.tar.gz" ] } } }
PE package (DS8880, only)
- Create
-
POST /v1/pepackage/offload { "request" : { "params" : { "area" : "general" | "ui" | "ettraces" | "etlogs" | "panic" | "prolongedIO" , } } }
Remote Mirror and Copy
- Create
-
POST /v1/cs/pprcs { "request" : { "params" : { "volume_pairs" : [ { "source_volume" : "0000" , "source_system_id" : "2107-1300861" , "target_volume" : "1000" , "target_system_id" : "2107-75YZ881" , } , ... ] , "type" : "global_copy" | "metro_mirror" , "option" : [ "permit_space_efficient_target" , "initial_copy_full" , "failover" ] } } }
- Update
-
PUT /v1/cs/pprcs?ids={pprc_id}},{pprc_id},…,{pprc_id}
PUT /v1/cs/pprcs/{pprc_id}
{ "request" : { "params" : { "options" : [ "setup_preserved_mirror" , "reset_preserved_mirror" ] } } }
- Delete
-
DELETE /v1/cs/pprcs?ids={pprc_id},{pprc_id},…,{pprc_id}
DELETE /v1/cs/pprcs/{pprc_id}
POST /v1/cs/pprcs/delete
{ "request" : { "params" : { "volume_full_ids" : [ { "volume_id" : "0000" , "system_id" : "2107-1300861" } , ] "options" : [ "unconditional" , "issue_source" , "issue_target" ] } } }
- Pause
-
POST /v1/cs/pprcs/pause { "request" : { “params” : { "pprc_ids" : [ "2107-1300861-0000:2107-1300855-1000" , "2107-1300861-0001:2107-1300855-1001" , ] } } }
- Resume
-
POST /v1/cs/pprcs/resume { "request" : { "params" : { "pprc_ids" : [ "2107-1300861-0000:2107-1300855-1000" , "2107-1300861-0001:2107-1300855-1001" , … ] , "type" : "global_copy" | "metro_mirror" , "options" : [ "permit_space_efficient_target" , "initial_copy_out_of_sync" , "failback" ] } } }
- Freeze
-
POST /v1/cs/pprcs/freeze { "request" : { "params" : { "lss_pairs" : [ { "source_lss_id" : "00" , "source_system_id" : "2107-1300861" , "target_lss_id" : "10" , "target_system_id" : "2107-1300855" }, ] } } }
- Unfreeze
-
POST /v1/cs/pprcs/unfreeze { "request" : { "params" : { "lss_pairs" : [ { "source_lss_id" : "00" , "source_system_id" : "2107-1300861" , "target_lss_id" : "10" , "target_system_id" : "2107-1300855" } , ] } } }
Remote Mirror and Copy paths
- Create
-
POST /v1/cs/pprcs/paths { "request" : { "params" : { "source_lss_id" : "00" , "target_lss_id" : "00" ,
"pprc_consistency_group": "enable" | "disable",
"target_system_wwnn" : "5005076306FFD341" , "port_pairs" : [ { "source_port_id" : "I0003" , "target_port_id" : "I0007" } ... ] } } }
- Delete
-
DELETE /v1/cs/pprcs/paths/{path_id}
Space-efficient storage
- Update
-
PUT /v1/pools/{pool_id}/tserep|eserep { "request": { "params" : { "cap" : "10", (optional) "captype" : "gib" | "bytes" | "cyl" | "mod1" , (optional) "threshold" : "70" (optional) } } }
- Delete
-
DELETE /v1/pools/{pool_id}/tserep|eserep
Statesave files (DS8880, only)
- Create
-
POST /v1/statesave/offload { "request" : { "params" : { "file_names" : [ "cpssdump17.150625_141348.1.0.tar.gz" , "cpssdump17.150625_141339.1.1.tar.gz" ] } } }
Tokens
- Create
-
POST /v1/token { "request": { "params" : { "username" : "username" "password" : "password" "maxliveInterval" : "86400000" (optional) "maxInactiveInterval" : "" (optional) } } }
Volumes
- Create
-
POST /v1/volumes { "request" : { "params" : { "name" : "mytest" , "namecol" : [ "mytest1", "mytest2" ], "quantity" : "64" , "stgtype" : "fb" | "ckd" , "pool" : "P2" , "cap" : "12" , "captype" : "gib" | "bytes" | "cyl" | "mod1" , (optional) "lss" : "00" , "tp" : "none" | "ese" | "tse" (optional) } }
- Update
-
PUT /v1/volumes/{volume_id} { "request" : { "params" : { "cap" : "20", (optional) "captype" : "gib" | "bytes" | "cyl" | "mod1" , (optional) "pool" : "P3", (optional) } } }
- Delete
-
DELETE /v1/volumes/{volume_id}