HPE Morpheus Enterprise
1848532 Members
3530 Online
104033 Solutions
New Discussion

Option lists : Morpheus API

 
Ibrahim-GCC
Regular Advisor

Option lists : Morpheus API

Hi Team,

Will it be possible to show only Linux or windows Instance in the option lists using Morpheus API instance?

Regards,
Ibrahim K

2 REPLIES 2
Ollie-Phillips
HPE Pro

Re: Option lists : Morpheus API

If your naming policy includes the type, then yes this would be very simple to do in the translation script:

results = [];
for(let i=0; i< data.length; i++) {
  // linux only
  if (data[i].name.toLowerCase().includes("linux")) {
  	results.push({name: data[i].name, value: data[i].value});
  }
}

If not it would be difficult to determine that based on the data in the built-in instances call which you can find here. Probably need to make REST request to the API.



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Ibrahim-GCC
Regular Advisor

Re: Option lists : Morpheus API

Thanks Phillips. Yes we already filter based on the naming policy but I wants to know is there any other way we can use of it.