Translate
POST
/v1/objects/{object_id}/translate
const url = 'https://api.cloud.agentums.ru/v1/objects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/translate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"target_lang":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.cloud.agentums.ru/v1/objects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/translate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "target_lang": "example" }'Перевод объекта на target_lang → новый искомый .md-объект.
Authorizations
Заголовок раздела «Authorizations»Parameters
Заголовок раздела «Parameters»Path Parameters
Заголовок раздела «Path Parameters»object_id
required
Object Id
string format: uuid
Request Bodyrequired
Заголовок раздела «Request Bodyrequired»Media typeapplication/json
TranslateRequest
object
target_lang
required
Target Lang
string
Examplegenerated
{ "target_lang": "example"}Responses
Заголовок раздела «Responses»Successful Response
Media typeapplication/json
TranslateAccepted
object
duplicate
Duplicate
boolean
object_id
required
Object Id
string format: uuid
status
required
Status
string
Example
{ "duplicate": false}Validation 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" } ]}