GET /scripts/{script_id}/collections
Collections from supabase/collections.json and their rules. Authentication: Scope:scripts.read
Path parameters: script_id
Response: { name, read_rule, write_rule }[]
cURL
GET /scripts/{script_id}/collections/{collection}/documents
Lists documents (collections.json rules apply). Authentication: Scope:scripts.read
Path parameters: script_id, collection
URL parameters: limit?, offset?, order?
Response: Document[]
cURL
POST /scripts/{script_id}/collections/{collection}/documents
Creates a document. Authentication: Scope:scripts.write
Path parameters: script_id, collection
Body: { data: object }
Response: Document
cURL
GET /scripts/{script_id}/collections/{collection}/documents/{doc_id}
A single document. Authentication: Scope:scripts.read
Path parameters: script_id, collection, doc_id
Response: Document
cURL
PATCH /scripts/{script_id}/collections/{collection}/documents/{doc_id}
Replaces the document’s data. Authentication: Scope:scripts.write
Path parameters: script_id, collection, doc_id
Body: { data: object }
Response: Document
cURL
DELETE /scripts/{script_id}/collections/{collection}/documents/{doc_id}
Deletes the document. Authentication: Scope:scripts.write
Path parameters: script_id, collection, doc_id
Response: 204
cURL

