LegalStack

Документы — доступ

Управление доступом к документам.

Отменить приглашение к документу

DELETE
/api/v1/smartdoc/documents/{id}/share-invites/{inviteId}
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор документа или папки

inviteId*string

Идентификатор приглашения

Тело ответа

application/json

application/problem+json

application/problem+json

curl -X DELETE "https://loading/api/v1/smartdoc/documents/string/share-invites/string"
{
  "createdAt": "string",
  "grantedBy": "string",
  "granteeId": "string",
  "granteeType": "user",
  "id": "string",
  "permission": "viewer",
  "resourceId": "string",
  "resourceType": "document",
  "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
}
{
  "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
}

Доступы к документу

GET
/api/v1/smartdoc/documents/{id}/shares
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор документа или папки

Тело ответа

application/json

application/problem+json

curl -X GET "https://loading/api/v1/smartdoc/documents/string/shares"
{
  "pendingInvites": [
    {
      "email": "string",
      "id": "string",
      "permission": "viewer",
      "property1": null,
      "property2": null
    }
  ],
  "shares": [
    {
      "createdAt": "string",
      "grantedBy": "string",
      "granteeId": "string",
      "granteeType": "user",
      "id": "string",
      "permission": "viewer",
      "resourceId": "string",
      "resourceType": "document",
      "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
}

Выдать доступ к документу

POST
/api/v1/smartdoc/documents/{id}/shares
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор документа или папки

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

application/problem+json

curl -X POST "https://loading/api/v1/smartdoc/documents/string/shares" \  -H "Content-Type: application/json" \  -d '{    "granteeId": "string",    "granteeType": "user",    "permission": "viewer"  }'
{
  "createdAt": "string",
  "grantedBy": "string",
  "granteeId": "string",
  "granteeType": "user",
  "id": "string",
  "permission": "viewer",
  "resourceId": "string",
  "resourceType": "document",
  "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
}
{
  "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
}

Расшарить документ по email

POST
/api/v1/smartdoc/documents/{id}/shares/by-email
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор документа или папки

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

application/problem+json

curl -X POST "https://loading/api/v1/smartdoc/documents/string/shares/by-email" \  -H "Content-Type: application/json" \  -d '{    "email": "string",    "permission": "viewer"  }'
{
  "email": "string",
  "share": {
    "createdAt": "string",
    "grantedBy": "string",
    "granteeId": "string",
    "granteeType": "user",
    "id": "string",
    "permission": "viewer",
    "resourceId": "string",
    "resourceType": "document",
    "property1": null,
    "property2": null
  },
  "type": "shared",
  "userId": "string"
}
{
  "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
}

Изменить доступ к документу

PATCH
/api/v1/smartdoc/documents/{id}/shares/{shareId}
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор документа или папки

shareId*string

Идентификатор шары

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

curl -X PATCH "https://loading/api/v1/smartdoc/documents/string/shares/string" \  -H "Content-Type: application/json" \  -d '{    "permission": "viewer"  }'
{
  "createdAt": "string",
  "grantedBy": "string",
  "granteeId": "string",
  "granteeType": "user",
  "id": "string",
  "permission": "viewer",
  "resourceId": "string",
  "resourceType": "document",
  "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
}

Отозвать доступ к документу

DELETE
/api/v1/smartdoc/documents/{id}/shares/{shareId}
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор документа или папки

shareId*string

Идентификатор шары

Тело ответа

application/json

application/problem+json

curl -X DELETE "https://loading/api/v1/smartdoc/documents/string/shares/string"
{
  "createdAt": "string",
  "grantedBy": "string",
  "granteeId": "string",
  "granteeType": "user",
  "id": "string",
  "permission": "viewer",
  "resourceId": "string",
  "resourceType": "document",
  "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
}

Отменить приглашение к папке

DELETE
/api/v1/smartdoc/folders/{id}/share-invites/{inviteId}
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор документа или папки

inviteId*string

Идентификатор приглашения

Тело ответа

application/json

application/problem+json

application/problem+json

curl -X DELETE "https://loading/api/v1/smartdoc/folders/string/share-invites/string"
{
  "createdAt": "string",
  "grantedBy": "string",
  "granteeId": "string",
  "granteeType": "user",
  "id": "string",
  "permission": "viewer",
  "resourceId": "string",
  "resourceType": "document",
  "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
}
{
  "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
}

Доступы к папке

GET
/api/v1/smartdoc/folders/{id}/shares
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор документа или папки

Тело ответа

application/json

application/problem+json

curl -X GET "https://loading/api/v1/smartdoc/folders/string/shares"
{
  "pendingInvites": [
    {
      "email": "string",
      "id": "string",
      "permission": "viewer",
      "property1": null,
      "property2": null
    }
  ],
  "shares": [
    {
      "createdAt": "string",
      "grantedBy": "string",
      "granteeId": "string",
      "granteeType": "user",
      "id": "string",
      "permission": "viewer",
      "resourceId": "string",
      "resourceType": "document",
      "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
}

Выдать доступ к папке

POST
/api/v1/smartdoc/folders/{id}/shares
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор документа или папки

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

application/problem+json

curl -X POST "https://loading/api/v1/smartdoc/folders/string/shares" \  -H "Content-Type: application/json" \  -d '{    "granteeId": "string",    "granteeType": "user",    "permission": "viewer"  }'
{
  "createdAt": "string",
  "grantedBy": "string",
  "granteeId": "string",
  "granteeType": "user",
  "id": "string",
  "permission": "viewer",
  "resourceId": "string",
  "resourceType": "document",
  "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
}
{
  "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
}

Расшарить папку по email

POST
/api/v1/smartdoc/folders/{id}/shares/by-email
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор документа или папки

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

application/problem+json

curl -X POST "https://loading/api/v1/smartdoc/folders/string/shares/by-email" \  -H "Content-Type: application/json" \  -d '{    "email": "string",    "permission": "viewer"  }'
{
  "email": "string",
  "share": {
    "createdAt": "string",
    "grantedBy": "string",
    "granteeId": "string",
    "granteeType": "user",
    "id": "string",
    "permission": "viewer",
    "resourceId": "string",
    "resourceType": "document",
    "property1": null,
    "property2": null
  },
  "type": "shared",
  "userId": "string"
}
{
  "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
}

Изменить доступ к папке

PATCH
/api/v1/smartdoc/folders/{id}/shares/{shareId}
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор документа или папки

shareId*string

Идентификатор шары

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

curl -X PATCH "https://loading/api/v1/smartdoc/folders/string/shares/string" \  -H "Content-Type: application/json" \  -d '{    "permission": "viewer"  }'
{
  "createdAt": "string",
  "grantedBy": "string",
  "granteeId": "string",
  "granteeType": "user",
  "id": "string",
  "permission": "viewer",
  "resourceId": "string",
  "resourceType": "document",
  "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
}

Отозвать доступ к папке

DELETE
/api/v1/smartdoc/folders/{id}/shares/{shareId}
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор документа или папки

shareId*string

Идентификатор шары

Тело ответа

application/json

application/problem+json

curl -X DELETE "https://loading/api/v1/smartdoc/folders/string/shares/string"
{
  "createdAt": "string",
  "grantedBy": "string",
  "granteeId": "string",
  "granteeType": "user",
  "id": "string",
  "permission": "viewer",
  "resourceId": "string",
  "resourceType": "document",
  "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
}

Документы и папки, расшаренные текущему пользователю

GET
/api/v1/smartdoc/shared-with-me
АвторизацияBearer <токен>

В: header

Тело ответа

application/json

curl -X GET "https://loading/api/v1/smartdoc/shared-with-me"
{
  "documents": [
    {
      "id": "string",
      "sharedPermission": "viewer",
      "status": "string",
      "title": "string",
      "userId": "string",
      "property1": null,
      "property2": null
    }
  ],
  "folders": [
    {
      "id": "string",
      "name": "string",
      "sharedPermission": "viewer",
      "userId": "string",
      "property1": null,
      "property2": null
    }
  ]
}