docs(openapi): Add undocumented kvs endpoints#2438
Conversation
Refactor for more re-use
|
Preview for this PR was built for commit |
There was a problem hiding this comment.
Pull request overview
This PR updates the OpenAPI spec to document previously undocumented (but public) convenience endpoints for Actor run default key-value stores, refactors KVS path definitions to reuse shared component objects, and reorganizes Convenience endpoints tags to reduce clutter.
Changes:
- Added new OpenAPI paths for Actor run default key-value store endpoints (by
runId) and last Actor run default key-value store endpoints (byactorId+ status). - Refactored key-value store path YAMLs to
$refshared component objects (key-value-store*.yaml) instead of duplicating operation definitions. - Split common parameters into
datasetParameters.yamlandkeyValueStoreParameters.yaml, updating references across datasets/KVS-related endpoints.
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| apify-api/openapi/openapi.yaml | Registers new convenience endpoints under paths for default/last-run key-value store access. |
| apify-api/openapi/components/x-tag-groups.yaml | Replaces old Convenience endpoint tags with dataset/KVS-specific subgroups. |
| apify-api/openapi/components/tags.yaml | Introduces new tag sections for Default dataset/KVS and last-run variants. |
| apify-api/openapi/components/parameters/storageParameters.yaml | Removes dataset/KVS-specific path params (migrated to dedicated parameter files). |
| apify-api/openapi/components/parameters/datasetParameters.yaml | Adds datasetId and centralizes dataset query/path parameters. |
| apify-api/openapi/components/parameters/keyValueStoreParameters.yaml | New: centralizes KVS path/query/header parameters (storeId, recordKey, filters, Content-Encoding, etc.). |
| apify-api/openapi/components/objects/key-value-stores/key-value-store.yaml | New: shared component operations for KVS store object (by id, default run, last run). |
| apify-api/openapi/components/objects/key-value-stores/key-value-store-keys.yaml | New: shared component operations for KVS keys listing (by id, default run, last run). |
| apify-api/openapi/components/objects/key-value-stores/key-value-store-record.yaml | New: shared component operations for KVS record CRUD (by id, default run, last run). |
| apify-api/openapi/components/objects/key-value-stores/key-value-store-records.yaml | New: shared component operations for KVS records ZIP download (by id, default run, last run). |
| apify-api/openapi/components/objects/key-value-stores/key-value-stores@{storeId}@records@{recordKey}put.yaml | Deleted: superseded by shared component objects. |
| apify-api/openapi/paths/key-value-stores/key-value-stores@{storeId}.yaml | Refactors store operations to $ref shared KVS store component. |
| apify-api/openapi/paths/key-value-stores/key-value-stores@{storeId}@keys.yaml | Refactors keys listing to $ref shared KVS keys component. |
| apify-api/openapi/paths/key-value-stores/key-value-stores@{storeId}@records.yaml | Refactors records ZIP download to $ref shared KVS records component. |
| apify-api/openapi/paths/key-value-stores/key-value-stores@{storeId}@records@{recordKey}.yaml | Refactors record CRUD/head to $ref shared KVS record component. |
| apify-api/openapi/paths/actor-runs/actor-runs@{runId}@key-value-store.yaml | New: convenience path for default KVS store object by runId. |
| apify-api/openapi/paths/actor-runs/actor-runs@{runId}@key-value-store@keys.yaml | New: convenience path for default KVS keys by runId. |
| apify-api/openapi/paths/actor-runs/actor-runs@{runId}@key-value-store@records.yaml | New: convenience path for default KVS records ZIP by runId. |
| apify-api/openapi/paths/actor-runs/actor-runs@{runId}@key-value-store@records@{recordKey}.yaml | New: convenience path for default KVS record CRUD by runId. |
| apify-api/openapi/paths/actors/acts@{actorId}@Runs@last@key-value-store.yaml | New: convenience path for last run default KVS store object by actorId. |
| apify-api/openapi/paths/actors/acts@{actorId}@Runs@last@key-value-store@keys.yaml | New: convenience path for last run default KVS keys by actorId. |
| apify-api/openapi/paths/actors/acts@{actorId}@Runs@last@key-value-store@records.yaml | New: convenience path for last run default KVS records ZIP by actorId. |
| apify-api/openapi/paths/actors/acts@{actorId}@Runs@last@key-value-store@records@{recordKey}.yaml | New: convenience path for last run default KVS record CRUD by actorId. |
| apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml | Switches dataset item query param refs to datasetParameters.yaml. |
| apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@run-sync-get-dataset-items.yaml | Switches dataset item query param refs to datasetParameters.yaml. |
| apify-api/openapi/components/objects/datasets/dataset.yaml | Updates datasetId ref and re-tags default/last-run dataset endpoints. |
| apify-api/openapi/components/objects/datasets/dataset-statistics.yaml | Updates datasetId ref and re-tags default/last-run dataset endpoints. |
| apify-api/openapi/components/objects/datasets/dataset-items.yaml | Updates datasetId + dataset query param refs and re-tags default/last-run dataset endpoints. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Preview for this PR was built for commit |
|
Preview for this PR was built for commit |
janbuchar
left a comment
There was a problem hiding this comment.
LGTM, but see my comment please
There was a problem hiding this comment.
I guess we must have discussed this earlier when we introduced #/components/objects for storing entire endpoints, but it kinda caught me off guard when I saw it in this PR.
We should probably document this somewhere (I mean the purpose of #/components/objects.
There was a problem hiding this comment.
Yes, it was described here: #2372 (comment)
I think that without such trick, there would be too much duplication in specification. (I will be adding even more variant because of task last run... and logs).
I am updating the docs about changing the OpenAPI specification about this trick.
There was a problem hiding this comment.
Cool, if you document it, no further objections 🙂
fa5f087 to
b88487a
Compare
|
Preview for this PR was built for commit |
|
Preview for this PR was built for commit |
Description
Convenience endpoints, to avoid cluttering the documentation.(More undocumented endpoints will be added in follow-up PRs)
Issues
Partially implements: #2286