Skip to content

docs(api): fix the Actor, version, and schedule request schemas - #3087

Merged
vdusek merged 26 commits into
masterfrom
fix/openapi-create-request-gaps
Oct 19, 2026
Merged

vdusek merged 26 commits into
masterfrom
fix/openapi-create-request-gaps

Conversation

@vdusek

@vdusek vdusek commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Aligns the Actor, version, env var and schedule request schemas with what the API accepts, checked against apify-core and the live API. CreateActorRequest gets actorPermissionLevel and CreateOrUpdateScheduleRequest gets notifications, which now has its own ScheduleNotifications schema. Fields drop null where the API rejects it, or where a stored null breaks later requests. versions needs at least one item.

CreateOrUpdateVersionRequest is split into CreateVersionRequest, which requires versionNumber and sourceType, and UpdateVersionRequest, where everything stays optional. Both take a new WritableVersionSourceType enum without SOURCE_CODE, which the API rejects. EnvVarRequest is now a standalone schema that requires name and value. The previous allOf over EnvVar made 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

@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Oct 16, 2026
@vdusek vdusek self-assigned this Oct 16, 2026
@apify-service-account

apify-service-account commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🗑️ Preview for this PR was deleted.

@Pijukatel Pijukatel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread apify-api/openapi/components/schemas/actors/CreateActorRequest.yaml Outdated
Comment thread apify-api/openapi/components/schemas/schedules/CreateOrUpdateScheduleRequest.yaml Outdated
@vdusek vdusek changed the title docs(api): add missing fields to the Actor and schedule request schemas docs(api): fix the Actor, version, and schedule request schemas Oct 19, 2026
@vdusek
vdusek requested a review from Pijukatel October 19, 2026 07:45
@vdusek

vdusek commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

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

Comment thread apify-api/openapi/components/schemas/actors/CreateActorRequest.yaml Outdated
@vdusek
vdusek requested a review from apify-factory October 19, 2026 09:33

@apify-factory apify-factory left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, nothing blocking.

Comment thread apify-api/openapi/components/schemas/actors/CreateActorRequest.yaml Outdated

@apify-service-account apify-service-account left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues, see inline comments.

Comment thread apify-api/openapi/components/schemas/actors/CreateActorRequest.yaml
Comment thread apify-api/openapi/components/schemas/actors/EnvVarRequest.yaml Outdated

@apify-service-account apify-service-account left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API rejects some buildTag values that the new version request schemas allow. Details are in the inline comments.

Comment thread apify-api/openapi/components/schemas/actors/CreateVersionRequest.yaml Outdated

@apify-service-account apify-service-account left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No new issues found at e111935, checked against apify-core v0.1582.0 and the live API.

vdusek added a commit to apify/apify-client-python that referenced this pull request Oct 19, 2026

@apify-service-account apify-service-account left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No new issues found at 395c5f9, checked against apify-core v0.1582.0 and the live API.

@apify-service-account apify-service-account left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No new problems found at c1589ee against apify-core v0.1582.0 and the production API.

@apify-service-account apify-service-account left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No new issues found at 395c5f9, checked against apify-core v0.1582.0 and tested on the live API.

@vdusek
vdusek merged commit 6923d21 into master Oct 19, 2026
18 checks passed
@vdusek
vdusek deleted the fix/openapi-create-request-gaps branch October 19, 2026 13:36
vdusek added a commit to apify/apify-client-python that referenced this pull request Oct 19, 2026
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*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants