Developer Documentation
API Reference
Tài liệu API của OpenVie — render trực tiếp từ api-docs.json (OpenAPI 3.1.0) đặt trong repo. Toàn bộ response trong mock playground được sinh từ schema, không gọi server thật.
# 1) Đăng nhập — nhận access token
curl --request POST \
--url "$OPENVIE/api/v1/auth/login" \
--header "Content-Type: application/json" \
--data '{"email":"owner@example.com","password":"OpenVie#2026!"}'
# 2) Gọi API với Bearer token
curl --request GET \
--url "$OPENVIE/api/v1/documents" \
--header "Authorization: Bearer $ACCESS_TOKEN"Đặt $OPENVIE là base URL server của bạn (mặc định dev là http://localhost:8080). Response đầy đủ của từng endpoint xem trong API Reference.
Getting started
Bắt đầu tích hợp
- Đăng nhập qua
POST /api/v1/auth/login(hoặc SSO/refresh) để lấyaccess_token. - Gọi API kèm header
Authorization: Bearer …. Workspace hiện hành, người dùng và vai trò được suy ra từ token — không cần tenant header. - Xem mock trong từng endpoint (mục API Reference): chọn response code, nhập tham số, playground trả dữ liệu tĩnh.
Authentication
Xác thực request
Tất cả endpoint có ký hiệu khóa yêu cầu Bearer JWT. Token hết hạn được đổi qua /api/v1/auth/refresh; đăng nhập SSO đi qua /api/v1/auth/sso/exchange. Lỗi auth trả về JSON chuẩn { timestamp, status, path, error, message }.
API Reference
Hiển thị 108 / 108 endpoint
Approval workflow9
Api keys3
Tenants1
Chat6
Webhooks5
Workflow engine8
Authentication11
Documents7
Lakehouse Analytics8
Workspace members12
Organization admins4
Notification channels10
Setup2
Workspaces22
Schemas
ErrorResponse
ErrorResponsesinh từ schema — mock tĩnh{
"timestamp": "2026-10-30T21:41:26.577Z",
"status": 500,
"path": "/api/v1/documents/d7c4a2e0",
"error": "Unauthorized",
"message": "Permission denied"
}timestamp—
status—
path—
error—
message—
UpdateSlConfigRequest
UpdateSlConfigRequestsinh từ schema — mock tĩnh{
"reminderMinutes": 1440,
"escalationMinutes": 4320
}reminderMinutesReminder threshold in minutes (1–20160). Escalation must come later.
escalationMinutesEscalation threshold in minutes (1–20160); must be later than the reminder.
SlConfigResponse
SlConfigResponsesinh từ schema — mock tĩnh{
"reminderMinutes": 1440,
"escalationMinutes": 4320,
"defaultReminderMinutes": 120,
"defaultEscalationMinutes": 120,
"updatedAt": "2026-10-29T19:21:56.550Z"
}reminderMinutesMinutes before an open approval task triggers a reminder.
escalationMinutesMinutes before an unanswered task escalates to level 2.
defaultReminderMinutes—
defaultEscalationMinutes—
updatedAt—
PasswordResetRequest
PasswordResetRequestsinh từ schema — mock tĩnh{
"password": "OpenVie#2026!"
}passwordInitial password (12–128 characters).
ChannelRequest
ChannelRequestsinh từ schema — mock tĩnh{
"type": "smtp",
"enabled": true,
"fromEmail": "no-reply@openvie.vn",
"fromName": "OpenVie Mail",
"host": "smtp.example.com",
"port": 465,
"username": "openvie-mailer",
"password": "OpenVie#2026!",
"auth": true,
"starttls": true
}typePlugin type, for example `smtp`.
enabled—
fromEmail—
fromName—
host—
port—
username—
passwordWrite-only credential; never returned by reads.
auth—
starttls—
ChannelView
ChannelViewsinh từ schema — mock tĩnh{
"id": "bf7895cf-7184-447f-a6f5-ca2ffd963a4c",
"type": "smtp",
"enabled": true,
"credentialsStored": true,
"lastDeliveryError": "Authentication required",
"lastDeliveryAt": "2026-10-28T17:40:16.205Z"
}id—
type—
enabled—
credentialsStoredTrue when credentials are stored (never the values themselves).
lastDeliveryErrorDelivery error of the last attempted send, when it failed.
lastDeliveryAt—
CompleteTaskRequest
CompleteTaskRequestsinh từ schema — mock tĩnh{
"decision": "APPROVE",
"reason": "Giá trị reason"
}decisionAPPROVE settles the level, REJECT ends the process as REJECTED, ESCALATE hands a level 1 task to level 2.
reasonRequired for REJECT; ignored otherwise, up to 500 characters.
CompleteTaskResponse
CompleteTaskResponsesinh từ schema — mock tĩnh{
"taskId": "073ce19e-9054-4f86-a879-420779d476e2",
"decision": "Giá trị decision",
"processInstanceId": "0d0d35de-b101-4e9b-acd4-7c29bdde89ce",
"documentId": "6fe8c5f2-aa6c-4f8e-a371-05defafbbbac",
"processEnded": true,
"documentStatus": "Giá trị documentStatus",
"nextTaskId": "b45d66dd-1e04-4e06-ab47-4613ec48396a"
}taskId—
decision—
processInstanceId—
documentId—
processEndedTrue when the decision settled the process (approved, rejected, or last level done).
documentStatusDocument status after the decision: APPROVED, REJECTED, or null while still in review.
nextTaskIdNext approval task when the process moved to a further level.
WorkspaceTaskView
WorkspaceTaskViewsinh từ schema — mock tĩnh{
"taskId": "fae3877a-de60-4938-a53b-59d9c9986eab",
"taskName": "Giá trị taskName",
"taskDefinitionKey": "Giá trị taskDefinitionKey",
"approvalLevel": 57,
"candidateGroup": "Giá trị candidateGroup",
"assignee": "Lê Thu Hà",
"processInstanceId": "e3d13ed2-770d-41b3-aea1-46e5f0c25a20",
"documentId": "85058b62-193c-4dbf-ae7d-276ac60997ec",
"documentFileName": "chinh-sach-nhan-su.docx",
"createdAt": "2026-10-30T08:26:16.293Z"
}taskId—
taskName—
taskDefinitionKey—
approvalLevel—
candidateGroup—
assignee—
processInstanceId—
documentId—
documentFileName—
createdAt—
StartProcessRequest
StartProcessRequestsinh từ schema — mock tĩnh{
"documentId": "d654d99e-aaf6-4231-a877-e9e154709a77",
"publishTarget": "workspace"
}documentIdDocument to approve; must be COMPLETED and without an open process.
publishTargetWhere the document is published once approved: `workspace`, `shared`, or `public`.
StartProcessResponse
StartProcessResponsesinh từ schema — mock tĩnh{
"processInstanceId": "344655e8-bf74-466b-a96c-58e01666f1a7",
"documentId": "a594b40e-b368-403f-aec5-0981173d461a",
"documentFileName": "bao-cao-tai-chinh-q3.xlsx",
"publishTarget": "Giá trị publishTarget",
"sensitive": true,
"approvalLevel": 38,
"policyVersion": "policy-2026-v1",
"slaReminder": "Giá trị slaReminder",
"slaEscalation": "Giá trị slaEscalation",
"taskId": "94106986-894c-4647-a520-36150fec3250",
"autoApproved": true,
"documentStatus": "Giá trị documentStatus"
}processInstanceId—
documentId—
documentFileName—
publishTarget—
sensitiveWhether sensitivity scoring classified the document as sensitive (drives the approval level).
approvalLevel—
policyVersion—
slaReminder—
slaEscalation—
taskIdFirst approval task; auto-approved starts leave this null.
autoApprovedTrue when the submitter's own authority covered the required review and the first task was auto-approved at start.
documentStatusAPPROVED when autoApproved; null while the document is still in review.
EngineCompleteRequest
EngineCompleteRequestsinh từ schema — mock tĩnh{
"variables": {
"alpha": "Giá trị variables",
"beta": "Giá trị variables"
}
}variables—
EngineClaimRequest
EngineClaimRequestsinh từ schema — mock tĩnh{
"assignee": "Đỗ Gia Khánh"
}assigneeOptional explicit assignee user id; defaults to the caller.
StartEngineProcessRequest
StartEngineProcessRequestsinh từ schema — mock tĩnh{
"definitionKey": "Giá trị definitionKey",
"businessKey": "Giá trị businessKey",
"variables": {
"alpha": "Giá trị variables",
"beta": "Giá trị variables"
}
}definitionKeyDefinition key (the BPMN process id), or the definition id.
businessKeyOptional caller-side business key (for example an external record id).
variablesVariables the definition's script/delegation logic consumes.
EngineProcessView
EngineProcessViewsinh từ schema — mock tĩnh{
"id": "Giá trị id",
"definitionKey": "Giá trị definitionKey",
"definitionName": "Giá trị definitionName",
"businessKey": "Giá trị businessKey",
"startedAt": "2026-10-28T14:26:06.051Z",
"variables": {
"alpha": "Giá trị variables",
"beta": "Giá trị variables"
}
}id—
definitionKeyDefinition key the instance runs.
definitionName—
businessKey—
startedAt—
variables—
DeployDefinitionRequest
DeployDefinitionRequestsinh từ schema — mock tĩnh{
"name": "DMS Bridge",
"bpmnXml": "Giá trị bpmnXml"
}nameDisplay name; also becomes the deployment resource name.
bpmnXmlBPMN 2.0 XML. The process `id` inside the XML is the definition key used to start processes.
EngineDefinitionView
EngineDefinitionViewsinh từ schema — mock tĩnh{
"id": "Giá trị id",
"key": "Giá trị key",
"name": "DMS Bridge",
"version": 97,
"deployedAt": "2026-10-30T22:54:39.836Z",
"managed": true
}id—
key—
name—
version—
deployedAt—
managedTrue when this definition was deployed through the generic engine API.
CreateUserRequest
CreateUserRequestsinh từ schema — mock tĩnh{
"email": "haidang@example.com",
"fullName": "Trần Quốc Bảo",
"password": "OpenVie#2026!"
}email—
fullName—
passwordInitial password (12–128 characters), forced to change on first login.
OrganizationMemberResponse
OrganizationMemberResponsesinh từ schema — mock tĩnh{
"id": "3200581c-023d-4f2e-abd0-8eca3ccc83b3",
"email": "no-reply@openvie.vn",
"fullName": "Lê Thu Hà",
"orgRole": "ORG_OWNER",
"status": "INACTIVE",
"createdAt": "2026-10-29T19:39:12.171Z",
"lastLoginAt": "2026-10-28T20:24:32.428Z",
"currentUser": true
}id—
email—
fullName—
orgRole—
status—
createdAt—
lastLoginAt—
currentUser—
AddMemberToWorkspaceRequest
AddMemberToWorkspaceRequestsinh từ schema — mock tĩnh{
"email": "qa-team@example.com",
"role": "WORKSPACE_ADMIN"
}emailEmail of an organization account that is not a member of the workspace yet.
roleWorkspace role to grant: ADMIN or MEMBER.
MemberResponse
MemberResponsesinh từ schema — mock tĩnh{
"id": "b465fb31-6f93-4b0e-a1e0-365fde954d01",
"email": "no-reply@openvie.vn",
"fullName": "Trần Quốc Bảo",
"workspaceRole": "MEMBER",
"status": "INACTIVE",
"joinedAt": "2026-10-30T02:50:43.049Z",
"lastLoginAt": "2026-10-30T10:36:13.519Z",
"currentUser": true
}id—
email—
fullName—
workspaceRoleWorkspace role: ADMIN or MEMBER.
status—
joinedAt—
lastLoginAt—
currentUserTrue when this row is the caller.
InviteRequest
InviteRequestsinh từ schema — mock tĩnh{
"email": "trnhb@example.com",
"role": "MEMBER"
}emailPersonal or account email; unique inside the workspace.
roleWorkspace role granted on acceptance: ADMIN or MEMBER.
InvitationResponse
InvitationResponsesinh từ schema — mock tĩnh{
"id": "109efbe4-9668-4ee9-aa76-38f3b3f150fc",
"email": "owner@example.com",
"role": "MEMBER",
"status": "ACCEPTED",
"invitedAt": "2026-10-28T14:19:31.043Z",
"expiresAt": "2026-10-29T22:39:36.562Z",
"lastSentAt": "2026-10-29T02:59:26.694Z"
}id—
email—
role—
statusPENDING, EXPIRED, ACCEPTED, or CANCELLED.
invitedAt—
expiresAt—
lastSentAt—
SetupRequest
SetupRequestsinh từ schema — mock tĩnh{
"organizationName": "OpenVie",
"fullName": "Nguyễn Hải Đăng",
"email": "owner@example.com",
"password": "OpenVie#2026!",
"allowSelfRegistration": true
}organizationNameOrganization display name.
fullNameOwner's display name.
emailOwner account email; used as the login name.
passwordInitial owner password (12–128 characters).
allowSelfRegistrationWhen true, `/api/v1/auth/register` accepts self-registrations from the start.
SetupResponse
SetupResponsesinh từ schema — mock tĩnh{
"organizationId": "e69eb850-5d91-4871-ad91-b878b6627df9",
"workspaceId": "47e184cd-b910-4f0b-a97b-02886090cd59",
"ownerId": "95a34882-7597-4436-a64a-cd133856298d"
}organizationId—
workspaceId—
ownerId—
DocumentUploadResponse
DocumentUploadResponsesinh từ schema — mock tĩnh{
"id": "75939071-f54d-4389-a7d8-bb1788d62985",
"jobId": "5e2bef58-5aa8-483c-aa58-c0f2a53e9c88",
"fileName": "bao-cao-tai-chinh-q3.xlsx",
"status": "PENDING"
}id—
jobId—
fileName—
status—
CreateSessionRequest
CreateSessionRequestsinh từ schema — mock tĩnh{
"chatbot_id": "a45aeec9-6709-4fed-ab06-62af21b75265",
"knowledge_base_id": "c43360ea-f11f-4fde-adb6-96ad5975fc1f",
"locale": "vi",
"metadata": {
"alpha": "Giá trị metadata",
"beta": "Giá trị metadata"
}
}chatbot_idChatbot profile the session runs with. Optional when the workspace has exactly one chatbot.
knowledge_base_idKnowledge base whose documents ground the answers.
localeAnswer language hint (BCP-47).
metadataFree-form client context attached to the session.
SessionResponse
SessionResponsesinh từ schema — mock tĩnh{
"id": "Giá trị id",
"chatbot_id": "Giá trị chatbot_id",
"knowledge_base_id": "Giá trị knowledge_base_id",
"tenant_id": "Giá trị tenant_id",
"locale": "vi"
}id—
chatbot_id—
knowledge_base_id—
tenant_id—
locale—
SubmitMessageRequest
SubmitMessageRequestsinh từ schema — mock tĩnh{
"content": "Summarize the onboarding policy.",
"metadata": {
"alpha": "Giá trị metadata",
"beta": "Giá trị metadata"
},
"document_ids": [
"31c3f1e2-80d6-452c-a542-febca5a038dd"
]
}contentUser question, up to 32 000 characters.
metadataFree-form client context for this turn.
document_idsOptional retrieval scope: at most 20 document ids, each a COMPLETED document of the session's knowledge base. Empty or absent means the whole knowledge base. A replayed turn (Idempotency-Key) keeps the scope stored with the original request.
AuthResponse
AuthResponsesinh từ schema — mock tĩnh{
"accessToken": "Giá trị accessToken",
"tokenType": "Bearer",
"expiresIn": 68,
"user": {
"userId": "Giá trị userId",
"orgId": "Giá trị orgId",
"activeWorkspaceId": "Giá trị activeWorkspaceId",
"fullName": "Nguyễn Hải Đăng",
"email": "no-reply@openvie.vn",
"orgRole": "Giá trị orgRole",
"workspaceRole": "Giá trị workspaceRole",
"mustChangePassword": true
}
}accessToken—
tokenType—
expiresIn—
user—
UserInfo
UserInfosinh từ schema — mock tĩnh{
"userId": "Giá trị userId",
"orgId": "Giá trị orgId",
"activeWorkspaceId": "Giá trị activeWorkspaceId",
"fullName": "Phạm Minh Anh",
"email": "no-reply@openvie.vn",
"orgRole": "Giá trị orgRole",
"workspaceRole": "Giá trị workspaceRole",
"mustChangePassword": true
}userId—
orgId—
activeWorkspaceId—
fullName—
email—
orgRole—
workspaceRole—
mustChangePassword—
SsoExchangeRequest
SsoExchangeRequestsinh từ schema — mock tĩnh{
"code": "Giá trị code",
"codeVerifier": "Giá trị codeVerifier",
"redirectUri": "Giá trị redirectUri"
}code—
codeVerifier—
redirectUri—
RegisterRequest
RegisterRequestsinh từ schema — mock tĩnh{
"email": "qa-team@example.com",
"fullName": "Trần Quốc Bảo",
"password": "OpenVie#2026!"
}email—
fullName—
password—
RefreshRequest
RefreshRequestsinh từ schema — mock tĩnh{
"refreshToken": "Giá trị refreshToken"
}refreshToken—
LoginRequest
LoginRequestsinh từ schema — mock tĩnh{
"email": "haidang@example.com",
"password": "OpenVie#2026!",
"rememberMe": true
}email—
password—
rememberMeWhen true the refresh cookie lasts `jwt.expiry-days`; otherwise it is a session cookie.
AcceptInvitationRequest
AcceptInvitationRequestsinh từ schema — mock tĩnh{
"token": "Giá trị token",
"fullName": "Phạm Minh Anh",
"password": "OpenVie#2026!"
}tokenInvitation token from the invite email link.
fullName—
passwordInitial password (8–128 characters); not forced to change later.
ChangePasswordRequest
ChangePasswordRequestsinh từ schema — mock tĩnh{
"currentPassword": "OpenVie#2026!",
"newPassword": "OpenVie#2027!"
}currentPasswordThe caller's current password; for a first forced change, the administrator-set initial password.
newPasswordThe new password (12–128 characters).
AddMemberRequest
AddMemberRequestsinh từ schema — mock tĩnh{
"email": "owner@example.com",
"role": "MEMBER"
}email—
role—
MemberView
MemberViewsinh từ schema — mock tĩnh{
"userId": "d92fe3f6-b779-4207-a4d9-a21191a6b76b",
"email": "no-reply@openvie.vn",
"fullName": "Nguyễn Hải Đăng",
"status": "OK",
"workspaceRole": "Giá trị workspaceRole",
"joinedAt": "2026-10-29T12:02:01.530Z"
}userId—
email—
fullName—
status—
workspaceRole—
joinedAt—
CreateWorkspaceRequest
CreateWorkspaceRequestsinh từ schema — mock tĩnh{
"name": "DMS Bridge",
"visibility": "Giá trị visibility"
}name—
visibility—
WorkspaceView
WorkspaceViewsinh từ schema — mock tĩnh{
"id": "19a7693e-67ff-43db-ab49-be314d458c57",
"name": "DMS Bridge",
"slug": "chinh-sach-ngay-nghi-2026",
"status": "OK",
"visibility": "Giá trị visibility",
"memberCount": 20,
"createdAt": "2026-10-29T22:53:21.730Z",
"default": true,
"isDefault": true
}id—
name—
slug—
status—
visibility—
memberCount—
createdAt—
default—
isDefault—
CreateWebhookRequest
CreateWebhookRequestsinh từ schema — mock tĩnh{
"name": "DMS bridge",
"url": "https://dms.example.com/openvie/hooks",
"events": [
"Giá trị events_item"
]
}nameDisplay name for listings.
urlPOST target; must be http(s).
eventsOptional event whitelist; empty or absent receives every event. Known types: document.status.changed, workflow.started, workflow.approved, workflow.rejected, workflow.escalated, webhook.test.
CreatedWebhook
CreatedWebhooksinh từ schema — mock tĩnh{
"id": "9688f570-9b87-4600-a088-5f5e45a0f225",
"secret": "whsec_7Yq3pRv9xLd2KmBaWf8hTc0nZj5GaQeU",
"endpoint": {
"id": "acbb618b-95e4-4102-ae0e-0f010c01f3a2",
"name": "DMS Bridge",
"url": "https://dms.example.com/openvie/hooks",
"status": "OK",
"createdAt": "2026-10-28T06:50:56.847Z",
"createdBy": "20526d58-6114-4946-a1ad-40be15910b52"
}
}id—
secretSigning secret in the form `whsec_<secret>`.
endpoint—
WebhookEndpointView
WebhookEndpointViewsinh từ schema — mock tĩnh{
"id": "110d0ce0-d96f-4a09-adac-311d92e28f5a",
"name": "DMS Bridge",
"url": "https://dms.example.com/openvie/hooks",
"status": "OK",
"events": [
"Giá trị events_item"
],
"createdAt": "2026-10-30T21:14:57.795Z",
"createdBy": "aa799d32-4c55-472f-a256-ff4eaaa3a627"
}id—
name—
url—
status—
events—
createdAt—
createdBy—
TestRequest
TestRequestsinh từ schema — mock tĩnh{
"email": "qa-team@example.com"
}email—
CreateApiKeyRequest
CreateApiKeyRequestsinh từ schema — mock tĩnh{
"name": "Marketing site search",
"workspaceId": "4e44d190-7889-42aa-acd9-9da8a5a3c42f",
"role": "MEMBER",
"expiresAt": "2026-10-28T18:49:39.490Z"
}nameDisplay name, shown in listings and in the service-member profile.
workspaceIdWorkspace the key operates in.
roleWorkspace authority of the key: WORKSPACE_ADMIN or MEMBER.
expiresAtOptional expiry; after this instant the key answers 401.
ApiKeyView
ApiKeyViewsinh từ schema — mock tĩnh{
"id": "2c2523cd-ba41-45ef-ab24-ba91ff209205",
"workspaceId": "d699ecb2-3bd3-40a1-a393-f86417fc8c9f",
"serviceUserId": "0dded368-72b9-4e6a-ae6c-6f84d303bdf4",
"name": "DMS Bridge",
"keyPrefix": "Giá trị keyPrefix",
"role": "Giá trị role",
"status": "OK",
"createdAt": "2026-10-29T17:39:09.001Z",
"lastUsedAt": "2026-10-30T13:13:24.258Z",
"expiresAt": "2026-10-30T18:49:31.551Z",
"createdBy": "9fec0d32-cd64-458f-a219-a38cded5094f",
"expired": true
}id—
workspaceId—
serviceUserId—
name—
keyPrefix`ovk_` + first secret characters, for identification only.
role—
status—
createdAt—
lastUsedAt—
expiresAt—
createdBy—
expiredTrue when the key can no longer authenticate (revoked or expired).
CreatedApiKey
CreatedApiKeysinh từ schema — mock tĩnh{
"id": "4a1d7c4a-b651-4881-a872-ba3b24ac764d",
"key": "ovk_7Yq3pRv9xLd2KmBaWf8hTc0nZj5GaQeU",
"keyView": {
"id": "a9f2f67f-5a9e-4712-adb5-dba501f9d9cc",
"workspaceId": "49e1c69e-f19a-40f2-a884-2d39175bd4ee",
"serviceUserId": "12545e2f-a171-443e-ad13-40d885c8a019",
"name": "DMS Bridge",
"keyPrefix": "Giá trị keyPrefix",
"role": "Giá trị role",
"status": "OK",
"createdAt": "2026-10-30T19:01:27.710Z",
"lastUsedAt": "2026-10-29T03:39:50.679Z",
"expiresAt": "2026-10-28T09:35:51.317Z",
"createdBy": "8c15c059-6e2b-453b-a688-56c82f315fa9",
"expired": true
}
}id—
keyBearer secret in the form `ovk_<secret>`.
keyView—
StatusUpdateRequest
StatusUpdateRequestsinh từ schema — mock tĩnh{
"status": "INVITED"
}status—
RoleUpdateRequest
RoleUpdateRequestsinh từ schema — mock tĩnh{
"role": "MEMBER"
}roleNew workspace role: ADMIN or MEMBER.
VisibilityRequest
VisibilityRequestsinh từ schema — mock tĩnh{
"visibility": "Giá trị visibility"
}visibility—
RoleRequest
RoleRequestsinh từ schema — mock tĩnh{
"role": "MEMBER"
}role—
RenameWorkspaceRequest
RenameWorkspaceRequestsinh từ schema — mock tĩnh{
"name": "DMS Bridge"
}name—
ToggleRequest
ToggleRequestsinh từ schema — mock tĩnh{
"allowed": true
}allowed—
WorkspaceTasks
WorkspaceTaskssinh từ schema — mock tĩnh{
"assignedToMe": [
{
"taskId": "f97332da-f59e-4845-a0cf-c2ed3d7a42eb",
"taskName": "Giá trị taskName",
"taskDefinitionKey": "Giá trị taskDefinitionKey",
"approvalLevel": 30,
"candidateGroup": "Giá trị candidateGroup",
"assignee": "Phạm Minh Anh",
"processInstanceId": "9d795a9e-3c32-4b7d-aab2-627b84325e5f",
"documentId": "6da4b427-4a2d-497e-aacb-920a88e280c9",
"documentFileName": "quy-trinh-phong-van.pdf",
"createdAt": "2026-10-30T08:31:16.331Z"
}
],
"groupTasks": [
{
"taskId": "c403a2fa-689b-4c4d-a56c-5ef143cbf7c8",
"taskName": "Giá trị taskName",
"taskDefinitionKey": "Giá trị taskDefinitionKey",
"approvalLevel": 80,
"candidateGroup": "Giá trị candidateGroup",
"assignee": "Trần Quốc Bảo",
"processInstanceId": "ea14c2bf-1b4a-43e1-a7f5-65127490f7db",
"documentId": "fd6cfeb8-504d-43fe-ad66-d5bd3de7342b",
"documentFileName": "quy-trinh-phong-van.pdf",
"createdAt": "2026-10-29T22:16:04.281Z"
}
]
}assignedToMe—
groupTasks—
WorkflowProcessView
WorkflowProcessViewsinh từ schema — mock tĩnh{
"processInstanceId": "1a0abce7-faa6-4198-af74-70dcc3ee274d",
"documentId": "19df97a2-79bd-4049-a208-b8bdf82c35b5",
"documentFileName": "chinh-sach-nhan-su.docx",
"sensitive": true,
"approvalLevel": 25,
"policyVersion": "policy-2026-v1",
"publishTarget": "Giá trị publishTarget",
"documentStatus": "Giá trị documentStatus",
"escalated": true,
"startedAt": "2026-10-29T00:07:40.730Z",
"endedAt": "2026-10-28T09:52:02.403Z"
}processInstanceId—
documentId—
documentFileName—
sensitive—
approvalLevel—
policyVersion—
publishTarget—
documentStatus—
escalated—
startedAt—
endedAt—
ProcessDetail
ProcessDetailsinh từ schema — mock tĩnh{
"process": {
"processInstanceId": "e78dbf6f-3805-4fcd-a4de-d89596240e99",
"documentId": "1fa51ad5-c9b8-40e6-a0ea-9e422d47fd34",
"documentFileName": "quy-trinh-phong-van.pdf",
"sensitive": true,
"approvalLevel": 90,
"policyVersion": "policy-2026-v1",
"publishTarget": "Giá trị publishTarget",
"documentStatus": "Giá trị documentStatus",
"escalated": true,
"startedAt": "2026-10-28T04:00:23.699Z",
"endedAt": "2026-10-30T22:56:08.357Z"
},
"activeTasks": [
{
"taskId": "a0e83ba9-fa23-4372-a63e-618c8746566a",
"taskName": "Giá trị taskName",
"taskDefinitionKey": "Giá trị taskDefinitionKey",
"approvalLevel": 20,
"candidateGroup": "Giá trị candidateGroup",
"assignee": "Lê Thu Hà",
"processInstanceId": "1467d909-746d-4d00-a300-c5bfce495998",
"documentId": "59f3fadf-a4bb-48b0-a409-4cbccf239ef3",
"documentFileName": "quy-trinh-phong-van.pdf",
"createdAt": "2026-10-30T22:14:58.949Z"
}
]
}process—
activeTasks—
ProcessLog
ProcessLogsinh từ schema — mock tĩnh{
"process": {
"processInstanceId": "3e2c8f41-8aba-4d94-af06-e3567479e73e",
"documentId": "a7603899-af6a-4db9-a008-9865158ee761",
"documentFileName": "bao-cao-tai-chinh-q3.xlsx",
"sensitive": true,
"approvalLevel": 35,
"policyVersion": "policy-2026-v1",
"publishTarget": "Giá trị publishTarget",
"documentStatus": "Giá trị documentStatus",
"escalated": true,
"startedAt": "2026-10-30T05:59:40.102Z",
"endedAt": "2026-10-28T08:23:20.237Z"
},
"entries": [
{
"occurredAt": "2026-10-30T17:11:44.264Z",
"actorId": "ce77e54d-8ff1-4a44-ad3f-d0a9a1cadd56",
"actorName": "Phạm Minh Anh",
"action": "Giá trị action"
}
]
}process—
entries—
ProcessLogEntry
ProcessLogEntrysinh từ schema — mock tĩnh{
"occurredAt": "2026-10-28T21:37:59.384Z",
"actorId": "a000157e-ff0d-4413-aa56-4a4675cc2d1e",
"actorName": "Trần Quốc Bảo",
"action": "Giá trị action",
"metadata": {
"alpha": "Giá trị metadata",
"beta": "Giá trị metadata"
}
}occurredAt—
actorId—
actorName—
action—
metadata—
EngineTaskView
EngineTaskViewsinh từ schema — mock tĩnh{
"id": "Giá trị id",
"name": "DMS Bridge",
"assignee": "Đỗ Gia Khánh",
"processInstanceId": "Giá trị processInstanceId",
"definitionKey": "Giá trị definitionKey",
"approvalDomain": true,
"createdAt": "2026-10-30T11:09:26.499Z",
"dueDate": "2026-10-30T22:49:10.805Z"
}id—
name—
assigneeUser id the task is claimed for, or null when unassigned.
processInstanceId—
definitionKey—
approvalDomainApproval-flow tasks are journaled by the approval endpoints and refused here.
createdAt—
dueDate—
EngineTasks
EngineTaskssinh từ schema — mock tĩnh{
"tasks": [
{
"id": "Giá trị id",
"name": "DMS Bridge",
"assignee": "Phạm Minh Anh",
"processInstanceId": "Giá trị processInstanceId",
"definitionKey": "Giá trị definitionKey",
"approvalDomain": true,
"createdAt": "2026-10-28T06:00:12.680Z",
"dueDate": "2026-10-30T03:49:35.396Z"
}
],
"total": 4
}tasks—
total—
EngineProcessHistoryView
EngineProcessHistoryViewsinh từ schema — mock tĩnh{
"id": "Giá trị id",
"definitionKey": "Giá trị definitionKey",
"businessKey": "Giá trị businessKey",
"startedAt": "2026-10-30T05:51:37.134Z",
"endedAt": "2026-10-28T03:41:31.230Z",
"ended": true,
"durationMs": 38,
"variables": {
"alpha": "Giá trị variables",
"beta": "Giá trị variables"
}
}id—
definitionKey—
businessKey—
startedAt—
endedAt—
endedTrue when the instance reached its end (for Approval this is the decision).
durationMsDuration between start and end in ms; null while running.
variables—
DirectoryResponse
DirectoryResponsesinh từ schema — mock tĩnh{
"members": [
{
"id": "7c3ecf2c-5bf0-4258-af8d-6000bc4b9b33",
"email": "owner@example.com",
"fullName": "Trần Quốc Bảo",
"workspaceRole": "WORKSPACE_ADMIN",
"status": "ACTIVE",
"joinedAt": "2026-10-29T03:10:36.199Z",
"lastLoginAt": "2026-10-30T12:50:19.138Z",
"currentUser": true
}
],
"invitations": [
{
"id": "85abac3a-48d9-4cd2-ad51-dee8b2a37c5f",
"email": "no-reply@openvie.vn",
"role": "WORKSPACE_ADMIN",
"status": "ACCEPTED",
"invitedAt": "2026-10-29T20:27:38.245Z",
"expiresAt": "2026-10-28T19:30:56.291Z",
"lastSentAt": "2026-10-30T08:55:39.008Z"
}
],
"visibility": "PRIVATE",
"defaultWorkspace": true
}members—
invitations—
visibility—
defaultWorkspace—
ChatbotWorkspace
ChatbotWorkspacesinh từ schema — mock tĩnh{
"id": "7ff3c16e-b54c-45cc-a4b3-163f1b697e1c",
"displayName": "Đỗ Gia Khánh",
"defaultLocale": "Giá trị defaultLocale",
"welcomeMessage": "Giá trị welcomeMessage"
}id—
displayName—
defaultLocale—
welcomeMessage—
KnowledgeBaseWorkspace
KnowledgeBaseWorkspacesinh từ schema — mock tĩnh{
"id": "882b2c8a-6068-46a5-a2d4-c98a5b4d825d",
"name": "DMS Bridge",
"slug": "chinh-sach-ngay-nghi-2026",
"defaultLocale": "Giá trị defaultLocale"
}id—
name—
slug—
defaultLocale—
TenantWorkspaceResponse
TenantWorkspaceResponsesinh từ schema — mock tĩnh{
"tenantId": "b2e13dca-e931-4cbf-acee-81f52a9502b4",
"knowledgeBase": {
"id": "c9d778d7-454c-418e-a052-0d5445e800d1",
"name": "DMS Bridge",
"slug": "chinh-sach-ngay-nghi-2026",
"defaultLocale": "Giá trị defaultLocale"
},
"chatbot": {
"id": "dfdb4fb1-267d-4fa3-abe7-441ade28aa85",
"displayName": "Đỗ Gia Khánh",
"defaultLocale": "Giá trị defaultLocale",
"welcomeMessage": "Giá trị welcomeMessage"
}
}tenantId—
knowledgeBase—
chatbot—
DocumentListItemResponse
DocumentListItemResponsesinh từ schema — mock tĩnh{
"id": "7493323b-fac0-4e3b-af82-6d92a26430e4",
"jobId": "79c9e454-9f4d-4a97-a060-482769ea2c30",
"fileName": "onboarding-policy.pdf",
"fileType": "VIDEO",
"fileSizeBytes": 22,
"knowledgeBaseId": "8b4ac432-8afa-4be8-ab20-1af8c5955e01",
"status": "PROCESSING",
"chunkCount": 42,
"textSource": "ocr",
"pageCount": 61,
"errorMessage": "Resource not found",
"uploadedAt": "2026-10-28T14:04:34.916Z",
"uploadedBy": "549b5762-5120-4533-a4e6-62955f0f5cba"
}id—
jobId—
fileName—
fileType—
fileSizeBytes—
knowledgeBaseId—
statusIngestion state: PENDING, PROCESSING, COMPLETED, or FAILED.
chunkCount—
textSourceHow the text was obtained: text (native layer), ocr (recognized page images), or mixed. Absent for legacy documents.
pageCountNumber of source pages when known (PDF and images).
errorMessageSet when ingestion FAILED; explains the worker-side reason.
uploadedAt—
uploadedBy—
DocumentStatusResponse
DocumentStatusResponsesinh từ schema — mock tĩnh{
"id": "205e360c-868f-4620-a566-0d5b3275dc61",
"jobId": "9feb9ee1-3e20-4cbf-a0e9-e10bd1a8acc5",
"fileName": "onboarding-policy.pdf",
"fileType": "IMAGE",
"fileSizeBytes": 6,
"uploadedAt": "2026-10-29T00:17:24.954Z",
"knowledgeBaseId": "a8054152-3009-4312-a7c8-93f53b383dea",
"status": "FAILED",
"approvalStatus": "APPROVED",
"approvalTarget": "Giá trị approvalTarget",
"chunkCount": 61,
"textSource": "ocr",
"pageCount": 60,
"errorMessage": "Validation failed",
"uploadedBy": "04745dfa-fab3-48fa-af0b-680da738f228"
}id—
jobId—
fileName—
fileType—
fileSizeBytes—
uploadedAt—
knowledgeBaseId—
statusIngestion state: PENDING, PROCESSING, COMPLETED, or FAILED.
approvalStatusApproval state written back by the workflow engine: absent when the document was never submitted, PENDING while a process is open, then APPROVED or REJECTED.
approvalTargetPublish target chosen at submission: workspace, shared, or public. Absent until the document is submitted for approval.
chunkCount—
textSourceHow the text was obtained: text (native layer), ocr (recognized page images), or mixed. Absent for legacy documents.
pageCountNumber of source pages when known (PDF and images).
errorMessageSet when ingestion FAILED; explains the worker-side reason.
uploadedBy—
DocumentUnit
DocumentUnitsinh từ schema — mock tĩnh{
"unit_id": "Giá trị unit_id",
"chunk_index": 86,
"text": "Giá trị text",
"sourceName": "Giá trị sourceName",
"modality": "Giá trị modality",
"block_type": "Giá trị block_type",
"section_path": [
"Giá trị section_path_item"
],
"heading_context": "Giá trị heading_context",
"page_number": 63,
"sheet_name": "Giá trị sheet_name",
"cell_range": "Giá trị cell_range",
"table_id": "Giá trị table_id",
"source_start": 53,
"source_end": 90
}unit_id—
chunk_index—
text—
sourceName—
modality—
block_type—
section_path—
heading_context—
page_number—
sheet_name—
cell_range—
table_id—
source_start—
source_end—
CitationImageDto
CitationImageDtosinh từ schema — mock tĩnh{
"media_id": "Giá trị media_id",
"media_type": "Giá trị media_type",
"width": 27,
"height": 85
}media_idKey suffix under the document's media/ storage namespace.
media_type—
width—
height—
CitationResponse
CitationResponsesinh từ schema — mock tĩnh{
"id": "Giá trị id",
"document_id": "Giá trị document_id",
"source_name": "Giá trị source_name",
"page_number": 82,
"chunk_index": 55,
"score": 46.28,
"snippet": "Giá trị snippet",
"unit_id": "Giá trị unit_id",
"modality": "Giá trị modality",
"section_path": [
"Giá trị section_path_item"
],
"block_type": "Giá trị block_type",
"sheet_name": "Giá trị sheet_name",
"cell_range": "Giá trị cell_range",
"table_id": "Giá trị table_id",
"parser_version": "Giá trị parser_version",
"public_url": "Giá trị public_url",
"image": {
"media_id": "Giá trị media_id",
"media_type": "Giá trị media_type",
"width": 24,
"height": 76
}
}id—
document_id—
source_nameFile name of the cited document.
page_number—
chunk_index0-based position of the chunk inside the document.
scoreRetrieval similarity score.
snippetShort text excerpt of the cited passage.
unit_id—
modalityUnit modality: TEXT, IMAGE, TABLE, or similar.
section_path—
block_type—
sheet_name—
cell_range—
table_id—
parser_versionIngestion parser that produced the cited unit (ocr-v1 marks OCR-derived text).
public_url—
imageThe cited image when the unit was derived from a persisted picture; media_id inserts into /api/v1/documents/{id}/media/{media_id}.
MessageResponse
MessageResponsesinh từ schema — mock tĩnh{
"role": "Giá trị role",
"content": "Tóm tắt giúp tôi chính sách ngày nghỉ phép năm nay.",
"citations": [
{
"id": "Giá trị id",
"document_id": "Giá trị document_id",
"source_name": "Giá trị source_name",
"page_number": 96,
"chunk_index": 43,
"score": 41.89,
"snippet": "Giá trị snippet",
"unit_id": "Giá trị unit_id",
"modality": "Giá trị modality",
"block_type": "Giá trị block_type",
"sheet_name": "Giá trị sheet_name",
"cell_range": "Giá trị cell_range",
"table_id": "Giá trị table_id",
"parser_version": "Giá trị parser_version",
"public_url": "Giá trị public_url"
}
],
"sequence_number": 51,
"action": {
"alpha": "Giá trị action",
"beta": "Giá trị action"
}
}role—
content—
citations—
sequence_number1-based position within the session; pass it as `after` when paging history.
action—
PlaygroundSessionResponse
PlaygroundSessionResponsesinh từ schema — mock tĩnh{
"id": "8b21f674-ae0b-4f6b-a30e-5acf101f1702",
"title": "Giá trị title",
"message_count": 67,
"status": "OPEN",
"created_at": "2026-10-29T18:22:43.882Z",
"last_activity_at": "2026-10-28T10:45:05.021Z"
}id—
title—
message_count—
statusOPEN or CLOSED.
created_at—
last_activity_at—
WorkspaceSummaryResponse
WorkspaceSummaryResponsesinh từ schema — mock tĩnh{
"id": "0510d99a-ff3c-4e69-aaa1-14bf96d0e395",
"name": "DMS Bridge",
"slug": "chinh-sach-ngay-nghi-2026",
"role": "Giá trị role",
"default": true,
"isDefault": true
}id—
name—
slug—
role—
default—
isDefault—
InvitationValidationResponse
InvitationValidationResponsesinh từ schema — mock tĩnh{
"email": "owner@example.com",
"organizationName": "Giá trị organizationName",
"workspaceName": "Giá trị workspaceName",
"role": "Giá trị role",
"expiresAt": "2026-10-28T05:55:34.973Z"
}email—
organizationName—
workspaceName—
role—
expiresAt—
OrganizationSnapshot
OrganizationSnapshotsinh từ schema — mock tĩnh{
"id": "d661e03e-b107-46f8-a9cd-87f55df34bdd",
"name": "DMS Bridge",
"slug": "chinh-sach-ngay-nghi-2026",
"allowSelfRegistration": true
}id—
name—
slug—
allowSelfRegistration—
WebhookDeliveryView
WebhookDeliveryViewsinh từ schema — mock tĩnh{
"id": "8b509898-efd5-4f36-ade3-630a684e3b16",
"eventId": "2fcd44c6-1cf3-47b2-aa8f-fc53fa5436ce",
"event_type": "Giá trị event_type",
"status": "OK",
"attemptCount": 73,
"last_http_status": 409,
"lastError": "Authentication required",
"createdAt": "2026-10-28T22:52:45.210Z",
"deliveredAt": "2026-10-29T10:40:33.968Z",
"next_attempt_at": "2026-10-29T00:31:48.327Z"
}id—
eventId—
event_type—
status—
attemptCount—
last_http_status—
lastError—
createdAt—
deliveredAt—
next_attempt_at—