Subscribe
Accepted Solution

OC API Services 1.2 - errno 2003 / 3303 for snapshots

Hi,

 

I'm trying to get snapshots information but always are returned some error. I have OC API Services 1.2RC1 but I don't see any info about this in RC2

https://:443/api/1.0/ontap/snapshots

And get:

{
  "status": {
    "code": "FAILED",
    "error": {
      "errno": 2003,
      "message": "Mandatory parameters are missing.",
      "reason": "volume_key is not specified as query parameter"
    }
  }
}

An with a known volume key:

https://:443/api/1.0/ontap/snapshots?volume_key=7fef79c3-5f03-11e6-baae-00a0987cc450:type=volume,uuid=6b74c170-65da-426e-9fce-7045b39c03f0
{
  "status": {
    "code": "FAILED",
    "error": {
      "errno": 3303,
      "message": "Storage system not found for the specified request.",
      "reason": "Unable to find a storage-system instance for the InventoryService.Ensure that the storage-system instance managing the resource is added as a storage-system in the API server."
    }
  }
}

Or

https://:443/api/1.0/ontap/volumes/7fef79c3-5f03-11e6-baae-00a0987cc450:type=volume,uuid=6b74c170-65da-426e-9fce-7045b39c03f0/snapshots
{
  "status": {
    "code": "FAILED",
    "error": {
      "errno": 3303,
      "message": "Storage system not found for the specified request.",
      "reason": "Unable to find a storage-system instance for the InventoryService.Ensure that the storage-system instance managing the resource is added as a storage-system in the API server."
    }
  }
}

Any idea?

 

Thanks in advance,

Re: OC API Services 1.2 - errno 2003 / 3303 for snapshots

I am assumpting, You have added OCUM to APIS. When cluster is discovered by OCUM and not added to APIS, you will get this kind of message. To overcome, pl. add cluster to APIS server. To Add cluster to APIS, use below URL:

 https://{ip}:{port}/api-admin/

 

 

 

 

Re: OC API Services 1.2 - errno 2003 / 3303 for snapshots

Snapshot  requires the cluster to  be managed by APIS can you please add the cluster to APIS

Re: OC API Services 1.2 - errno 2003 / 3303 for snapshots

Hello,

 

I have the same problem. According to the documentation the volume-key is mandatory for POST not for GET. And I totally understand why in this case adding a cluster is needed in order to trigger snapshots. I would expect the GET API using the OCUM database like the other APIs.

 

Can you say for sure, that this is expected behaviour and adding the cluster for GET is mandatory? If not I would open a case for this, just saw this post and decided to ask here first.

 

Regards

Re: OC API Services 1.2 - errno 2003 / 3303 for snapshots

Hi,

 

Just confirm that adding the cluster to API server works successfully.

 

Hope to be improved in next releases, and accepts GET request only with OCUM as data source.

 

Thanks & Regards,

Re: OC API Services 1.2 - errno 2003 / 3303 for snapshots

Just to be sure, if I want to get a list of all snapshots via the API, I would have make a separate call for each snapshot by passing a volume/cluster parameter?  This would force us to change code architecture a bit.

Re: OC API Services 1.2 - errno 2003 / 3303 for snapshots

victor - did you use the OCUM Key as the parameter for the GET snapshot REST call?  Did the API server provide a list of all snapshots?

Re: OC API Services 1.2 - errno 2003 / 3303 for snapshots

I added one of the clusters to the APIS, but still getting errors:

 

"Unable to find a storage-system instance for the InventoryService.Ensure that the storage-system instance managing the resource is added as a storage-system in the API server."

 

I also noticed a java error in the coherence log:

 

"java.sql.SQLSyntaxErrorException: Unknown column 'Snapshotontap.realTime' in 'where clause'"

Re: OC API Services 1.2 - errno 2003 / 3303 for snapshots

Pl. check cluster which is part of UM(listed under management-services)  is shown under API call ontap/clusters.

 

i.e :

GET https://<ip-address>:<port>/api/1.0/admin/management-services

 

cluster which part of UM, should be part of below API call.

 

GET https://<ip-address>:<port>/api/1.0/ontap/clusters