I am fetching metadata for S2L2A imagery using the catalog api as shown below which works fine. How should I fetch metadata for planetscope data?
Code below works for sentinel-2-l2a
const searchParams = {
bbox,
datetime: `${timeRange.from}/${timeRange.to}`,
collections: ['sentinel-2-l2a'],
limit: 100,
};
const fetchData = () => {
fetch('https://services.sentinel-hub.com/api/v1/catalog/1.0.0/search', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`,
},
body: JSON.stringify(searchParams),
})
.then(response => response.json())
.then(data => {
console.log(data);
setCatalogData(data);
const cloudCovers = data.features.map(feature => feature.properties['eo:cloud_cover']);
setcloudCover(cloudCovers[0])
toast('Data fetched successfully');
})
.catch(error => {
console.error(error);
});
};