{
  "openapi": "3.1.0",
  "info": {
    "title": "Hybrid Arena / CS2 provider integration target",
    "version": "1.0.0",
    "description": "Versioned implementation target plus runnable local contract sandbox. Not deployed production write APIs; do not send private rosters to hybrid-arena.com. See README for exact activation gates."
  },
  "security": [
    {
      "SourceSignature": []
    }
  ],
  "components": {
    "securitySchemes": {
      "SourceSignature": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Arena-Signature",
        "description": "HMAC-SHA256 over documented method/path/time/nonce/body digest. Also requires X-Arena-Key-Id, X-Arena-Timestamp, X-Arena-Nonce. Separate keys in each direction; never a browser cookie or Hybrid-ID token."
      }
    }
  },
  "x-production-writes-available": false,
  "servers": [
    {
      "url": "http://127.0.0.1:4313",
      "description": "Local provider contract simulator; replace only with agreed private staging origin"
    }
  ],
  "paths": {
    "/v1/allocations": {
      "post": {
        "operationId": "createAllocation",
        "summary": "createAllocation",
        "security": [
          {
            "SourceSignature": []
          }
        ],
        "responses": {
          "200": {
            "description": "Allocation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Allocation"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "405": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "./schemas.json#/$defs/CreateAllocation"
              }
            }
          }
        }
      }
    },
    "/v1/allocations/{allocation_id}": {
      "get": {
        "operationId": "getAllocation",
        "summary": "getAllocation",
        "security": [
          {
            "SourceSignature": []
          }
        ],
        "responses": {
          "200": {
            "description": "Allocation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Allocation"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "405": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "allocation_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          }
        }
      ]
    },
    "/v1/allocations/{allocation_id}/roster": {
      "put": {
        "operationId": "replaceRoster",
        "summary": "replaceRoster",
        "security": [
          {
            "SourceSignature": []
          }
        ],
        "responses": {
          "200": {
            "description": "Allocation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Allocation"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "405": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "./schemas.json#/$defs/ReplaceRoster"
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "allocation_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          }
        }
      ]
    },
    "/v1/allocations/{allocation_id}/start": {
      "post": {
        "operationId": "startAllocation",
        "summary": "startAllocation",
        "security": [
          {
            "SourceSignature": []
          }
        ],
        "responses": {
          "200": {
            "description": "Allocation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Allocation"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "405": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "./schemas.json#/$defs/Command"
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "allocation_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          }
        }
      ]
    },
    "/v1/allocations/{allocation_id}/cancel": {
      "post": {
        "operationId": "cancelAllocation",
        "summary": "cancelAllocation",
        "security": [
          {
            "SourceSignature": []
          }
        ],
        "responses": {
          "200": {
            "description": "Allocation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Allocation"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "405": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "413": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "422": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "./schemas.json#/$defs/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "./schemas.json#/$defs/Command"
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "allocation_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          }
        }
      ]
    }
  }
}
