AnsweredAssumed Answered

Configuration Mananger REST API Queries fail

Question asked by Joao Serra on Jul 19, 2017
Latest reply on Dec 7, 2017 by Thomas Reich

Hi.

I'm starting to work with Configuration Manager's REST API and after a quite nice start, I'm stuck on the queries. Everything seems to be OK but the queries always return the same error: The specified storage system is invalid.

(real serial numbers have been changed in the post bellow)

 

# Failed Query 

curl -k -v -H "Accept:application/json" -H Authorization:Session 9f282728-f846-48a9-adf6-fab2f5306236" -X GET https://suhdm101:23451/ConfigurationManager/v1/views/lun-paths?$query=ldev.storageDeviceId%20eq%20'800000099999'

* About to connect() to suhdm101 port 23451 (#0)

*   Trying 10.191.34.225...

* Connected to suhdm101 (10.191.34.225) port 23451 (#0)

* Initializing NSS with certpath: sql:/etc/pki/nssdb

* skipping SSL peer certificate verification

* SSL connection using TLS_RSA_WITH_AES_256_GCM_SHA384

* Server certificate:

*       subject: CN=example.com

*       start date: Feb 19 10:20:22 2016 GMT

*       expire date: Jul 07 10:20:22 2043 GMT

*       common name: example.com

*       issuer: CN=example.com

> GET /ConfigurationManager/v1/views/lun-paths?=ldev.storageDeviceId%20eq%20800000099999 HTTP/1.1

> User-Agent: curl/7.29.0

> Host: suhdm101:23451

> Accept:application/json

> Authorization:Session 9f282728-f846-48a9-adf6-fab2f5306236

>

< HTTP/1.1 400 Bad Request

< Date: Wed, 19 Jul 2017 10:51:11 GMT

< Server: Apache

< Content-Type: application/json; charset=UTF-8

< Connection: close

< Transfer-Encoding: chunked

<

{

  "errorSource" : "/ConfigurationManager/v1/views/lun-paths?=ldev.storageDeviceId%20eq%20800000099999",

  "message" : "Resource information could not be obtained.",

  "cause" : "The specified storage system is invalid.",

  "solution" : "Check and, if necessary, revise the query parameter to obtain information about the storage system.",

  "messageId" : "KART60004-E"

* Closing connection 0

 

Checking my environment, I don't see why the storage system queried is invalid:

 

 

# List of Storage Systems

curl -k -v -H "Accept:application/json" -X GET https://suhdm101:23451/ConfigurationManager/v1/objects/storages

 

{

  "data" : [ {

    "storageDeviceId" : "800000099998",

    "model" : "VSP G1000",

    "serialNumber" : 99998,

    "svpIp" : "10.191.145.224"

  }, {

    "storageDeviceId" : "800000099999",

    "model" : "VSP G1000",

    "serialNumber" : 99999,

    "svpIp" : "10.201.145.224"

  } ]

 

# Status of the refresh 

curl -k -H "Accept:application/json" -H "Authorization:Session 56fb09bd-90bc-4205-84bd-d9e5e5ee107a" -X GET https://suhdm101:23451/ConfigurationManager/v1/views/refresh-statuses

{

  "data" : [ {

    "refreshStatus" : {

      "storageDeviceId" : "800000099998",

      "status" : "Succeeded",

      "lastSucceededTime" : "2017-07-19T10:47:51Z",

      "lastStartedTime" : "2017-07-19T10:42:41Z"

    }

  }, {

    "refreshStatus" : {

      "storageDeviceId" : "800000099999",

      "status" : "Succeeded",

      "lastSucceededTime" : "2017-07-19T10:42:41Z",

      "lastStartedTime" : "2017-07-19T10:34:40Z"

    }

  } ],

  "offset" : 0,

  "count" : 2,

  "totalCount" : 2

 

The StartupV.properties has the right flags:

 

cat data/properties/StartupV.properties

#

# Supervisor RESTAPI

#

....

#Search function ON/OFF

rest.view.enabled=true

rest.view.r700.enabled=true

 

I'm probably missing something but I've run out of ideas.

 

Kind regards.

 

 

 

 

 

 

Outcomes