Privacy
由 openapi.json 自动生成的 14 个端点及其请求、响应和权限元数据。
此参考由已发布 API 契约生成。字段、请求头和权限要求如下。
下载完整 OpenAPI 文档 · SHA-256: ccaa20cec11fad96e369b88073ce3608a5b071ce55d6dc03fa31df7b0f08c525
标识符和数据结构与公开契约一致,说明直接给出调用规则。共享模型见 数据模型.
PUT /api/v1/admin/privacy/policy
PUT /api/v1/admin/privacy/policy
{
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"cooling_off_days": {
"maximum": 90,
"minimum": 1,
"type": "integer"
},
"version": {
"minimum": 1,
"type": "integer"
}
},
"required": [
"cooling_off_days",
"version"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"cooling_off_days": {
"type": "integer"
},
"version": {
"type": "integer"
}
},
"required": [
"cooling_off_days",
"version"
],
"type": "object"
}
}
},
"description": "Success"
}
},
"tags": [
"Privacy"
],
"x-audit": "ops.privacy.policy",
"x-body": "json",
"x-body-limit": 4096,
"x-idempotency": "required",
"x-permission": "ops.privacy.manage",
"x-rate-limit": "ops.retention.admin",
"x-reauth": true,
"effectiveSecurity": []
}GET /api/v1/admin/retention
GET /api/v1/admin/retention
{
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"items": {
"items": {
"properties": {
"category": {
"enum": [
"raw_traffic",
"daily_aggregates",
"business_audit",
"admin_audit",
"job_records",
"runtime_files",
"export_files",
"notification_records",
"access_logs"
],
"type": "string"
},
"days": {
"type": "integer"
},
"version": {
"type": "integer"
}
},
"required": [
"category",
"days",
"version"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"items"
],
"type": "object"
}
}
},
"description": "Success"
}
},
"tags": [
"Privacy"
],
"x-audit": "ops.retention.read",
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "none",
"x-permission": "ops.privacy.manage",
"x-rate-limit": "ops.retention.admin",
"x-reauth": false,
"effectiveSecurity": []
}GET /api/v1/admin/retention/runs
GET /api/v1/admin/retention/runs
{
"parameters": [
{
"in": "query",
"name": "before_id",
"required": false,
"schema": {
"pattern": "^\\d+$",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"items": {
"items": {
"properties": {
"category": {
"enum": [
"raw_traffic",
"daily_aggregates",
"business_audit",
"admin_audit",
"job_records",
"runtime_files",
"export_files",
"notification_records",
"access_logs"
],
"type": "string"
},
"created_at": {
"type": "string"
},
"cutoff_at": {
"type": "string"
},
"id": {
"type": "string"
},
"removed": {
"type": "integer"
},
"status": {
"enum": [
"completed",
"held",
"integration_pending"
],
"type": "string"
}
},
"required": [
"id",
"category",
"cutoff_at",
"removed",
"status",
"created_at"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"items"
],
"type": "object"
}
}
},
"description": "Success"
}
},
"tags": [
"Privacy"
],
"x-audit": "ops.retention.history",
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "none",
"x-permission": "ops.privacy.manage",
"x-rate-limit": "ops.retention.admin",
"x-reauth": false,
"effectiveSecurity": []
}PUT /api/v1/admin/retention/{category}
PUT /api/v1/admin/retention/{category}
{
"parameters": [
{
"in": "path",
"name": "category",
"required": true,
"schema": {
"enum": [
"raw_traffic",
"daily_aggregates",
"business_audit",
"admin_audit",
"job_records",
"runtime_files",
"export_files",
"notification_records",
"access_logs"
],
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"days": {
"maximum": 3650,
"minimum": 1,
"type": "integer"
},
"reason": {
"maxLength": 500,
"minLength": 1,
"type": "string"
},
"version": {
"minimum": 1,
"type": "integer"
}
},
"required": [
"days",
"version",
"reason"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"category": {
"enum": [
"raw_traffic",
"daily_aggregates",
"business_audit",
"admin_audit",
"job_records",
"runtime_files",
"export_files",
"notification_records",
"access_logs"
],
"type": "string"
},
"days": {
"type": "integer"
},
"version": {
"type": "integer"
}
},
"required": [
"category",
"days",
"version"
],
"type": "object"
}
}
},
"description": "Success"
}
},
"tags": [
"Privacy"
],
"x-audit": "ops.retention.update",
"x-body": "json",
"x-body-limit": 4096,
"x-idempotency": "required",
"x-permission": "ops.privacy.manage",
"x-rate-limit": "ops.retention.admin",
"x-reauth": true,
"effectiveSecurity": []
}GET /api/v1/admin/users/{userId}/privacy
GET /api/v1/admin/users/{userId}/privacy
{
"parameters": [
{
"in": "path",
"name": "userId",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"anonymized": {
"type": "boolean"
},
"policy": {
"properties": {
"cooling_off_days": {
"type": "integer"
},
"version": {
"type": "integer"
}
},
"required": [
"cooling_off_days",
"version"
],
"type": "object"
},
"request": {
"properties": {
"blocked_reasons": {
"items": {
"type": "string"
},
"type": "array"
},
"completed_steps": {
"items": {
"type": "string"
},
"type": "array"
},
"cooling_off_until": {
"type": [
"string",
"null"
]
},
"id": {
"format": "uuid",
"type": "string"
},
"status": {
"type": "string"
},
"user_id": {
"format": "uuid",
"type": "string"
},
"version": {
"type": "integer"
}
},
"required": [
"id",
"user_id",
"status",
"cooling_off_until",
"completed_steps",
"blocked_reasons",
"version"
],
"type": [
"object",
"null"
]
},
"retention_hold": {
"type": "boolean"
},
"settlement": {
"properties": {
"balances": {
"properties": {
"cash_minor": {
"type": "string"
},
"commission_minor": {
"type": "string"
},
"commission_pending_minor": {
"type": "string"
},
"gift_minor": {
"type": "string"
}
},
"required": [
"cash_minor",
"gift_minor",
"commission_pending_minor",
"commission_minor"
],
"type": "object"
},
"blocked_reasons": {
"items": {
"type": "string"
},
"type": "array"
},
"can_forfeit": {
"type": "boolean"
},
"currency": {
"type": "string"
},
"version": {
"type": "integer"
}
},
"required": [
"blocked_reasons",
"currency",
"version",
"can_forfeit",
"balances"
],
"type": "object"
},
"status": {
"type": "string"
},
"version": {
"type": "integer"
}
},
"required": [
"status",
"retention_hold",
"anonymized",
"version",
"policy",
"request"
],
"type": "object"
}
}
},
"description": "Success"
}
},
"tags": [
"Privacy"
],
"x-audit": "ops.privacy.read",
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "none",
"x-permission": "ops.privacy.manage",
"x-rate-limit": "iam.privacy.user",
"x-reauth": false,
"effectiveSecurity": []
}POST /api/v1/admin/users/{userId}/privacy/cancel
POST /api/v1/admin/users/{userId}/privacy/cancel
{
"parameters": [
{
"in": "path",
"name": "userId",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Cancelled"
}
},
"tags": [
"Privacy"
],
"x-audit": "ops.privacy.cancel",
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "required",
"x-permission": "ops.privacy.manage",
"x-rate-limit": "iam.privacy.user",
"x-reauth": true,
"effectiveSecurity": []
}PUT /api/v1/admin/users/{userId}/privacy/hold
PUT /api/v1/admin/users/{userId}/privacy/hold
{
"parameters": [
{
"in": "path",
"name": "userId",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"reason": {
"maxLength": 500,
"minLength": 1,
"type": "string"
},
"retention_hold": {
"type": "boolean"
},
"version": {
"minimum": 1,
"type": "integer"
}
},
"required": [
"retention_hold",
"version",
"reason"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"retention_hold": {
"type": "boolean"
},
"version": {
"type": "integer"
}
},
"required": [
"retention_hold",
"version"
],
"type": "object"
}
}
},
"description": "Success"
}
},
"tags": [
"Privacy"
],
"x-audit": "ops.privacy.hold",
"x-body": "json",
"x-body-limit": 4096,
"x-idempotency": "required",
"x-permission": "ops.privacy.manage",
"x-rate-limit": "iam.privacy.user",
"x-reauth": true,
"effectiveSecurity": []
}GET /api/v1/me/privacy
GET /api/v1/me/privacy
{
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"anonymized": {
"type": "boolean"
},
"policy": {
"properties": {
"cooling_off_days": {
"type": "integer"
},
"version": {
"type": "integer"
}
},
"required": [
"cooling_off_days",
"version"
],
"type": "object"
},
"request": {
"properties": {
"blocked_reasons": {
"items": {
"type": "string"
},
"type": "array"
},
"completed_steps": {
"items": {
"type": "string"
},
"type": "array"
},
"cooling_off_until": {
"type": [
"string",
"null"
]
},
"id": {
"format": "uuid",
"type": "string"
},
"status": {
"type": "string"
},
"user_id": {
"format": "uuid",
"type": "string"
},
"version": {
"type": "integer"
}
},
"required": [
"id",
"user_id",
"status",
"cooling_off_until",
"completed_steps",
"blocked_reasons",
"version"
],
"type": [
"object",
"null"
]
},
"retention_hold": {
"type": "boolean"
},
"settlement": {
"properties": {
"balances": {
"properties": {
"cash_minor": {
"type": "string"
},
"commission_minor": {
"type": "string"
},
"commission_pending_minor": {
"type": "string"
},
"gift_minor": {
"type": "string"
}
},
"required": [
"cash_minor",
"gift_minor",
"commission_pending_minor",
"commission_minor"
],
"type": "object"
},
"blocked_reasons": {
"items": {
"type": "string"
},
"type": "array"
},
"can_forfeit": {
"type": "boolean"
},
"currency": {
"type": "string"
},
"version": {
"type": "integer"
}
},
"required": [
"blocked_reasons",
"currency",
"version",
"can_forfeit",
"balances"
],
"type": "object"
},
"status": {
"type": "string"
},
"version": {
"type": "integer"
}
},
"required": [
"status",
"retention_hold",
"anonymized",
"version",
"policy",
"request"
],
"type": "object"
}
}
},
"description": "Success"
}
},
"tags": [
"Privacy"
],
"x-audit": "iam.privacy.read",
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "none",
"x-rate-limit": "iam.privacy.user",
"x-reauth": false,
"effectiveSecurity": []
}POST /api/v1/me/privacy/cancel
POST /api/v1/me/privacy/cancel
{
"responses": {
"204": {
"description": "Cancelled; old sessions and credentials stay revoked"
}
},
"tags": [
"Privacy"
],
"x-audit": "iam.privacy.cancel",
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "required",
"x-rate-limit": "iam.privacy.user",
"x-reauth": true,
"effectiveSecurity": []
}POST /api/v1/me/privacy/deactivate
POST /api/v1/me/privacy/deactivate
{
"responses": {
"202": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}
}
},
"description": "Success"
}
},
"tags": [
"Privacy"
],
"x-audit": "iam.privacy.deactivate",
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "required",
"x-rate-limit": "iam.privacy.user",
"x-reauth": true,
"effectiveSecurity": []
}POST /api/v1/me/privacy/export
POST /api/v1/me/privacy/export
{
"responses": {
"202": {
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}
}
},
"description": "Success"
}
},
"tags": [
"Privacy"
],
"x-audit": "ops.privacy.export",
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "required",
"x-rate-limit": "iam.privacy.user",
"x-reauth": true,
"effectiveSecurity": []
}GET /api/v1/me/privacy/export/{id}
GET /api/v1/me/privacy/export/{id}
{
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"expires_at": {
"type": "string"
},
"id": {
"format": "uuid",
"type": "string"
},
"status": {
"enum": [
"pending",
"ready",
"failed",
"expired"
],
"type": "string"
}
},
"required": [
"id",
"status",
"expires_at"
],
"type": "object"
}
}
},
"description": "Success"
}
},
"tags": [
"Privacy"
],
"x-audit": "ops.privacy.export_read",
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "none",
"x-rate-limit": "iam.privacy.user",
"x-reauth": false,
"effectiveSecurity": []
}GET /api/v1/me/privacy/export/{id}/download
GET /api/v1/me/privacy/export/{id}/download
{
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/octet-stream": {
"schema": {
"format": "binary",
"type": "string"
}
}
},
"description": "Private JSON export"
}
},
"tags": [
"Privacy"
],
"x-audit": "ops.privacy.download",
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "none",
"x-rate-limit": "iam.privacy.user",
"x-reauth": false,
"effectiveSecurity": []
}POST /api/v1/me/privacy/forfeit
POST /api/v1/me/privacy/forfeit
{
"parameters": [
{
"description": "Resource ETag; missing 428, malformed 412, stale 409.",
"in": "header",
"name": "If-Match",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"confirm": {
"enum": [
true
],
"type": "boolean"
}
},
"required": [
"confirm"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"version": {
"type": "integer"
}
},
"required": [
"version"
],
"type": "object"
}
}
},
"description": "Success",
"headers": {
"ETag": {
"description": "Current resource version for If-Match.",
"schema": {
"type": "string"
}
}
}
}
},
"tags": [
"Privacy"
],
"x-audit": "iam.privacy.forfeit",
"x-body": "json",
"x-body-limit": 1024,
"x-concurrency": {
"etag": true,
"ifMatch": true
},
"x-idempotency": "required",
"x-rate-limit": "iam.privacy.user",
"x-reauth": true,
"effectiveSecurity": []
}