Документы
Создание и управление документами.
Получить блоки по списку id
В: header
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/smartdoc/blocks/batch" \ -H "Content-Type: application/json" \ -d '{ "blockIds": [ "string" ] }'[
{
"documentId": "string",
"id": "string",
"label": "string",
"template": "string",
"type": "string",
"variables": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}
]Родительские документы для блоков
В: header
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/smartdoc/blocks/parent-documents" \ -H "Content-Type: application/json" \ -d '{ "parentBlockIds": [ "string" ] }'[
{
"documentId": "string",
"id": "string",
"label": "string",
"template": "string",
"type": "string",
"variables": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}
]Получить блок по id
В: header
Параметры пути
Идентификатор блока
Тело ответа
application/json
application/problem+json
curl -X GET "https://loading/api/v1/smartdoc/blocks/string"{
"documentId": "string",
"id": "string",
"label": "string",
"template": "string",
"type": "string",
"variables": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}{
"code": "string",
"detail": "string",
"errors": [
{
"name": "string",
"pointer": "string",
"reason": "string",
"rule": "string"
}
],
"instance": "string",
"request_id": "string",
"status": 0,
"title": "string",
"trace_id": "string",
"type": "http://example.com",
"property1": null,
"property2": null
}Ссылки на блок из других документов
В: header
Параметры пути
Идентификатор блока
Тело ответа
application/json
curl -X GET "https://loading/api/v1/smartdoc/blocks/string/references"[
{
"blockLabel": "string",
"blockType": "string",
"documentId": "string",
"documentName": "string",
"id": "string",
"meta": null,
"sourceBlockId": "string"
}
]Список документов
В: header
Параметры запроса
Фильтр по папке; null — только корень; без параметра — все
Тело ответа
application/json
curl -X GET "https://loading/api/v1/smartdoc/documents"[
{
"childDocIds": [
"string"
],
"createdAt": "string",
"folderId": "string",
"id": "string",
"parentDocId": "string",
"shareCount": 0,
"source": "string",
"status": "string",
"teamId": "string",
"title": "string",
"updatedAt": "string",
"userId": "string",
"property1": null,
"property2": null
}
]Создать документ
В: header
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/smartdoc/documents" \ -H "Content-Type: application/json" \ -d '{ "title": "string" }'{
"blocks": [
{
"depth": 0,
"id": "string",
"label": "string",
"order": 0,
"template": "string",
"type": "string",
"variables": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}
],
"createdAt": "string",
"folderId": "string",
"id": "string",
"status": "string",
"title": "string",
"updatedAt": "string",
"userId": "string",
"property1": null,
"property2": null
}Создать документ из шаблона
В: header
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/smartdoc/documents/from-template" \ -H "Content-Type: application/json" \ -d '{ "templateId": "string" }'{
"blocks": [
{
"depth": 0,
"id": "string",
"label": "string",
"order": 0,
"template": "string",
"type": "string",
"variables": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}
],
"createdAt": "string",
"folderId": "string",
"id": "string",
"status": "string",
"title": "string",
"updatedAt": "string",
"userId": "string",
"property1": null,
"property2": null
}Получить документ
В: header
Параметры пути
Идентификатор документа
Тело ответа
application/json
curl -X GET "https://loading/api/v1/smartdoc/documents/string"{
"blocks": [
{
"depth": 0,
"id": "string",
"label": "string",
"order": 0,
"template": "string",
"type": "string",
"variables": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}
],
"createdAt": "string",
"folderId": "string",
"id": "string",
"status": "string",
"title": "string",
"updatedAt": "string",
"userId": "string",
"property1": null,
"property2": null
}Удалить документ
В: header
Параметры пути
Идентификатор документа
Тело ответа
application/json
curl -X DELETE "https://loading/api/v1/smartdoc/documents/string"{
"success": true
}Обновить документ
В: header
Параметры пути
Идентификатор документа
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X PUT "https://loading/api/v1/smartdoc/documents/string" \ -H "Content-Type: application/json" \ -d '{}'{
"blocks": [
{
"depth": 0,
"id": "string",
"label": "string",
"order": 0,
"template": "string",
"type": "string",
"variables": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}
],
"createdAt": "string",
"folderId": "string",
"id": "string",
"status": "string",
"title": "string",
"updatedAt": "string",
"userId": "string",
"property1": null,
"property2": null
}Добавить блок в документ
В: header
Параметры пути
Идентификатор документа
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/smartdoc/documents/string/blocks" \ -H "Content-Type: application/json" \ -d '{ "label": "string", "order": 0, "template": "string", "type": "string" }'{
"depth": 0,
"id": "string",
"label": "string",
"order": 0,
"template": "string",
"type": "string",
"variables": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}Обновить блок документа
В: header
Параметры пути
Идентификатор документа
Идентификатор блока
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X PATCH "https://loading/api/v1/smartdoc/documents/string/blocks/string" \ -H "Content-Type: application/json" \ -d '{}'{
"depth": 0,
"id": "string",
"label": "string",
"order": 0,
"template": "string",
"type": "string",
"variables": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}Удалить блок документа
В: header
Параметры пути
Идентификатор документа
Идентификатор блока
Тело ответа
application/json
curl -X DELETE "https://loading/api/v1/smartdoc/documents/string/blocks/string"{
"success": true
}Копировать документ
В: header
Параметры пути
Идентификатор документа
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/smartdoc/documents/string/copy" \ -H "Content-Type: application/json" \ -d '{}'{
"blocks": [
{
"depth": 0,
"id": "string",
"label": "string",
"order": 0,
"template": "string",
"type": "string",
"variables": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}
],
"createdAt": "string",
"folderId": "string",
"id": "string",
"status": "string",
"title": "string",
"updatedAt": "string",
"userId": "string",
"property1": null,
"property2": null
}Связать дочерний документ
В: header
Параметры пути
Идентификатор документа
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Дочерний документ
Тело ответа
application/json
curl -X POST "https://loading/api/v1/smartdoc/documents/string/link" \ -H "Content-Type: application/json" \ -d '{ "childDocId": "string" }'{
"blocks": [
{
"depth": 0,
"id": "string",
"label": "string",
"order": 0,
"template": "string",
"type": "string",
"variables": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}
],
"createdAt": "string",
"folderId": "string",
"id": "string",
"status": "string",
"title": "string",
"updatedAt": "string",
"userId": "string",
"property1": null,
"property2": null
}Переместить документ в папку
В: header
Параметры пути
Идентификатор документа
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X PATCH "https://loading/api/v1/smartdoc/documents/string/move" \ -H "Content-Type: application/json" \ -d '{ "folderId": "5b6379a4-2a6c-4085-b184-45838a3b8e7e" }'{
"blocks": [
{
"depth": 0,
"id": "string",
"label": "string",
"order": 0,
"template": "string",
"type": "string",
"variables": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}
],
"createdAt": "string",
"folderId": "string",
"id": "string",
"status": "string",
"title": "string",
"updatedAt": "string",
"userId": "string",
"property1": null,
"property2": null
}Синхронно спроецировать накопленные Yjs-правки в блоки
В: header
Параметры пути
Идентификатор документа
Тело ответа
application/json
curl -X POST "https://loading/api/v1/smartdoc/documents/string/project-now"{
"success": true
}Восстановить документ из версии
В: header
Параметры пути
Идентификатор документа
Идентификатор версии
Тело ответа
application/json
curl -X POST "https://loading/api/v1/smartdoc/documents/string/restore/string"{
"blocks": [
{
"depth": 0,
"id": "string",
"label": "string",
"order": 0,
"template": "string",
"type": "string",
"variables": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}
],
"createdAt": "string",
"folderId": "string",
"id": "string",
"status": "string",
"title": "string",
"updatedAt": "string",
"userId": "string",
"property1": null,
"property2": null
}Сохранить документ целиком
В: header
Параметры пути
Идентификатор документа
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/smartdoc/documents/string/save" \ -H "Content-Type: application/json" \ -d '{ "blocks": [ { "depth": 0, "label": "string", "order": 0, "template": "string", "type": "string", "variables": { "property1": null, "property2": null } } ], "title": "string" }'{
"blocks": [
{
"depth": 0,
"id": "string",
"label": "string",
"order": 0,
"template": "string",
"type": "string",
"variables": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}
],
"createdAt": "string",
"folderId": "string",
"id": "string",
"status": "string",
"title": "string",
"updatedAt": "string",
"userId": "string",
"property1": null,
"property2": null
}Нерассмотренные предложения агента
В: header
Параметры пути
Идентификатор документа
Тело ответа
application/json
curl -X GET "https://loading/api/v1/smartdoc/documents/string/suggestions"[
{
"property1": null,
"property2": null
}
]Принять или отклонить все предложения агента
В: header
Параметры пути
Идентификатор документа
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/smartdoc/documents/string/suggestions/resolve-all" \ -H "Content-Type: application/json" \ -d '{ "action": "accept" }'{
"property1": null,
"property2": null
}Принять предложение агента
В: header
Параметры пути
Идентификатор документа
Идентификатор предложения агента
Тело ответа
application/json
curl -X POST "https://loading/api/v1/smartdoc/documents/string/suggestions/string/accept"{
"property1": null,
"property2": null
}Отклонить предложение агента
В: header
Параметры пути
Идентификатор документа
Идентификатор предложения агента
Тело ответа
application/json
curl -X POST "https://loading/api/v1/smartdoc/documents/string/suggestions/string/reject"{
"property1": null,
"property2": null
}Отвязать дочерний документ
В: header
Параметры пути
Идентификатор документа
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Дочерний документ
Тело ответа
application/json
curl -X POST "https://loading/api/v1/smartdoc/documents/string/unlink" \ -H "Content-Type: application/json" \ -d '{ "childDocId": "string" }'{
"blocks": [
{
"depth": 0,
"id": "string",
"label": "string",
"order": 0,
"template": "string",
"type": "string",
"variables": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}
],
"createdAt": "string",
"folderId": "string",
"id": "string",
"status": "string",
"title": "string",
"updatedAt": "string",
"userId": "string",
"property1": null,
"property2": null
}Версии документа
В: header
Параметры пути
Идентификатор документа
Тело ответа
application/json
application/problem+json
curl -X GET "https://loading/api/v1/smartdoc/documents/string/versions"[
{
"comment": "string",
"createdAt": "string",
"createdBy": "string",
"id": "string",
"versionNumber": 0,
"property1": null,
"property2": null
}
]{
"code": "string",
"detail": "string",
"errors": [
{
"name": "string",
"pointer": "string",
"reason": "string",
"rule": "string"
}
],
"instance": "string",
"request_id": "string",
"status": 0,
"title": "string",
"trace_id": "string",
"type": "http://example.com",
"property1": null,
"property2": null
}Создать версию документа
В: header
Параметры пути
Идентификатор документа
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/smartdoc/documents/string/versions" \ -H "Content-Type: application/json" \ -d '{}'{
"comment": "string",
"createdAt": "string",
"createdBy": "string",
"id": "string",
"versionNumber": 0,
"documentId": "string",
"found": true,
"snapshot": null,
"property1": null,
"property2": null
}Сравнить две версии документа
В: header
Параметры пути
Идентификатор документа
Параметры запроса
Версия-основание сравнения
Целевая версия
Тело ответа
application/json
application/problem+json
application/problem+json
curl -X GET "https://loading/api/v1/smartdoc/documents/string/versions/compare?from=string&to=string"{
"diff": null,
"fromVersionId": "string",
"fromVersionNumber": 0,
"toVersionId": "string",
"toVersionNumber": 0
}{
"code": "string",
"detail": "string",
"errors": [
{
"name": "string",
"pointer": "string",
"reason": "string",
"rule": "string"
}
],
"instance": "string",
"request_id": "string",
"status": 0,
"title": "string",
"trace_id": "string",
"type": "http://example.com",
"property1": null,
"property2": null
}{
"code": "string",
"detail": "string",
"errors": [
{
"name": "string",
"pointer": "string",
"reason": "string",
"rule": "string"
}
],
"instance": "string",
"request_id": "string",
"status": 0,
"title": "string",
"trace_id": "string",
"type": "http://example.com",
"property1": null,
"property2": null
}Получить версию документа
В: header
Параметры пути
Идентификатор документа
Идентификатор версии
Тело ответа
application/json
application/problem+json
curl -X GET "https://loading/api/v1/smartdoc/documents/string/versions/string"{
"comment": "string",
"createdAt": "string",
"createdBy": "string",
"id": "string",
"versionNumber": 0,
"documentId": "string",
"found": true,
"snapshot": null,
"property1": null,
"property2": null
}{
"code": "string",
"detail": "string",
"errors": [
{
"name": "string",
"pointer": "string",
"reason": "string",
"rule": "string"
}
],
"instance": "string",
"request_id": "string",
"status": 0,
"title": "string",
"trace_id": "string",
"type": "http://example.com",
"property1": null,
"property2": null
}Сравнить версию с текущим состоянием
В: header
Параметры пути
Идентификатор документа
Идентификатор версии
Тело ответа
application/json
application/problem+json
application/problem+json
curl -X GET "https://loading/api/v1/smartdoc/documents/string/versions/string/compare-current"{
"diff": null,
"fromVersionId": "string",
"fromVersionNumber": 0,
"toVersionId": "string",
"toVersionNumber": 0
}{
"code": "string",
"detail": "string",
"errors": [
{
"name": "string",
"pointer": "string",
"reason": "string",
"rule": "string"
}
],
"instance": "string",
"request_id": "string",
"status": 0,
"title": "string",
"trace_id": "string",
"type": "http://example.com",
"property1": null,
"property2": null
}{
"code": "string",
"detail": "string",
"errors": [
{
"name": "string",
"pointer": "string",
"reason": "string",
"rule": "string"
}
],
"instance": "string",
"request_id": "string",
"status": 0,
"title": "string",
"trace_id": "string",
"type": "http://example.com",
"property1": null,
"property2": null
}curl -X POST "https://loading/api/v1/smartdoc/resync"{
"property1": null,
"property2": null
}