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

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.

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.

1 Like