Start a Conversation

Unsolved

This post is more than 5 years old

4374

January 17th, 2018 11:00

how can I list all attributes via the REST API ???

Hi everyone,

So I'm successfully able to get the attributes back that I need from the REST API but I need to specify each one individually which is kind of a hassle/pain.

i.e : '/api/types/datastore/instances?fields=storageResource,name,format,host,vmDisks,vms'

Does anyone know of a way that I can list them ALL out without specifying each field individually ?

If you pass it '/api/types/datastore/instances' , it only returns the ID.

Is there anything I can do such as 'instances?fields=*' that will return every attribute ?

Please let me know.

Thank you!

Moderator

 • 

239 Posts

February 7th, 2018 03:00

8.6K Posts

February 7th, 2018 04:00

the API docs are also installed on every Unity system

Unisphere Management REST API Programmer’s Guide

Explains REST and JSON concepts and how to make REST requests to the Unisphere Management Rest API

Located at https:// /apidocs/programmers-guide/index.html

Unisphere Management REST API Reference Guide

Describes the resource types, operations, attributes, and arguments in the Unisphere Management REST API, along with other information, such as data types and enumerations

Located at https:// /apidocs/index.html

REST logs stored at /usr/apache-tomcat/logs/server.log

20 Posts

February 13th, 2018 04:00

Hello,

As far as I know, there is no way to retrieve all fields without specifying them... And yes it's very annoying!

Regards

Erwan

GitHub - equelin/Unity-Powershell: PowerShell module for managing EMC Unity arrays

8.6K Posts

February 14th, 2018 05:00

Hi Erwan,

this is by design - we dont want applications to just blindly grab everything just in case for performance / load reasons.

Also this makes it easier to maintain backward capability when adding new attributes without breaking applications

May 18th, 2018 10:00

Then how are developers supposed to get the complete list of attributes?

20 Posts

May 22nd, 2018 02:00

Hello,

You can do a GET request on the /api/types/ endpoint. You will find a list of attributes and more. Maybe it's possible to use it to automatically build your field list.

Regards

Erwan

GitHub - equelin/Unity-Powershell: PowerShell module for managing EMC Unity arrays

https://myvmworld.fr

No Events found!

Top