Back to list
restspace

restspace-api

by restspace

The runtime code for Restspace, a modular API builder and integrator for web3 and web 2 that promotes reuse and interoperability

1🍴 2📅 Jan 23, 2026

SKILL.md


name: restspace-api description: Interact with Restspace Runtime servers. Use when you need to make HTTP requests to a Restspace instance for data, files, or other operations. Always discover services first via /.well-known/restspace/services. allowed-tools: Bash, Read

Restspace Runtime API

Interact with a running Restspace Runtime instance via HTTP.

Key Concept: Dynamic Service Discovery

Restspace has no fixed URLs except for the discovery endpoint. Services are mounted at configurable paths, so you must always discover services first before performing operations.

Configuration

VariableRequiredDescription
RESTSPACE_URLNoServer URL (default: http://localhost:3100)
RESTSPACE_EMAILYesLogin email address
RESTSPACE_PASSWORDYesLogin password

Workflow

Step 1: Discover Available Services (ALWAYS DO THIS FIRST)

IMPORTANT: Always use $RESTSPACE_URL directly. Do NOT use intermediate variable assignments like BASE_URL=... as they can cause shell expansion issues on Windows.

# Get raw JSON (recommended - avoids jq piping issues)
curl -s "$RESTSPACE_URL/.well-known/restspace/services"

# Optional: pretty print with jq if needed
curl -s "$RESTSPACE_URL/.well-known/restspace/services" | jq '.'

If RESTSPACE_URL is not set, it defaults to http://localhost:3100.

Response shows services with their paths and types:

{
  "/api/users": {
    "name": "User Data",
    "source": "./services/data.rsm.json",
    "apis": ["store"]
  },
  "/files": {
    "name": "File Storage",
    "source": "./services/file.rsm.json",
    "apis": ["store"]
  },
  "/auth": {
    "name": "Authentication",
    "source": "./services/auth.rsm.json",
    "apis": ["auth"]
  }
}

Step 2: Find Services by Type

# Find data services
curl -s "$RESTSPACE_URL/.well-known/restspace/services" | \
  jq 'to_entries | map(select(.value.source | contains("data.rsm"))) | .[] | {path: .key, name: .value.name}'

# Find file services
curl -s "$RESTSPACE_URL/.well-known/restspace/services" | \
  jq 'to_entries | map(select(.value.source | contains("file.rsm"))) | .[] | {path: .key, name: .value.name}'

# Find auth service
curl -s "$RESTSPACE_URL/.well-known/restspace/services" | \
  jq 'to_entries | map(select(.value.source | contains("auth.rsm"))) | .[] | {path: .key, name: .value.name}'

Step 3: Handle Multiple Services

If multiple services of the same type exist (e.g., multiple data services), present them to the user and ask which to use.

If the user specifies a URL path in their prompt, use that path directly.

Step 4: Authenticate

See AUTH.md for authentication patterns.

Step 5: Perform Operations

Use the discovered service path for all operations. See:

Service Type Patterns

Service TypeSource Pattern
Data (JSON store)./services/data.rsm.json
File storage./services/file.rsm.json
Authentication./services/auth.rsm.json
Dataset (single)./services/dataset.rsm.json
Template./services/template.rsm.json
Pipeline./services/pipeline.rsm.json

Common Response Codes

CodeMeaning
200Success
201Created
204No Content
400Bad Request
401Unauthorized
403Forbidden
404Not Found

Security Notes

  • Never echo or log $RESTSPACE_EMAIL or $RESTSPACE_PASSWORD
  • Use -s (silent) flag to suppress curl output
  • Keep cookies.txt in a secure, non-committed location

Score

Total Score

65/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon