Repository navigation
docs(api): fix the Actor, version, and schedule request schemas - #3087
Conversation
|
🗑️ Preview for this PR was deleted. |
Pijukatel
left a comment
There was a problem hiding this comment.
Apart from the comments, when letting agent do real API tests with this, it also uncovered related pre-existing problem similar to what this PR could create:
CreateActorRequest.isPublic and .versions wrongly allow null; both return 400 on production. This is already on master, but could be fixed in this change as it is very closely related.
|
thanks @Pijukatel, your suggestions are addressed, please recheck btw. apify/apify-client-python#1150 uncovered a few more stale/imprecise schemas, so I'm fixing those here too |
apify-factory
left a comment
There was a problem hiding this comment.
Looks good, nothing blocking.
…t sets sourceType
apify-service-account
left a comment
There was a problem hiding this comment.
2 issues, see inline comments.
apify-service-account
left a comment
There was a problem hiding this comment.
The API rejects some buildTag values that the new version request schemas allow. Details are in the inline comments.
apify-service-account
left a comment
There was a problem hiding this comment.
No new issues found at e111935, checked against apify-core v0.1582.0 and the live API.
apify-service-account
left a comment
There was a problem hiding this comment.
No new issues found at 395c5f9, checked against apify-core v0.1582.0 and the live API.
apify-service-account
left a comment
There was a problem hiding this comment.
No new problems found at c1589ee against apify-core v0.1582.0 and the production API.
apify-service-account
left a comment
There was a problem hiding this comment.
No new issues found at 395c5f9, checked against apify-core v0.1582.0 and tested on the live API.
Adds optional parameters that the API accepts and the JS client already exposes: - Task `create()` / `update()`: `description`, `max_total_charge_usd` - Webhook `create()` / `update()`: `description`, `should_interpolate_strings` - Schedule `create()` / `update()`: `notifications_email` (sent as `notifications.email`) - Store `list()` / `iterate()`: `include_unrunnable_actors` - Actor `create()`: `actor_permission_level` - Dataset, key-value store and request queue `update()`: `title` - Dataset: `flatten` and `view` on `iterate_items()`, `view` and `attachment` on `get_items_as_bytes()` and `stream_items()`, `item_format` on `create_items_public_url()` `notifications` and `actor_permission_level` go through the generated request models, which got these fields in #1152 (from apify/apify-docs#3087). Task input stays dict-only: the spec allows a list, but the API rejects anything other than an object. Closes: #1147 *✍️ Drafted by Claude Code*
Aligns the Actor, version, env var and schedule request schemas with what the API accepts, checked against apify-core and the live API.
CreateActorRequestgetsactorPermissionLevelandCreateOrUpdateScheduleRequestgetsnotifications, which now has its ownScheduleNotificationsschema. Fields dropnullwhere the API rejects it, or where a storednullbreaks later requests.versionsneeds at least one item.CreateOrUpdateVersionRequestis split intoCreateVersionRequest, which requiresversionNumberandsourceType, andUpdateVersionRequest, where everything stays optional. Both take a newWritableVersionSourceTypeenum withoutSOURCE_CODE, which the API rejects.EnvVarRequestis now a standalone schema that requiresnameandvalue. The previousallOfoverEnvVarmade the generated client report an invalid override (apify/apify-client-python#1150).Value patterns and length limits are left out on purpose: apify-client-python turns them into local validation that would reject input before the API sees it. apify/apify-client-python#1151 previews the regenerated models. Until they're regenerated, apify/apify-client-python#1144 adds the missing fields to the request body by hand.
✍️ Drafted by Claude Code