Datastore Option lists Based on resource group

Hi Team,

I have created the Rest option list which is going to list the storage account based on the cloud selection. Is there any other filter we can only be able to list the specific storage account which available under the resource group based on the selection?

Regards,
Ibrahim K

Hi Ibrahim,

Please use the below API endpoint to list the Data Stores when you select cloud and Resource Group:

/api/data-stores , passing zoneId & resourcePoolId as parameters.

Please find the example below:

/api/data-stores?zoneId=7&resourcePoolId=47.

Transalation script:

for(var x=0;x < data.datastores.length; x++) {
  results.push({name: data.datastores[x].name,value:data.datastores[x].id});
}

Request Script:

results=[{name:"zoneId", value:7}, {name:"resourcePoolId", value:47}]

Thanks
Velan

2 Likes