Skip to content

Latest commit

 

History

History
147 lines (121 loc) · 3.85 KB

File metadata and controls

147 lines (121 loc) · 3.85 KB
title Quickstart
description Make your first authenticated call to the ResQ Tactical OS APIs in five minutes.

ResQ exposes two HTTPS APIs:

API Base URL Stack
Infrastructure API https://api.resq.software Rust + Axum
Coordination API https://coordination.resq.software TypeScript + Elysia
If you are running a self-hosted deployment, swap the base URLs above for your own. The request shapes are identical.

Steps

Hit `/health` on the Infrastructure API. No auth required.
<CodeGroup>
  ```bash curl
  curl https://api.resq.software/health
  ```

  ```ts TypeScript
  const res = await fetch("https://api.resq.software/health");
  console.log(await res.json());
  ```

  ```python Python
  import httpx
  print(httpx.get("https://api.resq.software/health").json())
  ```
</CodeGroup>

A healthy response looks like:

```json
{
  "status": "ok",
  "pinata": true,
  "gemini": true,
  "spoon_os": "0.1.0"
}
```
The Infrastructure API uses bearer JWTs. Trade credentials for a token at `POST /login`.
<CodeGroup>
  ```bash curl
  curl -X POST https://api.resq.software/login \
    -H "Content-Type: application/json" \
    -d '{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD"}'
  ```

  ```ts TypeScript
  const res = await fetch("https://api.resq.software/login", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ username, password }),
  });
  const { token, expires_at } = await res.json();
  ```
</CodeGroup>

The response carries a token and a Unix expiry:

```json
{
  "token": "eyJhbGciOi...",
  "expires_at": 1746345600
}
```

Store the token securely. See [Authentication](/authentication) for refresh
and rotation guidance.
Send the token as a `Bearer` header.
<CodeGroup>
  ```bash curl
  curl https://api.resq.software/evidence \
    -H "Authorization: Bearer $RESQ_TOKEN"
  ```

  ```ts TypeScript
  const res = await fetch("https://api.resq.software/evidence", {
    headers: { Authorization: `Bearer ${token}` },
  });
  ```
</CodeGroup>
The Coordination API exposes Prometheus metrics and Server-Sent Events for real-time fleet state.
```bash
curl -N https://coordination.resq.software/events
```

Each line is a JSON event: telemetry frames, mission state changes, and
HITL approvals.
Skip writing a client — install one of the official SDKs instead.
<CardGroup cols={2}>
  <Card title="TypeScript" icon="js" href="/sdks/typescript">
    `@resq-sw/http`, `@resq-sw/security`, UI components.
  </Card>
  <Card title="Python" icon="python" href="/sdks/python">
    `resq-mcp` (FastMCP server) and `resq-dsa`.
  </Card>
  <Card title="Rust" icon="rust" href="/sdks/rust">
    Unified `resq` CLI plus seven TUI tools.
  </Card>
  <Card title=".NET" icon="hashtag" href="/sdks/dotnet">
    Typed clients, Protobuf contracts, sim harnesses.
  </Card>
</CardGroup>

Next

JWT lifecycle, scopes, and rotation. Error envelope and status codes. Every endpoint, request, and response.