Get Raw
GET
/v1/objects/{object_id}/raw
const url = 'https://api.cloud.agentums.ru/v1/objects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/raw';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.cloud.agentums.ru/v1/objects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/raw \ --header 'Authorization: Bearer <token>'Сырые байты файла ЧЕРЕЗ наш API (а не presigned S3).
Нужно для превью в вебе: Flutter CanvasKit не может отрисовать картинку с S3 Timeweb
(нет Access-Control-Allow-Origin), а на этот эндпоинт наш CORSMiddleware (app_origins)
заголовки ставит — фронт читает байты по dio и рисует Image.memory / blob-iframe.
Authorizations
Заголовок раздела «Authorizations»Parameters
Заголовок раздела «Parameters»Path Parameters
Заголовок раздела «Path Parameters»object_id
required
Object Id
string format: uuid
Header Parameters
Заголовок раздела «Header Parameters»Responses
Заголовок раздела «Responses»Successful Response
Media typeapplication/json
Examplegenerated
exampleValidation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}