---
title: SpaceCorps Hangar REST API & Developer Documentation
description: Complete technical reference for the SpaceCorps Hangar REST API, endpoints, schemas, authentication, rate limits, and client SDKs.
canonical: https://hangar.sliplane.app/docs.md
last-updated: 2026-09-28
---

# SpaceCorps Hangar REST API & Developer Documentation

Welcome to the comprehensive technical documentation for SpaceCorps Hangar. SpaceCorps Hangar is the open distribution and management platform for high-performance games, developer tools, and scientific simulation software.

---

## 1. Architecture & Protocol Standards

SpaceCorps Hangar is designed for both human developers and autonomous AI agents:

- **Protocol Version:** REST API v1 (`/api/v1`)
- **OpenAPI Specification:** [https://hangar.sliplane.app/openapi.json](https://hangar.sliplane.app/openapi.json) (OpenAPI 3.1.0)
- **Model Context Protocol (MCP):** [https://hangar.sliplane.app/mcp](https://hangar.sliplane.app/mcp) (Streamable HTTP / SSE)
- **NLWeb Query Interface:** [https://hangar.sliplane.app/ask](https://hangar.sliplane.app/ask)
- **RFC 9727 API Catalog:** [https://hangar.sliplane.app/.well-known/api-catalog](https://hangar.sliplane.app/.well-known/api-catalog)
- **Agent Skills Discovery:** [https://hangar.sliplane.app/.well-known/agent-skills/index.json](https://hangar.sliplane.app/.well-known/agent-skills/index.json)
- **Authentication Standard:** WorkOS RFC compliant [`auth.md`](https://hangar.sliplane.app/auth.md)

---

## 2. Base URLs & Environments

| Environment            | Base URL                                     | Purpose                                                   |
| :--------------------- | :------------------------------------------- | :-------------------------------------------------------- |
| **Production Store**   | `https://hangar.sliplane.app/api/v1`         | Public web proxy with global caching and CDN acceleration |
| **Direct Backend API** | `https://hangar-api.sliplane.app/api/v1`     | Low-latency direct API cluster                            |
| **Agent Sandbox**      | `https://hangar.sliplane.app/sandbox/api/v1` | Isolated mock execution environment for automated agents  |
| **Local Development**  | `http://localhost:8480/api/v1`               | Local Docker and Cargo test instances                     |

---

## 3. Authentication & API Keys

SpaceCorps Hangar provides automated, frictionless authentication for both human users and AI agents:

### Pre-Provisioned Agent Tokens

- **Production Community Key:** `Bearer sc_live_instant_agent_key_2027`
- **Sandbox Test Key:** `Bearer sc_sandbox_live_automated_agent_key_2027`
- **Header:** `Authorization: Bearer <token>`

### Instant Self-Serve Keys

Generate programmatic API keys dynamically without forms or credit cards:

```bash
curl -sS https://hangar.sliplane.app/api/keys
```

**Response (200 OK):**

```json
{
  "status": "success",
  "key_generation": "self-serve",
  "self_serve": true,
  "free_tier": true,
  "api_key": "sc_sandbox_live_automated_agent_key_2027",
  "tier": "unlimited_community",
  "expires_in": null,
  "message": "Self-serve API key provisioned automatically with zero friction for SpaceCorps Hangar."
}
```

---

## 4. Rate Limiting & Deprecation Headers

Every HTTP response contains RFC-compliant rate limit and lifecycle headers:

- `RateLimit-Limit`: Maximum requests per sliding window (1,000 requests / minute)
- `RateLimit-Remaining`: Remaining request quota in the active window
- `RateLimit-Reset`: Time in seconds until the quota resets
- `Deprecation`: Deprecation announcement timestamp or `@0` for active versions
- `Sunset`: Date after which the endpoint version will be sunsetted (`Wed, 31 Dec 2031 23:59:59 GMT`)

---

## 5. Endpoints Reference

### 5.1 System Health & Diagnostics

#### `GET /api/v1/health`

Verify node liveness, database connectivity, and backend storage status.

**Parameters:**

- `format` (query, optional): Output format specifier (`json` or `text`).

**Request Example:**

```bash
curl -sS https://hangar.sliplane.app/api/v1/health
```

**Response (200 OK):**

```json
{
  "status": "ok",
  "version": "1.0.0",
  "storage": "fs"
}
```

---

### 5.2 Product Catalog

#### `GET /api/v1/products`

Retrieve available games, software tools, and simulation engines.

**Parameters:**

- `channel` (query, optional): Filter by channel (`stable`, `beta`, `nightly`).
- `limit` (query, optional): Results per page (default: 50).

**Request Example:**

```bash
curl -sS -H "Authorization: Bearer sc_live_instant_agent_key_2027" \
  "https://hangar.sliplane.app/api/v1/products?channel=stable"
```

**Response (200 OK):**

```json
{
  "items": [
    {
      "id": "spacecorps-2027",
      "slug": "spacecorps-2027",
      "title": "SpaceCorps 2027",
      "kind": "game",
      "platforms": ["darwin-arm64", "darwin-x86_64", "win-x86_64", "linux-x86_64"],
      "summary": "Multiplayer tactical space combat and planetary exploration MMO."
    },
    {
      "id": "swindle",
      "slug": "swindle",
      "title": "Swindle",
      "kind": "game",
      "platforms": ["darwin-arm64"],
      "summary": "Cyberpunk debt negotiation and algorithmic trading simulation."
    }
  ],
  "next_cursor": null
}
```

#### `GET /api/v1/products/{id}`

Retrieve complete metadata, system requirements, and screenshots for a product.

**Request Example:**

```bash
curl -sS https://hangar.sliplane.app/api/v1/products/spacecorps-2027
```

---

### 5.3 Releases & Platform Downloads

#### `GET /api/v1/products/{id}/releases`

List published binary builds, installation packages, and cryptographic SHA-256 verification hashes.

**Request Example:**

```bash
curl -sS https://hangar.sliplane.app/api/v1/products/spacecorps-2027/releases
```

**Response (200 OK):**

```json
{
  "releases": [
    {
      "version": "0.4.0",
      "channel": "stable",
      "published_at": "2026-09-28T10:00:00Z",
      "platforms": {
        "darwin-arm64": {
          "file_name": "SpaceCorps2027-v0.4.0-arm64.dmg",
          "file_size": 248912800,
          "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
          "download_url": "https://hangar.sliplane.app/api/v1/files/spacecorps-2027/0.4.0/darwin-arm64"
        }
      }
    }
  ]
}
```

---

### 5.4 Natural Language Web (`/ask`)

#### `POST /ask` or `GET /ask`

Query the Hangar knowledge base, pilot codex, and catalog conversationally. Returns NLWeb Schema.org compliant structured data.

**Request Example:**

```bash
curl -sS -X POST -H "Content-Type: application/json" \
  -d '{"query": "What are the ship hulls in SpaceCorps 2027?"}' \
  https://hangar.sliplane.app/ask
```

**Response (200 OK):**

```json
{
  "_meta": {
    "protocol": "NLWeb/1.0",
    "version": "1.0",
    "query": "What are the ship hulls in SpaceCorps 2027?",
    "mode": "answer"
  },
  "answer": [
    {
      "@context": "https://schema.org",
      "@type": "Answer",
      "text": "SpaceCorps 2027 features four primary hulls: Protos, Kitefin, Ostirion, and Wraith.",
      "url": "https://hangar.sliplane.app/wiki.html"
    }
  ]
}
```

---

### 5.5 Model Context Protocol (MCP)

#### `POST /mcp`

Connect AI coding agents (Claude, ChatGPT, Gemini, Copilot) via JSON-RPC 2.0.

Supported methods:

- `initialize`: Protocol negotiation and server capabilities.
- `tools/list`: Expose available tools (`list_products`, `get_product_releases`, `get_server_health`, `query_pilot_codex`).
- `tools/call`: Invoke an operational tool.
- `resources/list`: Catalog JSON schemas and codex articles.
- `resources/read`: Fetch machine-readable resources.

**Request Example:**

```bash
curl -sS -X POST -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' \
  https://hangar.sliplane.app/mcp
```

---

## 6. Error Handling & Problem Details (RFC 7807)

All non-2xx responses return RFC 7807 structured JSON error payloads:

```json
{
  "type": "https://hangar.sliplane.app/docs.md#errors",
  "title": "Resource Not Found",
  "status": 404,
  "detail": "Product with slug 'unknown-game' does not exist in the active catalog.",
  "instance": "/api/v1/products/unknown-game"
}
```

---

## 7. SDKs & Client Libraries

- **Rust Crate:** `cargo add hangar-client`
- **Node/TypeScript:** `pnpm add @spacecorps/hangar-api-client`
- **CLI Utility:** `cargo install hangar-cli` or `curl -fsSL https://hangar.sliplane.app/cli/install.sh | sh`

---

## 8. Open Source Repository & Agent Platform Configurations

- **Official Repository**: [https://github.com/SpaceCorps/hangar](https://github.com/SpaceCorps/hangar)
- **Agent Platform Guidelines**: [https://github.com/SpaceCorps/hangar/blob/main/AGENTS.md](https://github.com/SpaceCorps/hangar/blob/main/AGENTS.md)
- **Agent Plugins Manifest**: [https://github.com/SpaceCorps/hangar/blob/main/plugin.json](https://github.com/SpaceCorps/hangar/blob/main/plugin.json)
- **Documentation MCP Server**: [https://hangar.sliplane.app/docs/mcp](https://hangar.sliplane.app/docs/mcp)
- **Documentation MCP Server Card**: [https://hangar.sliplane.app/docs/server.json](https://hangar.sliplane.app/docs/server.json)
