MOBILE-ID · TRUSTED LTANS
API lưu trữ dài hạn
Gửi một bộ hồ sơ, đối soát biên nhận và truy vấn trạng thái; phân biệt tiếp nhận với bằng chứng sẵn sàng.
MÔ PHỎNG CỤC BỘ · Hợp đồng mục tiêu · Không gửi yêu cầu mạng
POST/v1/archives
HỢP ĐỒNG MỤC TIÊU · API 3.0.0-draft
| Thuộc tính | Giá trị |
|---|---|
| Chủ sở hữu kỹ thuật | Dịch vụ lưu trữ |
| Quyền ứng dụng | archives:write |
| HTTP | 202 |
| Xử lý lời gọi | Tác vụ bất đồng bộ: xem schema Job và trạng thái tài nguyên kết quả. |
| Sự kiện | ArchiveRequested |
Đối chiếu khóa và nội dung; kiểm tra kết quả trước khi tạo yêu cầu mới.
curl --fail-with-body --request POST \
"${BASE_URL%/}/v1/archives" \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "X-Correlation-ID: ${CORRELATION_ID}" \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY}" \
--header "Content-Type: application/json" \
--data-binary "@${REQUEST_FILE}"{
"profileId": "profile-test-01",
"policyId": "policy-test-v1",
"mimeType": "text/plain",
"metadata": {
"title": "LTANS-SYN-001 / r1",
"sourceId": "LTANS-SYN-001",
"sourceRevision": "r1"
},
"custody": "CUSTOMER_MANAGED",
"dataReference": "https://storage.example.invalid/test/primary-record.txt",
"digest": {
"algorithm": "SHA-256",
"value": "35bc4fcffc4a16c8a9db81d1a8f9042c27a1daaf51628b4c880f312178fe3085"
},
"archivalPeriod": {
"endAt": "2036-10-15T00:00:00Z"
},
"clientReference": "LTANS-SYN-001/r1",
"requestTime": "2026-10-15T05:00:00Z",
"groupId": "grp-syn-001"
}{
"archiveId": "arc-test-001",
"jobId": "job-test-001",
"policyId": "policy-test-v1",
"policyVersion": "1",
"receivedAt": "2026-10-15T05:00:01Z",
"state": "ACCEPTED"
}{
"type": "object",
"properties": {
"profileId": {
"type": "string"
},
"policyId": {
"type": "string"
},
"mimeType": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"custody": {
"type": "string",
"enum": [
"PROVIDER_MANAGED",
"CUSTOMER_MANAGED",
"HASH_ONLY"
]
},
"dataReference": {
"type": "string",
"format": "uri",
"description": "Allow-listed object reference; arbitrary server-side URL fetching is forbidden."
},
"digest": {
"$ref": "#/components/schemas/Digest"
},
"archivalPeriod": {
"$ref": "#/components/schemas/ArchivalPeriod"
},
"groupId": {
"type": "string"
},
"clientReference": {
"type": "string"
},
"requestTime": {
"type": "string",
"format": "date-time"
},
"uploadId": {
"type": "string",
"minLength": 1,
"description": "Identifier of a completed upload in an agreed storage connector; upload transport is outside these REST contracts."
},
"externalObjectId": {
"type": "string",
"minLength": 1,
"description": "Owner-retained data identifier for hash-only preservation; not an automatic fetch URL."
}
},
"required": [
"profileId",
"policyId",
"mimeType",
"custody",
"digest",
"archivalPeriod"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"custody": {
"const": "PROVIDER_MANAGED"
}
},
"required": [
"custody"
]
},
"then": {
"required": [
"uploadId"
],
"not": {
"anyOf": [
{
"required": [
"dataReference"
]
},
{
"required": [
"externalObjectId"
]
}
]
}
}
},
{
"if": {
"properties": {
"custody": {
"const": "CUSTOMER_MANAGED"
}
},
"required": [
"custody"
]
},
"then": {
"required": [
"dataReference"
],
"not": {
"anyOf": [
{
"required": [
"uploadId"
]
},
{
"required": [
"externalObjectId"
]
}
]
}
}
},
{
"if": {
"properties": {
"custody": {
"const": "HASH_ONLY"
}
},
"required": [
"custody"
]
},
"then": {
"required": [
"externalObjectId"
],
"not": {
"anyOf": [
{
"required": [
"dataReference"
]
},
{
"required": [
"uploadId"
]
}
]
}
}
}
],
"examples": [
{
"profileId": "profile-test-01",
"policyId": "policy-test-v1",
"mimeType": "text/plain",
"metadata": {
"title": "LTANS-SYN-001 / r1",
"sourceId": "LTANS-SYN-001",
"sourceRevision": "r1"
},
"custody": "CUSTOMER_MANAGED",
"dataReference": "https://storage.example.invalid/test/primary-record.txt",
"digest": {
"algorithm": "SHA-256",
"value": "35bc4fcffc4a16c8a9db81d1a8f9042c27a1daaf51628b4c880f312178fe3085"
},
"archivalPeriod": {
"endAt": "2036-10-15T00:00:00Z"
},
"clientReference": "LTANS-SYN-001/r1",
"requestTime": "2026-10-15T05:00:00Z",
"groupId": "grp-syn-001"
}
]
}{
"type": "https://example.invalid/problems/archive-key-conflict",
"title": "Archive Key Conflict",
"code": "ARCHIVE_KEY_CONFLICT",
"detail": "Idempotency key conflicts with another payload.",
"correlationId": "corr-test-001",
"requestId": "req-test-001",
"retryable": false,
"service": "Archive Service",
"timestamp": "2026-10-15T05:00:01Z",
"errors": [],
"status": 409,
"instance": "urn:ltans:request:req-test-001"
}GET/v1/archives
HỢP ĐỒNG MỤC TIÊU · API 3.0.0-draft
| Thuộc tính | Giá trị |
|---|---|
| Chủ sở hữu kỹ thuật | Dịch vụ lưu trữ |
| Quyền ứng dụng | archives:read |
| HTTP | 200 |
| Xử lý lời gọi | Xác thực/quyền → xử lý HTTP; đây không phải enum trạng thái tài nguyên. |
| Sự kiện | Nhật ký hoặc sự kiện nội bộ |
Đối chiếu khóa và nội dung; kiểm tra kết quả trước khi tạo yêu cầu mới.
curl --fail-with-body --request GET \
"${BASE_URL%/}/v1/archives" \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "X-Correlation-ID: ${CORRELATION_ID}"{
"items": [
{
"archiveId": "arc-test-001",
"profileId": "profile-test-01",
"policyId": "policy-test-v1",
"custody": "CUSTOMER_MANAGED",
"mimeType": "application/pdf",
"metadata": {
"title": "Synthetic record"
},
"state": "EVIDENCE_READY",
"evidenceVersion": 1
}
]
}{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ArchiveObject"
}
},
"nextCursor": {
"type": "string"
}
},
"required": [
"items"
],
"additionalProperties": false,
"examples": [
{
"items": [
{
"archiveId": "arc-test-001",
"profileId": "profile-test-01",
"policyId": "policy-test-v1",
"custody": "CUSTOMER_MANAGED",
"mimeType": "text/plain",
"metadata": {
"title": "LTANS-SYN-001 / r1"
},
"state": "EVIDENCE_READY",
"evidenceVersion": 1
}
]
}
]
}{
"type": "https://example.invalid/problems/archive-key-conflict",
"title": "Archive Key Conflict",
"code": "ARCHIVE_KEY_CONFLICT",
"detail": "Idempotency key conflicts with another payload.",
"correlationId": "corr-test-001",
"requestId": "req-test-001",
"retryable": false,
"service": "Archive Service",
"timestamp": "2026-10-15T05:00:01Z",
"errors": [],
"status": 409,
"instance": "urn:ltans:request:req-test-001"
}GET/v1/archives/{archiveId}
HỢP ĐỒNG MỤC TIÊU · API 3.0.0-draft
| Thuộc tính | Giá trị |
|---|---|
| Chủ sở hữu kỹ thuật | Dịch vụ lưu trữ |
| Quyền ứng dụng | archives:read |
| HTTP | 200 |
| Xử lý lời gọi | Xác thực/quyền → xử lý HTTP; đây không phải enum trạng thái tài nguyên. |
| Sự kiện | Nhật ký hoặc sự kiện nội bộ |
Đối chiếu khóa và nội dung; kiểm tra kết quả trước khi tạo yêu cầu mới.
curl --fail-with-body --request GET \
"${BASE_URL%/}/v1/archives/${ARCHIVE_ID}" \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "X-Correlation-ID: ${CORRELATION_ID}"{
"archiveId": "arc-test-001",
"profileId": "profile-test-01",
"policyId": "policy-test-v1",
"custody": "CUSTOMER_MANAGED",
"mimeType": "application/pdf",
"metadata": {
"title": "Synthetic record"
},
"state": "EVIDENCE_READY",
"evidenceVersion": 1
}{
"type": "object",
"properties": {
"archiveId": {
"type": "string"
},
"profileId": {
"type": "string"
},
"policyId": {
"type": "string"
},
"custody": {
"type": "string"
},
"mimeType": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"state": {
"type": "string",
"enum": [
"RECEIVED",
"VALIDATING",
"ACCEPTED",
"EVIDENCE_PENDING",
"EVIDENCE_READY",
"REJECTED",
"EVIDENCE_FAILED"
]
},
"evidenceVersion": {
"type": "integer",
"minimum": 0
}
},
"required": [
"archiveId",
"state"
],
"additionalProperties": false,
"examples": [
{
"archiveId": "arc-test-001",
"profileId": "profile-test-01",
"policyId": "policy-test-v1",
"custody": "CUSTOMER_MANAGED",
"mimeType": "text/plain",
"metadata": {
"title": "LTANS-SYN-001 / r1"
},
"state": "EVIDENCE_READY",
"evidenceVersion": 1
}
]
}{
"type": "https://example.invalid/problems/archive-key-conflict",
"title": "Archive Key Conflict",
"code": "ARCHIVE_KEY_CONFLICT",
"detail": "Idempotency key conflicts with another payload.",
"correlationId": "corr-test-001",
"requestId": "req-test-001",
"retryable": false,
"service": "Archive Service",
"timestamp": "2026-10-15T05:00:01Z",
"errors": [],
"status": 409,
"instance": "urn:ltans:request:req-test-001"
}GET/v1/archives/{archiveId}/status
HỢP ĐỒNG MỤC TIÊU · API 3.0.0-draft
| Thuộc tính | Giá trị |
|---|---|
| Chủ sở hữu kỹ thuật | Dịch vụ lưu trữ |
| Quyền ứng dụng | archives:read |
| HTTP | 200 |
| Xử lý lời gọi | Xác thực/quyền → xử lý HTTP; đây không phải enum trạng thái tài nguyên. |
| Sự kiện | Nhật ký hoặc sự kiện nội bộ |
Đối chiếu khóa và nội dung; kiểm tra kết quả trước khi tạo yêu cầu mới.
curl --fail-with-body --request GET \
"${BASE_URL%/}/v1/archives/${ARCHIVE_ID}/status" \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "X-Correlation-ID: ${CORRELATION_ID}"{
"archiveId": "arc-test-001",
"profileId": "profile-test-01",
"policyId": "policy-test-v1",
"custody": "CUSTOMER_MANAGED",
"mimeType": "application/pdf",
"metadata": {
"title": "Synthetic record"
},
"state": "EVIDENCE_READY",
"evidenceVersion": 1
}{
"type": "object",
"properties": {
"archiveId": {
"type": "string"
},
"profileId": {
"type": "string"
},
"policyId": {
"type": "string"
},
"custody": {
"type": "string"
},
"mimeType": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"state": {
"type": "string",
"enum": [
"RECEIVED",
"VALIDATING",
"ACCEPTED",
"EVIDENCE_PENDING",
"EVIDENCE_READY",
"REJECTED",
"EVIDENCE_FAILED"
]
},
"evidenceVersion": {
"type": "integer",
"minimum": 0
}
},
"required": [
"archiveId",
"state"
],
"additionalProperties": false,
"examples": [
{
"archiveId": "arc-test-001",
"profileId": "profile-test-01",
"policyId": "policy-test-v1",
"custody": "CUSTOMER_MANAGED",
"mimeType": "text/plain",
"metadata": {
"title": "LTANS-SYN-001 / r1"
},
"state": "EVIDENCE_READY",
"evidenceVersion": 1
}
]
}{
"type": "https://example.invalid/problems/archive-key-conflict",
"title": "Archive Key Conflict",
"code": "ARCHIVE_KEY_CONFLICT",
"detail": "Idempotency key conflicts with another payload.",
"correlationId": "corr-test-001",
"requestId": "req-test-001",
"retryable": false,
"service": "Archive Service",
"timestamp": "2026-10-15T05:00:01Z",
"errors": [],
"status": 409,
"instance": "urn:ltans:request:req-test-001"
}POST/v1/archives/{archiveId}/dispositions
HỢP ĐỒNG MỤC TIÊU · API 3.0.0-draft
| Thuộc tính | Giá trị |
|---|---|
| Chủ sở hữu kỹ thuật | Dịch vụ kho |
| Quyền ứng dụng | disposition:write |
| HTTP | 202 |
| Xử lý lời gọi | Tác vụ bất đồng bộ: xem schema Job và trạng thái tài nguyên kết quả. |
| Sự kiện | DispositionRequested |
Đối chiếu khóa và nội dung; kiểm tra kết quả trước khi tạo yêu cầu mới.
curl --fail-with-body --request POST \
"${BASE_URL%/}/v1/archives/${ARCHIVE_ID}/dispositions" \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "X-Correlation-ID: ${CORRELATION_ID}" \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY}" \
--header "Content-Type: application/json" \
--data-binary "@${REQUEST_FILE}"{
"scope": "PAYLOAD",
"approvalId": "approval-test-004",
"reason": "Synthetic expiry test"
}{
"jobId": "job-disposition-001",
"state": "QUEUED",
"resourceId": "arc-test-001",
"correlationId": "corr-test-001",
"pollAfterSeconds": 2
}{
"type": "object",
"properties": {
"scope": {
"type": "string",
"enum": [
"PAYLOAD",
"EVIDENCE",
"BOTH"
]
},
"approvalId": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": [
"scope",
"approvalId",
"reason"
],
"additionalProperties": false,
"examples": [
{
"scope": "PAYLOAD",
"approvalId": "approval-test-004",
"reason": "Synthetic expiry test"
}
]
}{
"type": "https://example.invalid/problems/archive-key-conflict",
"title": "Archive Key Conflict",
"code": "ARCHIVE_KEY_CONFLICT",
"detail": "Idempotency key conflicts with another payload.",
"correlationId": "corr-test-001",
"requestId": "req-test-001",
"retryable": false,
"service": "Storage Service",
"timestamp": "2026-10-15T05:00:01Z",
"errors": [],
"status": 409,
"instance": "urn:ltans:request:req-test-001"
}Bước tiếp theo
