HPE Morpheus Enterprise
1830045 Members
5118 Online
109998 Solutions
New Discussion

Option lists : Morpheus API

 
Ibrahim-GCC
Frequent 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
Regular Advisor

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.

Ibrahim-GCC
Frequent 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.