web/website/api/openapi-v1.json

1458 lines
42 KiB
JSON

{
"openapi": "3.1.0",
"info": {
"title": "DuneRealms private API",
"version": "1.0.0-initial",
"description": "Additive, default-off, session-authenticated read API for the MC main baseline. No financial, privileged, entitlement or delivery mutations are exposed. Maintainer reconciliation with deployed source is required before rollout."
},
"servers": [
{
"url": "https://cp.dunerealms.com/api/v1",
"description": "Proposed canonical mount; not deployed"
}
],
"security": [
{
"centralSession": []
}
],
"paths": {
"/me": {
"get": {
"operationId": "getOwnAccount",
"summary": "Current website account",
"description": "Current website account; no cross-account selector.",
"responses": {
"200": {
"description": "Read completed.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Account"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid or duplicate query parameters.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Central session absent, invalid, expired or revoked.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Cross-origin access or unsupported Authorization header.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Unknown endpoint, or API disabled.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"405": {
"description": "Read-only endpoint; Allow: GET.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Conservative process/global or account rate limit; retry in 60 seconds.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
},
"Retry-After": {
"schema": {
"const": "60"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"503": {
"description": "Dependency, invalid upstream data or audit sink unavailable.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/me/minecraft": {
"get": {
"operationId": "getVerifiedMinecraftIdentity",
"summary": "Current account verified link only",
"description": "Current account verified link only; unverified display-profile names are never proof of ownership.",
"responses": {
"200": {
"description": "Read completed.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Minecraft"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid or duplicate query parameters.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Central session absent, invalid, expired or revoked.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Cross-origin access or unsupported Authorization header.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Unknown endpoint, or API disabled.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"405": {
"description": "Read-only endpoint; Allow: GET.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Conservative process/global or account rate limit; retry in 60 seconds.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
},
"Retry-After": {
"schema": {
"const": "60"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"503": {
"description": "Dependency, invalid upstream data or audit sink unavailable.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/me/permissions": {
"get": {
"operationId": "getOwnPermissions",
"summary": "Existing effective permission nodes, for information only",
"description": "Existing effective permission nodes, for information only; never grants staff, appeals or game powers.",
"responses": {
"200": {
"description": "Read completed.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Permissions"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid or duplicate query parameters.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Central session absent, invalid, expired or revoked.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Cross-origin access or unsupported Authorization header.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Unknown endpoint, or API disabled.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"405": {
"description": "Read-only endpoint; Allow: GET.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Conservative process/global or account rate limit; retry in 60 seconds.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
},
"Retry-After": {
"schema": {
"const": "60"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"503": {
"description": "Dependency, invalid upstream data or audit sink unavailable.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/servers": {
"get": {
"operationId": "getServerStatus",
"summary": "Sanitized public world status behind session authentication, without console, addresses or administrative operations. Missing or stale monitor data is explicitly unknown.",
"description": "Sanitized public world status behind session authentication, without console, addresses or administrative operations. Missing or stale monitor data is explicitly unknown.",
"responses": {
"200": {
"description": "Read completed.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Status"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid or duplicate query parameters.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Central session absent, invalid, expired or revoked.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Cross-origin access or unsupported Authorization header.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Unknown endpoint, or API disabled.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"405": {
"description": "Read-only endpoint; Allow: GET.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Conservative process/global or account rate limit; retry in 60 seconds.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
},
"Retry-After": {
"schema": {
"const": "60"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"503": {
"description": "Dependency, invalid upstream data or audit sink unavailable.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/catalogue": {
"get": {
"operationId": "getExchangeCatalogue",
"summary": "Read-only native exchange catalogue, not kit catalogue or website perks. Live keyset pagination by descending immutable listing ID within the existing 500-row bridge window. Prices and IDs are strings. Concurrent native changes may remove rows",
"description": "Read-only native exchange catalogue, not kit catalogue or website perks. Live keyset pagination by descending immutable listing ID within the existing 500-row bridge window. Prices and IDs are strings. Concurrent native changes may remove rows; this is not snapshot isolation.",
"responses": {
"200": {
"description": "Read completed.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Catalogue"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid or duplicate query parameters.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Central session absent, invalid, expired or revoked.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Cross-origin access or unsupported Authorization header.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Unknown endpoint, or API disabled.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"405": {
"description": "Read-only endpoint; Allow: GET.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Conservative process/global or account rate limit; retry in 60 seconds.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
},
"Retry-After": {
"schema": {
"const": "60"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"503": {
"description": "Dependency, invalid upstream data or audit sink unavailable.",
"headers": {
"X-Request-ID": {
"schema": {
"type": "string",
"format": "uuid"
},
"description": "Server-generated correlation ID."
},
"Cache-Control": {
"schema": {
"const": "private, no-store"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"parameters": [
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 20
},
"description": "Canonical decimal integer, no leading zeroes."
},
{
"name": "before",
"in": "query",
"schema": {
"type": "string",
"pattern": "^[1-9][0-9]{0,18}$"
},
"description": "Exclusive listing ID cursor from nextCursor; at most signed 64-bit maximum."
}
]
}
}
},
"components": {
"securitySchemes": {
"centralSession": {
"type": "apiKey",
"in": "cookie",
"name": "__Host-dune_session",
"description": "Existing central website session, HttpOnly Secure SameSite=Lax. Sign in through existing central login. No new password or service-token login."
}
},
"schemas": {
"Error": {
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"not_found",
"unauthenticated",
"rate_limited",
"credential_not_supported",
"origin_rejected",
"method_not_allowed",
"invalid_query",
"service_unavailable",
"audit_unavailable"
]
},
"message": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
}
},
"required": [
"code",
"message",
"requestId"
],
"additionalProperties": false
}
},
"required": [
"error"
],
"additionalProperties": false
},
"Meta": {
"type": "object",
"properties": {
"requestId": {
"type": "string",
"format": "uuid"
}
},
"required": [
"requestId"
],
"additionalProperties": false
},
"Account": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"username": {
"type": "string"
},
"displayName": {
"type": "string"
}
},
"required": [
"id",
"username",
"displayName"
],
"additionalProperties": false
},
"Minecraft": {
"type": "object",
"properties": {
"linked": {
"type": "boolean"
},
"identity": {
"anyOf": [
{
"type": "object",
"properties": {
"uuid": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"linkedAt": {
"type": "integer",
"description": "Unix milliseconds"
},
"firstLinkedAt": {
"type": "integer",
"description": "Unix milliseconds; retained across relinking"
}
},
"required": [
"uuid",
"name",
"linkedAt",
"firstLinkedAt"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"linked",
"identity"
],
"additionalProperties": false
},
"Permissions": {
"type": "object",
"properties": {
"rank": {
"type": "string"
},
"label": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
}
},
"scopeModel": {
"const": "legacy-effective-nodes",
"description": "Informational existing resolver output. No department/server scoping is inferred; this response is not an authorization credential."
}
},
"required": [
"rank",
"label",
"permissions",
"scopeModel"
],
"additionalProperties": false
},
"Server": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"state": {
"enum": [
"unknown",
"online",
"offline"
]
},
"configured": {
"type": "boolean"
},
"players": {
"type": "integer",
"minimum": 0
}
},
"required": [
"id",
"name",
"state"
],
"additionalProperties": false
},
"Status": {
"type": "object",
"properties": {
"checkedAt": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"available": {
"type": "boolean"
},
"servers": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Server"
}
}
},
"required": [
"checkedAt",
"available",
"servers"
],
"additionalProperties": false
},
"Listing": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[1-9][0-9]{0,18}$"
},
"material": {
"type": "string"
},
"category": {
"type": "string"
},
"origin": {
"type": "string"
},
"seller": {
"type": "string"
},
"quantity": {
"type": "integer",
"minimum": 1
},
"unitPrice": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,2})?$",
"description": "Exact native price as a decimal string. Currency semantics remain with the native exchange; no conversion to a website wallet."
}
},
"required": [
"id",
"material",
"category",
"origin",
"seller",
"quantity",
"unitPrice"
],
"additionalProperties": false
},
"Catalogue": {
"type": "object",
"properties": {
"kind": {
"const": "game-exchange"
},
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Listing"
}
},
"pagination": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"hasMore": {
"type": "boolean"
},
"sourceWindow": {
"const": 500
},
"sourceLimited": {
"type": "boolean",
"description": "True at the 500-row upstream cap. Pagination covers this bounded live window only, not a complete historical snapshot."
}
},
"required": [
"limit",
"nextCursor",
"hasMore",
"sourceWindow",
"sourceLimited"
],
"additionalProperties": false
}
},
"required": [
"kind",
"items",
"pagination"
],
"additionalProperties": false
}
}
}
}