Skip to content

Add Actor Runtime API OpenAPI specification and documentation#84

Open
jancurn wants to merge 3 commits intomasterfrom
claude/whitepaper-to-specification-YwhuL
Open

Add Actor Runtime API OpenAPI specification and documentation#84
jancurn wants to merge 3 commits intomasterfrom
claude/whitepaper-to-specification-YwhuL

Conversation

@jancurn
Copy link
Copy Markdown
Member

@jancurn jancurn commented Mar 17, 2026

Summary

This PR adds comprehensive OpenAPI 3.1.0 specification for the Actor Runtime API and integrates API usage examples throughout the Actor Programming Model documentation.

Solves #46

Key Changes

  • New OpenAPI Specification (openapi/openapi.json): Complete REST API definition covering:

    • Actor run management (get, update, abort, reboot, metamorph, charge)
    • Key-value store operations (CRUD for records, list keys, get/create stores)
    • Dataset operations (push items, retrieve items, get/create datasets)
    • Webhook management for Actor runs
    • Memory information retrieval
    • Actor run startup with configuration
    • Bearer token and API token query parameter authentication schemes
    • Comprehensive schema definitions for all request/response types
  • Documentation Updates (README.md): Added API usage examples alongside existing SDK examples for:

    • Reading Actor input from key-value stores
    • Key-value store operations (get, set, delete, list records)
    • Dataset operations (push single/multiple items, get/create datasets)
    • Actor exit signaling with status and exit codes
    • Status message updates
    • Memory information retrieval
    • Starting Actor runs with input and configuration
    • Metamorphing to another Actor
    • Webhook attachment to runs
    • Aborting Actor runs
    • Added ACTOR_API_BASE_URL environment variable documentation

Implementation Details

  • The OpenAPI spec provides a language-agnostic interface definition that enables auto-generation of thin SDKs for any programming language
  • All endpoints include proper HTTP method semantics (GET, POST, PUT, DELETE)
  • Request/response schemas support flexible content types (JSON, binary, etc.) for key-value store records
  • Authentication is handled via Bearer token (from APIFY_TOKEN environment variable) or query parameter
  • Documentation examples use placeholder variables (e.g., {ACTOR_API_BASE_URL}, {ACTOR_RUN_ID}) for clarity

https://claude.ai/code/session_01J8Xb9hSAEuPoQj3EtDLcTf

claude added 3 commits March 16, 2026 22:38
Define a standardized HTTP REST API that separates the front-end SDK
from the back-end Actor runtime, enabling thin SDKs to be generated
for any language and third-party runtime implementations.

- Add openapi/openapi.json with full OpenAPI 3.1 specification covering:
  - Actor run management (status, abort, reboot, metamorph, charge)
  - Key-value store operations (get/set/delete records, list keys)
  - Dataset operations (push/get items, get-or-create named datasets)
  - Webhook attachment to Actor runs
  - Memory information endpoint
- Update README.md with API code example tabs for each Actor
  programming interface operation
- Add ACTOR_API_BASE_URL environment variable
- Update Future work section to reflect completed API specification
- Add OpenAPI spec link to Links section

Closes #46

https://claude.ai/code/session_01J8Xb9hSAEuPoQj3EtDLcTf
Add a conventions note at the top of the Actor programming interface
section explaining auth, base URL, and content type once, then remove
the repetitive Authorization, Content-Type, and {ACTOR_API_BASE_URL}
prefix from all API code blocks.

https://claude.ai/code/session_01J8Xb9hSAEuPoQj3EtDLcTf
- Update Background section: replace "work in progress" language with
  a proper reference to the now-complete Actor Runtime API OpenAPI spec
- Add a sentence to Actor programming interface section explaining that
  SDK operations map to the HTTP REST API defined in the OpenAPI spec
- Expand Future work section with a bulleted list of what the OpenAPI
  spec covers (run management, KV stores, datasets, webhooks, memory)
- Move the OpenAPI link out of the blockquote into the main prose

https://claude.ai/code/session_01J8Xb9hSAEuPoQj3EtDLcTf
@janbuchar
Copy link
Copy Markdown
Contributor

I think this is a better place to discuss this than Slack, so... This document describes the Actor API, which is (more or less) implemented by the Apify API. What is the endgame plan for keeping this spec in sync with the Apify spec?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants