Here’s my code:
const ortoIonBody = {
name:'Orto',
description:'some desc',
type:'IMAGERY',
options: {
sourceType:'RASTER_IMAGERY'
}
}
const ortoResponse = fetch('https://api.cesium.com/v1/assets', {
headers: {
Authorization: `Bearer ${ionToken}`
},
method: 'POST',
json: true,
body: ortoIonBody
})
.then(response => response.json())
.then(json => console.log(json))
Here’s is my code from console:
What is the problem? I’m using types from REST API doc. When I try get asset list it’s work. Ion token has all permisions.