Перейти к основному содержанию
POST
/
uploads
Create an upload target
curl --request POST \
  --url https://api.youka.io/api/v1/uploads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "<string>",
  "contentType": "<string>",
  "contentLength": 123
}
'
{
  "inputFileId": "<string>",
  "uploadUrl": "<string>",
  "contentType": "<string>"
}

Авторизации

Authorization
string
header
обязательно

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Заголовки

Idempotency-Key
string

Тело

application/json
filename
string
обязательно
Minimum string length: 1
contentType
string
обязательно
Minimum string length: 1
contentLength
number
обязательно
Требуемый диапазон: x <= 314572800

Ответ

200 - application/json

Upload target created

inputFileId
string
обязательно
uploadUrl
string<uri>
обязательно
contentType
string
обязательно