Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,15 @@ Timeouts, retries, limits, logging and the exit codes are in the [configuration
| [embeds](https://yandex.cloud/en/docs/datalens/api-ref/Embeds/) | [list](https://yandex.cloud/en/docs/datalens/api-ref/Embeds/rpclistEmbeds-post) · [create](https://yandex.cloud/en/docs/datalens/api-ref/Embeds/rpccreateEmbed-post) · [update](https://yandex.cloud/en/docs/datalens/api-ref/Embeds/rpcupdateEmbed-post) · [delete](https://yandex.cloud/en/docs/datalens/api-ref/Embeds/rpcdeleteEmbed-post) | ✅ | ✅ |
| [embeddingsecrets](https://yandex.cloud/en/docs/datalens/api-ref/EmbeddingSecrets/) | [get](https://yandex.cloud/en/docs/datalens/api-ref/EmbeddingSecrets/rpcgetEmbeddingSecret-post) · [list](https://yandex.cloud/en/docs/datalens/api-ref/EmbeddingSecrets/rpclistEmbeddingSecrets-post) · [create](https://yandex.cloud/en/docs/datalens/api-ref/EmbeddingSecrets/rpccreateEmbeddingSecret-post) · [delete](https://yandex.cloud/en/docs/datalens/api-ref/EmbeddingSecrets/rpcdeleteEmbeddingSecret-post) | ✅ | ✅ |

**Not covered** (7)
**Not covered** (9)

- ○ `POST /rpc/checkFavorites`: new section published 2026-10, wrapping not decided
- ○ [`POST /rpc/createFolder`](https://yandex.cloud/en/docs/datalens/api-ref/Folder/rpccreateFolder-post): the old placement model (folders); the organization has none to check it on (#394)
- ○ [`POST /rpc/deleteFolder`](https://yandex.cloud/en/docs/datalens/api-ref/Folder/rpcdeleteFolder-post): the old placement model (folders); the organization has none to check it on (#394)
- ○ [`POST /rpc/dlsSuggest`](https://yandex.cloud/en/docs/datalens/api-ref/Folder/rpcdlsSuggest-post): the old placement model (folders); the organization has none to check it on (#394)
- ○ [`POST /rpc/getPermissions`](https://yandex.cloud/en/docs/datalens/api-ref/Folder/rpcgetPermissions-post): the old placement model (folders); the organization has none to check it on (#394)
- ○ [`POST /rpc/listDirectory`](https://yandex.cloud/en/docs/datalens/api-ref/Navigation/rpclistDirectory-post): the old placement model (folders); the organization has none to check it on (#394)
- ○ `POST /rpc/listFavorites`: new section published 2026-10, wrapping not decided
- ○ [`POST /rpc/modifyPermissions`](https://yandex.cloud/en/docs/datalens/api-ref/Folder/rpcmodifyPermissions-post): the old placement model (folders); the organization has none to check it on (#394)
- ○ [`POST /rpc/moveFolderEntry`](https://yandex.cloud/en/docs/datalens/api-ref/Folder/rpcmoveFolderEntry-post): the old placement model (folders); the organization has none to check it on (#394)

Expand All @@ -405,7 +407,7 @@ What ycli sends, replayed from its contract tests, compared with what Yandex pub
| Tracker | 190 | 188 | 0 (+2 on purpose) | 0 | — | [API reference](https://yandex.ru/support/tracker/en/api/about-api) |
| Wiki | 56 | 56 | 0 | 0 | 24 of 24 | [OpenAPI](https://api.wiki.yandex.net/v1/openapi.json) |
| Forms | 84 | 84 | 0 | 8 | 26 of 30 | [OpenAPI](https://api.forms.yandex.net/v1/openapi.json) |
| DataLens | 141 | 134 | 0 (+7 on purpose) | 0 | 131 of 131 | [OpenAPI](https://api.datalens.tech/json/) |
| DataLens | 143 | 134 | 0 (+9 on purpose) | 0 | 131 of 131 | [OpenAPI](https://api.datalens.tech/json/) |

<details>
<summary><b>Tracker: what differs</b></summary>
Expand Down Expand Up @@ -456,11 +458,13 @@ What ycli sends, replayed from its contract tests, compared with what Yandex pub

| Operation | Why |
|---|---|
| `POST /rpc/checkFavorites` | new section published 2026-10, wrapping not decided |
| [`POST /rpc/createFolder`](https://yandex.cloud/en/docs/datalens/api-ref/Folder/rpccreateFolder-post) | the old placement model (folders); the organization has none to check it on (#394) |
| [`POST /rpc/deleteFolder`](https://yandex.cloud/en/docs/datalens/api-ref/Folder/rpcdeleteFolder-post) | the old placement model (folders); the organization has none to check it on (#394) |
| [`POST /rpc/dlsSuggest`](https://yandex.cloud/en/docs/datalens/api-ref/Folder/rpcdlsSuggest-post) | the old placement model (folders); the organization has none to check it on (#394) |
| [`POST /rpc/getPermissions`](https://yandex.cloud/en/docs/datalens/api-ref/Folder/rpcgetPermissions-post) | the old placement model (folders); the organization has none to check it on (#394) |
| [`POST /rpc/listDirectory`](https://yandex.cloud/en/docs/datalens/api-ref/Navigation/rpclistDirectory-post) | the old placement model (folders); the organization has none to check it on (#394) |
| `POST /rpc/listFavorites` | new section published 2026-10, wrapping not decided |
| [`POST /rpc/modifyPermissions`](https://yandex.cloud/en/docs/datalens/api-ref/Folder/rpcmodifyPermissions-post) | the old placement model (folders); the organization has none to check it on (#394) |
| [`POST /rpc/moveFolderEntry`](https://yandex.cloud/en/docs/datalens/api-ref/Folder/rpcmoveFolderEntry-post) | the old placement model (folders); the organization has none to check it on (#394) |

Expand Down
2 changes: 1 addition & 1 deletion README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ YANDEX_ID_ORGANIZATION_ID=... # идентификатор вашей орг

Операций API Трекера, Вики, Форм и DataLens: **467** (Трекер — 190, Вики — 58, Формы — 85, DataLens — 134), ресурсов: **88**; все операции доступны из **Python SDK** и **CLI**. MCP-инструментов для агентов: **457**. Таблицы по ресурсам и операциям — в [английском README](README.md#coverage).

Из опубликованных Яндексом операций обёрнуто: Трекер — 188 из 190, Вики — 56 из 56, Формы — 84 из 84, DataLens — 134 из 141. Чего ycli пока не умеет (параметры запросов, поля ответов), перечислено в разделе [Against the published API](README.md#against-the-published-api); сверка повторяется каждую неделю.
Из опубликованных Яндексом операций обёрнуто: Трекер — 188 из 190, Вики — 56 из 56, Формы — 84 из 84, DataLens — 134 из 143. Чего ycli пока не умеет (параметры запросов, поля ответов), перечислено в разделе [Against the published API](README.md#against-the-published-api); сверка повторяется каждую неделю.
<!-- COVERAGE:END -->

## Разработка
Expand Down
7 changes: 7 additions & 0 deletions scripts/api_drift.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@
*("getPermissions", "modifyPermissions", "dlsSuggest"),
)
},
# Favorites: a new section, published in 2026-10; wrapping it is not decided.
**{
("datalens", "POST", f"/rpc/{name}"): (
"new section published 2026-10, wrapping not decided"
)
for name in ("checkFavorites", "listFavorites")
},
}

# A difference that stays, with its reason: one name of one kind (``GAP_KINDS``), either on one
Expand Down
2 changes: 2 additions & 0 deletions scripts/api_snapshot/datalens.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{"method": "POST", "path": "/rpc/batchListMembers", "name": "batchListMembers", "group": "Access", "source": "openapi", "page": "Access/rpcbatchListMembers-post", "request": ["filter", "language", "pageSize", "pageToken", "search", "tabId"], "response": ["members", "nextPageToken"]},
{"method": "POST", "path": "/rpc/cancelSparkApplication", "name": "cancelSparkApplication", "group": "SparkApplications", "source": "openapi", "request": ["applicationId", "clusterId"], "response": ["createdAt", "createdBy", "description", "done", "error", "id", "metadata", "modifiedAt", "response"]},
{"method": "POST", "path": "/rpc/cancelWorkbookExport", "name": "cancelWorkbookExport", "group": "WorkbookExport", "source": "openapi", "page": "WorkbookExport/rpccancelWorkbookExport-post", "request": ["exportId"], "response": ["exportId"]},
{"method": "POST", "path": "/rpc/checkFavorites", "name": "checkFavorites", "group": "Favorites", "source": "openapi", "request": ["entities"], "response": ["displayAlias", "entityId", "entityType", "isFavorite"]},
{"method": "POST", "path": "/rpc/createBucketDownloadUrl", "name": "createBucketDownloadUrl", "group": "CloudEnvironmentStorage", "source": "openapi", "request": ["cloudEnvironmentId", "path"], "response": ["url"]},
{"method": "POST", "path": "/rpc/createBucketUploadUrl", "name": "createBucketUploadUrl", "group": "CloudEnvironmentStorage", "source": "openapi", "request": ["cloudEnvironmentId", "contentMd5", "path", "size"], "response": ["url"]},
{"method": "POST", "path": "/rpc/createCloudEnvironment", "name": "createCloudEnvironment", "group": "CloudEnvironments", "source": "openapi", "request": ["cloudId", "description", "name", "securityGroupIds", "storage", "subnetId"], "response": ["createdAt", "createdBy", "description", "done", "error", "id", "metadata", "modifiedAt", "response"]},
Expand Down Expand Up @@ -100,6 +101,7 @@
{"method": "POST", "path": "/rpc/listDirectory", "name": "listDirectory", "group": "Navigation", "source": "openapi", "page": "Navigation/rpclistDirectory-post", "request": ["createdBy", "filters", "includePermissionsInfo", "orderBy", "page", "pageSize", "path", "scope"], "response": ["breadCrumbs", "entries", "hasNextPage"]},
{"method": "POST", "path": "/rpc/listEmbeddingSecrets", "name": "listEmbeddingSecrets", "group": "EmbeddingSecrets", "source": "openapi", "page": "EmbeddingSecrets/rpclistEmbeddingSecrets-post", "request": ["workbookId"], "response": ["createdAt", "createdBy", "embeddingSecretId", "title", "workbookId"]},
{"method": "POST", "path": "/rpc/listEmbeds", "name": "listEmbeds", "group": "Embeds", "source": "openapi", "page": "Embeds/rpclistEmbeds-post", "request": ["entryId"], "response": ["createdAt", "createdBy", "depsIds", "embedId", "embeddingSecretId", "entryId", "privateParams", "publicParamsMode", "settings", "title", "unsignedParams", "updatedAt", "updatedBy"]},
{"method": "POST", "path": "/rpc/listFavorites", "name": "listFavorites", "group": "Favorites", "source": "openapi", "request": ["entityTypes", "pageSize", "pageToken"], "response": ["entities", "nextPageToken"]},
{"method": "POST", "path": "/rpc/listSharedEntryAccessBindings", "name": "listSharedEntryAccessBindings", "group": "SharedEntry", "source": "openapi", "page": "SharedEntry/rpclistSharedEntryAccessBindings-post", "request": ["entryId", "getInheritedBindings", "pageSize", "pageToken"], "response": ["nextPageToken", "subjectsWithBindings"]},
{"method": "POST", "path": "/rpc/listSparkApplicationLog", "name": "listSparkApplicationLog", "group": "SparkApplications", "source": "openapi", "request": ["applicationId", "clusterId", "pageSize", "pageToken"], "response": ["content", "nextPageToken"]},
{"method": "POST", "path": "/rpc/listSparkApplications", "name": "listSparkApplications", "group": "SparkApplications", "source": "openapi", "request": ["clusterId", "filter", "pageSize", "pageToken"], "response": ["applications", "nextPageToken"]},
Expand Down
19 changes: 10 additions & 9 deletions scripts/datalens_schemas.sha256
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,32 @@ e10c5765c9d57f100994680815c7571cb1b4e025623098d13feac39592a3da5c cloud_environm
ef89732c72b852ed0834f28446cada5abbe64c8f8816d132bd1a096ef018bfcf cloud_environments.py
00b2f07711b669204a64e6b993ea86856579ad7dff47bc61d101c592ae0f5cf9 collection.py
65a4c8a13d688f8ec8d826da14b8507d90376e7c19365a031aea4d51d87c45d8 connection.py
dbb1b22b5c16a6c2a64cdbea71ab23894a75182d834a932506a747f57fd5503e dashboard.py
7d8e086b5f1a9160a6267cb1b0565646e172d47fc4c99bb97f6465802a8c638d dashboard.py
8221cb538ba20d8925975e3122d924514b829cbd4069f5c0aee7ed6f245bfb72 data.py
f9efb961a99c1207768c0625821389dcd3595a81bf1691118a94d74dd48beb2f dataset.py
7f85de84ab1419f464546acfdb2efe3b430b70825df1f661e1b5336724c0c4ac editor.py
11d59eae9dab5ebed2873ff1ab328bd0229f28ca59fb6d7429f6e5ca5a5c4bd0 editor.py
e1e8a0118aa1d3cfcd48dfe33a096714c65a7e87114176541bf099da426f96d8 embedding_secrets.py
a5800b847aa019f81329833fe28e3823ce42d9ee607e648b6e99acee1a4bdc10 embeds.py
878dfcfb5d640d231efd8d0993c2064d02b711d1774c7a931d521db99f7fa168 entries.py
6b8f7ec8053181c928c14dc50aeb727e8c82cf8a883a5eae37778150ab304cc6 entry_lock.py
16a8cd8d0de9e26cb20ca8048e57e61a82cad3edbd2cadc3691f8a295674d22c favorites.py
9b9d22497a187f120dd81712c1a6efb8f5936db8fa52ca5b2824e1661ba889fe folder.py
9f439e17740fbf100a8e80a99b77cacd7e40322cf1af8129b987e9ce518adedb html_pages.py
f4558dffe77955f1a0cf4aaebb5fa351ecb8dd696f3d01d8c3c1268061a3f713 html_pages.py
a2944d4ad4e3dd23aaeb641801bafb825e1621a38238194226925b4f5a2c99ee lakehouse_operations.py
32679a24c9b1c2bb50d77f6d8903f2a4c4532d84c7b17679ad0f1d86cb109c8d licensing.py
5d1474b1773fa8fb3a063b35f6bf11abd1862926b60920a8189d40b71aa7a27f navigation.py
3f28a3426aecd531abf24774b1762a11ca43860fa759185dd6a2571cbcc903e3 navigation.py
5fb735a13f5958b75052c1f8e486c0987933a424f3f3cc31f9ed9bbfe2a09a46 permissions.py
8053318219e5fd9da7b61e47f5845cbbcc948b778a657cfef0f7b9ef480703ae ql.py
47cb212901608beadccc21ad47c4e204a975fca20318adcc4193b0c1a2aaacd7 reports.py
007e77c5ce13e8a59145112ee40219fcec55973b9f6f095cb48bab7b419b951d ql.py
bf9a01057114a3fda9e1854e9df59f77bf81009b43f49985ed790ebb818637d7 reports.py
660c36e0d9980caaa7ab77b81a7ae91d32b9c9c575be1aa74997edf3f2504c6f rest_catalogs.py
72278dc25dc6ce3a56c0910d8498ed2fa6703bcf1457b8e5622368a953481c20 shared.py
186d90efa73a171d65c47a0f31e63fcd0988801e78f029a17659328106160e10 shared_entry.py
c7c5f6dbdb8037594e0526c425d6702026013566cd7d882968a60941bbc30d77 spark_applications.py
c007eaa70d4622c8e4c31863c1d80104e73f9145624dd2781236fc109f4a7de0 spark_clusters.py
ff7ebb23c520265c1a93b2b5b923b8dbb1e410d0ae423cad7731bc1ad2b25b02 sql_queries.py
5fe0117796e50b5bd88b4fa2e1310c9ee9c73a650171a1ae9f6870e917fd0d79 sql_queries.py
5e61dbf756b08efc5dee106611379bf15bde50c1fb6c3725a4137f4a77f21bc9 tenants.py
a691214c05a4267714d4c646580fa23374370a7e85675fb508a1ceca1fa5dcb2 trino_clusters.py
a211833a4ac21149293d0957e1d26f4a9789a1d86806d447ba736b1fd419c434 wizard.py
b97cafd3d73b8c4c9fdfc7f1161de94b77f0447312d1545051a7e246f8b78e1c workbook.py
b60c79744cf6e230401b5ac593df912ce683d1dc074886944411617e16159d15 wizard.py
37d89fa2d64450e2a49e5f9d8dc06239f55d137c2358c22b8a05919422ed2886 workbook.py
b8d351d03d0191744034b9b94c2278600b5513926136b86cd3bdb7ce44df3699 workbook_export.py
5a22a5c3cd2d32cca64c1e5e5e508b822f64120b2a924fbfbdb3b83e45f5d3f8 workbook_import.py
14 changes: 12 additions & 2 deletions src/ycli/yandex/datalens/schemas/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ class GetDashboardV2Args(RequestBody):
rev_id: str | None = Field(default=None, alias="revId")
include_permissions: bool | None = Field(default=None, alias="includePermissions")
include_links: bool | None = Field(default=None, alias="includeLinks")
include_favorite: bool | None = Field(default=None, alias="includeFavorite")
include_favorite: bool | None = Field(
default=None,
alias="includeFavorite",
deprecated=True,
description="Deprecated: the parameter will be removed in a future API version.",
)
branch: shared.EntryBranch | None = None
workbook_id: str | None = Field(default=None, alias="workbookId")

Expand Down Expand Up @@ -1048,7 +1053,12 @@ class DashboardV2(APIModel):

class GetDashboardV2Result(APIModel):
entry: DashboardV2 | None = None
is_favorite: bool | None = Field(default=None, alias="isFavorite")
is_favorite: bool | None = Field(
default=None,
alias="isFavorite",
deprecated=True,
description="Deprecated: the field will be removed in a future API version.",
)
permissions: shared.EntryPermissions | None = None


Expand Down
6 changes: 4 additions & 2 deletions src/ycli/yandex/datalens/schemas/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ class GetEditorChartArgs(RequestBody):
include_favorite: bool | None = Field(
default=None,
alias="includeFavorite",
description="Include favorite status in the response.",
deprecated=True,
description="Include favorite status in the response. Deprecated: the parameter will be removed in a future API version.",
)
branch: shared.EntryBranch | None = None

Expand Down Expand Up @@ -562,7 +563,8 @@ class GetEditorChartResult(APIModel):
is_favorite: bool | None = Field(
default=None,
alias="isFavorite",
description="Indicates if the chart is marked as favorite.",
deprecated=True,
description="Indicates if the chart is marked as favorite. Deprecated: the field will be removed in a future API version.",
)
permissions: GetEditorChartResultPermissions | None = None

Expand Down
96 changes: 96 additions & 0 deletions src/ycli/yandex/datalens/schemas/favorites.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Generated from the DataLens specification by scripts/gen_datalens_models.py; do not edit by hand.

from typing import Annotated, Literal

from pydantic import Field, RootModel

from ycli.yandex.models import APIModel, NoDropNull, RequestBody


class CheckedFavorite(APIModel):
entity_id: str | None = Field(default=None, alias="entityId", description="ID of the entity.")
entity_type: Literal["entry", "workbook", "collection"] | str | None = Field(
default=None, alias="entityType", description="Type of the entity."
)
is_favorite: bool | None = Field(
default=None,
alias="isFavorite",
description="Whether the current user has marked the entity as a favorite.",
)
display_alias: Annotated[str | None, NoDropNull()] = Field(
default=None,
alias="displayAlias",
description="Custom name the user gave to the favorite, or null if there is none.",
)


class CheckFavoritesResult(RootModel[list[CheckedFavorite]], hide_input_in_errors=True):
"""Checked entities in the order of the request. Duplicates are repeated."""

root: list[CheckedFavorite] = Field(
...,
description="Checked entities in the order of the request. Duplicates are repeated.",
)


class FavoriteEntityRef(APIModel):
entity_id: str | None = Field(default=None, alias="entityId", description="ID of the entity.")
entity_type: Literal["entry", "workbook", "collection"] | str | None = Field(
default=None, alias="entityType", description="Type of the entity."
)


class CheckFavoritesArgs(RequestBody):
entities: list[FavoriteEntityRef] = Field(..., description="Entities to check.")


class FavoriteMark(APIModel):
entity_id: str | None = Field(
default=None,
alias="entityId",
description="ID of the entity marked as a favorite.",
)
entity_type: Literal["entry", "workbook", "collection"] | str | None = Field(
default=None,
alias="entityType",
description="Type of the entity marked as a favorite.",
)
display_alias: Annotated[str | None, NoDropNull()] = Field(
default=None,
alias="displayAlias",
description="Custom name the user gave to the favorite, or null if there is none.",
)
created_at: str | None = Field(
default=None,
alias="createdAt",
description="Date and time when the entity was marked as a favorite.",
)


class ListFavoritesResult(APIModel):
entities: list[FavoriteMark] | None = Field(
default=None, description="Favorite marks of the current user."
)
next_page_token: str | None = Field(
default=None,
alias="nextPageToken",
description="Token of the next page. Absent on the last page.",
)


class ListFavoritesArgs(RequestBody):
entity_types: list[Literal["entry", "workbook", "collection"] | str] | None = Field(
default=None,
alias="entityTypes",
description="Entity types to return. All types are returned if the field is omitted.",
)
page_size: int | None = Field(
default=None,
alias="pageSize",
description="Maximum number of favorites per page. Defaults to 200.",
)
page_token: str | None = Field(
default=None,
alias="pageToken",
description="Token of the page to return, taken from the previous response.",
)
Loading
Loading