Fix Apify integration sending actor input in nested envelope#194
Merged
Conversation
The gateway wrapped the `input` param as `{"input": {...}}` in the
request body, but Apify's run-sync-get-dataset-items endpoint expects
the actor input as the top-level body. This caused every actor to
receive empty/default input and return nothing.
Add `body_path: "."` support to the gateway so a param's parsed value
can become the entire request body. Apply it to the Apify integration
definition. Add e2e smoke test covering URL templating, auth, body
structure, and array response handling.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two bugs fixed:
1. Actor input envelope: The gateway wrapped the `input` param as
`{"input": {...}}` but Apify expects actor input as the top-level
request body. Added `body_path: "."` support so a JSON param's
parsed value becomes the entire body.
2. Actor ID URL format: Apify uses `~` as the namespace separator in
API URLs (e.g. `apidojo~tweet-scraper`), not `/`. The `/` format
created extra path segments causing 404s. Updated all 6 skill docs
to use the correct tilde format.
Verified against live Apify API — returns tweet data correctly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
inputparam as{"input": {...}}in the request body, but Apify'srun-sync-get-dataset-itemsendpoint expects the actor input as the top-level body. This caused every actor invocation to receive empty/default input and return nothing useful.body_path: "."support to the gateway so a JSON param's parsed value can become the entire request body instead of being nested under its param name.body_path: "."to the Apify integration definition'sinputparam.e2e/apify_smoke_test.gowith a mock test (URL templating, auth header, body structure, JSON array response) and a live API test gated onAPIFY_TEST_TOKEN.Test plan
TestSmoke_ApifyRunActor— mock test confirms body is sent at top level, not wrapped./e2e/,./internal/integration/,./cmd/) — no regressionsTestSmoke_ApifyRunActor_LiveAPI— run withAPIFY_TEST_TOKEN=<key> go test ./e2e/ -run LiveAPI -vto validate against real Apify API🤖 Generated with Claude Code