2.19.1 Obtaining Datastore List
The API acquires a list of datastores.
Execution permission
Admin, Modify
API version
v1
Request format
GET http[s]://host:port/Analytics/version/objects/Datastores
Request body
Not applicable.
Response body
The structure of the response body and the object attributes are as follows:{ "data":[{ "name":"...", "status":"...", "monitorStatus":"...", "description":"...", "datastoreUrl":"...", "identificationNumber":"...", "clusterName":"...", "collectorID":"...", "collectorName":"...", "autoCollectionType":"...", "usedCredentialID":"...", "usedCredentials":"...", "accessPointType":"...", "accessPointSnmpVersion":"...", "accessPointIpAddress":"...", "accessPointUser":"..." }, : ], "pagination":{ "page":"...", "pageSize":"...", "numPages":"...", "totalCount":"..." }, "count":"..." }
Collections (Type: Collections)
Attribute |
Type |
Description |
---|---|---|
data |
Datastore[] |
A list of Datastore objects. For details about Datastore, see the table below. |
pagination |
Pagination |
Page information. This parameter is displayed only when the relevant resource exists. |
count |
int |
Number of data items that meet the conditions. |
data (Type: Datastore)
Attribute |
Type |
Description |
---|---|---|
name |
string |
Name of the datastore |
status |
enum |
Status of the datastore (For details about the specifiable values, see the table NodeStatusType in List of enumerators.) The specifiable values are as follows:
|
monitorStatus |
enum |
Monitoring status of the datastore (For details about the specifiable values, see the table ComponentMonitorType in List of enumerators.) The specifiable values are as follows:
|
description |
string |
Description of the datastore |
datastoreUrl |
string |
URL of the datastore defined in monitoring targets or management software |
identificationNumber |
string |
Identification Number of the datastore defined in monitoring targets or management software |
clusterName |
string |
Name of the cluster that the datastore belongs to |
collectorID |
long |
ID for identifying a collector used for detection |
collectorName |
string |
Name of a collector used for detection |
autoCollectionType |
enum |
Type of a collector used for detection (For details about the specifiable values, see the table ConnectType in List of enumerators.) The specifiable values are as follows:
|
usedCredentialID |
long |
Name of authentication information used for detection |
usedCredentials |
string |
Name for authentication information used for detection |
accessPointType |
enum |
Type of the protocol or collector for authentication information used for detection. (For details about the specifiable values, see the table ProtocolType in List of enumerators.) The specifiable values are as follows:
|
accessPointSnmpVersion |
enum |
SNMP version of credential (For details about the specifiable values, see the table SnmpVersion in List of enumerators.) The specifiable values are as follows:
|
accessPointIpAddress |
string |
IP address or host name used for connections to monitoring targets or management software |
accessPointUser |
string |
User ID used for connections to monitoring targets or management software |
pagination (Type: Pagination)
Attribute |
Type |
Description |
---|---|---|
page |
integer |
page |
pageSize |
integer |
Size of the pages |
numPages |
integer |
Number of the pages |
totalCount |
integer |
Number of the objects |
Status codes
Status code |
Reason phrase |
Description |
---|---|---|
200 |
OK |
Success. |
401 |
Unauthorized |
No login privilege. |
403 |
Forbidden |
No reference privilege. |
412 |
Precondition Failed |
The server is not available. |
500 |
Internal Server Error |
Server processing error. |
Example code
[Request Header] GET /Analytics/v1/objects/DatastoresHTTP/1.1 Authorization: HSSO e1ae4524b8ff0eb6560dda6af26e6a258ac92f6_Vlo8Y30KeAYCfyNKC3cJZCEEbAQ=_V0810 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko Host: localhost:22015 Accept: application/json Accept-Language: ja [Response Header] HTTP/1.1 200 OK Date: Fri, 04 Sep 2020 09:53:26 GMT Server: Cosminexus HTTP Server Cache-Control: no-cache WWW-Authenticate: HSSO e1ae4524b8ff0eb6560dda6af26e6a258ac92f6_Vlo8Y30KeAYCfyNKC3cJZCEEbAQ=_V0810 X-Frame-Options: SAMEORIGIN Connection: Keep-Alive Content-Type: application/json Content-Length: 633 [Response Body] { "data" : [ { "instanceID" : 1667, "name" : "SelfServiceContainer", "status" : "Normal", "monitorStatus" : "InUse", "identificationNumber" : "3cbe1312-ea74-4c94-8963-547fbe412946", "clusterName" : "nutanix_cluster", "usedCredentialID" : 5, "usedCredentials" : "Nutanix", "accessPointType" : "SNMP", "accessPointSnmpVersion" : "V3", "accessPointIpAddress" : "10.197.101.182", "accessPointUser" : "admin" },{ "instanceID" : 300, "name" : "datastore39", "status" : "Normal", "monitorStatus" : "InUse", "description" : "", "datastoreUrl" : "ds:///vmfs/volumes/58bf7061-e63b5c93-c2a2-1c6f65310ce4/", "collectorID" : 0, "collectorName" : "vCenter", "autoCollectionType" : "AutoConnect", "accessPointType" : "VCENTER", "accessPointIpAddress" : "10.197.64.164", "accessPointUser" : "administrator@vsphere.local" }], "count": 2 }