const response = await fetch('/api/v2/assets/{assetID}', {
method: 'PATCH',
headers: {
"Content-Type": "application/vnd.api+json"
},
body: JSON.stringify({
"data": {
"id": "a8e22ad3-b8b1-4fe2-a08a-45e5ba39df7d",
"type": "assets",
"attributes": {
"name": "My Asset",
"file_name": "my-asset.jpg",
"path": "assets/43/43f6358e-dcbb-45f9-a9d7-25156a3f9707/orig",
"thumbnail_path": "assets/43/43f6358e-dcbb-45f9-a9d7-25156a3f9707/thumbnail",
"size": 123456,
"mime_type": "image/jpeg",
"image_width": 1920,
"image_height": 1080,
"created_at": "2021-01-01T00:00:00Z",
"uploader_name": "John Doe",
"uploader_email": "user@example.com"
},
"relationships": {
"asset_tags": {
"data": [
{
"type": "asset_tags",
"id": "123e4567-e89b-12d3-a456-426614174000"
}
]
}
}
}
}),
});
const data = await response.json();