MOBILE-ID · TRUSTED LTANS
API gia hạn
Gửi quyết định gia hạn theo TIMESTAMP hoặc HASH_TREE; kiểm tra quyền dữ liệu, phê duyệt và kết quả tiếp nối.
Hai chế độ gia hạn
| Quyết định | Đầu vào | Kết quả |
|---|---|---|
| Gia hạn dấu thời gian | Bằng chứng trước; hàm băm cây còn phù hợp. | Dấu thời gian mới trong chuỗi phù hợp. |
| Gia hạn cây băm | Dữ liệu gốc và bằng chứng trước theo mô hình xử lý. | Băm lại, cây mới, dấu thời gian mới và chuỗi mới. |
Gia hạn cây băm yêu cầu truy cập dữ liệu đã lưu trữ và bằng chứng trước theo mô hình xử lý bản ghi bằng chứng áp dụ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/renewals
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ụ gia hạn |
| Quyền ứng dụng | renewals: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 | RenewalStarted |
Khôi phục quyền đọc dữ liệu gốc trước gia hạn cây băm.
curl --fail-with-body --request POST \
"${BASE_URL%/}/v1/renewals" \
--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}"{
"archiveId": "arc-test-001",
"evidenceVersion": 1,
"mode": "HASH_TREE",
"dataReference": "https://storage.example.invalid/test/object-001",
"approvalId": "approval-test-001",
"reason": "Scheduled synthetic test"
}{
"renewalId": "ren-test-001",
"archiveId": "arc-test-001",
"jobId": "job-test-002",
"mode": "HASH_TREE",
"state": "APPROVED"
}{
"type": "object",
"properties": {
"archiveId": {
"type": "string"
},
"evidenceVersion": {
"type": "integer",
"minimum": 1
},
"mode": {
"type": "string",
"enum": [
"TIMESTAMP",
"HASH_TREE"
]
},
"dataReference": {
"type": "string",
"format": "uri"
},
"approvalId": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": [
"archiveId",
"evidenceVersion",
"mode",
"reason"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"mode": {
"const": "HASH_TREE"
}
},
"required": [
"mode"
]
},
"then": {
"required": [
"dataReference",
"approvalId"
]
}
}
],
"examples": [
{
"archiveId": "arc-test-001",
"evidenceVersion": 1,
"mode": "HASH_TREE",
"dataReference": "https://storage.example.invalid/test/object-001",
"approvalId": "approval-test-001",
"reason": "Scheduled synthetic test"
}
]
}{
"type": "https://example.invalid/problems/renew-data-unavailable",
"title": "Renew Data Unavailable",
"code": "RENEW_DATA_UNAVAILABLE",
"detail": "Original bytes cannot be read.",
"correlationId": "corr-test-001",
"requestId": "req-test-001",
"retryable": false,
"service": "Renewal Service",
"timestamp": "2026-10-15T05:00:01Z",
"errors": [],
"status": 409,
"instance": "urn:ltans:request:req-test-001"
}GET/v1/renewals/{renewalId}
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ụ gia hạn |
| Quyền ứng dụng | renewals: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ộ |
Khôi phục quyền đọc dữ liệu gốc trước gia hạn cây băm.
curl --fail-with-body --request GET \
"${BASE_URL%/}/v1/renewals/${RENEWAL_ID}" \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "X-Correlation-ID: ${CORRELATION_ID}"{
"renewalId": "ren-test-001",
"archiveId": "arc-test-001",
"jobId": "job-test-002",
"mode": "HASH_TREE",
"state": "APPROVED"
}{
"type": "object",
"properties": {
"renewalId": {
"type": "string"
},
"archiveId": {
"type": "string"
},
"jobId": {
"type": "string"
},
"mode": {
"type": "string"
},
"state": {
"type": "string",
"enum": [
"DUE",
"ASSESSED",
"APPROVED",
"RUNNING",
"COMPLETED",
"BLOCKED_DATA_ACCESS",
"FAILED"
]
}
},
"required": [
"renewalId",
"archiveId",
"jobId",
"state"
],
"additionalProperties": false,
"examples": [
{
"renewalId": "ren-test-001",
"archiveId": "arc-test-001",
"jobId": "job-test-002",
"mode": "HASH_TREE",
"state": "APPROVED"
}
]
}{
"type": "https://example.invalid/problems/renew-data-unavailable",
"title": "Renew Data Unavailable",
"code": "RENEW_DATA_UNAVAILABLE",
"detail": "Original bytes cannot be read.",
"correlationId": "corr-test-001",
"requestId": "req-test-001",
"retryable": false,
"service": "Renewal Service",
"timestamp": "2026-10-15T05:00:01Z",
"errors": [],
"status": 409,
"instance": "urn:ltans:request:req-test-001"
}