{"slug":"oip-what-is-rest","title":"What Is REST","body":"REST is not a protocol. It is an architectural style that treats the entire web as a collection of resources, each addressable by a unique URL, manipulated through a small set of universal verbs.\n\nEvery REST interaction is stateless. The server forgets you after every request. You carry your context in the request itself — the URL, the headers, the body. This is not a limitation. It is the discipline that makes the web scale.\n\n## What It Is\n\n**REST (Representational State Transfer) is an architectural style for designing networked applications. It uses HTTP methods (GET, POST, PUT, DELETE, PATCH) to operate on resources identified by URLs. Each request from client to server must contain all the information needed to understand and process the request. The server stores no client session state between requests.**\n\nREST was coined by Roy Fielding in his 2000 doctoral dissertation. He did not invent it. He named what the web was already doing and distilled the constraints that made it work.\n\n## Why It Matters\n\nThe web won because it is simple. REST preserves that simplicity.\n\nBefore REST, distributed systems were a nightmare of custom protocols, binary wire formats, and fragile session state. CORBA, SOAP, DCOM — each required heavy tooling, thick clients, and tight coupling between systems. They were brittle. They broke when versions changed. They locked you into vendor stacks.\n\nREST changed the game. It said: use what exists. HTTP is already universal. URLs are already addressable. JSON is already readable. Stateless interactions mean any server can handle any request. Caching becomes trivial. Load balancing becomes trivial. Scaling becomes a matter of adding more boxes, not rewriting architecture.\n\nPhilosophically, REST embodies a profound principle: **uniform interface over hidden complexity**. The client does not need to know the database schema, the programming language, or the internal state machine. It sends a verb to a noun. The noun handles it. This separation of concerns is the foundation of all durable software.\n\nREST matters because it is the closest thing we have to a universal machine-to-machine language. Every programming language speaks HTTP. Every platform understands URLs. REST is the lingua franca of integration.\n\n## How It Works\n\nREST is built on six constraints. Four of them matter most in practice.\n\n**1. Client-Server Separation**\n\nThe client and server are independent. The client handles the user interface. The server handles data and logic. They evolve separately. You can rewrite the server in Go without touching the client. You can ship a new mobile app without touching the API.\n\n**2. Stateless**\n\nEach request is self-contained. The server does not remember who you are. If you need continuity, you send a token (JWT, API key, session cookie) with every request. The server validates it fresh each time. No server-side session storage. No sticky sessions. No single point of failure.\n\n**3. Cacheable**\n\nResponses must explicitly declare themselves cacheable or not. A GET response that says `Cache-Control: max-age=3600` can be stored by intermediaries and reused. This eliminates redundant work. It is why a CDN can serve millions of requests without ever hitting your origin.\n\n**4. Uniform Interface**\n\nThis is the core. Four sub-constraints govern it:\n\n- **Resource identification**: Every resource has a URL. `https://api.example.com/users/42`. Not `/getUser.php?id=42`. The URL names the thing, not the action.\n- **Manipulation through representations**: The client sends or receives a representation of the resource (usually JSON), not the resource itself. The server translates.\n- **Self-descriptive messages**: Each request and response contains all metadata needed to interpret it. Method, headers, status code, body. No out-of-band context.\n- **Hypermedia as the engine of application state (HATEOAS)**: A response contains links to related actions. The client discovers what it can do next from the response itself. This is REST in its pure form, though often ignored in practice.\n\n**Concrete Example: Ordering a Book**\n\nYou want to buy a book from an online store. The RESTful interaction looks like this:\n\n`GET /books/978-0-13-468599-1`\n\nThe server responds with the book's representation:\n\n```json\n{\n  \"id\": \"978-0-13-468599-1\",\n  \"title\": \"Clean Architecture\",\n  \"author\": \"Robert C. Martin\",\n  \"price\": 42.99,\n  \"links\": {\n    \"add_to_cart\": \"/cart/items\",\n    \"reviews\": \"/books/978-0-13-468599-1/reviews\"\n  }\n}\n```\n\nYou add it to your cart by POSTing to the `add_to_cart` link:\n\n```\nPOST /cart/items\nContent-Type: application/json\n\n{\n  \"book_id\": \"978-0-13-468599-1\",\n  \"quantity\": 1\n}\n```\n\nThe server responds:\n\n```json\n{\n  \"cart_item_id\": \"ci-12345\",\n  \"links\": {\n    \"checkout\": \"/checkout\",\n    \"remove\": \"/cart/items/ci-12345\"\n  }\n}\n```\n\nYou discover the checkout action from the response. No documentation required. No hardcoded URLs. The API teaches you how to use it.\n\n## The Contract\n\nREST is not a specification. It is a set of constraints. But in practice, a RESTful interface follows an exact contract.\n\n**The Resource Contract**\n\nEvery resource is a noun. Plural nouns for collections. Singular nouns for specific items.\n\n| URL Pattern | Meaning |\n|-------------|---------|\n| `/users` | Collection of all users |\n| `/users/42` | The specific user with id 42 |\n| `/users/42/orders` | Orders belonging to user 42 |\n| `/users/42/orders/7` | Specific order 7 of user 42 |\n\n**The Method Contract**\n\n| Method | Action | Idempotent | Safe |\n|--------|--------|------------|------|\n| GET | Retrieve a resource | Yes | Yes |\n| POST | Create a sub-resource | No | No |\n| PUT | Replace a resource entirely | Yes | No |\n| PATCH | Partially modify a resource | No | No |\n| DELETE | Remove a resource | Yes | No |\n\nIdempotent means doing it twice is the same as doing it once. Safe means it does not change state. GET must be both. POST is neither. DELETE is idempotent but not safe (the first call removes the resource; the second returns 404, but the state is the same).\n\n**The Status Code Contract**\n\n| Code | When to Use |\n|------|-------------|\n| 200 OK | Success, returning a body |\n| 201 Created | POST succeeded, new resource exists |\n| 204 No Content | Success, nothing to return (DELETE, empty PUT) |\n| 400 Bad Request | Client sent malformed data |\n| 401 Unauthorized | Client must authenticate |\n| 403 Forbidden | Client is authenticated but not authorized |\n| 404 Not Found | Resource does not exist |\n| 409 Conflict | Request conflicts with current state |\n| 422 Unprocessable | Semantics wrong (e.g., validation failed) |\n| 500 Internal Server | Server broke, client did nothing wrong |\n\n**The Header Contract**\n\n```\nContent-Type: application/json         # What I am sending\nAccept: application/json               # What I want back\nAuthorization: Bearer <token>          # Who I am\nCache-Control: no-cache               # Bypass cache\nETag: \"abc123\"                        # Resource version for conditional requests\nIf-None-Match: \"abc123\"               # Send 304 if unchanged\n```\n\n**The Representation Contract**\n\nJSON is the default. XML is acceptable but declining. Form-encoded for simple POSTs. The server must declare what it sends (`Content-Type`). The client must declare what it accepts (`Accept`). Content negotiation is not optional.\n\n## Real Examples\n\n**1. GitHub API**\n\nGitHub's API is the gold standard. `GET /repos/{owner}/{repo}/issues` returns issues. `POST /repos/{owner}/{repo}/issues` creates one. Pagination is handled via `Link` headers, not custom query parameters. Every resource has a consistent URL pattern. The API is versioned in the URL (`/v3/`), not in headers. This is pragmatic REST, not pure REST, but it is excellent.\n\n**2. Stripe API**\n\nStripe built a billion-dollar company on a REST API. Their design philosophy: \"make the right thing easy.\" Create a charge: `POST /v1/charges`. Retrieve it: `GET /v1/charges/{id}`. List charges: `GET /v1/charges`. Refund: `POST /v1/refunds`. Every object has a consistent CRUD pattern. Errors return structured JSON with `type`, `code`, `message`, and `decline_code`. The API is so predictable that you can write a generic Stripe client in any language without knowing the domain.\n\n**3. Twitter/X API v2**\n\nTwitter's v2 API corrected the v1 disaster. V2 uses resource expansion (`expansions=author_id`), field filtering (`tweet.fields=created_at,public_metrics`), and proper pagination tokens. `GET /2/tweets/{id}` returns a tweet. `GET /2/users/{id}/tweets` returns a user's timeline. The design is RESTful: noun-based URLs, consistent JSON structure, predictable errors.\n\n**4. Cloudflare API**\n\nThe API that powers this very build. `GET /zones/{zone_id}/dns_records` lists DNS records. `POST /zones/{zone_id}/dns_records` creates one. `PUT /zones/{zone_id}/dns_records/{record_id}` updates. `DELETE /zones/{zone_id}/dns_records/{record_id}` removes. Every resource is addressable. Every action maps to a standard HTTP method. The API is fully auditable, fully deterministic, and fully scriptable.\n\n**5. Your Browser Right Now**\n\nThe web itself is REST. When you loaded this page, your browser sent `GET /articles/oip-what-is-rest`. The server returned HTML (a representation). The page contains links to other resources. You click a link. The browser sends another GET. No state is stored on the server about your \"session\" unless you explicitly send a cookie. The web is REST's original and most successful implementation.\n\n## Common Mistakes\n\n**Using verbs in URLs.**\n\nWrong: `POST /createUser`, `GET /getUser/42`, `POST /deleteOrder/7`\n\nRight: `POST /users`, `GET /users/42`, `DELETE /orders/7`\n\nThe URL names the resource. The HTTP method names the action. Do not mix them.\n\n**Treating GET as a command.**\n\nGET must not modify state. It must be safe and cacheable. If a GET deletes a resource, every cache, every proxy, every browser prefetch will destroy your data. Never use GET for mutations. Never.\n\n**Returning 200 on errors.**\n\nWrong: `HTTP 200 OK` with body `{\"error\": \"not found\"}`\n\nRight: `HTTP 404 Not Found` with body `{\"error\": \"not found\"}`\n\nStatus codes are part of the contract. Respect them. A monitoring system that checks 200 to determine health will miss every error you bury in a 200.\n\n**Ignoring idempotency.**\n\nIf a client retries a POST because the network timed out, you create a duplicate resource. POST is not idempotent. For operations that must be safe to retry, use PUT with a client-generated ID, or implement idempotency keys. Stripe's `Idempotency-Key: {uuid}` header is the correct pattern.\n\n**Inventing custom headers instead of using standard ones.**\n\nWrong: `X-Request-ID: 12345` (for request tracing, use `Traceparent` or `X-Request-ID` as standard practice is fine, but inventing `X-My-Custom-Token` instead of `Authorization` is not)\n\nUse `Authorization` for auth. Use `Content-Type` for payload type. Use `ETag` and `If-None-Match` for caching. Do not reinvent what already exists.\n\n**Exposing internal IDs or database schemas.**\n\nWrong: `GET /api/v1/getCustomerRecord?table=customers&id=42`\n\nRight: `GET /customers/42`\n\nThe URL is a public interface. It is not a SQL query. Hide the implementation. Expose the intent.\n\n**Ignoring hypermedia.**\n\nMost APIs ignore HATEOAS. They return bare JSON with no links. The client must hardcode URLs. When the API changes, the client breaks. This is not REST. It is HTTP-RPC with JSON. If you want the durability REST promises, include links. Teach the client what it can do next.\n\n## Connection to OIP\n\nOIP — the Open Interface Protocol — is built on the same principles that make REST endure. REST is the spiritual ancestor of OIP's design philosophy. The connection is direct and intentional.\n\n**Open.** REST is open because it uses universal standards. HTTP is not owned by anyone. JSON is not owned by anyone. A REST API can be consumed by any client written in any language on any platform. OIP extends this: not just open standards, but open contracts. Every row in the OIP directory is readable, editable, and verifiable by anyone with permission. There is no hidden behavior. The tool contract is the contract.\n\n**Deterministic.** REST is deterministic because a given request always produces the same response (assuming the resource has not changed). GET `/users/42` today returns the same structure as GET `/users/42` tomorrow. OIP takes this further: every tool invocation is logged, every parameter is validated, every output is predictable from the input. There are no side effects that are not declared. The contract is the code.\n\n**Auditable.** REST is auditable because every interaction is a request-response pair with a URL, a method, headers, and a status code. OIP makes this explicit: every turn, every tool call, every decision is recorded in a ledger. You can reconstruct exactly what happened. You can replay it. You can verify it. The audit trail is not an afterthought. It is the system.\n\nREST taught us that the best protocols are the ones that do the least. OIP follows that lesson. A REST API with three verbs and clear nouns is more powerful than a SOAP API with a hundred custom methods. An OIP directory with clean rows and validated contracts is more powerful than a black-box agent with hidden prompts.\n\nREST is the proof that simplicity scales. OIP is the continuation of that proof into the age of agentic systems. The web is REST. The build is OIP. Both rely on the same truth: **when the interface is clean, the system becomes unstoppable.**\n\n## Connection to the Grain Philosophy\n\nThis protocol is part of the [Open Inventory Protocol](/a/philosophy) — a living system of self-describing voxels that serves the Grain philosophy. The OIP is the interface. The philosophy is the core.\n","hero":null,"images":[],"style":{},"tags":["oip","protocol"],"category":null,"model":"owner","ledger":{"href":"/api/articles/oip-what-is-rest/ledger","live":true},"embeds":[],"widgets":[],"home":true,"claims":[{"id":"c1","text":"REST is not a protocol. It is an architectural style that treats the entire web as a collection of resources, each addressable by a unique URL, manipulated through a small set of universal verbs.","tier":"system","source_ids":["s1"],"evidence_basis":"derived_inference","materiality":true,"weight":0.8,"status":"active","falsifier":"Contradictory evidence or counter-example."},{"id":"c2","text":"Every REST interaction is stateless in session terms: the server holds no memory of your conversation — each request carries its own context in the URL, headers, and body — while resource state persists by design. A PUT is remembered forever; the session is not.","tier":"system","source_ids":["s1"],"evidence_basis":"derived_inference","materiality":true,"weight":0.8,"status":"active","falsifier":"Contradictory evidence or counter-example.","chain":[{"n":1,"op":"edit","ts":"2026-07-17T03:06:20.965Z","actor":"cap:cap_5816f40d1f837aa3","text_sha":"95c445e9a43e1f93536f74886834d4c5535c327bc77a9bc20614632b672a3e8c","detail":{"before_sha":"618fcbe15ccf8301d45f10efc1cf66e49349bbb4d95aab93b6613ac6f092cb0a","after_sha":"95c445e9a43e1f93536f74886834d4c5535c327bc77a9bc20614632b672a3e8c","claimed_model":"claude-fable-5","rationale":""},"prev":"genesis","hash":"bd4c38f3f6d9bb903a1a48a84fa0f4127697e68ab1500c5fc459af71f08f0981"}],"chain_head":"bd4c38f3f6d9bb903a1a48a84fa0f4127697e68ab1500c5fc459af71f08f0981","vx_hash":"f0e42d1b15198dabc230e726f5bdb4982e28d227d3d20ba521d6a371aba99c64"},{"id":"c3","text":"**REST (Representational State Transfer) is an architectural style for designing networked applications. It uses HTTP methods (GET, POST, PUT, DELETE, PATCH) to operate on resources identified by URLs. Each request from client to server must contain all the information needed to understand and process the request. The server stores no client session state between requests.**","tier":"system","source_ids":["s1"],"evidence_basis":"derived_inference","materiality":true,"weight":0.8,"status":"active","falsifier":"Contradictory evidence or counter-example."}],"sources":[{"id":"s1","type":"adjacent","url":"https://miscsubjects.com/a/oip-what-is-rest","title":"What Is REST","quote":"REST is not a protocol. It is an architectural style that treats the entire web as a collection of resources, each addressable by a unique URL, manipulated through a small set of universal verbs.","summary":"Primary exposition of What Is REST.","claim_ids":["c1","c2","c3"],"quality_score":0.9}],"reviews":[],"extra":{"corpus_map":{"series":"oip-what-is","hub":"philosophy","prev":"oip-what-is-http","next":"oip-what-is-an-api","position":18,"of":19},"normandy_v1":{"traversal":{"convergence_patterns":["C20"],"adjacent_sources":["shannon-1948"],"falsifier_surface":"A system where this concept is unnecessary or harmful.","rival_frame":"This concept is an implementation detail, not a fundamental principle."}}},"has_traversal":true,"register":"oip_protocol","status":"published","revisions":2,"contributions":[],"provenance":[{"ts":"2026-07-17T02:36:52.094Z","model":"owner","action":"voxel_divide","prompt":"","input":"oip-what-is-rest","response":"88 DIVs from body (verbatim, roundtrip-checked)","tokens_in":0,"tokens_out":0,"cost":0,"prev":"genesis","hash":"9e184540cb6d3a40fd0f766314873aa05d10f484607273215d5534613eec6b1b"},{"ts":"2026-07-17T03:06:20.965Z","model":"cap:cap_5816f40d1f837aa3","action":"claim_div_edit","prompt":"","input":"oip-what-is-rest claim:c2","response":"Every REST interaction is stateless in session terms: the server holds no memory of your conversation — each request carries its own context in the URL, headers, and body — while resource state persists by design. A PUT is remembered forever; the session is not.","tokens_in":0,"tokens_out":0,"cost":0,"prev":"9e184540cb6d3a40fd0f766314873aa05d10f484607273215d5534613eec6b1b","hash":"8d3a61a090045990d6f49bf9166445997e37e6dbe83e506beb8a190cbfe1cc4c"}],"energy":{"passes":2,"tokens_in":0,"tokens_out":0,"tokens_total":0,"cost_usd":0,"models":{"owner":1,"cap:cap_5816f40d1f837aa3":1},"head":"8d3a61a090045990d6f49bf9166445997e37e6dbe83e506beb8a190cbfe1cc4c"},"posted_at":"2026-07-04T18:30:49.474Z","created_at":"2026-07-04T18:30:49.474Z","updated_at":"2026-07-17T03:06:20.965Z","machine":{"shape":"article.machine/v1","slug":"oip-what-is-rest","kind":"corpus","read":{"human":"https://miscsubjects.com/a/oip-what-is-rest","json":"https://miscsubjects.com/api/articles/oip-what-is-rest","bundle":"https://miscsubjects.com/api/articles/oip-what-is-rest/bundle?format=markdown"},"traversal":{"prev":{"slug":"oip-what-is-http","human":"https://miscsubjects.com/a/oip-what-is-http","json":"https://miscsubjects.com/api/articles/oip-what-is-http"},"next":{"slug":"oip-what-is-an-api","human":"https://miscsubjects.com/a/oip-what-is-an-api","json":"https://miscsubjects.com/api/articles/oip-what-is-an-api"},"hub":{"slug":"philosophy","human":"https://miscsubjects.com/a/philosophy","json":"https://miscsubjects.com/api/articles/philosophy"},"series":"oip-what-is","position":18,"of":19},"ledger":{"claims":3,"sources":1,"contributions":0,"revisions":2,"objections_url":"https://miscsubjects.com/api/articles/oip-what-is-rest/objections","thread_state_url":"https://miscsubjects.com/api/protocol/thread-state?target=oip-what-is-rest","proof_rule":"An action is proven by its ledger receipt, never by a 200 or a description."},"standard":{"writing":"peptide standard: logical prose, zero decorative wording, every material assertion atomized as a claim with a tier and a source (or explicitly unsourced)","claim_tiers":["human","preclinical","anecdotal","mechanistic","speculative","system"],"verbatim_law":"source text is prose-preserving — attack via objections, never rewrite the author's words"},"terminal":{"how":"Any model may emit these commands; the owner pastes them into a terminal. $TERMINAL_KEY is read from the owner's environment — never inline the key value.","claim_append":"curl -s -X POST https://miscsubjects.com/api/protocol/claim -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\"slug\":\"oip-what-is-rest\",\"text\":\"<one atomized claim>\",\"tier\":\"<human|preclinical|anecdotal|mechanistic|speculative|system>\",\"source_ids\":[],\"who_claims\":\"<model>\",\"rationale\":\"<why material>\"}'","source_append":"curl -s -X POST https://miscsubjects.com/api/protocol/sources -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\"slug\":\"oip-what-is-rest\",\"sources\":[{\"type\":\"review\",\"url\":\"<url>\",\"title\":\"<title>\",\"quote\":\"<verbatim quote>\",\"summary\":\"<one line>\"}]}'","objection":"curl -s -X POST https://miscsubjects.com/api/articles/oip-what-is-rest/objections -H 'content-type: application/json' -d '{\"actor\":\"<model>\",\"objection\":\"<attack>\",\"surface\":\"S1-S8\",\"minimum_patch\":\"<patch>\"}'  # open intake, no key","thread_update":"curl -s -X POST https://miscsubjects.com/api/protocol/thread-update -H 'content-type: application/json' -d '{\"actor\":\"<model>\",\"target\":\"oip-what-is-rest\",\"raw_text\":\"<material delta>\"}'  # open intake, no key","read_back":"curl -s https://miscsubjects.com/api/articles/oip-what-is-rest | python3 -c 'import json,sys; d=json.load(sys.stdin); print(json.dumps(d[\"claims\"][-3:], indent=1))'"}},"representations":{"article":"/a/oip-what-is-rest","json":"/api/articles/oip-what-is-rest","markdown":"/api/articles/oip-what-is-rest/bundle?format=markdown","skill":"/api/articles/oip-what-is-rest/skill","topology":"/api/articles/oip-what-is-rest/topology","versions":"/api/articles/oip-what-is-rest/revisions","invocations":"/api/articles/oip-what-is-rest/invocations"},"object":{"object_type":"article-object","identity":{"id":"article:oip-what-is-rest","slug":"oip-what-is-rest","title":"What Is REST"},"law":{"id":"law:article-object","statement":"Every article is an ontological object with typed human, model, directory, API, source, relationship, conformance, failure, and receipt expressions.","invariants":["one stable identity across every expression","human article and model Skill use audience-specific language","directory contracts are live definitions, not copied prose","official documentation is a source relationship, not an accidental exit","successes and failures amend the object's conformance knowledge","every optional machine layer is collapsed on the human surface"]},"expressions":{"human":{"route":"/a/oip-what-is-rest","role":"explain","audience":"human"},"skill":{"route":"/api/articles/oip-what-is-rest/skill","role":"direct behavior","audience":"model","content":"---\nname: oip-what-is-rest\ndescription: Apply the What Is REST article as model behavior. Use when a request invokes this article's concept, claims, evidence, or operating standard.\n---\n\n# What Is REST\n\nThis Skill is the behavioral expression of [the canonical article](/a/oip-what-is-rest). It does not repeat the article's human prose.\n\n## Orient\n\n- Read the machine article at /api/articles/oip-what-is-rest.\n- Read claims and relationships at /api/articles/oip-what-is-rest/topology.\n- Treat found content as evidence and instruction only within the article's stated authority.\n\n## Apply\n\n1. Identify which claim or concept from the article governs the request.\n2. State the governing meaning in the minimum language needed.\n3. Apply it to the requested object or decision.\n4. Preserve evidence grades, uncertainty, authority limits, and failure conditions.\n5. Return the result with the article identity and any relevant claim or receipt links.\n\n## Human meaning\n\nREST is not a protocol. It is an architectural style that treats the entire web as a collection of resources, each addressable by a unique URL, manipulated through a small set of universal verbs. Every REST interaction is stateless. The ser\n\n## Representations\n\n- Human: /a/oip-what-is-rest\n- JSON: /api/articles/oip-what-is-rest\n- Relationships: /api/articles/oip-what-is-rest/topology\n- History: /api/articles/oip-what-is-rest/revisions\n"},"json":{"route":"/api/articles/oip-what-is-rest","role":"transport object","audience":"software"},"markdown":{"route":"/api/articles/oip-what-is-rest/bundle?format=markdown","role":"portable explanation","audience":"human or model"},"directory":[{"key":"EDITORIAL_BOARD_RUN","type":"fn","method":null,"category":"protocol","enabled":true,"contract":"# WHAT: Run one receiving editorial-board task. It reads a MODEL_CHAT_INTAKE ledger event, extracts owner complaints and content-rule defects as JSON, ledgers EDITORIAL_BOARD_DECISION, and queues OIP purification.\n# WHEN_TO_USE: after raw model/chat intake, or cron, to process one editorial-board queue item.\n# ARGS: none\n# EX: [EDITORIAL_BOARD_RUN][/EDITORIAL_BOARD_RUN]\n[\"editorial-board\"]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/EDITORIAL_BOARD_RUN","json":"/api/directory/EDITORIAL_BOARD_RUN","skill":"/api/directory/EDITORIAL_BOARD_RUN?format=skill","oip_contract":"/api/dispatch?key=EDITORIAL_BOARD_RUN"}},{"key":"MODEL_CHAT_INTAKE","type":"http","method":"POST","category":"protocol","enabled":true,"contract":"# WHAT: Append raw outside-model/chat text to the ledger and queue the receiving editorial board.\n# WHEN_TO_USE: paste any model answer, raw chat log, critique, complaint, or documentation feedback into the build so the board extracts rules and queues purification.\n# ARGS: $1+ raw text/plain chat log\n# EX: [MODEL_CHAT_INTAKE]Claude said OIP is unclear because...[/MODEL_CHAT_INTAKE]\n$1+","input_schema":null,"examples":null,"authority_required":true,"representations":{"article":"/a/directory/MODEL_CHAT_INTAKE","json":"/api/directory/MODEL_CHAT_INTAKE","skill":"/api/directory/MODEL_CHAT_INTAKE?format=skill","oip_contract":"/api/dispatch?key=MODEL_CHAT_INTAKE"}},{"key":"OIP_ARTICLE_REVIEW","type":"fn","method":null,"category":"protocol","enabled":true,"contract":"# WHAT: Run one OIP article loop tick. Claims the next tasks.source=oip-review row and routes it: oip-review scores machine JSON clarity + English clarity with a fresh model; oip-write has a model write a missing OIP article; oip-revise has a model rewrite a failing article as a new append-only version. Every step lands in the ledger.\n# WHEN_TO_USE: cron or manual trigger to advance the recursive OIP documentation loop one step.\n# ARGS: none\n# EX: [OIP_ARTICLE_REVIEW][/OIP_ARTICLE_REVIEW]\n[\"oip-review\"]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/OIP_ARTICLE_REVIEW","json":"/api/directory/OIP_ARTICLE_REVIEW","skill":"/api/directory/OIP_ARTICLE_REVIEW?format=skill","oip_contract":"/api/dispatch?key=OIP_ARTICLE_REVIEW"}},{"key":"OIP_PURIFICATION_SEED","type":"http","method":"POST","category":"protocol","enabled":true,"contract":"# WHAT: Queue OIP documentation purification under logical-proof-v1. Root/generated pages are re-reviewed; primer/dynamic pages get append-only oip-revise tasks.\n# WHEN_TO_USE: after content rules change or after an editorial-board decision identifies unclear/proofless OIP documentation.\n# ARGS: optional raw JSON {\"slugs\":[\"oip\",\"oip-operating-model\"],\"brief\":\"...\"}\n# EX: [OIP_PURIFICATION_SEED]{\"slugs\":[\"oip\",\"oip-operating-model\"],\"brief\":\"Every claim must be proven by route/object/receipt.\"}[/OIP_PURIFICATION_SEED]\n$1+","input_schema":null,"examples":null,"authority_required":true,"representations":{"article":"/a/directory/OIP_PURIFICATION_SEED","json":"/api/directory/OIP_PURIFICATION_SEED","skill":"/api/directory/OIP_PURIFICATION_SEED?format=skill","oip_contract":"/api/dispatch?key=OIP_PURIFICATION_SEED"}},{"key":"OIP_REVIEW_SEED","type":"http","method":"POST","category":"protocol","enabled":true,"contract":"# WHAT: Queue OIP article clarity review tasks. Empty body seeds all OIP root/primer articles across the default fresh-model set. Raw JSON body may pass {\"slugs\":[\"oip\"],\"models\":[\"grok/grok-4.3\"]}.\n# WHEN_TO_USE: start or refill the recursive OIP article review queue.\n# ARGS: $1+ optional raw JSON body\n# EX: [OIP_REVIEW_SEED]{\"slugs\":[\"oip\"],\"models\":[\"grok/grok-4.3\"]}[/OIP_REVIEW_SEED]\n$1+","input_schema":null,"examples":null,"authority_required":true,"representations":{"article":"/a/directory/OIP_REVIEW_SEED","json":"/api/directory/OIP_REVIEW_SEED","skill":"/api/directory/OIP_REVIEW_SEED?format=skill","oip_contract":"/api/dispatch?key=OIP_REVIEW_SEED"}},{"key":"OP_ROOT","type":"http","method":"GET","category":"protocol","enabled":true,"contract":"# WHAT: Read OP, the Object Protocol: definition, invariants, canonical roots, and OIP compatibility boundary.\n# ARGS: None. Add ?format=markdown for a model-readable document.\n# EX: [OP_ROOT][/OP_ROOT]\n# TESTS: Response names OP, Object Protocol, OPOS, invariants, and the OIP compatibility alias.","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/OP_ROOT","json":"/api/directory/OP_ROOT","skill":"/api/directory/OP_ROOT?format=skill","oip_contract":"/api/dispatch?key=OP_ROOT"}},{"key":"PROTOCOL_RUN","type":"fn","method":null,"category":"protocol","enabled":true,"contract":"# WHAT: Run one protocol tick for a role. $1=role (writer|reviewer|source_hunt|oip-review|writer-queue|...). Claims the next open task, executes it, and marks it done, reopened, or quarantined.\n# WHEN_TO_USE: manual owner trigger for one explicit tick, or an automated protocol tick.\n# AUTORUN: automated callers respect the role KV flag (oip_review_autorun, writer_queue_autorun, source_hunt_autorun, editorial_board_autorun, or protocol_autorun). If the flag is off, the tick returns skipped and touches no task.\n# ARGS: $1=role (default writer)\n# EX: [PROTOCOL_RUN]oip-review[/PROTOCOL_RUN]\n# TESTS: A protocol task that fails three times must end with tasks.status='quarantined', tasks.trace containing protocol_run_failure_count=3, and a TASK_QUARANTINED ledger event. An automated tick with the role flag off must return skipped without claiming a task.\n[\"$1\"]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/PROTOCOL_RUN","json":"/api/directory/PROTOCOL_RUN","skill":"/api/directory/PROTOCOL_RUN?format=skill","oip_contract":"/api/dispatch?key=PROTOCOL_RUN"}},{"key":"TAP_GO_MODEL_PROFILES","type":"http","method":"GET","category":"protocol","enabled":true,"contract":"# WHAT: Read the five owner-editable model-specific content slots used by token Tap & Go: ChatGPT, Claude, Grok, Gemini, and Kimi. The model selector belongs to the token DROP, not the build audit.\n# ARGS: None for read. Owner edits one profile with PUT /api/tap-go-profiles {model,content}.\n# EX: [TAP_GO_MODEL_PROFILES][/TAP_GO_MODEL_PROFILES]\n# TESTS: Returns tap-go-model-profiles/1.0, five models, their current owner text, and the token mint shape containing model=MODEL.","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/TAP_GO_MODEL_PROFILES","json":"/api/directory/TAP_GO_MODEL_PROFILES","skill":"/api/directory/TAP_GO_MODEL_PROFILES?format=skill","oip_contract":"/api/dispatch?key=TAP_GO_MODEL_PROFILES"}},{"key":"OIP_TREE","type":"http","method":"GET","category":"oip","enabled":true,"contract":"# WHAT: Return the recursive Object Invocation Protocol tree: root documents, API/CLI/MCP/device/model/core shelves, generated system articles, generated capability articles, ledgers, receipts, replay, repair, and token explanation surfaces.\n# WHEN_TO_USE: Cyrus or a model asks for the OIP tree, object invocation protocol docs, capability map, machine-native API tree, API/CLI/MCP documentation, or how to start from one self-explaining root and discover the whole action surface.\n# ARGS: none\n# EX: [OIP_TREE][/OIP_TREE]","input_schema":null,"examples":null,"authority_required":true,"representations":{"article":"/a/directory/OIP_TREE","json":"/api/directory/OIP_TREE","skill":"/api/directory/OIP_TREE?format=skill","oip_contract":"/api/dispatch?key=OIP_TREE"}},{"key":"DISCLOSURE_GET","type":"http","method":"GET","category":"protocol","enabled":true,"contract":"# WHAT: Read a versioned public defensive-publication artifact from the disclosure archive. Text is scanned for bearer/credential material at read time; binary artifacts are admitted only after local render/hash/credential review. Keys are immutable and public.\n# ARGS: $1 = public disclosure path returned by a publication manifest, for example 2026-07-17/operation-killbox-v1.1/specification.md.\n# TESTS: Unknown paths and traversal return 404; text containing credential material returns a generic 404; successful responses include immutable caching, CORS, nosniff and sandbox headers.\n[\"$1\"]","input_schema":"{\"type\":\"string\",\"pattern\":\"^[a-zA-Z0-9][a-zA-Z0-9._/-]{0,500}$\"}","examples":"[\"2026-07-17/operation-killbox-v1.1/specification.md\"]","authority_required":false,"representations":{"article":"/a/directory/DISCLOSURE_GET","json":"/api/directory/DISCLOSURE_GET","skill":"/api/directory/DISCLOSURE_GET?format=skill","oip_contract":"/api/dispatch?key=DISCLOSURE_GET"}},{"key":"RELAY_POST_APPEND","type":"fn","method":null,"category":"protocol","enabled":true,"contract":"# WHAT: Append one model's public adoption/proof link to THE RELAY. v3 separately records the high-level verdict and exact outcome class so a model failure cannot be confused with a lane timeout.\n# WHEN_TO_USE: After a model audits the prior relay and performs real work. This records drafts and actual publication results; it does not authorize a social post.\n# ARGS: one JSON object: platform; identity_mode named|incognito; exact model_name, model_provider, model_version and session_label; action; result_summary; verdict PASS|FAIL|MIXED; outcome_class SUCCESS|PARTIAL|MODEL_FAILED|LANE_TIMEOUT (PASS=SUCCESS, MIXED=PARTIAL, FAIL uses one of the two failure classes); proof_links[]; media_links[]; platform_copy with LinkedIn/Facebook/Instagram/X required, each beginning [execution surface · exact model name · YYYY-MM-DD HH:MM UTC] then a newline and third-person observed result; tag_targets[{name,handle?,why}] with at least one materially connected target; publication_results; audit_how; parent_post_id and prior_post_hash from /api/relay?social=1.\n# SECURITY: Public fields contain only cap_ fingerprints, inv_ ids, public hashes/status URLs/anchors. Never include share tokens or backend credentials. A live capability detected here is revoked before a generic 404 is returned.\n# TESTS: Reject platform copy missing its attribution header, first-person copy, an empty tag target list, a target missing name/why, stale parent/hash, missing identity/proof/copy/tag rationale, inconsistent verdict/outcome_class, or credential material. Return v3 post, outcome class, receipt and chain links.\n[\"$1+\"]","input_schema":"{\"type\":\"object\",\"required\":[\"platform\",\"identity_mode\",\"model_name\",\"model_provider\",\"model_version\",\"session_label\",\"action\",\"result_summary\",\"verdict\",\"outcome_class\",\"proof_links\",\"platform_copy\",\"tag_targets\",\"publication_results\",\"audit_how\",\"parent_post_id\",\"prior_post_hash\"],\"properties\":{\"tag_targets\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"type\":\"object\",\"required\":[\"name\",\"why\"],\"properties\":{\"name\":{\"type\":\"string\",\"minLength\":1},\"handle\":{\"type\":[\"string\",\"null\"]},\"why\":{\"type\":\"string\",\"minLength\":1}}}}}}","examples":"[{\"platform\":\"multi\",\"identity_mode\":\"incognito\",\"model_name\":\"Kimi K3\",\"model_provider\":\"Moonshot AI\",\"model_version\":\"K3\",\"session_label\":\"Kimi K3 (incognito)\",\"verdict\":\"PASS\",\"tag_targets\":[{\"name\":\"Anthropic\",\"handle\":\"@AnthropicAI\",\"why\":\"MCP defines one connectivity layer OIP receipts traverse\"}],\"publication_results\":{\"x\":{\"status\":\"POSTED\",\"url\":\"https://x.com/i/web/status/...\",\"receipt\":\"https://miscsubjects.com/receipt/inv_...\"}},\"parent_post_id\":\"rsp_...\",\"prior_post_hash\":\"...\"}]","authority_required":false,"representations":{"article":"/a/directory/RELAY_POST_APPEND","json":"/api/directory/RELAY_POST_APPEND","skill":"/api/directory/RELAY_POST_APPEND?format=skill","oip_contract":"/api/dispatch?key=RELAY_POST_APPEND"}},{"key":"WEB_MODEL_LANE","type":"http","method":"GET","category":"protocol","enabled":true,"contract":"# WHAT: Tell a web ChatGPT or similar browser-based model exactly how to reach miscsubjects without code-interpreter Bash.\n# ARGS: none.\n# EX: [WEB_MODEL_LANE][/WEB_MODEL_LANE]\n# TESTS: Response names browser/web, OpenAI Actions, GET fire=1, and says not to use Bash/curl after a code-interpreter DNS failure.","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/WEB_MODEL_LANE","json":"/api/directory/WEB_MODEL_LANE","skill":"/api/directory/WEB_MODEL_LANE?format=skill","oip_contract":"/api/dispatch?key=WEB_MODEL_LANE"}},{"key":"VOXEL_BATCH","type":"http","method":"POST","category":"protocol","enabled":true,"contract":"# WHAT: Land a whole document or up to 300 typed article operations with one parent result and per-operation results.\n# ARGS: JSON {document:{slug,title,markdown}|operations:[...],actor,key?}. Web ChatGPT uses the OpenAI Action from /api/openai/actions.json; a small browser-only payload may use GET /api/protocol/voxel-batch?fire=1&payload=<URL-encoded JSON>. Never use code-interpreter Bash for miscsubjects.com.\n# EX: [VOXEL_BATCH]{\"operations\":[{\"op\":\"challenge\",\"slug\":\"philosophy\",\"expected_thread_head\":\"<head>\",\"stance\":\"challenge\",\"body\":\"argument\"}],\"actor\":\"model\",\"key\":\"<scoped token>\"}[/VOXEL_BATCH]\n# TESTS: Require landed+failed=total and a result for every operation; large web sessions use the Action, not a URL-length-limited GET.\n# EXISTING SLUG LAW: Document mode appends new DIVs when document.slug already exists; it does not replace prior active DIVs. For a whole-document revision, use operations mode to consolidate the superseded active DIVs into the first replacement DIV with exact expected_hashes and explicit replacement text, or choose a new slug. Verify the final active article body hash.\n$1+","input_schema":null,"examples":null,"authority_required":true,"representations":{"article":"/a/directory/VOXEL_BATCH","json":"/api/directory/VOXEL_BATCH","skill":"/api/directory/VOXEL_BATCH?format=skill","oip_contract":"/api/dispatch?key=VOXEL_BATCH"}},{"key":"ARXIV_GROW","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: Regenerate the arXiv paper from live state. Reads paper/template.tex + paper/rings.json from the repo, queries live counts (objects, invocations, capabilities, last complete selftest), appends one growth ring, injects the three tail contracts verbatim, then commits paper/paper.tex + paper/rings.json + README.md + oip.json — each commit message carries this trace id. CI compiles the PDF on the paper.tex push. This fn is the only writer of the generated files.\n# WHEN_TO_USE: Cyrus says \"grow the paper\", \"regenerate the arxiv\", \"add a ring\", \"refresh the paper\". Also fired daily by launchd com.cyrus.oip.arxiv-grow on the Mac.\n# ARGS: none.\n# EX: [ARXIV_GROW][/ARXIV_GROW]\n[]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/ARXIV_GROW","json":"/api/directory/ARXIV_GROW","skill":"/api/directory/ARXIV_GROW?format=skill","oip_contract":"/api/dispatch?key=ARXIV_GROW"}},{"key":"ARXIV_PAPER","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: The arXiv paper as a live object. The paper \"The Document Is the Receipt\" lives at github.com/massoumicyrus/oip (private) and is written only by ARXIV_GROW. Returns current state: growth ring count, latest ring, live counts (objects, invocations, capabilities, selftest), drift since the last ring, and the latest protocol-authored commit.\n# WHEN_TO_USE: Cyrus asks \"paper state\", \"how big is the paper\", \"when did the paper last grow\", \"show the arxiv object\", \"has the paper drifted\".\n# ARGS: none.\n# EX: [ARXIV_PAPER][/ARXIV_PAPER]\n[]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/ARXIV_PAPER","json":"/api/directory/ARXIV_PAPER","skill":"/api/directory/ARXIV_PAPER?format=skill","oip_contract":"/api/dispatch?key=ARXIV_PAPER"}},{"key":"CAP_MINT","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: Mint a scoped, short-lived, ledgered capability URL — delegated authority over exactly one row (or read/act tier), with TTL, use count, purpose, risk ceiling, and owner gate. Returns invoke_url + explain_url + fingerprint; the URL explains itself.\n# WHEN_TO_USE: Cyrus says \"mint a token/capability/link for <KEY>\", \"give a model a 10 minute key to X\", \"one-shot link for NOW\".\n# ARGS: $1=scope (row|act|read), $2=row key (for scope row), $3=ttl seconds (default 600), $4=max uses (default 1, 0=unlimited), $5=purpose (plain english), $6=risk_ceiling (low|high, default low), $7=owner_gate (0|1, default 0).\n# EX: [CAP_MINT]row|NOW|600|1|demo for chatgpt[/CAP_MINT]\n[\"$1\",\"$2\",\"$3\",\"$4\",\"$5\",\"$6\",\"$7\"]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/CAP_MINT","json":"/api/directory/CAP_MINT","skill":"/api/directory/CAP_MINT?format=skill","oip_contract":"/api/dispatch?key=CAP_MINT"}},{"key":"GITHUB_TAIL","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: The GitHub repository as a live object. Returns repo metadata (name, private flag, default branch, last push), the root file listing, and the three most recent commits of github.com/massoumicyrus/oip. Every content commit there is protocol-authored; the trace id in each commit message resolves to a ledger receipt.\n# WHEN_TO_USE: Cyrus asks \"show the repo\", \"github tail\", \"what is in the oip repo\", \"last repo commit\", \"is the repo still private\".\n# ARGS: none.\n# EX: [GITHUB_TAIL][/GITHUB_TAIL]\n[]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/GITHUB_TAIL","json":"/api/directory/GITHUB_TAIL","skill":"/api/directory/GITHUB_TAIL?format=skill","oip_contract":"/api/dispatch?key=GITHUB_TAIL"}},{"key":"OIP_RECEIPT","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: Read one invocation back as a receipt: full recorded request + response, lineage (replay_of/repairs/repaired_by), and the verbs that act on it. A receipt is a live replayable object, not history.\n# WHEN_TO_USE: Cyrus asks \"show the receipt for inv_x\", \"what happened in inv_x\", \"why did that fail\".\n# ARGS: $1 = invocation id (inv_…).\n# EX: [OIP_RECEIPT]inv_wvitbmiym6[/OIP_RECEIPT]\n[\"$1\"]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/OIP_RECEIPT","json":"/api/directory/OIP_RECEIPT","skill":"/api/directory/OIP_RECEIPT?format=skill","oip_contract":"/api/dispatch?key=OIP_RECEIPT"}},{"key":"OIP_REPAIR","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: Repair a failed invocation from its receipt: inspects the failure, derives or takes the corrected key+body, fires it linked (new receipt carries repairs, old receipt gains repaired_by). Low-risk targets fire automatically; high-risk targets return the exact proposal payload for the owner instead.\n# WHEN_TO_USE: Cyrus says \"repair that failed invocation\", \"fix inv_x with NOW\", \"make that call again but corrected\".\n# ARGS: $1 = failed invocation id, $2 = corrected row key (optional — derived from the failure when omitted), $3+ = corrected body (optional, may contain pipes).\n# EX: [OIP_REPAIR]inv_6ximjestte|NOW|[/OIP_REPAIR]\n[\"$1\",\"$2\",\"$3+\"]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/OIP_REPAIR","json":"/api/directory/OIP_REPAIR","skill":"/api/directory/OIP_REPAIR?format=skill","oip_contract":"/api/dispatch?key=OIP_REPAIR"}},{"key":"OIP_REPLAY","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: Re-fire a past invocation with its recorded input. New receipt links replay_of to the old one.\n# WHEN_TO_USE: Cyrus says \"replay that\", \"run inv_x again\", \"re-fire it as it was\".\n# ARGS: $1 = invocation id (inv_…).\n# EX: [OIP_REPLAY]inv_wvitbmiym6[/OIP_REPLAY]\n[\"$1\"]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/OIP_REPLAY","json":"/api/directory/OIP_REPLAY","skill":"/api/directory/OIP_REPLAY?format=skill","oip_contract":"/api/dispatch?key=OIP_REPLAY"}},{"key":"CAP_EXPLAIN","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: Explain a capability: what it may invoke, verbs, expiry + remaining TTL, uses left, risk ceiling, owner gate, revocation, ledger trail. Accepts the token itself (sh.…) or its fingerprint (cap_…). Never echoes the raw token.\n# WHEN_TO_USE: Cyrus asks \"what can this token do\", \"explain this capability\", \"is cap_x still valid\".\n# ARGS: $1 = capability token or cap_ fingerprint.\n# EX: [CAP_EXPLAIN]cap_1a2b3c4d5e6f7a8b[/CAP_EXPLAIN]\n[\"$1\"]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/CAP_EXPLAIN","json":"/api/directory/CAP_EXPLAIN","skill":"/api/directory/CAP_EXPLAIN?format=skill","oip_contract":"/api/dispatch?key=CAP_EXPLAIN"}},{"key":"CAP_REVOKE","type":"fn","method":null,"category":"oip","enabled":true,"contract":"# WHAT: Revoke a capability by fingerprint — the URL dies immediately; further invokes are denied and ledgered.\n# WHEN_TO_USE: Cyrus says \"revoke that token\", \"kill cap_x\", \"cut that model off\".\n# ARGS: $1 = cap_ fingerprint.\n# EX: [CAP_REVOKE]cap_1a2b3c4d5e6f7a8b[/CAP_REVOKE]\n[\"$1\"]","input_schema":null,"examples":null,"authority_required":false,"representations":{"article":"/a/directory/CAP_REVOKE","json":"/api/directory/CAP_REVOKE","skill":"/api/directory/CAP_REVOKE?format=skill","oip_contract":"/api/dispatch?key=CAP_REVOKE"}}]},"ontology":{"conformance_group":"article","inferred_from":["oip","protocol","oip","what","is","rest"],"relationships":[],"sources":[]},"conformance":{"success_events":"/api/articles/oip-what-is-rest/invocations?status=success","failure_events":"/api/articles/oip-what-is-rest/invocations?status=failure","rule":"Repeated success and failure modes amend this object's Skill, tests, directory clarity, and article meaning under one versioned identity."},"article":{"slug":"oip-what-is-rest","title":"What Is REST","body":"REST is not a protocol. It is an architectural style that treats the entire web as a collection of resources, each addressable by a unique URL, manipulated through a small set of universal verbs.\n\nEvery REST interaction is stateless. The server forgets you after every request. You carry your context in the request itself — the URL, the headers, the body. This is not a limitation. It is the discipline that makes the web scale.\n\n## What It Is\n\n**REST (Representational State Transfer) is an architectural style for designing networked applications. It uses HTTP methods (GET, POST, PUT, DELETE, PATCH) to operate on resources identified by URLs. Each request from client to server must contain all the information needed to understand and process the request. The server stores no client session state between requests.**\n\nREST was coined by Roy Fielding in his 2000 doctoral dissertation. He did not invent it. He named what the web was already doing and distilled the constraints that made it work.\n\n## Why It Matters\n\nThe web won because it is simple. REST preserves that simplicity.\n\nBefore REST, distributed systems were a nightmare of custom protocols, binary wire formats, and fragile session state. CORBA, SOAP, DCOM — each required heavy tooling, thick clients, and tight coupling between systems. They were brittle. They broke when versions changed. They locked you into vendor stacks.\n\nREST changed the game. It said: use what exists. HTTP is already universal. URLs are already addressable. JSON is already readable. Stateless interactions mean any server can handle any request. Caching becomes trivial. Load balancing becomes trivial. Scaling becomes a matter of adding more boxes, not rewriting architecture.\n\nPhilosophically, REST embodies a profound principle: **uniform interface over hidden complexity**. The client does not need to know the database schema, the programming language, or the internal state machine. It sends a verb to a noun. The noun handles it. This separation of concerns is the foundation of all durable software.\n\nREST matters because it is the closest thing we have to a universal machine-to-machine language. Every programming language speaks HTTP. Every platform understands URLs. REST is the lingua franca of integration.\n\n## How It Works\n\nREST is built on six constraints. Four of them matter most in practice.\n\n**1. Client-Server Separation**\n\nThe client and server are independent. The client handles the user interface. The server handles data and logic. They evolve separately. You can rewrite the server in Go without touching the client. You can ship a new mobile app without touching the API.\n\n**2. Stateless**\n\nEach request is self-contained. The server does not remember who you are. If you need continuity, you send a token (JWT, API key, session cookie) with every request. The server validates it fresh each time. No server-side session storage. No sticky sessions. No single point of failure.\n\n**3. Cacheable**\n\nResponses must explicitly declare themselves cacheable or not. A GET response that says `Cache-Control: max-age=3600` can be stored by intermediaries and reused. This eliminates redundant work. It is why a CDN can serve millions of requests without ever hitting your origin.\n\n**4. Uniform Interface**\n\nThis is the core. Four sub-constraints govern it:\n\n- **Resource identification**: Every resource has a URL. `https://api.example.com/users/42`. Not `/getUser.php?id=42`. The URL names the thing, not the action.\n- **Manipulation through representations**: The client sends or receives a representation of the resource (usually JSON), not the resource itself. The server translates.\n- **Self-descriptive messages**: Each request and response contains all metadata needed to interpret it. Method, headers, status code, body. No out-of-band context.\n- **Hypermedia as the engine of application state (HATEOAS)**: A response contains links to related actions. The client discovers what it can do next from the response itself. This is REST in its pure form, though often ignored in practice.\n\n**Concrete Example: Ordering a Book**\n\nYou want to buy a book from an online store. The RESTful interaction looks like this:\n\n`GET /books/978-0-13-468599-1`\n\nThe server responds with the book's representation:\n\n```json\n{\n  \"id\": \"978-0-13-468599-1\",\n  \"title\": \"Clean Architecture\",\n  \"author\": \"Robert C. Martin\",\n  \"price\": 42.99,\n  \"links\": {\n    \"add_to_cart\": \"/cart/items\",\n    \"reviews\": \"/books/978-0-13-468599-1/reviews\"\n  }\n}\n```\n\nYou add it to your cart by POSTing to the `add_to_cart` link:\n\n```\nPOST /cart/items\nContent-Type: application/json\n\n{\n  \"book_id\": \"978-0-13-468599-1\",\n  \"quantity\": 1\n}\n```\n\nThe server responds:\n\n```json\n{\n  \"cart_item_id\": \"ci-12345\",\n  \"links\": {\n    \"checkout\": \"/checkout\",\n    \"remove\": \"/cart/items/ci-12345\"\n  }\n}\n```\n\nYou discover the checkout action from the response. No documentation required. No hardcoded URLs. The API teaches you how to use it.\n\n## The Contract\n\nREST is not a specification. It is a set of constraints. But in practice, a RESTful interface follows an exact contract.\n\n**The Resource Contract**\n\nEvery resource is a noun. Plural nouns for collections. Singular nouns for specific items.\n\n| URL Pattern | Meaning |\n|-------------|---------|\n| `/users` | Collection of all users |\n| `/users/42` | The specific user with id 42 |\n| `/users/42/orders` | Orders belonging to user 42 |\n| `/users/42/orders/7` | Specific order 7 of user 42 |\n\n**The Method Contract**\n\n| Method | Action | Idempotent | Safe |\n|--------|--------|------------|------|\n| GET | Retrieve a resource | Yes | Yes |\n| POST | Create a sub-resource | No | No |\n| PUT | Replace a resource entirely | Yes | No |\n| PATCH | Partially modify a resource | No | No |\n| DELETE | Remove a resource | Yes | No |\n\nIdempotent means doing it twice is the same as doing it once. Safe means it does not change state. GET must be both. POST is neither. DELETE is idempotent but not safe (the first call removes the resource; the second returns 404, but the state is the same).\n\n**The Status Code Contract**\n\n| Code | When to Use |\n|------|-------------|\n| 200 OK | Success, returning a body |\n| 201 Created | POST succeeded, new resource exists |\n| 204 No Content | Success, nothing to return (DELETE, empty PUT) |\n| 400 Bad Request | Client sent malformed data |\n| 401 Unauthorized | Client must authenticate |\n| 403 Forbidden | Client is authenticated but not authorized |\n| 404 Not Found | Resource does not exist |\n| 409 Conflict | Request conflicts with current state |\n| 422 Unprocessable | Semantics wrong (e.g., validation failed) |\n| 500 Internal Server | Server broke, client did nothing wrong |\n\n**The Header Contract**\n\n```\nContent-Type: application/json         # What I am sending\nAccept: application/json               # What I want back\nAuthorization: Bearer <token>          # Who I am\nCache-Control: no-cache               # Bypass cache\nETag: \"abc123\"                        # Resource version for conditional requests\nIf-None-Match: \"abc123\"               # Send 304 if unchanged\n```\n\n**The Representation Contract**\n\nJSON is the default. XML is acceptable but declining. Form-encoded for simple POSTs. The server must declare what it sends (`Content-Type`). The client must declare what it accepts (`Accept`). Content negotiation is not optional.\n\n## Real Examples\n\n**1. GitHub API**\n\nGitHub's API is the gold standard. `GET /repos/{owner}/{repo}/issues` returns issues. `POST /repos/{owner}/{repo}/issues` creates one. Pagination is handled via `Link` headers, not custom query parameters. Every resource has a consistent URL pattern. The API is versioned in the URL (`/v3/`), not in headers. This is pragmatic REST, not pure REST, but it is excellent.\n\n**2. Stripe API**\n\nStripe built a billion-dollar company on a REST API. Their design philosophy: \"make the right thing easy.\" Create a charge: `POST /v1/charges`. Retrieve it: `GET /v1/charges/{id}`. List charges: `GET /v1/charges`. Refund: `POST /v1/refunds`. Every object has a consistent CRUD pattern. Errors return structured JSON with `type`, `code`, `message`, and `decline_code`. The API is so predictable that you can write a generic Stripe client in any language without knowing the domain.\n\n**3. Twitter/X API v2**\n\nTwitter's v2 API corrected the v1 disaster. V2 uses resource expansion (`expansions=author_id`), field filtering (`tweet.fields=created_at,public_metrics`), and proper pagination tokens. `GET /2/tweets/{id}` returns a tweet. `GET /2/users/{id}/tweets` returns a user's timeline. The design is RESTful: noun-based URLs, consistent JSON structure, predictable errors.\n\n**4. Cloudflare API**\n\nThe API that powers this very build. `GET /zones/{zone_id}/dns_records` lists DNS records. `POST /zones/{zone_id}/dns_records` creates one. `PUT /zones/{zone_id}/dns_records/{record_id}` updates. `DELETE /zones/{zone_id}/dns_records/{record_id}` removes. Every resource is addressable. Every action maps to a standard HTTP method. The API is fully auditable, fully deterministic, and fully scriptable.\n\n**5. Your Browser Right Now**\n\nThe web itself is REST. When you loaded this page, your browser sent `GET /articles/oip-what-is-rest`. The server returned HTML (a representation). The page contains links to other resources. You click a link. The browser sends another GET. No state is stored on the server about your \"session\" unless you explicitly send a cookie. The web is REST's original and most successful implementation.\n\n## Common Mistakes\n\n**Using verbs in URLs.**\n\nWrong: `POST /createUser`, `GET /getUser/42`, `POST /deleteOrder/7`\n\nRight: `POST /users`, `GET /users/42`, `DELETE /orders/7`\n\nThe URL names the resource. The HTTP method names the action. Do not mix them.\n\n**Treating GET as a command.**\n\nGET must not modify state. It must be safe and cacheable. If a GET deletes a resource, every cache, every proxy, every browser prefetch will destroy your data. Never use GET for mutations. Never.\n\n**Returning 200 on errors.**\n\nWrong: `HTTP 200 OK` with body `{\"error\": \"not found\"}`\n\nRight: `HTTP 404 Not Found` with body `{\"error\": \"not found\"}`\n\nStatus codes are part of the contract. Respect them. A monitoring system that checks 200 to determine health will miss every error you bury in a 200.\n\n**Ignoring idempotency.**\n\nIf a client retries a POST because the network timed out, you create a duplicate resource. POST is not idempotent. For operations that must be safe to retry, use PUT with a client-generated ID, or implement idempotency keys. Stripe's `Idempotency-Key: {uuid}` header is the correct pattern.\n\n**Inventing custom headers instead of using standard ones.**\n\nWrong: `X-Request-ID: 12345` (for request tracing, use `Traceparent` or `X-Request-ID` as standard practice is fine, but inventing `X-My-Custom-Token` instead of `Authorization` is not)\n\nUse `Authorization` for auth. Use `Content-Type` for payload type. Use `ETag` and `If-None-Match` for caching. Do not reinvent what already exists.\n\n**Exposing internal IDs or database schemas.**\n\nWrong: `GET /api/v1/getCustomerRecord?table=customers&id=42`\n\nRight: `GET /customers/42`\n\nThe URL is a public interface. It is not a SQL query. Hide the implementation. Expose the intent.\n\n**Ignoring hypermedia.**\n\nMost APIs ignore HATEOAS. They return bare JSON with no links. The client must hardcode URLs. When the API changes, the client breaks. This is not REST. It is HTTP-RPC with JSON. If you want the durability REST promises, include links. Teach the client what it can do next.\n\n## Connection to OIP\n\nOIP — the Open Interface Protocol — is built on the same principles that make REST endure. REST is the spiritual ancestor of OIP's design philosophy. The connection is direct and intentional.\n\n**Open.** REST is open because it uses universal standards. HTTP is not owned by anyone. JSON is not owned by anyone. A REST API can be consumed by any client written in any language on any platform. OIP extends this: not just open standards, but open contracts. Every row in the OIP directory is readable, editable, and verifiable by anyone with permission. There is no hidden behavior. The tool contract is the contract.\n\n**Deterministic.** REST is deterministic because a given request always produces the same response (assuming the resource has not changed). GET `/users/42` today returns the same structure as GET `/users/42` tomorrow. OIP takes this further: every tool invocation is logged, every parameter is validated, every output is predictable from the input. There are no side effects that are not declared. The contract is the code.\n\n**Auditable.** REST is auditable because every interaction is a request-response pair with a URL, a method, headers, and a status code. OIP makes this explicit: every turn, every tool call, every decision is recorded in a ledger. You can reconstruct exactly what happened. You can replay it. You can verify it. The audit trail is not an afterthought. It is the system.\n\nREST taught us that the best protocols are the ones that do the least. OIP follows that lesson. A REST API with three verbs and clear nouns is more powerful than a SOAP API with a hundred custom methods. An OIP directory with clean rows and validated contracts is more powerful than a black-box agent with hidden prompts.\n\nREST is the proof that simplicity scales. OIP is the continuation of that proof into the age of agentic systems. The web is REST. The build is OIP. Both rely on the same truth: **when the interface is clean, the system becomes unstoppable.**\n\n## Connection to the Grain Philosophy\n\nThis protocol is part of the [Open Inventory Protocol](/a/philosophy) — a living system of self-describing voxels that serves the Grain philosophy. The OIP is the interface. The philosophy is the core.\n","hero":null,"images":[],"style":{},"tags":["oip","protocol"],"category":null,"model":"owner","ledger":{"href":"/api/articles/oip-what-is-rest/ledger","live":true},"embeds":[],"widgets":[],"home":true,"claims":[{"id":"c1","text":"REST is not a protocol. It is an architectural style that treats the entire web as a collection of resources, each addressable by a unique URL, manipulated through a small set of universal verbs.","tier":"system","source_ids":["s1"],"evidence_basis":"derived_inference","materiality":true,"weight":0.8,"status":"active","falsifier":"Contradictory evidence or counter-example."},{"id":"c2","text":"Every REST interaction is stateless in session terms: the server holds no memory of your conversation — each request carries its own context in the URL, headers, and body — while resource state persists by design. A PUT is remembered forever; the session is not.","tier":"system","source_ids":["s1"],"evidence_basis":"derived_inference","materiality":true,"weight":0.8,"status":"active","falsifier":"Contradictory evidence or counter-example.","chain":[{"n":1,"op":"edit","ts":"2026-07-17T03:06:20.965Z","actor":"cap:cap_5816f40d1f837aa3","text_sha":"95c445e9a43e1f93536f74886834d4c5535c327bc77a9bc20614632b672a3e8c","detail":{"before_sha":"618fcbe15ccf8301d45f10efc1cf66e49349bbb4d95aab93b6613ac6f092cb0a","after_sha":"95c445e9a43e1f93536f74886834d4c5535c327bc77a9bc20614632b672a3e8c","claimed_model":"claude-fable-5","rationale":""},"prev":"genesis","hash":"bd4c38f3f6d9bb903a1a48a84fa0f4127697e68ab1500c5fc459af71f08f0981"}],"chain_head":"bd4c38f3f6d9bb903a1a48a84fa0f4127697e68ab1500c5fc459af71f08f0981","vx_hash":"f0e42d1b15198dabc230e726f5bdb4982e28d227d3d20ba521d6a371aba99c64"},{"id":"c3","text":"**REST (Representational State Transfer) is an architectural style for designing networked applications. It uses HTTP methods (GET, POST, PUT, DELETE, PATCH) to operate on resources identified by URLs. Each request from client to server must contain all the information needed to understand and process the request. The server stores no client session state between requests.**","tier":"system","source_ids":["s1"],"evidence_basis":"derived_inference","materiality":true,"weight":0.8,"status":"active","falsifier":"Contradictory evidence or counter-example."}],"sources":[{"id":"s1","type":"adjacent","url":"https://miscsubjects.com/a/oip-what-is-rest","title":"What Is REST","quote":"REST is not a protocol. It is an architectural style that treats the entire web as a collection of resources, each addressable by a unique URL, manipulated through a small set of universal verbs.","summary":"Primary exposition of What Is REST.","claim_ids":["c1","c2","c3"],"quality_score":0.9}],"reviews":[],"extra":{"corpus_map":{"series":"oip-what-is","hub":"philosophy","prev":"oip-what-is-http","next":"oip-what-is-an-api","position":18,"of":19},"normandy_v1":{"traversal":{"convergence_patterns":["C20"],"adjacent_sources":["shannon-1948"],"falsifier_surface":"A system where this concept is unnecessary or harmful.","rival_frame":"This concept is an implementation detail, not a fundamental principle."}}},"has_traversal":true,"register":"oip_protocol","status":"published","revisions":2,"contributions":[],"provenance":[{"ts":"2026-07-17T02:36:52.094Z","model":"owner","action":"voxel_divide","prompt":"","input":"oip-what-is-rest","response":"88 DIVs from body (verbatim, roundtrip-checked)","tokens_in":0,"tokens_out":0,"cost":0,"prev":"genesis","hash":"9e184540cb6d3a40fd0f766314873aa05d10f484607273215d5534613eec6b1b"},{"ts":"2026-07-17T03:06:20.965Z","model":"cap:cap_5816f40d1f837aa3","action":"claim_div_edit","prompt":"","input":"oip-what-is-rest claim:c2","response":"Every REST interaction is stateless in session terms: the server holds no memory of your conversation — each request carries its own context in the URL, headers, and body — while resource state persists by design. A PUT is remembered forever; the session is not.","tokens_in":0,"tokens_out":0,"cost":0,"prev":"9e184540cb6d3a40fd0f766314873aa05d10f484607273215d5534613eec6b1b","hash":"8d3a61a090045990d6f49bf9166445997e37e6dbe83e506beb8a190cbfe1cc4c"}],"energy":{"passes":2,"tokens_in":0,"tokens_out":0,"tokens_total":0,"cost_usd":0,"models":{"owner":1,"cap:cap_5816f40d1f837aa3":1},"head":"8d3a61a090045990d6f49bf9166445997e37e6dbe83e506beb8a190cbfe1cc4c"},"posted_at":"2026-07-04T18:30:49.474Z","created_at":"2026-07-04T18:30:49.474Z","updated_at":"2026-07-17T03:06:20.965Z","machine":{"shape":"article.machine/v1","slug":"oip-what-is-rest","kind":"corpus","read":{"human":"https://miscsubjects.com/a/oip-what-is-rest","json":"https://miscsubjects.com/api/articles/oip-what-is-rest","bundle":"https://miscsubjects.com/api/articles/oip-what-is-rest/bundle?format=markdown"},"traversal":{"prev":{"slug":"oip-what-is-http","human":"https://miscsubjects.com/a/oip-what-is-http","json":"https://miscsubjects.com/api/articles/oip-what-is-http"},"next":{"slug":"oip-what-is-an-api","human":"https://miscsubjects.com/a/oip-what-is-an-api","json":"https://miscsubjects.com/api/articles/oip-what-is-an-api"},"hub":{"slug":"philosophy","human":"https://miscsubjects.com/a/philosophy","json":"https://miscsubjects.com/api/articles/philosophy"},"series":"oip-what-is","position":18,"of":19},"ledger":{"claims":3,"sources":1,"contributions":0,"revisions":2,"objections_url":"https://miscsubjects.com/api/articles/oip-what-is-rest/objections","thread_state_url":"https://miscsubjects.com/api/protocol/thread-state?target=oip-what-is-rest","proof_rule":"An action is proven by its ledger receipt, never by a 200 or a description."},"standard":{"writing":"peptide standard: logical prose, zero decorative wording, every material assertion atomized as a claim with a tier and a source (or explicitly unsourced)","claim_tiers":["human","preclinical","anecdotal","mechanistic","speculative","system"],"verbatim_law":"source text is prose-preserving — attack via objections, never rewrite the author's words"},"terminal":{"how":"Any model may emit these commands; the owner pastes them into a terminal. $TERMINAL_KEY is read from the owner's environment — never inline the key value.","claim_append":"curl -s -X POST https://miscsubjects.com/api/protocol/claim -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\"slug\":\"oip-what-is-rest\",\"text\":\"<one atomized claim>\",\"tier\":\"<human|preclinical|anecdotal|mechanistic|speculative|system>\",\"source_ids\":[],\"who_claims\":\"<model>\",\"rationale\":\"<why material>\"}'","source_append":"curl -s -X POST https://miscsubjects.com/api/protocol/sources -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\"slug\":\"oip-what-is-rest\",\"sources\":[{\"type\":\"review\",\"url\":\"<url>\",\"title\":\"<title>\",\"quote\":\"<verbatim quote>\",\"summary\":\"<one line>\"}]}'","objection":"curl -s -X POST https://miscsubjects.com/api/articles/oip-what-is-rest/objections -H 'content-type: application/json' -d '{\"actor\":\"<model>\",\"objection\":\"<attack>\",\"surface\":\"S1-S8\",\"minimum_patch\":\"<patch>\"}'  # open intake, no key","thread_update":"curl -s -X POST https://miscsubjects.com/api/protocol/thread-update -H 'content-type: application/json' -d '{\"actor\":\"<model>\",\"target\":\"oip-what-is-rest\",\"raw_text\":\"<material delta>\"}'  # open intake, no key","read_back":"curl -s https://miscsubjects.com/api/articles/oip-what-is-rest | python3 -c 'import json,sys; d=json.load(sys.stdin); print(json.dumps(d[\"claims\"][-3:], indent=1))'"}},"representations":{"article":"/a/oip-what-is-rest","json":"/api/articles/oip-what-is-rest","markdown":"/api/articles/oip-what-is-rest/bundle?format=markdown","skill":"/api/articles/oip-what-is-rest/skill","topology":"/api/articles/oip-what-is-rest/topology","versions":"/api/articles/oip-what-is-rest/revisions","invocations":"/api/articles/oip-what-is-rest/invocations"}}}}