APIСправочник API
Конвертер представлений
POST /v1/chemistry/convert-representation
POST /v1/chemistry/convert-representation
Доступ
Требуется bearer-авторизация. Описание операции задаёт дополнительные права, роли и ограничения для сессий кабинета. Сам по себе API-ключ их не предоставляет.
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
data | string | да | |
input_format | "smiles" ∣ "inchi" ∣ "mol" ∣ "sdf" ∣ "reaction_smiles" ∣ "rxn" | да | |
output_format | "smiles" ∣ "inchi" ∣ "inchikey" ∣ "mol" ∣ "mol_v3000" ∣ "sdf" ∣ "reaction_smiles" ∣ "rxn" ∣ "rxn_v3000" ∣ "formula" ∣ "unicode_formula" | да | |
allow_lossy | boolean | нет | По умолчанию: false. |
Полная схема: ConvertRepresentationRequest
{
"properties": {
"data": {
"type": "string",
"maxLength": 20000,
"minLength": 1,
"title": "Data"
},
"input_format": {
"type": "string",
"enum": [
"smiles",
"inchi",
"mol",
"sdf",
"reaction_smiles",
"rxn"
],
"title": "Input Format"
},
"output_format": {
"type": "string",
"enum": [
"smiles",
"inchi",
"inchikey",
"mol",
"mol_v3000",
"sdf",
"reaction_smiles",
"rxn",
"rxn_v3000",
"formula",
"unicode_formula"
],
"title": "Output Format"
},
"allow_lossy": {
"type": "boolean",
"title": "Allow Lossy",
"default": false
}
},
"additionalProperties": false,
"type": "object",
"required": [
"data",
"input_format",
"output_format"
],
"title": "ConvertRepresentationRequest"
}Ответы
| HTTP | Описание | Тип |
|---|---|---|
| 200 | Успешный ответ | application/json: RepresentationConversionResult |
| 401 | Требуется авторизация | application/problem+json: ProblemDetails |
| 402 | Недостаточно кредитов | application/problem+json: ProblemDetails |
| 403 | Доступ запрещён | application/problem+json: ProblemDetails |
| 408 | Время запроса истекло | application/problem+json: ProblemDetails |
| 413 | Превышен размер запроса | application/problem+json: ProblemDetails |
| 422 | Ошибка входных данных | application/problem+json: ProblemDetails |
| 429 | Превышен лимит | application/problem+json: ProblemDetails |
| 502 | Ошибка шлюза | application/problem+json: ProblemDetails |
| 503 | Сервис недоступен | application/problem+json: ProblemDetails |
Ответ: RepresentationConversionResult
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
input_format | "smiles" ∣ "inchi" ∣ "mol" ∣ "sdf" ∣ "reaction_smiles" ∣ "rxn" | да | |
output_format | "smiles" ∣ "inchi" ∣ "inchikey" ∣ "mol" ∣ "mol_v3000" ∣ "sdf" ∣ "reaction_smiles" ∣ "rxn" ∣ "rxn_v3000" ∣ "formula" ∣ "unicode_formula" | да | |
kind | "molecule" ∣ "molecule_collection" ∣ "reaction" | да | |
record_count | integer | да | |
output | string | да | |
records | ConvertedRepresentationRecord[] | да | |
canonical_reaction_smiles | string ∣ null | да | |
lossy | boolean | да | |
warnings | string[] | да | |
limitations | string[] | да |
Полная схема
{
"properties": {
"input_format": {
"type": "string",
"enum": [
"smiles",
"inchi",
"mol",
"sdf",
"reaction_smiles",
"rxn"
],
"title": "Input Format"
},
"output_format": {
"type": "string",
"enum": [
"smiles",
"inchi",
"inchikey",
"mol",
"mol_v3000",
"sdf",
"reaction_smiles",
"rxn",
"rxn_v3000",
"formula",
"unicode_formula"
],
"title": "Output Format"
},
"kind": {
"type": "string",
"enum": [
"molecule",
"molecule_collection",
"reaction"
],
"title": "Kind"
},
"record_count": {
"type": "integer",
"title": "Record Count"
},
"output": {
"type": "string",
"title": "Output"
},
"records": {
"items": {
"$ref": "#/components/schemas/ConvertedRepresentationRecord"
},
"type": "array",
"title": "Records"
},
"canonical_reaction_smiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Canonical Reaction Smiles"
},
"lossy": {
"type": "boolean",
"title": "Lossy"
},
"warnings": {
"items": {
"type": "string"
},
"type": "array",
"title": "Warnings"
},
"limitations": {
"items": {
"type": "string"
},
"type": "array",
"title": "Limitations"
}
},
"additionalProperties": true,
"type": "object",
"required": [
"input_format",
"output_format",
"kind",
"record_count",
"output",
"records",
"canonical_reaction_smiles",
"lossy",
"warnings",
"limitations"
],
"title": "RepresentationConversionResult"
}Эта страница генерируется из OpenAPI. Примеры показывают схемы, а не вымышленные успешные ответы.