Skip to main content

REST endpoints: Hosts

REST

These endpoints:endpoints mirror the CLI commands described in Hosts, Host groups and pairing. Each endpoint runs the CLI command named under its heading, so the behavior, defaults, and restrictions are the same; this page lists how to call it over REST.

Conventions that apply to every endpoint (request format, the async and outputType parameters, and the response envelope) are in Requests and responses. In the tables below, Required is Yes when the parameter must always be supplied, No when it is optional, and Depends when it is required only in some combinations (for example, either an application and volume, or a consistency group ID); the CLI chapter for the same command explains the combinations.

PUT /hosts/add_to_group

Add hosts to a host-group.

CLI command: hosts add_to_group

Body fields (JSON)

Name Type Required Description Name string Yes The name of the host group. GroupedHosts array of string Yes List of hosts to add to the group.

POST /hosts/create

Create a host.

CLI command: hosts create

Body fields (JSON)

Name Type Required Description Name string Yes The name of the new initiator/host. Ip string No The IP address or DNS name of the initiator/host. Wwpns array of string Depends List of Fibre Channel world wide port names. Iqn string Depends iSCSI qualified name. ChapSecret string No iSCSI CHAP secret. Nqn string Depends NVMe qualified name.

POST /hosts/create_group

Create a host group.

CLI command: hosts create_group

Body fields (JSON)

Name Type Required Description Name string Yes The name of the new initiator/host group. GroupedHosts array of string Yes The names of the initiators/hosts belonging to the initiator/host group.

DELETE /hosts/delete

Delete a host.

CLI command: hosts delete

Query parameters

Name Type Required Description name string Yes The name of the initiator/host to delete. force boolean No Skip the confirmation prompt.

PUT /hosts/edit

Edit a host or host group.

CLI command: hosts edit

Query parameters

Name Type Required Description name string Yes The name of the initiator/host or host group to edit.

Body fields (JSON)

Name Type Required Description Name string Yes The name of the initiator/host or host group to edit. Ip string No New IP address or DNS name. Wwpns array of string No New list of Fibre Channel world wide port names. Iqn string No New iSCSI qualified name. ChapSecret string No iSCSI CHAP secret. Nqn string No New NVMe qualified name. GroupedHosts array of string No The names of the initiators/hosts belonging to the host group. Force boolean No Skip the confirmation prompt.

GET /hosts/list

List all available hosts.

CLI command: hosts list

Query parameters

Name Type Required Description name string No Filter by host name. mapping boolean No Show volumes that are mapped to those hosts. ip boolean No Show the IP of the hosts.

Response: a list of HostElement objects in Result.Hosts, each with: Name (string), Ip (string), Wwpns (array of string), Iqn (string), Nqn (string), ChapSecret (string), IsChapEnabled (boolean), GroupedHosts (array of string), Mappings (array of HostMappingElement), Pairs (array of HostPairElement), Force (boolean).

POST /hosts/mappings/add

Add mapping between a volume and an iSCSI/FC/NVMeOF host.

CLI command: hosts mappings add

Body fields (JSON)

Name Type Required Description Application string Yes The name of the application. Hosts array of string Yes The names of the hosts to map the volumes to. Volumes array of string No The names of the volumes to map. If not specified, all volumes within the application are mapped. LunIds array of string No The LUN ID for each volume. Use * to assign an available LUN ID.

DELETE /hosts/mappings/delete

Delete mapping.

CLI command: hosts mappings delete

Query parameters

Name Type Required Description application string Yes The name of the application. hosts array of string No The names of the hosts to unmap. If not specified, all mapped hosts are unmapped. volumes array of string No The names of the volumes to unmap. If not specified, all volumes within the application are unmapped. force boolean No Skip the confirmation prompt.

PUT /hosts/mappings/edit

Add/Remove mapping between a volume and an iSCSI/FC/NVMeOF host.

CLI command: hosts mappings edit

Query parameters

Name Type Required Description application string Yes The name of the application. host string Yes The name of the host to map the volumes to.

Body fields (JSON)

Name Type Required Description Volumes array of string No The names of the volumes to map. LunIds array of string No The LUN ID for each volume. Use * to assign an available LUN ID.

GET /hosts/mappings/list

List mappings, grouped by host.

CLI command: hosts mappings list

Query parameters

Name Type Required Description application string No Filter by application name. host string No Filter by host name.

Response: a list of MappingElementHostPerspective objects in Result.MappingElementHostPerspective, each with: Application (string), Host (string), Volumes (array of string), LunIds (array of string), Force (boolean).

POST /hosts/pair

Pair a host to a host on a remote system.

CLI command: hosts pair

Body fields (JSON)

Name Type Required Description Name string Yes The local host or host group to pair. TargetSystem string Yes The remote system to pair with. TargetHost string Yes The host or host group on the remote system to pair with.

DELETE /hosts/remove_from_group

Remove hosts from a host-group.

CLI command: hosts remove_from_group

Query parameters

Name Type Required Description name string Yes The name of the host group. groupedHosts array of string Yes List of hosts to remove from the group.

DELETE /hosts/unpair

Unpair a host from a host on a remote system.

CLI command: hosts unpair

Query parameters

Name Type Required Description name string Yes The local host or host group to unpair. targetSystem string Yes The remote system to unpair from.

PUT /hosts/wwpn/add

Add WWPNs to a host.

CLI command: hosts wwpn add

Body fields (JSON)

Name Type Required Description Name string Yes The name of the initiator. Wwpns array of string Yes List of Fibre Channel world wide port names to add.

DELETE /hosts/wwpn/delete

Remove WWPNs from a host.

CLI command: hosts wwpn delete

Query parameters

Name Type Required Description name string Yes The name of the initiator. wwpns array of string Yes List of Fibre Channel world wide port names to remove.

See also: Requests and responses - Authentication - Examples