Skip to content

docs(apify-actor-development): document REST deploy path (PUT versions with JSON sourceFiles)#71

Draft
DaveHanns wants to merge 1 commit into
apify:mainfrom
DaveHanns:docs/skill-migration-2-rest-deploy-json
Draft

docs(apify-actor-development): document REST deploy path (PUT versions with JSON sourceFiles)#71
DaveHanns wants to merge 1 commit into
apify:mainfrom
DaveHanns:docs/skill-migration-2-rest-deploy-json

Conversation

@DaveHanns

Copy link
Copy Markdown

Rationale

When apify-cli isn't available (API-only or MCP-only workflows), agents attempting to deploy Actor source via REST hit two silent pitfalls:

  1. The sibling PUT /v2/acts/{id}/versions/{ver}/source-files tarball endpoint is documented but currently 4xx's on any payload shape.
  2. Invented query params like ?overwrite=true or ?force=1 don't exist — overwrite semantics are governed by the HTTP verb (POST to create, PUT to overwrite).

The correct path is PUT /v2/acts/{actorId}/versions/{versionNumber} with a JSON body describing files via sourceType + inline sourceFiles (base64 for binaries, plain text for text files). This addition documents that path directly in the actor-development skill so agents pick the working endpoint on the first try.

Added content (preview)

Deploying without the CLI (REST API)

If apify-cli isn't available, deploy via PUT /v2/acts/{actorId}/versions/{versionNumber} with a JSON body whose sourceType and inline sourceFiles (base64 for binaries, plain text for text files) describe each file — see the Update version reference. Use POST /v2/acts/{actorId}/versions to create a new version, PUT to overwrite an existing one; there is no ?overwrite=true or ?force=1 query parameter — overwrite semantics are governed by the HTTP verb.

Avoid the sibling PUT /v2/acts/{id}/versions/{ver}/source-files tarball endpoint. It is documented but currently returns 4xx regardless of payload shape; use the JSON sourceFiles form instead.

The MAJOR.MINOR version regex (each segment 0-99) applies to this endpoint as well — see the actor.json reference.

Surfaced during an evaluation of Apify surfaces for agent-driven Actor development.

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.

2 participants