Skip to main content

OPENAPI_V1

Constant OPENAPI_V1 

Source
pub const OPENAPI_V1: &str = "openapi: 3.1.0\ninfo:\n  title: Hyphae API\n  version: 0.1.0\n  description: >-\n    Stable version 1 HTTP contract for the autonomous Hyphae data engine.\n    Hyphae remains fully usable without starting this optional server.\n  license:\n    name: Apache-2.0\n    identifier: Apache-2.0\nx-hyphae-status: alpha\nx-hyphae-auth-policy: >-\n  Health and capability routes are public. Data and witness routes require a\n  bearer token whenever the server is configured with one. Non-loopback bind\n  is rejected unless a token is configured before bind.\nservers:\n  - url: http://127.0.0.1:8787\n    description: Default loopback-only listener\ntags:\n  - name: system\n  - name: data\n  - name: proofs\npaths:\n  /v1/capabilities:\n    get:\n      tags: [system]\n      operationId: getCapabilities\n      summary: Report implemented public capabilities and effective limits\n      responses:\n        \"200\":\n          description: Current capability set\n          headers:\n            X-Request-Id:\n              $ref: \"#/components/headers/RequestId\"\n          content:\n            application/json:\n              schema:\n                $ref: \"../json-schema/capabilities-v1.schema.json\"\n  /v1/health/live:\n    get:\n      tags: [system]\n      operationId: getLiveness\n      summary: Report process liveness without inspecting data\n      responses:\n        \"200\":\n          description: Process is live\n          headers:\n            X-Request-Id:\n              $ref: \"#/components/headers/RequestId\"\n          content:\n            application/json:\n              schema:\n                $ref: \"../json-schema/health-v1.schema.json\"\n  /v1/health/ready:\n    get:\n      tags: [system]\n      operationId: getReadiness\n      summary: Report whether the owned engine is ready for data operations\n      responses:\n        \"200\":\n          description: Process is ready\n          headers:\n            X-Request-Id:\n              $ref: \"#/components/headers/RequestId\"\n          content:\n            application/json:\n              schema:\n                $ref: \"../json-schema/health-v1.schema.json\"\n        \"503\":\n          $ref: \"#/components/responses/Unavailable\"\n  /v1/kv/put:\n    post:\n      tags: [data]\n      operationId: putRecords\n      summary: Atomically commit one or more structured records\n      security:\n        - BearerAuth: []\n        - {}\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: \"../json-schema/put-request-v1.schema.json\"\n      responses:\n        \"200\":\n          description: New commit or exact idempotent retry\n          headers:\n            X-Request-Id:\n              $ref: \"#/components/headers/RequestId\"\n          content:\n            application/json:\n              schema:\n                $ref: \"../json-schema/commit-receipt-v1.schema.json\"\n        \"400\":\n          $ref: \"#/components/responses/InvalidRequest\"\n        \"401\":\n          $ref: \"#/components/responses/Unauthorized\"\n        \"408\":\n          $ref: \"#/components/responses/Timeout\"\n        \"409\":\n          $ref: \"#/components/responses/Conflict\"\n        \"413\":\n          $ref: \"#/components/responses/PayloadTooLarge\"\n        \"415\":\n          $ref: \"#/components/responses/UnsupportedMediaType\"\n        \"422\":\n          $ref: \"#/components/responses/LimitExceeded\"\n        \"429\":\n          $ref: \"#/components/responses/Busy\"\n        \"500\":\n          $ref: \"#/components/responses/Internal\"\n        \"503\":\n          $ref: \"#/components/responses/Unavailable\"\n  /v1/kv/delete:\n    post:\n      tags: [data]\n      operationId: deleteRecords\n      summary: Atomically delete one or more binary keys\n      security:\n        - BearerAuth: []\n        - {}\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: \"../json-schema/delete-request-v1.schema.json\"\n      responses:\n        \"200\":\n          description: New commit or exact idempotent retry\n          headers:\n            X-Request-Id:\n              $ref: \"#/components/headers/RequestId\"\n          content:\n            application/json:\n              schema:\n                $ref: \"../json-schema/commit-receipt-v1.schema.json\"\n        \"400\":\n          $ref: \"#/components/responses/InvalidRequest\"\n        \"401\":\n          $ref: \"#/components/responses/Unauthorized\"\n        \"408\":\n          $ref: \"#/components/responses/Timeout\"\n        \"409\":\n          $ref: \"#/components/responses/Conflict\"\n        \"413\":\n          $ref: \"#/components/responses/PayloadTooLarge\"\n        \"415\":\n          $ref: \"#/components/responses/UnsupportedMediaType\"\n        \"422\":\n          $ref: \"#/components/responses/LimitExceeded\"\n        \"429\":\n          $ref: \"#/components/responses/Busy\"\n        \"500\":\n          $ref: \"#/components/responses/Internal\"\n        \"503\":\n          $ref: \"#/components/responses/Unavailable\"\n  /v1/kv/get:\n    post:\n      tags: [data, proofs]\n      operationId: getRecord\n      summary: Resolve exact key presence with a portable offline proof\n      security:\n        - BearerAuth: []\n        - {}\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: \"../json-schema/get-request-v1.schema.json\"\n      responses:\n        \"200\":\n          description: Proven presence or absence at one checkpoint\n          headers:\n            X-Request-Id:\n              $ref: \"#/components/headers/RequestId\"\n          content:\n            application/json:\n              schema:\n                $ref: \"../json-schema/get-response-v1.schema.json\"\n        \"400\":\n          $ref: \"#/components/responses/InvalidRequest\"\n        \"401\":\n          $ref: \"#/components/responses/Unauthorized\"\n        \"408\":\n          $ref: \"#/components/responses/Timeout\"\n        \"413\":\n          $ref: \"#/components/responses/PayloadTooLarge\"\n        \"415\":\n          $ref: \"#/components/responses/UnsupportedMediaType\"\n        \"422\":\n          $ref: \"#/components/responses/LimitExceeded\"\n        \"429\":\n          $ref: \"#/components/responses/Busy\"\n        \"500\":\n          $ref: \"#/components/responses/Internal\"\n        \"503\":\n          $ref: \"#/components/responses/Unavailable\"\n  /v1/query:\n    post:\n      tags: [data, proofs]\n      operationId: queryRecords\n      summary: Execute a deterministic structured query with an offline proof\n      security:\n        - BearerAuth: []\n        - {}\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: \"../json-schema/query-request-v1.schema.json\"\n      responses:\n        \"200\":\n          description: Complete bounded query page and proof\n          headers:\n            X-Request-Id:\n              $ref: \"#/components/headers/RequestId\"\n          content:\n            application/json:\n              schema:\n                $ref: \"../json-schema/query-response-v1.schema.json\"\n        \"400\":\n          $ref: \"#/components/responses/InvalidRequest\"\n        \"401\":\n          $ref: \"#/components/responses/Unauthorized\"\n        \"408\":\n          $ref: \"#/components/responses/Timeout\"\n        \"413\":\n          $ref: \"#/components/responses/PayloadTooLarge\"\n        \"415\":\n          $ref: \"#/components/responses/UnsupportedMediaType\"\n        \"422\":\n          $ref: \"#/components/responses/LimitExceeded\"\n        \"429\":\n          $ref: \"#/components/responses/Busy\"\n        \"500\":\n          $ref: \"#/components/responses/Internal\"\n        \"503\":\n          $ref: \"#/components/responses/Unavailable\"\n  /v1/witnesses/{checkpoint_sequence}/{snapshot_digest}:\n    get:\n      tags: [proofs]\n      operationId: downloadWitness\n      summary: Download the exact canonical snapshot required by a result proof\n      security:\n        - BearerAuth: []\n        - {}\n      parameters:\n        - name: checkpoint_sequence\n          in: path\n          required: true\n          schema:\n            type: integer\n            format: uint64\n            minimum: 0\n        - name: snapshot_digest\n          in: path\n          required: true\n          schema:\n            type: string\n            pattern: \"^[0-9a-f]{64}$\"\n      responses:\n        \"200\":\n          description: Verified canonical logical snapshot file\n          headers:\n            X-Request-Id:\n              $ref: \"#/components/headers/RequestId\"\n            Digest:\n              description: \"blake3= followed by the lowercase snapshot digest\"\n              schema:\n                type: string\n          content:\n            application/octet-stream:\n              schema:\n                type: string\n                format: binary\n        \"400\":\n          $ref: \"#/components/responses/InvalidRequest\"\n        \"401\":\n          $ref: \"#/components/responses/Unauthorized\"\n        \"404\":\n          $ref: \"#/components/responses/NotFound\"\n        \"429\":\n          $ref: \"#/components/responses/Busy\"\n        \"500\":\n          $ref: \"#/components/responses/Internal\"\ncomponents:\n  securitySchemes:\n    BearerAuth:\n      type: http\n      scheme: bearer\n      bearerFormat: opaque\n      description: Optional on loopback; mandatory for every non-loopback bind.\n  headers:\n    RequestId:\n      description: Unique UUID request correlation identifier.\n      required: true\n      schema:\n        type: string\n        format: uuid\n  schemas:\n    Error:\n      $ref: \"../json-schema/error-v1.schema.json\"\n  responses:\n    InvalidRequest:\n      description: Malformed JSON, unknown field, invalid value, or invalid key\n      headers:\n        X-Request-Id:\n          $ref: \"#/components/headers/RequestId\"\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Error\"\n    Unauthorized:\n      description: Missing or incorrect configured bearer credential\n      headers:\n        X-Request-Id:\n          $ref: \"#/components/headers/RequestId\"\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Error\"\n    Conflict:\n      description: Idempotency UUID was committed previously with different contents\n      headers:\n        X-Request-Id:\n          $ref: \"#/components/headers/RequestId\"\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Error\"\n    Timeout:\n      description: Request-body or cooperative query deadline elapsed with no partial result\n      headers:\n        X-Request-Id:\n          $ref: \"#/components/headers/RequestId\"\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Error\"\n    PayloadTooLarge:\n      description: Request or result byte budget exceeded\n      headers:\n        X-Request-Id:\n          $ref: \"#/components/headers/RequestId\"\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Error\"\n    UnsupportedMediaType:\n      description: Request content type is not JSON\n      headers:\n        X-Request-Id:\n          $ref: \"#/components/headers/RequestId\"\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Error\"\n    LimitExceeded:\n      description: Batch, shape, work, result, proof, or witness policy exceeded\n      headers:\n        X-Request-Id:\n          $ref: \"#/components/headers/RequestId\"\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Error\"\n    Busy:\n      description: Concurrent operation admission limit reached\n      headers:\n        Retry-After:\n          description: Minimum suggested retry delay in seconds\n          schema:\n            type: integer\n            minimum: 1\n        X-Request-Id:\n          $ref: \"#/components/headers/RequestId\"\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Error\"\n    NotFound:\n      description: Requested proof witness does not exist\n      headers:\n        X-Request-Id:\n          $ref: \"#/components/headers/RequestId\"\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Error\"\n    Unavailable:\n      description: Owned engine is not ready\n      headers:\n        X-Request-Id:\n          $ref: \"#/components/headers/RequestId\"\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Error\"\n    Internal:\n      description: Internal failure with implementation details withheld\n      headers:\n        X-Request-Id:\n          $ref: \"#/components/headers/RequestId\"\n      content:\n        application/json:\n          schema:\n            $ref: \"#/components/schemas/Error\"\n";
Expand description

OpenAPI 3.1 document for HTTP API version 1.