entryscape 1.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. entryscape/__init__.py +219 -0
  2. entryscape/api/__init__.py +26 -0
  3. entryscape/api/app_token_api.py +835 -0
  4. entryscape/api/auth_api.py +965 -0
  5. entryscape/api/catalog_api.py +4473 -0
  6. entryscape/api/contact_api.py +3135 -0
  7. entryscape/api/dataservice_api.py +3135 -0
  8. entryscape/api/dataset_api.py +3804 -0
  9. entryscape/api/distribution_api.py +3135 -0
  10. entryscape/api/document_api.py +2740 -0
  11. entryscape/api/idea_api.py +2740 -0
  12. entryscape/api/job_api.py +360 -0
  13. entryscape/api/model_api.py +2446 -0
  14. entryscape/api/model_class_api.py +2611 -0
  15. entryscape/api/model_diagram_api.py +2611 -0
  16. entryscape/api/model_field_api.py +2611 -0
  17. entryscape/api/model_form_api.py +2611 -0
  18. entryscape/api/model_namespace_api.py +2611 -0
  19. entryscape/api/model_property_api.py +2611 -0
  20. entryscape/api/organization_api.py +3135 -0
  21. entryscape/api/search_api.py +1513 -0
  22. entryscape/api/showcase_api.py +2740 -0
  23. entryscape/api/suggestion_api.py +2740 -0
  24. entryscape/api/terminology_api.py +1726 -0
  25. entryscape/api/upload_api.py +814 -0
  26. entryscape/api_client.py +763 -0
  27. entryscape/api_response.py +20 -0
  28. entryscape/configuration.py +673 -0
  29. entryscape/exceptions.py +222 -0
  30. entryscape/models/__init__.py +71 -0
  31. entryscape/models/app_token.py +156 -0
  32. entryscape/models/app_token_create_request.py +98 -0
  33. entryscape/models/app_token_create_response.py +169 -0
  34. entryscape/models/app_token_status.py +35 -0
  35. entryscape/models/app_token_verify_request.py +109 -0
  36. entryscape/models/entity_list_item.py +175 -0
  37. entryscape/models/entity_list_response.py +139 -0
  38. entryscape/models/entity_reference.py +189 -0
  39. entryscape/models/entity_type.py +57 -0
  40. entryscape/models/error.py +135 -0
  41. entryscape/models/facet_field.py +115 -0
  42. entryscape/models/facet_field_values_inner.py +100 -0
  43. entryscape/models/facet_list.py +113 -0
  44. entryscape/models/facet_list_available_inner.py +107 -0
  45. entryscape/models/job_response.py +112 -0
  46. entryscape/models/job_status.py +189 -0
  47. entryscape/models/job_status_progress.py +100 -0
  48. entryscape/models/job_status_value.py +37 -0
  49. entryscape/models/job_type.py +37 -0
  50. entryscape/models/list_catalogs_entry_type_parameter.py +37 -0
  51. entryscape/models/list_catalogs_graph_type_parameter.py +44 -0
  52. entryscape/models/list_catalogs_resource_type_parameter.py +37 -0
  53. entryscape/models/login_request.py +108 -0
  54. entryscape/models/login_response.py +115 -0
  55. entryscape/models/metadata_format.py +38 -0
  56. entryscape/models/metadata_request.py +99 -0
  57. entryscape/models/parent_reference.py +130 -0
  58. entryscape/models/search_request.py +158 -0
  59. entryscape/models/search_request_filters.py +144 -0
  60. entryscape/models/search_request_filters_graph_type.py +44 -0
  61. entryscape/models/search_request_filters_resource_type.py +37 -0
  62. entryscape/models/search_request_sort.py +38 -0
  63. entryscape/models/search_request_sort_order.py +35 -0
  64. entryscape/models/search_response.py +175 -0
  65. entryscape/models/search_result.py +175 -0
  66. entryscape/models/search_result_graph_type.py +44 -0
  67. entryscape/models/search_result_resource_type.py +37 -0
  68. entryscape/models/search_sort_order_parameter.py +35 -0
  69. entryscape/models/terminology_import_mode.py +35 -0
  70. entryscape/models/validation_profile.py +36 -0
  71. entryscape/models/validation_response.py +149 -0
  72. entryscape/models/validation_result.py +162 -0
  73. entryscape/models/validation_severity.py +36 -0
  74. entryscape/models/validation_summary.py +122 -0
  75. entryscape/models/whoami_response.py +104 -0
  76. entryscape/py.typed +0 -0
  77. entryscape/rest.py +210 -0
  78. entryscape-1.3.0.dist-info/METADATA +696 -0
  79. entryscape-1.3.0.dist-info/RECORD +82 -0
  80. entryscape-1.3.0.dist-info/WHEEL +5 -0
  81. entryscape-1.3.0.dist-info/licenses/LICENSE.txt +165 -0
  82. entryscape-1.3.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,3804 @@
1
+ """
2
+ EntryScape API
3
+
4
+ This API provides structured access to EntryScape data following DCAT-AP standards. All entity endpoints follow a consistent pattern: - GET /{entity} - List all entities - POST /{entity} - Create a new entity (DCAT types only) - GET /{entity}/{context_id}/{entry_id} - Get entity reference info - DELETE /{entity}/{context_id}/{entry_id} - Delete an entity (DCAT types only) - GET /{entity}/{context_id}/{entry_id}/metadata - Get raw RDF metadata - PUT /{entity}/{context_id}/{entry_id}/metadata - Replace raw RDF metadata (JSON-LD, Turtle, RDF/XML, or N-Triples passthrough) ## Reading and consistency Reads of a single entity — `GET /{entity}/{context_id}/{entry_id}` and its `/metadata` — go straight to the store and always reflect the latest write. Lists and search do not. They are answered from a search index that is updated asynchronously, so for a short interval after a write: - an entry that was just created may be missing from the list it belongs to, while reading it by id already works; - an entry that was just deleted may still appear; - `results` counts what the index holds, not what the store holds. Write a client that tolerates this: after creating an entry, use the id the create returned rather than searching for what you just wrote. `results` is also an upper bound rather than an exact count when the caller cannot read every hit (see the field's own description). Separately, responses are cached for 15 minutes by default, which is a second and unrelated source of staleness. A write invalidates the cache entries it affects, but a read that lands in the indexing gap can cache a list that does not yet show it. ## Authentication Most endpoints require an authenticated session. Reading public data works without authentication, while creating, updating, and deleting entities requires a valid user session. 1. **Log in** with `POST /auth/login`, supplying an EntryStore username and password. The response returns an `auth_token`. 2. **Send the token** on subsequent requests via the `X-Auth-Token` header. This is the recommended method for SDK and programmatic access. Browser clients can instead rely on the `auth_token` cookie, which the server sets automatically on login (`SameSite=Lax; Secure`). 3. **Inspect the session** with `GET /auth/whoami`, which returns the current user or an anonymous/guest identity when no valid token is supplied. 4. **Log out** with `POST /auth/logout` to invalidate the token and clear the cookie. ### Writes and CSRF Send the token as the `X-Auth-Token` **header** and there is nothing else to do: creates, updates and deletes work as they are, which is how the SDKs and the MCP server are built. The `auth_token` cookie is different. A cookie is attached by the browser automatically, so a state-changing request authenticated by it alone is what cross-site request forgery abuses, and those requests additionally need a double-submit token: read the `XSRF-TOKEN` cookie the server sets on any response and send its value back as the `X-XSRF-TOKEN` header. Without it the request is rejected with `403` before it reaches the endpoint. A custom header cannot be forged this way — cross-origin JavaScript cannot set one without a CORS preflight, which this API grants only to configured origins — so the header is the recommended path for anything that is not a browser session. ### App Tokens An app token identifies an integration. Create one with `POST /app-token` (unauthenticated). Creation requires an email address: the token starts in the `pending` state and a 6-digit code is emailed to the owner. Confirm the code with `POST /app-token/verify` to activate the token and receive its value, which is shown only once — store it securely. `GET /app-token/{app_token_id}` then returns its details and quota usage, authenticated by the token itself via the `X-App-Token` header. **The `X-App-Token` header is accepted only by `GET /app-token/{app_token_id}`.** No other operation reads it, and the read quota is recorded but not yet enforced: reading public data needs no token of any kind, and sending an app token with a read neither grants nor meters anything. Metered public read access is the intent of the two-token model, not a description of this release — see the `security` declared on each operation for what it actually accepts. ## SDKs Generated clients for Python, TypeScript, JavaScript and C# wrap every operation below, and each operation on this page shows the SDK call beside the `curl` command. Two of them install from a public registry: ``` pip install entryscape # Python npm install @entryscape/api-client # TypeScript and JavaScript ``` `@entryscape/api-client` ships an ESM and a CommonJS build, so `import` and `require()` both work and TypeScript is not required to use it — the name describes what it is written in, not what you have to write. There is a separate generated JavaScript SDK, and it is deliberately **not** on npm; this package is the npm client for both languages. Every SDK, including the C# and JavaScript ones, is also published as a tarball. The downloads are linked in the sidebar, they are the route to take when a registry is unreachable or a build has to vendor its dependencies, and each archive carries the SDK's own README: - **Python** — `pip install entryscape`, or `python-sdk.tar.gz`. - **TypeScript and JavaScript** — `npm install @entryscape/api-client`, or `typescript-sdk.tar.gz`. - **JavaScript (the separate generated client)** — not published to a registry, by design; `javascript-sdk.tar.gz` only. - **C#** — not published to NuGet yet; `csharp-sdk.tar.gz` only. - **MCP server** — `npx -y @entryscape/mcp-server`, or `mcp-server.tar.gz`. ## MCP Server A Model Context Protocol (MCP) server is generated from this specification and published alongside the SDKs (`@entryscape/mcp-server`), exposing the API as tools for AI assistants and agents. Each operation becomes one tool named after its `operationId` — `listDatasets`, `createCatalog`, `search`, `getJobStatus`. The `auth` operations are the exception: the server reads its token once at startup, so a `login` tool could install nothing and a `logout` tool would only invalidate the token the server was started with. On connect the server also hands the assistant a short set of rules that hold across every tool: a token is bound to one EntryStore instance, the search index lags a write, uploads finish as jobs. ### Install The server is on npm, and MCP servers are normally launched straight from there, so nothing has to be installed first: ``` npx -y @entryscape/mcp-server ``` `npm install -g @entryscape/mcp-server` works too and puts an `entryscape-mcp` binary on `PATH`. It is also listed in the MCP Registry as `com.entryscape/mcp-server`, which is where clients and marketplaces look it up. Without npm, download `mcp-server.tar.gz` from the SDK downloads and unpack it. The package ships prebuilt; install its runtime dependency once: ``` mkdir entryscape-mcp && tar -xzf mcp-server.tar.gz -C entryscape-mcp cd entryscape-mcp && npm install --omit=dev ``` ### Configure The server is a stdio MCP server configured through environment variables, read once at startup: - `ENTRYSCAPE_API_URL` — base URL of the API server, path included. Required: there is no default, and the server refuses to start without it. - `ENTRYSCAPE_AUTH_TOKEN` — a session token from `POST /auth/login`, sent as the `X-Auth-Token` header. Optional: without it reads see public entries and every write is refused. A token is valid only for the EntryStore instance that issued it. - `ENTRYSCAPE_ENTRYSTORE_HOST` — the EntryStore instance the API server should use, for example `dev.entryscape.com/store/`. Unset means the API server's own default. - `ENTRYSCAPE_MCP_UPLOAD_ROOT` — the directory the upload tools may read files from. **Unset means uploads are disabled**: `addFileToDistribution`, `replaceFileInDistribution` and `importTerminology` refuse and say so. - `ENTRYSCAPE_MCP_TAGS` — comma-separated tags to serve tools for, for example `catalog,dataset,distribution,search`. Unset serves every tool. The package's `README.md` lists the remaining variables (timeouts and size caps). Register the server with any MCP-capable client by adding it to the client's `mcpServers` configuration: ```json { \"mcpServers\": { \"entryscape\": { \"command\": \"npx\", \"args\": [\"-y\", \"@entryscape/mcp-server\"], \"env\": { \"ENTRYSCAPE_API_URL\": \"https://<your EntryScape API host>\", \"ENTRYSCAPE_AUTH_TOKEN\": \"your-session-token\" } } } } ``` From an unpacked download instead, the command is `\"command\": \"node\", \"args\": [\"/path/to/entryscape-mcp/dist/bin/entryscape-mcp.js\"]`. ### Claude Code The unpacked package is also a Claude Code plugin, so one install gives the server and the skills below together. Claude Code installs plugins from marketplaces, and the package carries a one-entry marketplace pointing at itself: ``` claude plugin marketplace add /path/to/entryscape-mcp claude plugin install entryscape@entryscape --scope user ``` The plugin passes `ENTRYSCAPE_API_URL`, `ENTRYSCAPE_AUTH_TOKEN`, `ENTRYSCAPE_ENTRYSTORE_HOST`, `ENTRYSCAPE_MCP_TAGS` and `ENTRYSCAPE_MCP_UPLOAD_ROOT` through from the shell Claude Code was started in, so set them there. To try the plugin for one session without installing it, start Claude Code with `--plugin-dir /path/to/entryscape-mcp`. ### Skills `skills/` in the package holds procedures that span several tools, in the Agent Skills format (a `SKILL.md` with `name` and `description`): which tools to call in which order, what to check between calls, and where to stop. Claude Code loads them from the plugin; other clients that read the format can be pointed at the directory. The `find` skill covers discovery, facets and selective metadata reads; `publish-dataset` takes a dataset from catalog to validated distribution with its file; `edit-metadata` changes an entry that already exists without dropping the rest of its graph, models included; `migrate-from-taskrunner` moves an integration off the deprecated Taskrunner API. Every tool a skill names is checked against this specification when the package is built. ## Deprecation Policy When endpoints or features are deprecated: 1. The operation is marked with `deprecated: true` in this spec 2. The operation description documents the replacement endpoint and sunset date 3. Deprecated endpoints remain functional for at least 6 months after announcement 4. The server returns a `Sunset` header with the planned removal date 5. After the sunset date, the endpoint may be removed in a future release
5
+
6
+ The version of the OpenAPI document: 1.3.0
7
+ Contact: contact@entryscape.com
8
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
9
+
10
+ Do not edit the class manually.
11
+ """ # noqa: E501
12
+
13
+ import warnings
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from datetime import datetime
19
+ from pydantic import Field, StrictBool, StrictStr, field_validator
20
+ from typing import Any, Dict, Optional
21
+ from typing_extensions import Annotated
22
+ from entryscape.models.entity_list_response import EntityListResponse
23
+ from entryscape.models.entity_reference import EntityReference
24
+ from entryscape.models.list_catalogs_entry_type_parameter import (
25
+ ListCatalogsEntryTypeParameter,
26
+ )
27
+ from entryscape.models.list_catalogs_graph_type_parameter import (
28
+ ListCatalogsGraphTypeParameter,
29
+ )
30
+ from entryscape.models.list_catalogs_resource_type_parameter import (
31
+ ListCatalogsResourceTypeParameter,
32
+ )
33
+ from entryscape.models.metadata_format import MetadataFormat
34
+ from entryscape.models.metadata_request import MetadataRequest
35
+ from entryscape.models.validation_profile import ValidationProfile
36
+ from entryscape.models.validation_response import ValidationResponse
37
+
38
+ from entryscape.api_client import ApiClient, RequestSerialized
39
+ from entryscape.api_response import ApiResponse
40
+ from entryscape.rest import RESTResponseType
41
+
42
+
43
+ class DatasetApi:
44
+ """NOTE: This class is auto generated by OpenAPI Generator
45
+ Ref: https://openapi-generator.tech
46
+
47
+ Do not edit the class manually.
48
+ """
49
+
50
+ def __init__(self, api_client=None) -> None:
51
+ if api_client is None:
52
+ api_client = ApiClient.get_default()
53
+ self.api_client = api_client
54
+
55
+ @validate_call
56
+ async def create_dataset(
57
+ self,
58
+ context: Annotated[
59
+ str,
60
+ Field(
61
+ strict=True,
62
+ description="The context (catalog) ID where the new entity will be created",
63
+ ),
64
+ ],
65
+ metadata_request: Annotated[
66
+ MetadataRequest,
67
+ Field(
68
+ description="With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
69
+ ),
70
+ ],
71
+ x_entrystore_host: Annotated[
72
+ Optional[StrictStr],
73
+ Field(
74
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
75
+ ),
76
+ ] = None,
77
+ entrystore_host: Annotated[
78
+ Optional[StrictStr],
79
+ Field(
80
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
81
+ ),
82
+ ] = None,
83
+ _request_timeout: Union[
84
+ None,
85
+ Annotated[StrictFloat, Field(gt=0)],
86
+ Tuple[
87
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
88
+ ],
89
+ ] = None,
90
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
91
+ _content_type: Optional[StrictStr] = None,
92
+ _headers: Optional[Dict[StrictStr, Any]] = None,
93
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
94
+ ) -> EntityReference:
95
+ """Create dataset
96
+
97
+ Creates a new dataset in the specified context. The request body must contain valid DCAT-AP metadata in JSON-LD format. Requires authentication with write access to the target context.
98
+
99
+ :param context: The context (catalog) ID where the new entity will be created (required)
100
+ :type context: str
101
+ :param metadata_request: With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
102
+ :type metadata_request: MetadataRequest
103
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
104
+ :type x_entrystore_host: str
105
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
106
+ :type entrystore_host: str
107
+ :param _request_timeout: timeout setting for this request. If one
108
+ number provided, it will be total request
109
+ timeout. It can also be a pair (tuple) of
110
+ (connection, read) timeouts.
111
+ :type _request_timeout: int, tuple(int, int), optional
112
+ :param _request_auth: set to override the auth_settings for an a single
113
+ request; this effectively ignores the
114
+ authentication in the spec for a single request.
115
+ :type _request_auth: dict, optional
116
+ :param _content_type: force content-type for the request.
117
+ :type _content_type: str, Optional
118
+ :param _headers: set to override the headers for a single
119
+ request; this effectively ignores the headers
120
+ in the spec for a single request.
121
+ :type _headers: dict, optional
122
+ :param _host_index: set to override the host_index for a single
123
+ request; this effectively ignores the host_index
124
+ in the spec for a single request.
125
+ :type _host_index: int, optional
126
+ :return: Returns the result object.
127
+ """ # noqa: E501
128
+
129
+ _param = self._create_dataset_serialize(
130
+ context=context,
131
+ metadata_request=metadata_request,
132
+ x_entrystore_host=x_entrystore_host,
133
+ entrystore_host=entrystore_host,
134
+ _request_auth=_request_auth,
135
+ _content_type=_content_type,
136
+ _headers=_headers,
137
+ _host_index=_host_index,
138
+ )
139
+
140
+ _response_types_map: Dict[str, Optional[str]] = {
141
+ "201": "EntityReference",
142
+ "400": "Error",
143
+ "401": "Error",
144
+ "403": "Error",
145
+ "404": "Error",
146
+ "409": "Error",
147
+ "422": "ValidationResponse",
148
+ "500": "Error",
149
+ "503": "Error",
150
+ }
151
+ response_data = await self.api_client.call_api(
152
+ *_param, _request_timeout=_request_timeout
153
+ )
154
+ await response_data.read()
155
+ return self.api_client.response_deserialize(
156
+ response_data=response_data,
157
+ response_types_map=_response_types_map,
158
+ ).data
159
+
160
+ @validate_call
161
+ async def create_dataset_with_http_info(
162
+ self,
163
+ context: Annotated[
164
+ str,
165
+ Field(
166
+ strict=True,
167
+ description="The context (catalog) ID where the new entity will be created",
168
+ ),
169
+ ],
170
+ metadata_request: Annotated[
171
+ MetadataRequest,
172
+ Field(
173
+ description="With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
174
+ ),
175
+ ],
176
+ x_entrystore_host: Annotated[
177
+ Optional[StrictStr],
178
+ Field(
179
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
180
+ ),
181
+ ] = None,
182
+ entrystore_host: Annotated[
183
+ Optional[StrictStr],
184
+ Field(
185
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
186
+ ),
187
+ ] = None,
188
+ _request_timeout: Union[
189
+ None,
190
+ Annotated[StrictFloat, Field(gt=0)],
191
+ Tuple[
192
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
193
+ ],
194
+ ] = None,
195
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
196
+ _content_type: Optional[StrictStr] = None,
197
+ _headers: Optional[Dict[StrictStr, Any]] = None,
198
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
199
+ ) -> ApiResponse[EntityReference]:
200
+ """Create dataset
201
+
202
+ Creates a new dataset in the specified context. The request body must contain valid DCAT-AP metadata in JSON-LD format. Requires authentication with write access to the target context.
203
+
204
+ :param context: The context (catalog) ID where the new entity will be created (required)
205
+ :type context: str
206
+ :param metadata_request: With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
207
+ :type metadata_request: MetadataRequest
208
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
209
+ :type x_entrystore_host: str
210
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
211
+ :type entrystore_host: str
212
+ :param _request_timeout: timeout setting for this request. If one
213
+ number provided, it will be total request
214
+ timeout. It can also be a pair (tuple) of
215
+ (connection, read) timeouts.
216
+ :type _request_timeout: int, tuple(int, int), optional
217
+ :param _request_auth: set to override the auth_settings for an a single
218
+ request; this effectively ignores the
219
+ authentication in the spec for a single request.
220
+ :type _request_auth: dict, optional
221
+ :param _content_type: force content-type for the request.
222
+ :type _content_type: str, Optional
223
+ :param _headers: set to override the headers for a single
224
+ request; this effectively ignores the headers
225
+ in the spec for a single request.
226
+ :type _headers: dict, optional
227
+ :param _host_index: set to override the host_index for a single
228
+ request; this effectively ignores the host_index
229
+ in the spec for a single request.
230
+ :type _host_index: int, optional
231
+ :return: Returns the result object.
232
+ """ # noqa: E501
233
+
234
+ _param = self._create_dataset_serialize(
235
+ context=context,
236
+ metadata_request=metadata_request,
237
+ x_entrystore_host=x_entrystore_host,
238
+ entrystore_host=entrystore_host,
239
+ _request_auth=_request_auth,
240
+ _content_type=_content_type,
241
+ _headers=_headers,
242
+ _host_index=_host_index,
243
+ )
244
+
245
+ _response_types_map: Dict[str, Optional[str]] = {
246
+ "201": "EntityReference",
247
+ "400": "Error",
248
+ "401": "Error",
249
+ "403": "Error",
250
+ "404": "Error",
251
+ "409": "Error",
252
+ "422": "ValidationResponse",
253
+ "500": "Error",
254
+ "503": "Error",
255
+ }
256
+ response_data = await self.api_client.call_api(
257
+ *_param, _request_timeout=_request_timeout
258
+ )
259
+ await response_data.read()
260
+ return self.api_client.response_deserialize(
261
+ response_data=response_data,
262
+ response_types_map=_response_types_map,
263
+ )
264
+
265
+ @validate_call
266
+ async def create_dataset_without_preload_content(
267
+ self,
268
+ context: Annotated[
269
+ str,
270
+ Field(
271
+ strict=True,
272
+ description="The context (catalog) ID where the new entity will be created",
273
+ ),
274
+ ],
275
+ metadata_request: Annotated[
276
+ MetadataRequest,
277
+ Field(
278
+ description="With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
279
+ ),
280
+ ],
281
+ x_entrystore_host: Annotated[
282
+ Optional[StrictStr],
283
+ Field(
284
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
285
+ ),
286
+ ] = None,
287
+ entrystore_host: Annotated[
288
+ Optional[StrictStr],
289
+ Field(
290
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
291
+ ),
292
+ ] = None,
293
+ _request_timeout: Union[
294
+ None,
295
+ Annotated[StrictFloat, Field(gt=0)],
296
+ Tuple[
297
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
298
+ ],
299
+ ] = None,
300
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
301
+ _content_type: Optional[StrictStr] = None,
302
+ _headers: Optional[Dict[StrictStr, Any]] = None,
303
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
304
+ ) -> RESTResponseType:
305
+ """Create dataset
306
+
307
+ Creates a new dataset in the specified context. The request body must contain valid DCAT-AP metadata in JSON-LD format. Requires authentication with write access to the target context.
308
+
309
+ :param context: The context (catalog) ID where the new entity will be created (required)
310
+ :type context: str
311
+ :param metadata_request: With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
312
+ :type metadata_request: MetadataRequest
313
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
314
+ :type x_entrystore_host: str
315
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
316
+ :type entrystore_host: str
317
+ :param _request_timeout: timeout setting for this request. If one
318
+ number provided, it will be total request
319
+ timeout. It can also be a pair (tuple) of
320
+ (connection, read) timeouts.
321
+ :type _request_timeout: int, tuple(int, int), optional
322
+ :param _request_auth: set to override the auth_settings for an a single
323
+ request; this effectively ignores the
324
+ authentication in the spec for a single request.
325
+ :type _request_auth: dict, optional
326
+ :param _content_type: force content-type for the request.
327
+ :type _content_type: str, Optional
328
+ :param _headers: set to override the headers for a single
329
+ request; this effectively ignores the headers
330
+ in the spec for a single request.
331
+ :type _headers: dict, optional
332
+ :param _host_index: set to override the host_index for a single
333
+ request; this effectively ignores the host_index
334
+ in the spec for a single request.
335
+ :type _host_index: int, optional
336
+ :return: Returns the result object.
337
+ """ # noqa: E501
338
+
339
+ _param = self._create_dataset_serialize(
340
+ context=context,
341
+ metadata_request=metadata_request,
342
+ x_entrystore_host=x_entrystore_host,
343
+ entrystore_host=entrystore_host,
344
+ _request_auth=_request_auth,
345
+ _content_type=_content_type,
346
+ _headers=_headers,
347
+ _host_index=_host_index,
348
+ )
349
+
350
+ _response_types_map: Dict[str, Optional[str]] = {
351
+ "201": "EntityReference",
352
+ "400": "Error",
353
+ "401": "Error",
354
+ "403": "Error",
355
+ "404": "Error",
356
+ "409": "Error",
357
+ "422": "ValidationResponse",
358
+ "500": "Error",
359
+ "503": "Error",
360
+ }
361
+ response_data = await self.api_client.call_api(
362
+ *_param, _request_timeout=_request_timeout
363
+ )
364
+ return response_data.response
365
+
366
+ def _create_dataset_serialize(
367
+ self,
368
+ context,
369
+ metadata_request,
370
+ x_entrystore_host,
371
+ entrystore_host,
372
+ _request_auth,
373
+ _content_type,
374
+ _headers,
375
+ _host_index,
376
+ ) -> RequestSerialized:
377
+
378
+ _host = None
379
+
380
+ _collection_formats: Dict[str, str] = {}
381
+
382
+ _path_params: Dict[str, str] = {}
383
+ _query_params: List[Tuple[str, str]] = []
384
+ _header_params: Dict[str, Optional[str]] = _headers or {}
385
+ _form_params: List[Tuple[str, str]] = []
386
+ _files: Dict[
387
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
388
+ ] = {}
389
+ _body_params: Optional[bytes] = None
390
+
391
+ # process the path parameters
392
+ # process the query parameters
393
+ if entrystore_host is not None:
394
+
395
+ _query_params.append(("entrystore_host", entrystore_host))
396
+
397
+ if context is not None:
398
+
399
+ _query_params.append(("context", context))
400
+
401
+ # process the header parameters
402
+ if x_entrystore_host is not None:
403
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
404
+ # process the form parameters
405
+ # process the body parameter
406
+ if metadata_request is not None:
407
+ _body_params = metadata_request
408
+
409
+ # set the HTTP header `Accept`
410
+ if "Accept" not in _header_params:
411
+ _header_params["Accept"] = self.api_client.select_header_accept(
412
+ ["application/json"]
413
+ )
414
+
415
+ # set the HTTP header `Content-Type`
416
+ if _content_type:
417
+ _header_params["Content-Type"] = _content_type
418
+ else:
419
+ _default_content_type = self.api_client.select_header_content_type(
420
+ ["application/ld+json"]
421
+ )
422
+ if _default_content_type is not None:
423
+ _header_params["Content-Type"] = _default_content_type
424
+
425
+ # authentication setting
426
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
427
+
428
+ return self.api_client.param_serialize(
429
+ method="POST",
430
+ resource_path="/dataset",
431
+ path_params=_path_params,
432
+ query_params=_query_params,
433
+ header_params=_header_params,
434
+ body=_body_params,
435
+ post_params=_form_params,
436
+ files=_files,
437
+ auth_settings=_auth_settings,
438
+ collection_formats=_collection_formats,
439
+ _host=_host,
440
+ _request_auth=_request_auth,
441
+ )
442
+
443
+ @validate_call
444
+ async def delete_dataset(
445
+ self,
446
+ context_id: Annotated[
447
+ str,
448
+ Field(
449
+ strict=True,
450
+ description="The context (catalog) identifier in EntryStore",
451
+ ),
452
+ ],
453
+ entry_id: Annotated[
454
+ str,
455
+ Field(strict=True, description="The entry identifier within the context"),
456
+ ],
457
+ x_entrystore_host: Annotated[
458
+ Optional[StrictStr],
459
+ Field(
460
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
461
+ ),
462
+ ] = None,
463
+ entrystore_host: Annotated[
464
+ Optional[StrictStr],
465
+ Field(
466
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
467
+ ),
468
+ ] = None,
469
+ _request_timeout: Union[
470
+ None,
471
+ Annotated[StrictFloat, Field(gt=0)],
472
+ Tuple[
473
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
474
+ ],
475
+ ] = None,
476
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
477
+ _content_type: Optional[StrictStr] = None,
478
+ _headers: Optional[Dict[StrictStr, Any]] = None,
479
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
480
+ ) -> None:
481
+ """Delete dataset
482
+
483
+ Deletes a specific dataset and its associated metadata. This operation is irreversible. Requires authentication with write access to the entry's context.
484
+
485
+ :param context_id: The context (catalog) identifier in EntryStore (required)
486
+ :type context_id: str
487
+ :param entry_id: The entry identifier within the context (required)
488
+ :type entry_id: str
489
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
490
+ :type x_entrystore_host: str
491
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
492
+ :type entrystore_host: str
493
+ :param _request_timeout: timeout setting for this request. If one
494
+ number provided, it will be total request
495
+ timeout. It can also be a pair (tuple) of
496
+ (connection, read) timeouts.
497
+ :type _request_timeout: int, tuple(int, int), optional
498
+ :param _request_auth: set to override the auth_settings for an a single
499
+ request; this effectively ignores the
500
+ authentication in the spec for a single request.
501
+ :type _request_auth: dict, optional
502
+ :param _content_type: force content-type for the request.
503
+ :type _content_type: str, Optional
504
+ :param _headers: set to override the headers for a single
505
+ request; this effectively ignores the headers
506
+ in the spec for a single request.
507
+ :type _headers: dict, optional
508
+ :param _host_index: set to override the host_index for a single
509
+ request; this effectively ignores the host_index
510
+ in the spec for a single request.
511
+ :type _host_index: int, optional
512
+ :return: Returns the result object.
513
+ """ # noqa: E501
514
+
515
+ _param = self._delete_dataset_serialize(
516
+ context_id=context_id,
517
+ entry_id=entry_id,
518
+ x_entrystore_host=x_entrystore_host,
519
+ entrystore_host=entrystore_host,
520
+ _request_auth=_request_auth,
521
+ _content_type=_content_type,
522
+ _headers=_headers,
523
+ _host_index=_host_index,
524
+ )
525
+
526
+ _response_types_map: Dict[str, Optional[str]] = {
527
+ "204": None,
528
+ "400": "Error",
529
+ "401": "Error",
530
+ "403": "Error",
531
+ "404": "Error",
532
+ "409": "Error",
533
+ "500": "Error",
534
+ "503": "Error",
535
+ }
536
+ response_data = await self.api_client.call_api(
537
+ *_param, _request_timeout=_request_timeout
538
+ )
539
+ await response_data.read()
540
+ return self.api_client.response_deserialize(
541
+ response_data=response_data,
542
+ response_types_map=_response_types_map,
543
+ ).data
544
+
545
+ @validate_call
546
+ async def delete_dataset_with_http_info(
547
+ self,
548
+ context_id: Annotated[
549
+ str,
550
+ Field(
551
+ strict=True,
552
+ description="The context (catalog) identifier in EntryStore",
553
+ ),
554
+ ],
555
+ entry_id: Annotated[
556
+ str,
557
+ Field(strict=True, description="The entry identifier within the context"),
558
+ ],
559
+ x_entrystore_host: Annotated[
560
+ Optional[StrictStr],
561
+ Field(
562
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
563
+ ),
564
+ ] = None,
565
+ entrystore_host: Annotated[
566
+ Optional[StrictStr],
567
+ Field(
568
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
569
+ ),
570
+ ] = None,
571
+ _request_timeout: Union[
572
+ None,
573
+ Annotated[StrictFloat, Field(gt=0)],
574
+ Tuple[
575
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
576
+ ],
577
+ ] = None,
578
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
579
+ _content_type: Optional[StrictStr] = None,
580
+ _headers: Optional[Dict[StrictStr, Any]] = None,
581
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
582
+ ) -> ApiResponse[None]:
583
+ """Delete dataset
584
+
585
+ Deletes a specific dataset and its associated metadata. This operation is irreversible. Requires authentication with write access to the entry's context.
586
+
587
+ :param context_id: The context (catalog) identifier in EntryStore (required)
588
+ :type context_id: str
589
+ :param entry_id: The entry identifier within the context (required)
590
+ :type entry_id: str
591
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
592
+ :type x_entrystore_host: str
593
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
594
+ :type entrystore_host: str
595
+ :param _request_timeout: timeout setting for this request. If one
596
+ number provided, it will be total request
597
+ timeout. It can also be a pair (tuple) of
598
+ (connection, read) timeouts.
599
+ :type _request_timeout: int, tuple(int, int), optional
600
+ :param _request_auth: set to override the auth_settings for an a single
601
+ request; this effectively ignores the
602
+ authentication in the spec for a single request.
603
+ :type _request_auth: dict, optional
604
+ :param _content_type: force content-type for the request.
605
+ :type _content_type: str, Optional
606
+ :param _headers: set to override the headers for a single
607
+ request; this effectively ignores the headers
608
+ in the spec for a single request.
609
+ :type _headers: dict, optional
610
+ :param _host_index: set to override the host_index for a single
611
+ request; this effectively ignores the host_index
612
+ in the spec for a single request.
613
+ :type _host_index: int, optional
614
+ :return: Returns the result object.
615
+ """ # noqa: E501
616
+
617
+ _param = self._delete_dataset_serialize(
618
+ context_id=context_id,
619
+ entry_id=entry_id,
620
+ x_entrystore_host=x_entrystore_host,
621
+ entrystore_host=entrystore_host,
622
+ _request_auth=_request_auth,
623
+ _content_type=_content_type,
624
+ _headers=_headers,
625
+ _host_index=_host_index,
626
+ )
627
+
628
+ _response_types_map: Dict[str, Optional[str]] = {
629
+ "204": None,
630
+ "400": "Error",
631
+ "401": "Error",
632
+ "403": "Error",
633
+ "404": "Error",
634
+ "409": "Error",
635
+ "500": "Error",
636
+ "503": "Error",
637
+ }
638
+ response_data = await self.api_client.call_api(
639
+ *_param, _request_timeout=_request_timeout
640
+ )
641
+ await response_data.read()
642
+ return self.api_client.response_deserialize(
643
+ response_data=response_data,
644
+ response_types_map=_response_types_map,
645
+ )
646
+
647
+ @validate_call
648
+ async def delete_dataset_without_preload_content(
649
+ self,
650
+ context_id: Annotated[
651
+ str,
652
+ Field(
653
+ strict=True,
654
+ description="The context (catalog) identifier in EntryStore",
655
+ ),
656
+ ],
657
+ entry_id: Annotated[
658
+ str,
659
+ Field(strict=True, description="The entry identifier within the context"),
660
+ ],
661
+ x_entrystore_host: Annotated[
662
+ Optional[StrictStr],
663
+ Field(
664
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
665
+ ),
666
+ ] = None,
667
+ entrystore_host: Annotated[
668
+ Optional[StrictStr],
669
+ Field(
670
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
671
+ ),
672
+ ] = None,
673
+ _request_timeout: Union[
674
+ None,
675
+ Annotated[StrictFloat, Field(gt=0)],
676
+ Tuple[
677
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
678
+ ],
679
+ ] = None,
680
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
681
+ _content_type: Optional[StrictStr] = None,
682
+ _headers: Optional[Dict[StrictStr, Any]] = None,
683
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
684
+ ) -> RESTResponseType:
685
+ """Delete dataset
686
+
687
+ Deletes a specific dataset and its associated metadata. This operation is irreversible. Requires authentication with write access to the entry's context.
688
+
689
+ :param context_id: The context (catalog) identifier in EntryStore (required)
690
+ :type context_id: str
691
+ :param entry_id: The entry identifier within the context (required)
692
+ :type entry_id: str
693
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
694
+ :type x_entrystore_host: str
695
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
696
+ :type entrystore_host: str
697
+ :param _request_timeout: timeout setting for this request. If one
698
+ number provided, it will be total request
699
+ timeout. It can also be a pair (tuple) of
700
+ (connection, read) timeouts.
701
+ :type _request_timeout: int, tuple(int, int), optional
702
+ :param _request_auth: set to override the auth_settings for an a single
703
+ request; this effectively ignores the
704
+ authentication in the spec for a single request.
705
+ :type _request_auth: dict, optional
706
+ :param _content_type: force content-type for the request.
707
+ :type _content_type: str, Optional
708
+ :param _headers: set to override the headers for a single
709
+ request; this effectively ignores the headers
710
+ in the spec for a single request.
711
+ :type _headers: dict, optional
712
+ :param _host_index: set to override the host_index for a single
713
+ request; this effectively ignores the host_index
714
+ in the spec for a single request.
715
+ :type _host_index: int, optional
716
+ :return: Returns the result object.
717
+ """ # noqa: E501
718
+
719
+ _param = self._delete_dataset_serialize(
720
+ context_id=context_id,
721
+ entry_id=entry_id,
722
+ x_entrystore_host=x_entrystore_host,
723
+ entrystore_host=entrystore_host,
724
+ _request_auth=_request_auth,
725
+ _content_type=_content_type,
726
+ _headers=_headers,
727
+ _host_index=_host_index,
728
+ )
729
+
730
+ _response_types_map: Dict[str, Optional[str]] = {
731
+ "204": None,
732
+ "400": "Error",
733
+ "401": "Error",
734
+ "403": "Error",
735
+ "404": "Error",
736
+ "409": "Error",
737
+ "500": "Error",
738
+ "503": "Error",
739
+ }
740
+ response_data = await self.api_client.call_api(
741
+ *_param, _request_timeout=_request_timeout
742
+ )
743
+ return response_data.response
744
+
745
+ def _delete_dataset_serialize(
746
+ self,
747
+ context_id,
748
+ entry_id,
749
+ x_entrystore_host,
750
+ entrystore_host,
751
+ _request_auth,
752
+ _content_type,
753
+ _headers,
754
+ _host_index,
755
+ ) -> RequestSerialized:
756
+
757
+ _host = None
758
+
759
+ _collection_formats: Dict[str, str] = {}
760
+
761
+ _path_params: Dict[str, str] = {}
762
+ _query_params: List[Tuple[str, str]] = []
763
+ _header_params: Dict[str, Optional[str]] = _headers or {}
764
+ _form_params: List[Tuple[str, str]] = []
765
+ _files: Dict[
766
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
767
+ ] = {}
768
+ _body_params: Optional[bytes] = None
769
+
770
+ # process the path parameters
771
+ if context_id is not None:
772
+ _path_params["context_id"] = context_id
773
+ if entry_id is not None:
774
+ _path_params["entry_id"] = entry_id
775
+ # process the query parameters
776
+ if entrystore_host is not None:
777
+
778
+ _query_params.append(("entrystore_host", entrystore_host))
779
+
780
+ # process the header parameters
781
+ if x_entrystore_host is not None:
782
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
783
+ # process the form parameters
784
+ # process the body parameter
785
+
786
+ # set the HTTP header `Accept`
787
+ if "Accept" not in _header_params:
788
+ _header_params["Accept"] = self.api_client.select_header_accept(
789
+ ["application/json"]
790
+ )
791
+
792
+ # authentication setting
793
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
794
+
795
+ return self.api_client.param_serialize(
796
+ method="DELETE",
797
+ resource_path="/dataset/{context_id}/{entry_id}",
798
+ path_params=_path_params,
799
+ query_params=_query_params,
800
+ header_params=_header_params,
801
+ body=_body_params,
802
+ post_params=_form_params,
803
+ files=_files,
804
+ auth_settings=_auth_settings,
805
+ collection_formats=_collection_formats,
806
+ _host=_host,
807
+ _request_auth=_request_auth,
808
+ )
809
+
810
+ @validate_call
811
+ async def get_dataset(
812
+ self,
813
+ context_id: Annotated[
814
+ str,
815
+ Field(
816
+ strict=True,
817
+ description="The context (catalog) identifier in EntryStore",
818
+ ),
819
+ ],
820
+ entry_id: Annotated[
821
+ str,
822
+ Field(strict=True, description="The entry identifier within the context"),
823
+ ],
824
+ x_entrystore_host: Annotated[
825
+ Optional[StrictStr],
826
+ Field(
827
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
828
+ ),
829
+ ] = None,
830
+ entrystore_host: Annotated[
831
+ Optional[StrictStr],
832
+ Field(
833
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
834
+ ),
835
+ ] = None,
836
+ _request_timeout: Union[
837
+ None,
838
+ Annotated[StrictFloat, Field(gt=0)],
839
+ Tuple[
840
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
841
+ ],
842
+ ] = None,
843
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
844
+ _content_type: Optional[StrictStr] = None,
845
+ _headers: Optional[Dict[StrictStr, Any]] = None,
846
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
847
+ ) -> EntityReference:
848
+ """Get dataset
849
+
850
+ Returns basic reference information for a specific dataset. Use the /metadata sub-endpoint to retrieve the full DCAT-AP metadata. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
851
+
852
+ :param context_id: The context (catalog) identifier in EntryStore (required)
853
+ :type context_id: str
854
+ :param entry_id: The entry identifier within the context (required)
855
+ :type entry_id: str
856
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
857
+ :type x_entrystore_host: str
858
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
859
+ :type entrystore_host: str
860
+ :param _request_timeout: timeout setting for this request. If one
861
+ number provided, it will be total request
862
+ timeout. It can also be a pair (tuple) of
863
+ (connection, read) timeouts.
864
+ :type _request_timeout: int, tuple(int, int), optional
865
+ :param _request_auth: set to override the auth_settings for an a single
866
+ request; this effectively ignores the
867
+ authentication in the spec for a single request.
868
+ :type _request_auth: dict, optional
869
+ :param _content_type: force content-type for the request.
870
+ :type _content_type: str, Optional
871
+ :param _headers: set to override the headers for a single
872
+ request; this effectively ignores the headers
873
+ in the spec for a single request.
874
+ :type _headers: dict, optional
875
+ :param _host_index: set to override the host_index for a single
876
+ request; this effectively ignores the host_index
877
+ in the spec for a single request.
878
+ :type _host_index: int, optional
879
+ :return: Returns the result object.
880
+ """ # noqa: E501
881
+
882
+ _param = self._get_dataset_serialize(
883
+ context_id=context_id,
884
+ entry_id=entry_id,
885
+ x_entrystore_host=x_entrystore_host,
886
+ entrystore_host=entrystore_host,
887
+ _request_auth=_request_auth,
888
+ _content_type=_content_type,
889
+ _headers=_headers,
890
+ _host_index=_host_index,
891
+ )
892
+
893
+ _response_types_map: Dict[str, Optional[str]] = {
894
+ "200": "EntityReference",
895
+ "400": "Error",
896
+ "401": "Error",
897
+ "404": "Error",
898
+ "500": "Error",
899
+ "503": "Error",
900
+ }
901
+ response_data = await self.api_client.call_api(
902
+ *_param, _request_timeout=_request_timeout
903
+ )
904
+ await response_data.read()
905
+ return self.api_client.response_deserialize(
906
+ response_data=response_data,
907
+ response_types_map=_response_types_map,
908
+ ).data
909
+
910
+ @validate_call
911
+ async def get_dataset_with_http_info(
912
+ self,
913
+ context_id: Annotated[
914
+ str,
915
+ Field(
916
+ strict=True,
917
+ description="The context (catalog) identifier in EntryStore",
918
+ ),
919
+ ],
920
+ entry_id: Annotated[
921
+ str,
922
+ Field(strict=True, description="The entry identifier within the context"),
923
+ ],
924
+ x_entrystore_host: Annotated[
925
+ Optional[StrictStr],
926
+ Field(
927
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
928
+ ),
929
+ ] = None,
930
+ entrystore_host: Annotated[
931
+ Optional[StrictStr],
932
+ Field(
933
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
934
+ ),
935
+ ] = None,
936
+ _request_timeout: Union[
937
+ None,
938
+ Annotated[StrictFloat, Field(gt=0)],
939
+ Tuple[
940
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
941
+ ],
942
+ ] = None,
943
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
944
+ _content_type: Optional[StrictStr] = None,
945
+ _headers: Optional[Dict[StrictStr, Any]] = None,
946
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
947
+ ) -> ApiResponse[EntityReference]:
948
+ """Get dataset
949
+
950
+ Returns basic reference information for a specific dataset. Use the /metadata sub-endpoint to retrieve the full DCAT-AP metadata. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
951
+
952
+ :param context_id: The context (catalog) identifier in EntryStore (required)
953
+ :type context_id: str
954
+ :param entry_id: The entry identifier within the context (required)
955
+ :type entry_id: str
956
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
957
+ :type x_entrystore_host: str
958
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
959
+ :type entrystore_host: str
960
+ :param _request_timeout: timeout setting for this request. If one
961
+ number provided, it will be total request
962
+ timeout. It can also be a pair (tuple) of
963
+ (connection, read) timeouts.
964
+ :type _request_timeout: int, tuple(int, int), optional
965
+ :param _request_auth: set to override the auth_settings for an a single
966
+ request; this effectively ignores the
967
+ authentication in the spec for a single request.
968
+ :type _request_auth: dict, optional
969
+ :param _content_type: force content-type for the request.
970
+ :type _content_type: str, Optional
971
+ :param _headers: set to override the headers for a single
972
+ request; this effectively ignores the headers
973
+ in the spec for a single request.
974
+ :type _headers: dict, optional
975
+ :param _host_index: set to override the host_index for a single
976
+ request; this effectively ignores the host_index
977
+ in the spec for a single request.
978
+ :type _host_index: int, optional
979
+ :return: Returns the result object.
980
+ """ # noqa: E501
981
+
982
+ _param = self._get_dataset_serialize(
983
+ context_id=context_id,
984
+ entry_id=entry_id,
985
+ x_entrystore_host=x_entrystore_host,
986
+ entrystore_host=entrystore_host,
987
+ _request_auth=_request_auth,
988
+ _content_type=_content_type,
989
+ _headers=_headers,
990
+ _host_index=_host_index,
991
+ )
992
+
993
+ _response_types_map: Dict[str, Optional[str]] = {
994
+ "200": "EntityReference",
995
+ "400": "Error",
996
+ "401": "Error",
997
+ "404": "Error",
998
+ "500": "Error",
999
+ "503": "Error",
1000
+ }
1001
+ response_data = await self.api_client.call_api(
1002
+ *_param, _request_timeout=_request_timeout
1003
+ )
1004
+ await response_data.read()
1005
+ return self.api_client.response_deserialize(
1006
+ response_data=response_data,
1007
+ response_types_map=_response_types_map,
1008
+ )
1009
+
1010
+ @validate_call
1011
+ async def get_dataset_without_preload_content(
1012
+ self,
1013
+ context_id: Annotated[
1014
+ str,
1015
+ Field(
1016
+ strict=True,
1017
+ description="The context (catalog) identifier in EntryStore",
1018
+ ),
1019
+ ],
1020
+ entry_id: Annotated[
1021
+ str,
1022
+ Field(strict=True, description="The entry identifier within the context"),
1023
+ ],
1024
+ x_entrystore_host: Annotated[
1025
+ Optional[StrictStr],
1026
+ Field(
1027
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1028
+ ),
1029
+ ] = None,
1030
+ entrystore_host: Annotated[
1031
+ Optional[StrictStr],
1032
+ Field(
1033
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1034
+ ),
1035
+ ] = None,
1036
+ _request_timeout: Union[
1037
+ None,
1038
+ Annotated[StrictFloat, Field(gt=0)],
1039
+ Tuple[
1040
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1041
+ ],
1042
+ ] = None,
1043
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1044
+ _content_type: Optional[StrictStr] = None,
1045
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1046
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1047
+ ) -> RESTResponseType:
1048
+ """Get dataset
1049
+
1050
+ Returns basic reference information for a specific dataset. Use the /metadata sub-endpoint to retrieve the full DCAT-AP metadata. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
1051
+
1052
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1053
+ :type context_id: str
1054
+ :param entry_id: The entry identifier within the context (required)
1055
+ :type entry_id: str
1056
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1057
+ :type x_entrystore_host: str
1058
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1059
+ :type entrystore_host: str
1060
+ :param _request_timeout: timeout setting for this request. If one
1061
+ number provided, it will be total request
1062
+ timeout. It can also be a pair (tuple) of
1063
+ (connection, read) timeouts.
1064
+ :type _request_timeout: int, tuple(int, int), optional
1065
+ :param _request_auth: set to override the auth_settings for an a single
1066
+ request; this effectively ignores the
1067
+ authentication in the spec for a single request.
1068
+ :type _request_auth: dict, optional
1069
+ :param _content_type: force content-type for the request.
1070
+ :type _content_type: str, Optional
1071
+ :param _headers: set to override the headers for a single
1072
+ request; this effectively ignores the headers
1073
+ in the spec for a single request.
1074
+ :type _headers: dict, optional
1075
+ :param _host_index: set to override the host_index for a single
1076
+ request; this effectively ignores the host_index
1077
+ in the spec for a single request.
1078
+ :type _host_index: int, optional
1079
+ :return: Returns the result object.
1080
+ """ # noqa: E501
1081
+
1082
+ _param = self._get_dataset_serialize(
1083
+ context_id=context_id,
1084
+ entry_id=entry_id,
1085
+ x_entrystore_host=x_entrystore_host,
1086
+ entrystore_host=entrystore_host,
1087
+ _request_auth=_request_auth,
1088
+ _content_type=_content_type,
1089
+ _headers=_headers,
1090
+ _host_index=_host_index,
1091
+ )
1092
+
1093
+ _response_types_map: Dict[str, Optional[str]] = {
1094
+ "200": "EntityReference",
1095
+ "400": "Error",
1096
+ "401": "Error",
1097
+ "404": "Error",
1098
+ "500": "Error",
1099
+ "503": "Error",
1100
+ }
1101
+ response_data = await self.api_client.call_api(
1102
+ *_param, _request_timeout=_request_timeout
1103
+ )
1104
+ return response_data.response
1105
+
1106
+ def _get_dataset_serialize(
1107
+ self,
1108
+ context_id,
1109
+ entry_id,
1110
+ x_entrystore_host,
1111
+ entrystore_host,
1112
+ _request_auth,
1113
+ _content_type,
1114
+ _headers,
1115
+ _host_index,
1116
+ ) -> RequestSerialized:
1117
+
1118
+ _host = None
1119
+
1120
+ _collection_formats: Dict[str, str] = {}
1121
+
1122
+ _path_params: Dict[str, str] = {}
1123
+ _query_params: List[Tuple[str, str]] = []
1124
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1125
+ _form_params: List[Tuple[str, str]] = []
1126
+ _files: Dict[
1127
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1128
+ ] = {}
1129
+ _body_params: Optional[bytes] = None
1130
+
1131
+ # process the path parameters
1132
+ if context_id is not None:
1133
+ _path_params["context_id"] = context_id
1134
+ if entry_id is not None:
1135
+ _path_params["entry_id"] = entry_id
1136
+ # process the query parameters
1137
+ if entrystore_host is not None:
1138
+
1139
+ _query_params.append(("entrystore_host", entrystore_host))
1140
+
1141
+ # process the header parameters
1142
+ if x_entrystore_host is not None:
1143
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
1144
+ # process the form parameters
1145
+ # process the body parameter
1146
+
1147
+ # set the HTTP header `Accept`
1148
+ if "Accept" not in _header_params:
1149
+ _header_params["Accept"] = self.api_client.select_header_accept(
1150
+ ["application/json"]
1151
+ )
1152
+
1153
+ # authentication setting
1154
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
1155
+
1156
+ return self.api_client.param_serialize(
1157
+ method="GET",
1158
+ resource_path="/dataset/{context_id}/{entry_id}",
1159
+ path_params=_path_params,
1160
+ query_params=_query_params,
1161
+ header_params=_header_params,
1162
+ body=_body_params,
1163
+ post_params=_form_params,
1164
+ files=_files,
1165
+ auth_settings=_auth_settings,
1166
+ collection_formats=_collection_formats,
1167
+ _host=_host,
1168
+ _request_auth=_request_auth,
1169
+ )
1170
+
1171
+ @validate_call
1172
+ async def get_dataset_metadata(
1173
+ self,
1174
+ context_id: Annotated[
1175
+ str,
1176
+ Field(
1177
+ strict=True,
1178
+ description="The context (catalog) identifier in EntryStore",
1179
+ ),
1180
+ ],
1181
+ entry_id: Annotated[
1182
+ str,
1183
+ Field(strict=True, description="The entry identifier within the context"),
1184
+ ],
1185
+ x_entrystore_host: Annotated[
1186
+ Optional[StrictStr],
1187
+ Field(
1188
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1189
+ ),
1190
+ ] = None,
1191
+ entrystore_host: Annotated[
1192
+ Optional[StrictStr],
1193
+ Field(
1194
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1195
+ ),
1196
+ ] = None,
1197
+ format: Annotated[
1198
+ Optional[MetadataFormat],
1199
+ Field(
1200
+ description="Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format "
1201
+ ),
1202
+ ] = None,
1203
+ _request_timeout: Union[
1204
+ None,
1205
+ Annotated[StrictFloat, Field(gt=0)],
1206
+ Tuple[
1207
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1208
+ ],
1209
+ ] = None,
1210
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1211
+ _content_type: Optional[StrictStr] = None,
1212
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1213
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1214
+ ) -> Dict[str, object]:
1215
+ """Get dataset metadata
1216
+
1217
+ Returns the raw DCAT-AP metadata for a specific dataset. The response format can be specified using the `format` query parameter. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
1218
+
1219
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1220
+ :type context_id: str
1221
+ :param entry_id: The entry identifier within the context (required)
1222
+ :type entry_id: str
1223
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1224
+ :type x_entrystore_host: str
1225
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1226
+ :type entrystore_host: str
1227
+ :param format: Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format
1228
+ :type format: MetadataFormat
1229
+ :param _request_timeout: timeout setting for this request. If one
1230
+ number provided, it will be total request
1231
+ timeout. It can also be a pair (tuple) of
1232
+ (connection, read) timeouts.
1233
+ :type _request_timeout: int, tuple(int, int), optional
1234
+ :param _request_auth: set to override the auth_settings for an a single
1235
+ request; this effectively ignores the
1236
+ authentication in the spec for a single request.
1237
+ :type _request_auth: dict, optional
1238
+ :param _content_type: force content-type for the request.
1239
+ :type _content_type: str, Optional
1240
+ :param _headers: set to override the headers for a single
1241
+ request; this effectively ignores the headers
1242
+ in the spec for a single request.
1243
+ :type _headers: dict, optional
1244
+ :param _host_index: set to override the host_index for a single
1245
+ request; this effectively ignores the host_index
1246
+ in the spec for a single request.
1247
+ :type _host_index: int, optional
1248
+ :return: Returns the result object.
1249
+ """ # noqa: E501
1250
+
1251
+ _param = self._get_dataset_metadata_serialize(
1252
+ context_id=context_id,
1253
+ entry_id=entry_id,
1254
+ x_entrystore_host=x_entrystore_host,
1255
+ entrystore_host=entrystore_host,
1256
+ format=format,
1257
+ _request_auth=_request_auth,
1258
+ _content_type=_content_type,
1259
+ _headers=_headers,
1260
+ _host_index=_host_index,
1261
+ )
1262
+
1263
+ _response_types_map: Dict[str, Optional[str]] = {
1264
+ "200": "Dict[str, object]",
1265
+ "400": "Error",
1266
+ "401": "Error",
1267
+ "404": "Error",
1268
+ "500": "Error",
1269
+ "503": "Error",
1270
+ }
1271
+ response_data = await self.api_client.call_api(
1272
+ *_param, _request_timeout=_request_timeout
1273
+ )
1274
+ await response_data.read()
1275
+ return self.api_client.response_deserialize(
1276
+ response_data=response_data,
1277
+ response_types_map=_response_types_map,
1278
+ ).data
1279
+
1280
+ @validate_call
1281
+ async def get_dataset_metadata_with_http_info(
1282
+ self,
1283
+ context_id: Annotated[
1284
+ str,
1285
+ Field(
1286
+ strict=True,
1287
+ description="The context (catalog) identifier in EntryStore",
1288
+ ),
1289
+ ],
1290
+ entry_id: Annotated[
1291
+ str,
1292
+ Field(strict=True, description="The entry identifier within the context"),
1293
+ ],
1294
+ x_entrystore_host: Annotated[
1295
+ Optional[StrictStr],
1296
+ Field(
1297
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1298
+ ),
1299
+ ] = None,
1300
+ entrystore_host: Annotated[
1301
+ Optional[StrictStr],
1302
+ Field(
1303
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1304
+ ),
1305
+ ] = None,
1306
+ format: Annotated[
1307
+ Optional[MetadataFormat],
1308
+ Field(
1309
+ description="Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format "
1310
+ ),
1311
+ ] = None,
1312
+ _request_timeout: Union[
1313
+ None,
1314
+ Annotated[StrictFloat, Field(gt=0)],
1315
+ Tuple[
1316
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1317
+ ],
1318
+ ] = None,
1319
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1320
+ _content_type: Optional[StrictStr] = None,
1321
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1322
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1323
+ ) -> ApiResponse[Dict[str, object]]:
1324
+ """Get dataset metadata
1325
+
1326
+ Returns the raw DCAT-AP metadata for a specific dataset. The response format can be specified using the `format` query parameter. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
1327
+
1328
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1329
+ :type context_id: str
1330
+ :param entry_id: The entry identifier within the context (required)
1331
+ :type entry_id: str
1332
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1333
+ :type x_entrystore_host: str
1334
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1335
+ :type entrystore_host: str
1336
+ :param format: Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format
1337
+ :type format: MetadataFormat
1338
+ :param _request_timeout: timeout setting for this request. If one
1339
+ number provided, it will be total request
1340
+ timeout. It can also be a pair (tuple) of
1341
+ (connection, read) timeouts.
1342
+ :type _request_timeout: int, tuple(int, int), optional
1343
+ :param _request_auth: set to override the auth_settings for an a single
1344
+ request; this effectively ignores the
1345
+ authentication in the spec for a single request.
1346
+ :type _request_auth: dict, optional
1347
+ :param _content_type: force content-type for the request.
1348
+ :type _content_type: str, Optional
1349
+ :param _headers: set to override the headers for a single
1350
+ request; this effectively ignores the headers
1351
+ in the spec for a single request.
1352
+ :type _headers: dict, optional
1353
+ :param _host_index: set to override the host_index for a single
1354
+ request; this effectively ignores the host_index
1355
+ in the spec for a single request.
1356
+ :type _host_index: int, optional
1357
+ :return: Returns the result object.
1358
+ """ # noqa: E501
1359
+
1360
+ _param = self._get_dataset_metadata_serialize(
1361
+ context_id=context_id,
1362
+ entry_id=entry_id,
1363
+ x_entrystore_host=x_entrystore_host,
1364
+ entrystore_host=entrystore_host,
1365
+ format=format,
1366
+ _request_auth=_request_auth,
1367
+ _content_type=_content_type,
1368
+ _headers=_headers,
1369
+ _host_index=_host_index,
1370
+ )
1371
+
1372
+ _response_types_map: Dict[str, Optional[str]] = {
1373
+ "200": "Dict[str, object]",
1374
+ "400": "Error",
1375
+ "401": "Error",
1376
+ "404": "Error",
1377
+ "500": "Error",
1378
+ "503": "Error",
1379
+ }
1380
+ response_data = await self.api_client.call_api(
1381
+ *_param, _request_timeout=_request_timeout
1382
+ )
1383
+ await response_data.read()
1384
+ return self.api_client.response_deserialize(
1385
+ response_data=response_data,
1386
+ response_types_map=_response_types_map,
1387
+ )
1388
+
1389
+ @validate_call
1390
+ async def get_dataset_metadata_without_preload_content(
1391
+ self,
1392
+ context_id: Annotated[
1393
+ str,
1394
+ Field(
1395
+ strict=True,
1396
+ description="The context (catalog) identifier in EntryStore",
1397
+ ),
1398
+ ],
1399
+ entry_id: Annotated[
1400
+ str,
1401
+ Field(strict=True, description="The entry identifier within the context"),
1402
+ ],
1403
+ x_entrystore_host: Annotated[
1404
+ Optional[StrictStr],
1405
+ Field(
1406
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1407
+ ),
1408
+ ] = None,
1409
+ entrystore_host: Annotated[
1410
+ Optional[StrictStr],
1411
+ Field(
1412
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1413
+ ),
1414
+ ] = None,
1415
+ format: Annotated[
1416
+ Optional[MetadataFormat],
1417
+ Field(
1418
+ description="Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format "
1419
+ ),
1420
+ ] = None,
1421
+ _request_timeout: Union[
1422
+ None,
1423
+ Annotated[StrictFloat, Field(gt=0)],
1424
+ Tuple[
1425
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1426
+ ],
1427
+ ] = None,
1428
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1429
+ _content_type: Optional[StrictStr] = None,
1430
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1431
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1432
+ ) -> RESTResponseType:
1433
+ """Get dataset metadata
1434
+
1435
+ Returns the raw DCAT-AP metadata for a specific dataset. The response format can be specified using the `format` query parameter. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
1436
+
1437
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1438
+ :type context_id: str
1439
+ :param entry_id: The entry identifier within the context (required)
1440
+ :type entry_id: str
1441
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1442
+ :type x_entrystore_host: str
1443
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1444
+ :type entrystore_host: str
1445
+ :param format: Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format
1446
+ :type format: MetadataFormat
1447
+ :param _request_timeout: timeout setting for this request. If one
1448
+ number provided, it will be total request
1449
+ timeout. It can also be a pair (tuple) of
1450
+ (connection, read) timeouts.
1451
+ :type _request_timeout: int, tuple(int, int), optional
1452
+ :param _request_auth: set to override the auth_settings for an a single
1453
+ request; this effectively ignores the
1454
+ authentication in the spec for a single request.
1455
+ :type _request_auth: dict, optional
1456
+ :param _content_type: force content-type for the request.
1457
+ :type _content_type: str, Optional
1458
+ :param _headers: set to override the headers for a single
1459
+ request; this effectively ignores the headers
1460
+ in the spec for a single request.
1461
+ :type _headers: dict, optional
1462
+ :param _host_index: set to override the host_index for a single
1463
+ request; this effectively ignores the host_index
1464
+ in the spec for a single request.
1465
+ :type _host_index: int, optional
1466
+ :return: Returns the result object.
1467
+ """ # noqa: E501
1468
+
1469
+ _param = self._get_dataset_metadata_serialize(
1470
+ context_id=context_id,
1471
+ entry_id=entry_id,
1472
+ x_entrystore_host=x_entrystore_host,
1473
+ entrystore_host=entrystore_host,
1474
+ format=format,
1475
+ _request_auth=_request_auth,
1476
+ _content_type=_content_type,
1477
+ _headers=_headers,
1478
+ _host_index=_host_index,
1479
+ )
1480
+
1481
+ _response_types_map: Dict[str, Optional[str]] = {
1482
+ "200": "Dict[str, object]",
1483
+ "400": "Error",
1484
+ "401": "Error",
1485
+ "404": "Error",
1486
+ "500": "Error",
1487
+ "503": "Error",
1488
+ }
1489
+ response_data = await self.api_client.call_api(
1490
+ *_param, _request_timeout=_request_timeout
1491
+ )
1492
+ return response_data.response
1493
+
1494
+ def _get_dataset_metadata_serialize(
1495
+ self,
1496
+ context_id,
1497
+ entry_id,
1498
+ x_entrystore_host,
1499
+ entrystore_host,
1500
+ format,
1501
+ _request_auth,
1502
+ _content_type,
1503
+ _headers,
1504
+ _host_index,
1505
+ ) -> RequestSerialized:
1506
+
1507
+ _host = None
1508
+
1509
+ _collection_formats: Dict[str, str] = {}
1510
+
1511
+ _path_params: Dict[str, str] = {}
1512
+ _query_params: List[Tuple[str, str]] = []
1513
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1514
+ _form_params: List[Tuple[str, str]] = []
1515
+ _files: Dict[
1516
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1517
+ ] = {}
1518
+ _body_params: Optional[bytes] = None
1519
+
1520
+ # process the path parameters
1521
+ if context_id is not None:
1522
+ _path_params["context_id"] = context_id
1523
+ if entry_id is not None:
1524
+ _path_params["entry_id"] = entry_id
1525
+ # process the query parameters
1526
+ if entrystore_host is not None:
1527
+
1528
+ _query_params.append(("entrystore_host", entrystore_host))
1529
+
1530
+ if format is not None:
1531
+
1532
+ _query_params.append(("format", format.value))
1533
+
1534
+ # process the header parameters
1535
+ if x_entrystore_host is not None:
1536
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
1537
+ # process the form parameters
1538
+ # process the body parameter
1539
+
1540
+ # set the HTTP header `Accept`
1541
+ if "Accept" not in _header_params:
1542
+ _header_params["Accept"] = self.api_client.select_header_accept(
1543
+ [
1544
+ "application/ld+json",
1545
+ "application/rdf+json",
1546
+ "text/turtle",
1547
+ "application/n-triples",
1548
+ "application/rdf+xml",
1549
+ "application/json",
1550
+ ]
1551
+ )
1552
+
1553
+ # authentication setting
1554
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
1555
+
1556
+ return self.api_client.param_serialize(
1557
+ method="GET",
1558
+ resource_path="/dataset/{context_id}/{entry_id}/metadata",
1559
+ path_params=_path_params,
1560
+ query_params=_query_params,
1561
+ header_params=_header_params,
1562
+ body=_body_params,
1563
+ post_params=_form_params,
1564
+ files=_files,
1565
+ auth_settings=_auth_settings,
1566
+ collection_formats=_collection_formats,
1567
+ _host=_host,
1568
+ _request_auth=_request_auth,
1569
+ )
1570
+
1571
+ @validate_call
1572
+ async def list_dataset_distributions(
1573
+ self,
1574
+ context_id: Annotated[
1575
+ str,
1576
+ Field(
1577
+ strict=True,
1578
+ description="The context (catalog) identifier in EntryStore",
1579
+ ),
1580
+ ],
1581
+ entry_id: Annotated[
1582
+ str,
1583
+ Field(strict=True, description="The entry identifier within the context"),
1584
+ ],
1585
+ x_entrystore_host: Annotated[
1586
+ Optional[StrictStr],
1587
+ Field(
1588
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1589
+ ),
1590
+ ] = None,
1591
+ entrystore_host: Annotated[
1592
+ Optional[StrictStr],
1593
+ Field(
1594
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1595
+ ),
1596
+ ] = None,
1597
+ limit: Annotated[
1598
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1599
+ Field(description="Results per page"),
1600
+ ] = None,
1601
+ offset: Annotated[
1602
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
1603
+ Field(description="Results to skip before the first one returned"),
1604
+ ] = None,
1605
+ cursor: Annotated[
1606
+ Optional[Annotated[str, Field(strict=True, max_length=512)]],
1607
+ Field(
1608
+ description="Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response. "
1609
+ ),
1610
+ ] = None,
1611
+ query: Annotated[
1612
+ Optional[Annotated[str, Field(strict=True, max_length=1000)]],
1613
+ Field(
1614
+ description="Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own. "
1615
+ ),
1616
+ ] = None,
1617
+ sort: Annotated[
1618
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]],
1619
+ Field(
1620
+ description="Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400. "
1621
+ ),
1622
+ ] = None,
1623
+ public: Annotated[
1624
+ Optional[StrictBool],
1625
+ Field(
1626
+ description="true: only publicly readable entries; false: only non-public entries"
1627
+ ),
1628
+ ] = None,
1629
+ created_after: Annotated[
1630
+ Optional[datetime], Field(description="Created at or after this instant")
1631
+ ] = None,
1632
+ created_before: Annotated[
1633
+ Optional[datetime], Field(description="Created before this instant")
1634
+ ] = None,
1635
+ modified_after: Annotated[
1636
+ Optional[datetime], Field(description="Modified at or after this instant")
1637
+ ] = None,
1638
+ modified_before: Annotated[
1639
+ Optional[datetime], Field(description="Modified before this instant")
1640
+ ] = None,
1641
+ _request_timeout: Union[
1642
+ None,
1643
+ Annotated[StrictFloat, Field(gt=0)],
1644
+ Tuple[
1645
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1646
+ ],
1647
+ ] = None,
1648
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1649
+ _content_type: Optional[StrictStr] = None,
1650
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1651
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1652
+ ) -> EntityListResponse:
1653
+ """List distributions for dataset
1654
+
1655
+ Returns a paginated list of the distributions this dataset links with `dcat:distribution`. Membership is the link, not the context: a distribution the dataset does not link is not listed here, and a dataset that links none answers with zero results. Authentication is optional. Without authentication, only publicly available entries are returned. Authenticated requests may return additional non-public entries. Answered from an asynchronously updated index: an entry created moments ago may be missing here while reading it by id already returns it.
1656
+
1657
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1658
+ :type context_id: str
1659
+ :param entry_id: The entry identifier within the context (required)
1660
+ :type entry_id: str
1661
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1662
+ :type x_entrystore_host: str
1663
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1664
+ :type entrystore_host: str
1665
+ :param limit: Results per page
1666
+ :type limit: int
1667
+ :param offset: Results to skip before the first one returned
1668
+ :type offset: int
1669
+ :param cursor: Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response.
1670
+ :type cursor: str
1671
+ :param query: Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own.
1672
+ :type query: str
1673
+ :param sort: Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400.
1674
+ :type sort: str
1675
+ :param public: true: only publicly readable entries; false: only non-public entries
1676
+ :type public: bool
1677
+ :param created_after: Created at or after this instant
1678
+ :type created_after: datetime
1679
+ :param created_before: Created before this instant
1680
+ :type created_before: datetime
1681
+ :param modified_after: Modified at or after this instant
1682
+ :type modified_after: datetime
1683
+ :param modified_before: Modified before this instant
1684
+ :type modified_before: datetime
1685
+ :param _request_timeout: timeout setting for this request. If one
1686
+ number provided, it will be total request
1687
+ timeout. It can also be a pair (tuple) of
1688
+ (connection, read) timeouts.
1689
+ :type _request_timeout: int, tuple(int, int), optional
1690
+ :param _request_auth: set to override the auth_settings for an a single
1691
+ request; this effectively ignores the
1692
+ authentication in the spec for a single request.
1693
+ :type _request_auth: dict, optional
1694
+ :param _content_type: force content-type for the request.
1695
+ :type _content_type: str, Optional
1696
+ :param _headers: set to override the headers for a single
1697
+ request; this effectively ignores the headers
1698
+ in the spec for a single request.
1699
+ :type _headers: dict, optional
1700
+ :param _host_index: set to override the host_index for a single
1701
+ request; this effectively ignores the host_index
1702
+ in the spec for a single request.
1703
+ :type _host_index: int, optional
1704
+ :return: Returns the result object.
1705
+ """ # noqa: E501
1706
+
1707
+ _param = self._list_dataset_distributions_serialize(
1708
+ context_id=context_id,
1709
+ entry_id=entry_id,
1710
+ x_entrystore_host=x_entrystore_host,
1711
+ entrystore_host=entrystore_host,
1712
+ limit=limit,
1713
+ offset=offset,
1714
+ cursor=cursor,
1715
+ query=query,
1716
+ sort=sort,
1717
+ public=public,
1718
+ created_after=created_after,
1719
+ created_before=created_before,
1720
+ modified_after=modified_after,
1721
+ modified_before=modified_before,
1722
+ _request_auth=_request_auth,
1723
+ _content_type=_content_type,
1724
+ _headers=_headers,
1725
+ _host_index=_host_index,
1726
+ )
1727
+
1728
+ _response_types_map: Dict[str, Optional[str]] = {
1729
+ "200": "EntityListResponse",
1730
+ "400": "Error",
1731
+ "401": "Error",
1732
+ "404": "Error",
1733
+ "500": "Error",
1734
+ "503": "Error",
1735
+ }
1736
+ response_data = await self.api_client.call_api(
1737
+ *_param, _request_timeout=_request_timeout
1738
+ )
1739
+ await response_data.read()
1740
+ return self.api_client.response_deserialize(
1741
+ response_data=response_data,
1742
+ response_types_map=_response_types_map,
1743
+ ).data
1744
+
1745
+ @validate_call
1746
+ async def list_dataset_distributions_with_http_info(
1747
+ self,
1748
+ context_id: Annotated[
1749
+ str,
1750
+ Field(
1751
+ strict=True,
1752
+ description="The context (catalog) identifier in EntryStore",
1753
+ ),
1754
+ ],
1755
+ entry_id: Annotated[
1756
+ str,
1757
+ Field(strict=True, description="The entry identifier within the context"),
1758
+ ],
1759
+ x_entrystore_host: Annotated[
1760
+ Optional[StrictStr],
1761
+ Field(
1762
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1763
+ ),
1764
+ ] = None,
1765
+ entrystore_host: Annotated[
1766
+ Optional[StrictStr],
1767
+ Field(
1768
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1769
+ ),
1770
+ ] = None,
1771
+ limit: Annotated[
1772
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1773
+ Field(description="Results per page"),
1774
+ ] = None,
1775
+ offset: Annotated[
1776
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
1777
+ Field(description="Results to skip before the first one returned"),
1778
+ ] = None,
1779
+ cursor: Annotated[
1780
+ Optional[Annotated[str, Field(strict=True, max_length=512)]],
1781
+ Field(
1782
+ description="Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response. "
1783
+ ),
1784
+ ] = None,
1785
+ query: Annotated[
1786
+ Optional[Annotated[str, Field(strict=True, max_length=1000)]],
1787
+ Field(
1788
+ description="Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own. "
1789
+ ),
1790
+ ] = None,
1791
+ sort: Annotated[
1792
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]],
1793
+ Field(
1794
+ description="Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400. "
1795
+ ),
1796
+ ] = None,
1797
+ public: Annotated[
1798
+ Optional[StrictBool],
1799
+ Field(
1800
+ description="true: only publicly readable entries; false: only non-public entries"
1801
+ ),
1802
+ ] = None,
1803
+ created_after: Annotated[
1804
+ Optional[datetime], Field(description="Created at or after this instant")
1805
+ ] = None,
1806
+ created_before: Annotated[
1807
+ Optional[datetime], Field(description="Created before this instant")
1808
+ ] = None,
1809
+ modified_after: Annotated[
1810
+ Optional[datetime], Field(description="Modified at or after this instant")
1811
+ ] = None,
1812
+ modified_before: Annotated[
1813
+ Optional[datetime], Field(description="Modified before this instant")
1814
+ ] = None,
1815
+ _request_timeout: Union[
1816
+ None,
1817
+ Annotated[StrictFloat, Field(gt=0)],
1818
+ Tuple[
1819
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1820
+ ],
1821
+ ] = None,
1822
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1823
+ _content_type: Optional[StrictStr] = None,
1824
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1825
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1826
+ ) -> ApiResponse[EntityListResponse]:
1827
+ """List distributions for dataset
1828
+
1829
+ Returns a paginated list of the distributions this dataset links with `dcat:distribution`. Membership is the link, not the context: a distribution the dataset does not link is not listed here, and a dataset that links none answers with zero results. Authentication is optional. Without authentication, only publicly available entries are returned. Authenticated requests may return additional non-public entries. Answered from an asynchronously updated index: an entry created moments ago may be missing here while reading it by id already returns it.
1830
+
1831
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1832
+ :type context_id: str
1833
+ :param entry_id: The entry identifier within the context (required)
1834
+ :type entry_id: str
1835
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1836
+ :type x_entrystore_host: str
1837
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1838
+ :type entrystore_host: str
1839
+ :param limit: Results per page
1840
+ :type limit: int
1841
+ :param offset: Results to skip before the first one returned
1842
+ :type offset: int
1843
+ :param cursor: Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response.
1844
+ :type cursor: str
1845
+ :param query: Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own.
1846
+ :type query: str
1847
+ :param sort: Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400.
1848
+ :type sort: str
1849
+ :param public: true: only publicly readable entries; false: only non-public entries
1850
+ :type public: bool
1851
+ :param created_after: Created at or after this instant
1852
+ :type created_after: datetime
1853
+ :param created_before: Created before this instant
1854
+ :type created_before: datetime
1855
+ :param modified_after: Modified at or after this instant
1856
+ :type modified_after: datetime
1857
+ :param modified_before: Modified before this instant
1858
+ :type modified_before: datetime
1859
+ :param _request_timeout: timeout setting for this request. If one
1860
+ number provided, it will be total request
1861
+ timeout. It can also be a pair (tuple) of
1862
+ (connection, read) timeouts.
1863
+ :type _request_timeout: int, tuple(int, int), optional
1864
+ :param _request_auth: set to override the auth_settings for an a single
1865
+ request; this effectively ignores the
1866
+ authentication in the spec for a single request.
1867
+ :type _request_auth: dict, optional
1868
+ :param _content_type: force content-type for the request.
1869
+ :type _content_type: str, Optional
1870
+ :param _headers: set to override the headers for a single
1871
+ request; this effectively ignores the headers
1872
+ in the spec for a single request.
1873
+ :type _headers: dict, optional
1874
+ :param _host_index: set to override the host_index for a single
1875
+ request; this effectively ignores the host_index
1876
+ in the spec for a single request.
1877
+ :type _host_index: int, optional
1878
+ :return: Returns the result object.
1879
+ """ # noqa: E501
1880
+
1881
+ _param = self._list_dataset_distributions_serialize(
1882
+ context_id=context_id,
1883
+ entry_id=entry_id,
1884
+ x_entrystore_host=x_entrystore_host,
1885
+ entrystore_host=entrystore_host,
1886
+ limit=limit,
1887
+ offset=offset,
1888
+ cursor=cursor,
1889
+ query=query,
1890
+ sort=sort,
1891
+ public=public,
1892
+ created_after=created_after,
1893
+ created_before=created_before,
1894
+ modified_after=modified_after,
1895
+ modified_before=modified_before,
1896
+ _request_auth=_request_auth,
1897
+ _content_type=_content_type,
1898
+ _headers=_headers,
1899
+ _host_index=_host_index,
1900
+ )
1901
+
1902
+ _response_types_map: Dict[str, Optional[str]] = {
1903
+ "200": "EntityListResponse",
1904
+ "400": "Error",
1905
+ "401": "Error",
1906
+ "404": "Error",
1907
+ "500": "Error",
1908
+ "503": "Error",
1909
+ }
1910
+ response_data = await self.api_client.call_api(
1911
+ *_param, _request_timeout=_request_timeout
1912
+ )
1913
+ await response_data.read()
1914
+ return self.api_client.response_deserialize(
1915
+ response_data=response_data,
1916
+ response_types_map=_response_types_map,
1917
+ )
1918
+
1919
+ @validate_call
1920
+ async def list_dataset_distributions_without_preload_content(
1921
+ self,
1922
+ context_id: Annotated[
1923
+ str,
1924
+ Field(
1925
+ strict=True,
1926
+ description="The context (catalog) identifier in EntryStore",
1927
+ ),
1928
+ ],
1929
+ entry_id: Annotated[
1930
+ str,
1931
+ Field(strict=True, description="The entry identifier within the context"),
1932
+ ],
1933
+ x_entrystore_host: Annotated[
1934
+ Optional[StrictStr],
1935
+ Field(
1936
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1937
+ ),
1938
+ ] = None,
1939
+ entrystore_host: Annotated[
1940
+ Optional[StrictStr],
1941
+ Field(
1942
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1943
+ ),
1944
+ ] = None,
1945
+ limit: Annotated[
1946
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1947
+ Field(description="Results per page"),
1948
+ ] = None,
1949
+ offset: Annotated[
1950
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
1951
+ Field(description="Results to skip before the first one returned"),
1952
+ ] = None,
1953
+ cursor: Annotated[
1954
+ Optional[Annotated[str, Field(strict=True, max_length=512)]],
1955
+ Field(
1956
+ description="Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response. "
1957
+ ),
1958
+ ] = None,
1959
+ query: Annotated[
1960
+ Optional[Annotated[str, Field(strict=True, max_length=1000)]],
1961
+ Field(
1962
+ description="Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own. "
1963
+ ),
1964
+ ] = None,
1965
+ sort: Annotated[
1966
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]],
1967
+ Field(
1968
+ description="Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400. "
1969
+ ),
1970
+ ] = None,
1971
+ public: Annotated[
1972
+ Optional[StrictBool],
1973
+ Field(
1974
+ description="true: only publicly readable entries; false: only non-public entries"
1975
+ ),
1976
+ ] = None,
1977
+ created_after: Annotated[
1978
+ Optional[datetime], Field(description="Created at or after this instant")
1979
+ ] = None,
1980
+ created_before: Annotated[
1981
+ Optional[datetime], Field(description="Created before this instant")
1982
+ ] = None,
1983
+ modified_after: Annotated[
1984
+ Optional[datetime], Field(description="Modified at or after this instant")
1985
+ ] = None,
1986
+ modified_before: Annotated[
1987
+ Optional[datetime], Field(description="Modified before this instant")
1988
+ ] = None,
1989
+ _request_timeout: Union[
1990
+ None,
1991
+ Annotated[StrictFloat, Field(gt=0)],
1992
+ Tuple[
1993
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1994
+ ],
1995
+ ] = None,
1996
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1997
+ _content_type: Optional[StrictStr] = None,
1998
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1999
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2000
+ ) -> RESTResponseType:
2001
+ """List distributions for dataset
2002
+
2003
+ Returns a paginated list of the distributions this dataset links with `dcat:distribution`. Membership is the link, not the context: a distribution the dataset does not link is not listed here, and a dataset that links none answers with zero results. Authentication is optional. Without authentication, only publicly available entries are returned. Authenticated requests may return additional non-public entries. Answered from an asynchronously updated index: an entry created moments ago may be missing here while reading it by id already returns it.
2004
+
2005
+ :param context_id: The context (catalog) identifier in EntryStore (required)
2006
+ :type context_id: str
2007
+ :param entry_id: The entry identifier within the context (required)
2008
+ :type entry_id: str
2009
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
2010
+ :type x_entrystore_host: str
2011
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
2012
+ :type entrystore_host: str
2013
+ :param limit: Results per page
2014
+ :type limit: int
2015
+ :param offset: Results to skip before the first one returned
2016
+ :type offset: int
2017
+ :param cursor: Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response.
2018
+ :type cursor: str
2019
+ :param query: Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own.
2020
+ :type query: str
2021
+ :param sort: Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400.
2022
+ :type sort: str
2023
+ :param public: true: only publicly readable entries; false: only non-public entries
2024
+ :type public: bool
2025
+ :param created_after: Created at or after this instant
2026
+ :type created_after: datetime
2027
+ :param created_before: Created before this instant
2028
+ :type created_before: datetime
2029
+ :param modified_after: Modified at or after this instant
2030
+ :type modified_after: datetime
2031
+ :param modified_before: Modified before this instant
2032
+ :type modified_before: datetime
2033
+ :param _request_timeout: timeout setting for this request. If one
2034
+ number provided, it will be total request
2035
+ timeout. It can also be a pair (tuple) of
2036
+ (connection, read) timeouts.
2037
+ :type _request_timeout: int, tuple(int, int), optional
2038
+ :param _request_auth: set to override the auth_settings for an a single
2039
+ request; this effectively ignores the
2040
+ authentication in the spec for a single request.
2041
+ :type _request_auth: dict, optional
2042
+ :param _content_type: force content-type for the request.
2043
+ :type _content_type: str, Optional
2044
+ :param _headers: set to override the headers for a single
2045
+ request; this effectively ignores the headers
2046
+ in the spec for a single request.
2047
+ :type _headers: dict, optional
2048
+ :param _host_index: set to override the host_index for a single
2049
+ request; this effectively ignores the host_index
2050
+ in the spec for a single request.
2051
+ :type _host_index: int, optional
2052
+ :return: Returns the result object.
2053
+ """ # noqa: E501
2054
+
2055
+ _param = self._list_dataset_distributions_serialize(
2056
+ context_id=context_id,
2057
+ entry_id=entry_id,
2058
+ x_entrystore_host=x_entrystore_host,
2059
+ entrystore_host=entrystore_host,
2060
+ limit=limit,
2061
+ offset=offset,
2062
+ cursor=cursor,
2063
+ query=query,
2064
+ sort=sort,
2065
+ public=public,
2066
+ created_after=created_after,
2067
+ created_before=created_before,
2068
+ modified_after=modified_after,
2069
+ modified_before=modified_before,
2070
+ _request_auth=_request_auth,
2071
+ _content_type=_content_type,
2072
+ _headers=_headers,
2073
+ _host_index=_host_index,
2074
+ )
2075
+
2076
+ _response_types_map: Dict[str, Optional[str]] = {
2077
+ "200": "EntityListResponse",
2078
+ "400": "Error",
2079
+ "401": "Error",
2080
+ "404": "Error",
2081
+ "500": "Error",
2082
+ "503": "Error",
2083
+ }
2084
+ response_data = await self.api_client.call_api(
2085
+ *_param, _request_timeout=_request_timeout
2086
+ )
2087
+ return response_data.response
2088
+
2089
+ def _list_dataset_distributions_serialize(
2090
+ self,
2091
+ context_id,
2092
+ entry_id,
2093
+ x_entrystore_host,
2094
+ entrystore_host,
2095
+ limit,
2096
+ offset,
2097
+ cursor,
2098
+ query,
2099
+ sort,
2100
+ public,
2101
+ created_after,
2102
+ created_before,
2103
+ modified_after,
2104
+ modified_before,
2105
+ _request_auth,
2106
+ _content_type,
2107
+ _headers,
2108
+ _host_index,
2109
+ ) -> RequestSerialized:
2110
+
2111
+ _host = None
2112
+
2113
+ _collection_formats: Dict[str, str] = {}
2114
+
2115
+ _path_params: Dict[str, str] = {}
2116
+ _query_params: List[Tuple[str, str]] = []
2117
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2118
+ _form_params: List[Tuple[str, str]] = []
2119
+ _files: Dict[
2120
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2121
+ ] = {}
2122
+ _body_params: Optional[bytes] = None
2123
+
2124
+ # process the path parameters
2125
+ if context_id is not None:
2126
+ _path_params["context_id"] = context_id
2127
+ if entry_id is not None:
2128
+ _path_params["entry_id"] = entry_id
2129
+ # process the query parameters
2130
+ if entrystore_host is not None:
2131
+
2132
+ _query_params.append(("entrystore_host", entrystore_host))
2133
+
2134
+ if limit is not None:
2135
+
2136
+ _query_params.append(("limit", limit))
2137
+
2138
+ if offset is not None:
2139
+
2140
+ _query_params.append(("offset", offset))
2141
+
2142
+ if cursor is not None:
2143
+
2144
+ _query_params.append(("cursor", cursor))
2145
+
2146
+ if query is not None:
2147
+
2148
+ _query_params.append(("query", query))
2149
+
2150
+ if sort is not None:
2151
+
2152
+ _query_params.append(("sort", sort))
2153
+
2154
+ if public is not None:
2155
+
2156
+ _query_params.append(("public", public))
2157
+
2158
+ if created_after is not None:
2159
+ if isinstance(created_after, datetime):
2160
+ _query_params.append(
2161
+ (
2162
+ "created_after",
2163
+ created_after.strftime(
2164
+ self.api_client.configuration.datetime_format
2165
+ ),
2166
+ )
2167
+ )
2168
+ else:
2169
+ _query_params.append(("created_after", created_after))
2170
+
2171
+ if created_before is not None:
2172
+ if isinstance(created_before, datetime):
2173
+ _query_params.append(
2174
+ (
2175
+ "created_before",
2176
+ created_before.strftime(
2177
+ self.api_client.configuration.datetime_format
2178
+ ),
2179
+ )
2180
+ )
2181
+ else:
2182
+ _query_params.append(("created_before", created_before))
2183
+
2184
+ if modified_after is not None:
2185
+ if isinstance(modified_after, datetime):
2186
+ _query_params.append(
2187
+ (
2188
+ "modified_after",
2189
+ modified_after.strftime(
2190
+ self.api_client.configuration.datetime_format
2191
+ ),
2192
+ )
2193
+ )
2194
+ else:
2195
+ _query_params.append(("modified_after", modified_after))
2196
+
2197
+ if modified_before is not None:
2198
+ if isinstance(modified_before, datetime):
2199
+ _query_params.append(
2200
+ (
2201
+ "modified_before",
2202
+ modified_before.strftime(
2203
+ self.api_client.configuration.datetime_format
2204
+ ),
2205
+ )
2206
+ )
2207
+ else:
2208
+ _query_params.append(("modified_before", modified_before))
2209
+
2210
+ # process the header parameters
2211
+ if x_entrystore_host is not None:
2212
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
2213
+ # process the form parameters
2214
+ # process the body parameter
2215
+
2216
+ # set the HTTP header `Accept`
2217
+ if "Accept" not in _header_params:
2218
+ _header_params["Accept"] = self.api_client.select_header_accept(
2219
+ ["application/json"]
2220
+ )
2221
+
2222
+ # authentication setting
2223
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
2224
+
2225
+ return self.api_client.param_serialize(
2226
+ method="GET",
2227
+ resource_path="/dataset/{context_id}/{entry_id}/distributions",
2228
+ path_params=_path_params,
2229
+ query_params=_query_params,
2230
+ header_params=_header_params,
2231
+ body=_body_params,
2232
+ post_params=_form_params,
2233
+ files=_files,
2234
+ auth_settings=_auth_settings,
2235
+ collection_formats=_collection_formats,
2236
+ _host=_host,
2237
+ _request_auth=_request_auth,
2238
+ )
2239
+
2240
+ @validate_call
2241
+ async def list_datasets(
2242
+ self,
2243
+ x_entrystore_host: Annotated[
2244
+ Optional[StrictStr],
2245
+ Field(
2246
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
2247
+ ),
2248
+ ] = None,
2249
+ entrystore_host: Annotated[
2250
+ Optional[StrictStr],
2251
+ Field(
2252
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
2253
+ ),
2254
+ ] = None,
2255
+ limit: Annotated[
2256
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
2257
+ Field(description="Results per page"),
2258
+ ] = None,
2259
+ offset: Annotated[
2260
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
2261
+ Field(description="Results to skip before the first one returned"),
2262
+ ] = None,
2263
+ cursor: Annotated[
2264
+ Optional[Annotated[str, Field(strict=True, max_length=512)]],
2265
+ Field(
2266
+ description="Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response. "
2267
+ ),
2268
+ ] = None,
2269
+ query: Annotated[
2270
+ Optional[Annotated[str, Field(strict=True, max_length=1000)]],
2271
+ Field(
2272
+ description="Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own. "
2273
+ ),
2274
+ ] = None,
2275
+ sort: Annotated[
2276
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]],
2277
+ Field(
2278
+ description="Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400. "
2279
+ ),
2280
+ ] = None,
2281
+ context: Annotated[
2282
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]],
2283
+ Field(
2284
+ description="Filter by context ID. Can be specified multiple times to include entries from multiple contexts. "
2285
+ ),
2286
+ ] = None,
2287
+ rdf_type: Annotated[
2288
+ Optional[Annotated[str, Field(strict=True, max_length=2048)]],
2289
+ Field(description="Only entries with this rdf:type URI"),
2290
+ ] = None,
2291
+ public: Annotated[
2292
+ Optional[StrictBool],
2293
+ Field(
2294
+ description="true: only publicly readable entries; false: only non-public entries"
2295
+ ),
2296
+ ] = None,
2297
+ created_after: Annotated[
2298
+ Optional[datetime], Field(description="Created at or after this instant")
2299
+ ] = None,
2300
+ created_before: Annotated[
2301
+ Optional[datetime], Field(description="Created before this instant")
2302
+ ] = None,
2303
+ modified_after: Annotated[
2304
+ Optional[datetime], Field(description="Modified at or after this instant")
2305
+ ] = None,
2306
+ modified_before: Annotated[
2307
+ Optional[datetime], Field(description="Modified before this instant")
2308
+ ] = None,
2309
+ entry_type: Annotated[
2310
+ Optional[ListCatalogsEntryTypeParameter],
2311
+ Field(
2312
+ description="Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata "
2313
+ ),
2314
+ ] = None,
2315
+ graph_type: Annotated[
2316
+ Optional[ListCatalogsGraphTypeParameter],
2317
+ Field(
2318
+ description="Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution "
2319
+ ),
2320
+ ] = None,
2321
+ resource_type: Annotated[
2322
+ Optional[ListCatalogsResourceTypeParameter],
2323
+ Field(
2324
+ description="Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data) "
2325
+ ),
2326
+ ] = None,
2327
+ _request_timeout: Union[
2328
+ None,
2329
+ Annotated[StrictFloat, Field(gt=0)],
2330
+ Tuple[
2331
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2332
+ ],
2333
+ ] = None,
2334
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2335
+ _content_type: Optional[StrictStr] = None,
2336
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2337
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2338
+ ) -> EntityListResponse:
2339
+ """List datasets
2340
+
2341
+ Returns a paginated list of all datasets. Datasets are collections of data published or curated by a single agent. Authentication is optional. Without authentication, only publicly available entries are returned. Authenticated requests may return additional non-public entries. Answered from an asynchronously updated index: an entry created moments ago may be missing here while reading it by id already returns it.
2342
+
2343
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
2344
+ :type x_entrystore_host: str
2345
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
2346
+ :type entrystore_host: str
2347
+ :param limit: Results per page
2348
+ :type limit: int
2349
+ :param offset: Results to skip before the first one returned
2350
+ :type offset: int
2351
+ :param cursor: Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response.
2352
+ :type cursor: str
2353
+ :param query: Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own.
2354
+ :type query: str
2355
+ :param sort: Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400.
2356
+ :type sort: str
2357
+ :param context: Filter by context ID. Can be specified multiple times to include entries from multiple contexts.
2358
+ :type context: str
2359
+ :param rdf_type: Only entries with this rdf:type URI
2360
+ :type rdf_type: str
2361
+ :param public: true: only publicly readable entries; false: only non-public entries
2362
+ :type public: bool
2363
+ :param created_after: Created at or after this instant
2364
+ :type created_after: datetime
2365
+ :param created_before: Created before this instant
2366
+ :type created_before: datetime
2367
+ :param modified_after: Modified at or after this instant
2368
+ :type modified_after: datetime
2369
+ :param modified_before: Modified before this instant
2370
+ :type modified_before: datetime
2371
+ :param entry_type: Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata
2372
+ :type entry_type: ListCatalogsEntryTypeParameter
2373
+ :param graph_type: Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution
2374
+ :type graph_type: ListCatalogsGraphTypeParameter
2375
+ :param resource_type: Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data)
2376
+ :type resource_type: ListCatalogsResourceTypeParameter
2377
+ :param _request_timeout: timeout setting for this request. If one
2378
+ number provided, it will be total request
2379
+ timeout. It can also be a pair (tuple) of
2380
+ (connection, read) timeouts.
2381
+ :type _request_timeout: int, tuple(int, int), optional
2382
+ :param _request_auth: set to override the auth_settings for an a single
2383
+ request; this effectively ignores the
2384
+ authentication in the spec for a single request.
2385
+ :type _request_auth: dict, optional
2386
+ :param _content_type: force content-type for the request.
2387
+ :type _content_type: str, Optional
2388
+ :param _headers: set to override the headers for a single
2389
+ request; this effectively ignores the headers
2390
+ in the spec for a single request.
2391
+ :type _headers: dict, optional
2392
+ :param _host_index: set to override the host_index for a single
2393
+ request; this effectively ignores the host_index
2394
+ in the spec for a single request.
2395
+ :type _host_index: int, optional
2396
+ :return: Returns the result object.
2397
+ """ # noqa: E501
2398
+
2399
+ _param = self._list_datasets_serialize(
2400
+ x_entrystore_host=x_entrystore_host,
2401
+ entrystore_host=entrystore_host,
2402
+ limit=limit,
2403
+ offset=offset,
2404
+ cursor=cursor,
2405
+ query=query,
2406
+ sort=sort,
2407
+ context=context,
2408
+ rdf_type=rdf_type,
2409
+ public=public,
2410
+ created_after=created_after,
2411
+ created_before=created_before,
2412
+ modified_after=modified_after,
2413
+ modified_before=modified_before,
2414
+ entry_type=entry_type,
2415
+ graph_type=graph_type,
2416
+ resource_type=resource_type,
2417
+ _request_auth=_request_auth,
2418
+ _content_type=_content_type,
2419
+ _headers=_headers,
2420
+ _host_index=_host_index,
2421
+ )
2422
+
2423
+ _response_types_map: Dict[str, Optional[str]] = {
2424
+ "200": "EntityListResponse",
2425
+ "400": "Error",
2426
+ "401": "Error",
2427
+ "500": "Error",
2428
+ "503": "Error",
2429
+ }
2430
+ response_data = await self.api_client.call_api(
2431
+ *_param, _request_timeout=_request_timeout
2432
+ )
2433
+ await response_data.read()
2434
+ return self.api_client.response_deserialize(
2435
+ response_data=response_data,
2436
+ response_types_map=_response_types_map,
2437
+ ).data
2438
+
2439
+ @validate_call
2440
+ async def list_datasets_with_http_info(
2441
+ self,
2442
+ x_entrystore_host: Annotated[
2443
+ Optional[StrictStr],
2444
+ Field(
2445
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
2446
+ ),
2447
+ ] = None,
2448
+ entrystore_host: Annotated[
2449
+ Optional[StrictStr],
2450
+ Field(
2451
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
2452
+ ),
2453
+ ] = None,
2454
+ limit: Annotated[
2455
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
2456
+ Field(description="Results per page"),
2457
+ ] = None,
2458
+ offset: Annotated[
2459
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
2460
+ Field(description="Results to skip before the first one returned"),
2461
+ ] = None,
2462
+ cursor: Annotated[
2463
+ Optional[Annotated[str, Field(strict=True, max_length=512)]],
2464
+ Field(
2465
+ description="Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response. "
2466
+ ),
2467
+ ] = None,
2468
+ query: Annotated[
2469
+ Optional[Annotated[str, Field(strict=True, max_length=1000)]],
2470
+ Field(
2471
+ description="Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own. "
2472
+ ),
2473
+ ] = None,
2474
+ sort: Annotated[
2475
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]],
2476
+ Field(
2477
+ description="Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400. "
2478
+ ),
2479
+ ] = None,
2480
+ context: Annotated[
2481
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]],
2482
+ Field(
2483
+ description="Filter by context ID. Can be specified multiple times to include entries from multiple contexts. "
2484
+ ),
2485
+ ] = None,
2486
+ rdf_type: Annotated[
2487
+ Optional[Annotated[str, Field(strict=True, max_length=2048)]],
2488
+ Field(description="Only entries with this rdf:type URI"),
2489
+ ] = None,
2490
+ public: Annotated[
2491
+ Optional[StrictBool],
2492
+ Field(
2493
+ description="true: only publicly readable entries; false: only non-public entries"
2494
+ ),
2495
+ ] = None,
2496
+ created_after: Annotated[
2497
+ Optional[datetime], Field(description="Created at or after this instant")
2498
+ ] = None,
2499
+ created_before: Annotated[
2500
+ Optional[datetime], Field(description="Created before this instant")
2501
+ ] = None,
2502
+ modified_after: Annotated[
2503
+ Optional[datetime], Field(description="Modified at or after this instant")
2504
+ ] = None,
2505
+ modified_before: Annotated[
2506
+ Optional[datetime], Field(description="Modified before this instant")
2507
+ ] = None,
2508
+ entry_type: Annotated[
2509
+ Optional[ListCatalogsEntryTypeParameter],
2510
+ Field(
2511
+ description="Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata "
2512
+ ),
2513
+ ] = None,
2514
+ graph_type: Annotated[
2515
+ Optional[ListCatalogsGraphTypeParameter],
2516
+ Field(
2517
+ description="Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution "
2518
+ ),
2519
+ ] = None,
2520
+ resource_type: Annotated[
2521
+ Optional[ListCatalogsResourceTypeParameter],
2522
+ Field(
2523
+ description="Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data) "
2524
+ ),
2525
+ ] = None,
2526
+ _request_timeout: Union[
2527
+ None,
2528
+ Annotated[StrictFloat, Field(gt=0)],
2529
+ Tuple[
2530
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2531
+ ],
2532
+ ] = None,
2533
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2534
+ _content_type: Optional[StrictStr] = None,
2535
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2536
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2537
+ ) -> ApiResponse[EntityListResponse]:
2538
+ """List datasets
2539
+
2540
+ Returns a paginated list of all datasets. Datasets are collections of data published or curated by a single agent. Authentication is optional. Without authentication, only publicly available entries are returned. Authenticated requests may return additional non-public entries. Answered from an asynchronously updated index: an entry created moments ago may be missing here while reading it by id already returns it.
2541
+
2542
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
2543
+ :type x_entrystore_host: str
2544
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
2545
+ :type entrystore_host: str
2546
+ :param limit: Results per page
2547
+ :type limit: int
2548
+ :param offset: Results to skip before the first one returned
2549
+ :type offset: int
2550
+ :param cursor: Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response.
2551
+ :type cursor: str
2552
+ :param query: Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own.
2553
+ :type query: str
2554
+ :param sort: Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400.
2555
+ :type sort: str
2556
+ :param context: Filter by context ID. Can be specified multiple times to include entries from multiple contexts.
2557
+ :type context: str
2558
+ :param rdf_type: Only entries with this rdf:type URI
2559
+ :type rdf_type: str
2560
+ :param public: true: only publicly readable entries; false: only non-public entries
2561
+ :type public: bool
2562
+ :param created_after: Created at or after this instant
2563
+ :type created_after: datetime
2564
+ :param created_before: Created before this instant
2565
+ :type created_before: datetime
2566
+ :param modified_after: Modified at or after this instant
2567
+ :type modified_after: datetime
2568
+ :param modified_before: Modified before this instant
2569
+ :type modified_before: datetime
2570
+ :param entry_type: Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata
2571
+ :type entry_type: ListCatalogsEntryTypeParameter
2572
+ :param graph_type: Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution
2573
+ :type graph_type: ListCatalogsGraphTypeParameter
2574
+ :param resource_type: Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data)
2575
+ :type resource_type: ListCatalogsResourceTypeParameter
2576
+ :param _request_timeout: timeout setting for this request. If one
2577
+ number provided, it will be total request
2578
+ timeout. It can also be a pair (tuple) of
2579
+ (connection, read) timeouts.
2580
+ :type _request_timeout: int, tuple(int, int), optional
2581
+ :param _request_auth: set to override the auth_settings for an a single
2582
+ request; this effectively ignores the
2583
+ authentication in the spec for a single request.
2584
+ :type _request_auth: dict, optional
2585
+ :param _content_type: force content-type for the request.
2586
+ :type _content_type: str, Optional
2587
+ :param _headers: set to override the headers for a single
2588
+ request; this effectively ignores the headers
2589
+ in the spec for a single request.
2590
+ :type _headers: dict, optional
2591
+ :param _host_index: set to override the host_index for a single
2592
+ request; this effectively ignores the host_index
2593
+ in the spec for a single request.
2594
+ :type _host_index: int, optional
2595
+ :return: Returns the result object.
2596
+ """ # noqa: E501
2597
+
2598
+ _param = self._list_datasets_serialize(
2599
+ x_entrystore_host=x_entrystore_host,
2600
+ entrystore_host=entrystore_host,
2601
+ limit=limit,
2602
+ offset=offset,
2603
+ cursor=cursor,
2604
+ query=query,
2605
+ sort=sort,
2606
+ context=context,
2607
+ rdf_type=rdf_type,
2608
+ public=public,
2609
+ created_after=created_after,
2610
+ created_before=created_before,
2611
+ modified_after=modified_after,
2612
+ modified_before=modified_before,
2613
+ entry_type=entry_type,
2614
+ graph_type=graph_type,
2615
+ resource_type=resource_type,
2616
+ _request_auth=_request_auth,
2617
+ _content_type=_content_type,
2618
+ _headers=_headers,
2619
+ _host_index=_host_index,
2620
+ )
2621
+
2622
+ _response_types_map: Dict[str, Optional[str]] = {
2623
+ "200": "EntityListResponse",
2624
+ "400": "Error",
2625
+ "401": "Error",
2626
+ "500": "Error",
2627
+ "503": "Error",
2628
+ }
2629
+ response_data = await self.api_client.call_api(
2630
+ *_param, _request_timeout=_request_timeout
2631
+ )
2632
+ await response_data.read()
2633
+ return self.api_client.response_deserialize(
2634
+ response_data=response_data,
2635
+ response_types_map=_response_types_map,
2636
+ )
2637
+
2638
+ @validate_call
2639
+ async def list_datasets_without_preload_content(
2640
+ self,
2641
+ x_entrystore_host: Annotated[
2642
+ Optional[StrictStr],
2643
+ Field(
2644
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
2645
+ ),
2646
+ ] = None,
2647
+ entrystore_host: Annotated[
2648
+ Optional[StrictStr],
2649
+ Field(
2650
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
2651
+ ),
2652
+ ] = None,
2653
+ limit: Annotated[
2654
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
2655
+ Field(description="Results per page"),
2656
+ ] = None,
2657
+ offset: Annotated[
2658
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
2659
+ Field(description="Results to skip before the first one returned"),
2660
+ ] = None,
2661
+ cursor: Annotated[
2662
+ Optional[Annotated[str, Field(strict=True, max_length=512)]],
2663
+ Field(
2664
+ description="Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response. "
2665
+ ),
2666
+ ] = None,
2667
+ query: Annotated[
2668
+ Optional[Annotated[str, Field(strict=True, max_length=1000)]],
2669
+ Field(
2670
+ description="Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own. "
2671
+ ),
2672
+ ] = None,
2673
+ sort: Annotated[
2674
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]],
2675
+ Field(
2676
+ description="Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400. "
2677
+ ),
2678
+ ] = None,
2679
+ context: Annotated[
2680
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]],
2681
+ Field(
2682
+ description="Filter by context ID. Can be specified multiple times to include entries from multiple contexts. "
2683
+ ),
2684
+ ] = None,
2685
+ rdf_type: Annotated[
2686
+ Optional[Annotated[str, Field(strict=True, max_length=2048)]],
2687
+ Field(description="Only entries with this rdf:type URI"),
2688
+ ] = None,
2689
+ public: Annotated[
2690
+ Optional[StrictBool],
2691
+ Field(
2692
+ description="true: only publicly readable entries; false: only non-public entries"
2693
+ ),
2694
+ ] = None,
2695
+ created_after: Annotated[
2696
+ Optional[datetime], Field(description="Created at or after this instant")
2697
+ ] = None,
2698
+ created_before: Annotated[
2699
+ Optional[datetime], Field(description="Created before this instant")
2700
+ ] = None,
2701
+ modified_after: Annotated[
2702
+ Optional[datetime], Field(description="Modified at or after this instant")
2703
+ ] = None,
2704
+ modified_before: Annotated[
2705
+ Optional[datetime], Field(description="Modified before this instant")
2706
+ ] = None,
2707
+ entry_type: Annotated[
2708
+ Optional[ListCatalogsEntryTypeParameter],
2709
+ Field(
2710
+ description="Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata "
2711
+ ),
2712
+ ] = None,
2713
+ graph_type: Annotated[
2714
+ Optional[ListCatalogsGraphTypeParameter],
2715
+ Field(
2716
+ description="Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution "
2717
+ ),
2718
+ ] = None,
2719
+ resource_type: Annotated[
2720
+ Optional[ListCatalogsResourceTypeParameter],
2721
+ Field(
2722
+ description="Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data) "
2723
+ ),
2724
+ ] = None,
2725
+ _request_timeout: Union[
2726
+ None,
2727
+ Annotated[StrictFloat, Field(gt=0)],
2728
+ Tuple[
2729
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2730
+ ],
2731
+ ] = None,
2732
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2733
+ _content_type: Optional[StrictStr] = None,
2734
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2735
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2736
+ ) -> RESTResponseType:
2737
+ """List datasets
2738
+
2739
+ Returns a paginated list of all datasets. Datasets are collections of data published or curated by a single agent. Authentication is optional. Without authentication, only publicly available entries are returned. Authenticated requests may return additional non-public entries. Answered from an asynchronously updated index: an entry created moments ago may be missing here while reading it by id already returns it.
2740
+
2741
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
2742
+ :type x_entrystore_host: str
2743
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
2744
+ :type entrystore_host: str
2745
+ :param limit: Results per page
2746
+ :type limit: int
2747
+ :param offset: Results to skip before the first one returned
2748
+ :type offset: int
2749
+ :param cursor: Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response.
2750
+ :type cursor: str
2751
+ :param query: Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own.
2752
+ :type query: str
2753
+ :param sort: Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400.
2754
+ :type sort: str
2755
+ :param context: Filter by context ID. Can be specified multiple times to include entries from multiple contexts.
2756
+ :type context: str
2757
+ :param rdf_type: Only entries with this rdf:type URI
2758
+ :type rdf_type: str
2759
+ :param public: true: only publicly readable entries; false: only non-public entries
2760
+ :type public: bool
2761
+ :param created_after: Created at or after this instant
2762
+ :type created_after: datetime
2763
+ :param created_before: Created before this instant
2764
+ :type created_before: datetime
2765
+ :param modified_after: Modified at or after this instant
2766
+ :type modified_after: datetime
2767
+ :param modified_before: Modified before this instant
2768
+ :type modified_before: datetime
2769
+ :param entry_type: Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata
2770
+ :type entry_type: ListCatalogsEntryTypeParameter
2771
+ :param graph_type: Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution
2772
+ :type graph_type: ListCatalogsGraphTypeParameter
2773
+ :param resource_type: Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data)
2774
+ :type resource_type: ListCatalogsResourceTypeParameter
2775
+ :param _request_timeout: timeout setting for this request. If one
2776
+ number provided, it will be total request
2777
+ timeout. It can also be a pair (tuple) of
2778
+ (connection, read) timeouts.
2779
+ :type _request_timeout: int, tuple(int, int), optional
2780
+ :param _request_auth: set to override the auth_settings for an a single
2781
+ request; this effectively ignores the
2782
+ authentication in the spec for a single request.
2783
+ :type _request_auth: dict, optional
2784
+ :param _content_type: force content-type for the request.
2785
+ :type _content_type: str, Optional
2786
+ :param _headers: set to override the headers for a single
2787
+ request; this effectively ignores the headers
2788
+ in the spec for a single request.
2789
+ :type _headers: dict, optional
2790
+ :param _host_index: set to override the host_index for a single
2791
+ request; this effectively ignores the host_index
2792
+ in the spec for a single request.
2793
+ :type _host_index: int, optional
2794
+ :return: Returns the result object.
2795
+ """ # noqa: E501
2796
+
2797
+ _param = self._list_datasets_serialize(
2798
+ x_entrystore_host=x_entrystore_host,
2799
+ entrystore_host=entrystore_host,
2800
+ limit=limit,
2801
+ offset=offset,
2802
+ cursor=cursor,
2803
+ query=query,
2804
+ sort=sort,
2805
+ context=context,
2806
+ rdf_type=rdf_type,
2807
+ public=public,
2808
+ created_after=created_after,
2809
+ created_before=created_before,
2810
+ modified_after=modified_after,
2811
+ modified_before=modified_before,
2812
+ entry_type=entry_type,
2813
+ graph_type=graph_type,
2814
+ resource_type=resource_type,
2815
+ _request_auth=_request_auth,
2816
+ _content_type=_content_type,
2817
+ _headers=_headers,
2818
+ _host_index=_host_index,
2819
+ )
2820
+
2821
+ _response_types_map: Dict[str, Optional[str]] = {
2822
+ "200": "EntityListResponse",
2823
+ "400": "Error",
2824
+ "401": "Error",
2825
+ "500": "Error",
2826
+ "503": "Error",
2827
+ }
2828
+ response_data = await self.api_client.call_api(
2829
+ *_param, _request_timeout=_request_timeout
2830
+ )
2831
+ return response_data.response
2832
+
2833
+ def _list_datasets_serialize(
2834
+ self,
2835
+ x_entrystore_host,
2836
+ entrystore_host,
2837
+ limit,
2838
+ offset,
2839
+ cursor,
2840
+ query,
2841
+ sort,
2842
+ context,
2843
+ rdf_type,
2844
+ public,
2845
+ created_after,
2846
+ created_before,
2847
+ modified_after,
2848
+ modified_before,
2849
+ entry_type,
2850
+ graph_type,
2851
+ resource_type,
2852
+ _request_auth,
2853
+ _content_type,
2854
+ _headers,
2855
+ _host_index,
2856
+ ) -> RequestSerialized:
2857
+
2858
+ _host = None
2859
+
2860
+ _collection_formats: Dict[str, str] = {}
2861
+
2862
+ _path_params: Dict[str, str] = {}
2863
+ _query_params: List[Tuple[str, str]] = []
2864
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2865
+ _form_params: List[Tuple[str, str]] = []
2866
+ _files: Dict[
2867
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2868
+ ] = {}
2869
+ _body_params: Optional[bytes] = None
2870
+
2871
+ # process the path parameters
2872
+ # process the query parameters
2873
+ if entrystore_host is not None:
2874
+
2875
+ _query_params.append(("entrystore_host", entrystore_host))
2876
+
2877
+ if limit is not None:
2878
+
2879
+ _query_params.append(("limit", limit))
2880
+
2881
+ if offset is not None:
2882
+
2883
+ _query_params.append(("offset", offset))
2884
+
2885
+ if cursor is not None:
2886
+
2887
+ _query_params.append(("cursor", cursor))
2888
+
2889
+ if query is not None:
2890
+
2891
+ _query_params.append(("query", query))
2892
+
2893
+ if sort is not None:
2894
+
2895
+ _query_params.append(("sort", sort))
2896
+
2897
+ if context is not None:
2898
+
2899
+ _query_params.append(("context", context))
2900
+
2901
+ if rdf_type is not None:
2902
+
2903
+ _query_params.append(("rdf_type", rdf_type))
2904
+
2905
+ if public is not None:
2906
+
2907
+ _query_params.append(("public", public))
2908
+
2909
+ if created_after is not None:
2910
+ if isinstance(created_after, datetime):
2911
+ _query_params.append(
2912
+ (
2913
+ "created_after",
2914
+ created_after.strftime(
2915
+ self.api_client.configuration.datetime_format
2916
+ ),
2917
+ )
2918
+ )
2919
+ else:
2920
+ _query_params.append(("created_after", created_after))
2921
+
2922
+ if created_before is not None:
2923
+ if isinstance(created_before, datetime):
2924
+ _query_params.append(
2925
+ (
2926
+ "created_before",
2927
+ created_before.strftime(
2928
+ self.api_client.configuration.datetime_format
2929
+ ),
2930
+ )
2931
+ )
2932
+ else:
2933
+ _query_params.append(("created_before", created_before))
2934
+
2935
+ if modified_after is not None:
2936
+ if isinstance(modified_after, datetime):
2937
+ _query_params.append(
2938
+ (
2939
+ "modified_after",
2940
+ modified_after.strftime(
2941
+ self.api_client.configuration.datetime_format
2942
+ ),
2943
+ )
2944
+ )
2945
+ else:
2946
+ _query_params.append(("modified_after", modified_after))
2947
+
2948
+ if modified_before is not None:
2949
+ if isinstance(modified_before, datetime):
2950
+ _query_params.append(
2951
+ (
2952
+ "modified_before",
2953
+ modified_before.strftime(
2954
+ self.api_client.configuration.datetime_format
2955
+ ),
2956
+ )
2957
+ )
2958
+ else:
2959
+ _query_params.append(("modified_before", modified_before))
2960
+
2961
+ if entry_type is not None:
2962
+
2963
+ _query_params.append(("entry_type", entry_type.value))
2964
+
2965
+ if graph_type is not None:
2966
+
2967
+ _query_params.append(("graph_type", graph_type.value))
2968
+
2969
+ if resource_type is not None:
2970
+
2971
+ _query_params.append(("resource_type", resource_type.value))
2972
+
2973
+ # process the header parameters
2974
+ if x_entrystore_host is not None:
2975
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
2976
+ # process the form parameters
2977
+ # process the body parameter
2978
+
2979
+ # set the HTTP header `Accept`
2980
+ if "Accept" not in _header_params:
2981
+ _header_params["Accept"] = self.api_client.select_header_accept(
2982
+ ["application/json"]
2983
+ )
2984
+
2985
+ # authentication setting
2986
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
2987
+
2988
+ return self.api_client.param_serialize(
2989
+ method="GET",
2990
+ resource_path="/dataset",
2991
+ path_params=_path_params,
2992
+ query_params=_query_params,
2993
+ header_params=_header_params,
2994
+ body=_body_params,
2995
+ post_params=_form_params,
2996
+ files=_files,
2997
+ auth_settings=_auth_settings,
2998
+ collection_formats=_collection_formats,
2999
+ _host=_host,
3000
+ _request_auth=_request_auth,
3001
+ )
3002
+
3003
+ @validate_call
3004
+ async def update_dataset_metadata(
3005
+ self,
3006
+ context_id: Annotated[
3007
+ str,
3008
+ Field(
3009
+ strict=True,
3010
+ description="The context (catalog) identifier in EntryStore",
3011
+ ),
3012
+ ],
3013
+ entry_id: Annotated[
3014
+ str,
3015
+ Field(strict=True, description="The entry identifier within the context"),
3016
+ ],
3017
+ metadata_request: Annotated[
3018
+ MetadataRequest,
3019
+ Field(
3020
+ description="Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
3021
+ ),
3022
+ ],
3023
+ x_entrystore_host: Annotated[
3024
+ Optional[StrictStr],
3025
+ Field(
3026
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
3027
+ ),
3028
+ ] = None,
3029
+ entrystore_host: Annotated[
3030
+ Optional[StrictStr],
3031
+ Field(
3032
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
3033
+ ),
3034
+ ] = None,
3035
+ _request_timeout: Union[
3036
+ None,
3037
+ Annotated[StrictFloat, Field(gt=0)],
3038
+ Tuple[
3039
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3040
+ ],
3041
+ ] = None,
3042
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3043
+ _content_type: Optional[StrictStr] = None,
3044
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3045
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3046
+ ) -> Dict[str, object]:
3047
+ """Update dataset metadata
3048
+
3049
+ Replaces the DCAT-AP metadata for a specific dataset. The request body is forwarded directly to EntryStore without structural transformation; use the Content-Type header to select the RDF serialization (application/ld+json, text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json). This is a full replacement, not a partial update. Requires authentication with write access to the entry's context.
3050
+
3051
+ :param context_id: The context (catalog) identifier in EntryStore (required)
3052
+ :type context_id: str
3053
+ :param entry_id: The entry identifier within the context (required)
3054
+ :type entry_id: str
3055
+ :param metadata_request: Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
3056
+ :type metadata_request: MetadataRequest
3057
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
3058
+ :type x_entrystore_host: str
3059
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
3060
+ :type entrystore_host: str
3061
+ :param _request_timeout: timeout setting for this request. If one
3062
+ number provided, it will be total request
3063
+ timeout. It can also be a pair (tuple) of
3064
+ (connection, read) timeouts.
3065
+ :type _request_timeout: int, tuple(int, int), optional
3066
+ :param _request_auth: set to override the auth_settings for an a single
3067
+ request; this effectively ignores the
3068
+ authentication in the spec for a single request.
3069
+ :type _request_auth: dict, optional
3070
+ :param _content_type: force content-type for the request.
3071
+ :type _content_type: str, Optional
3072
+ :param _headers: set to override the headers for a single
3073
+ request; this effectively ignores the headers
3074
+ in the spec for a single request.
3075
+ :type _headers: dict, optional
3076
+ :param _host_index: set to override the host_index for a single
3077
+ request; this effectively ignores the host_index
3078
+ in the spec for a single request.
3079
+ :type _host_index: int, optional
3080
+ :return: Returns the result object.
3081
+ """ # noqa: E501
3082
+
3083
+ _param = self._update_dataset_metadata_serialize(
3084
+ context_id=context_id,
3085
+ entry_id=entry_id,
3086
+ metadata_request=metadata_request,
3087
+ x_entrystore_host=x_entrystore_host,
3088
+ entrystore_host=entrystore_host,
3089
+ _request_auth=_request_auth,
3090
+ _content_type=_content_type,
3091
+ _headers=_headers,
3092
+ _host_index=_host_index,
3093
+ )
3094
+
3095
+ _response_types_map: Dict[str, Optional[str]] = {
3096
+ "200": "Dict[str, object]",
3097
+ "400": "Error",
3098
+ "401": "Error",
3099
+ "403": "Error",
3100
+ "404": "Error",
3101
+ "409": "Error",
3102
+ "422": "ValidationResponse",
3103
+ "500": "Error",
3104
+ "503": "Error",
3105
+ }
3106
+ response_data = await self.api_client.call_api(
3107
+ *_param, _request_timeout=_request_timeout
3108
+ )
3109
+ await response_data.read()
3110
+ return self.api_client.response_deserialize(
3111
+ response_data=response_data,
3112
+ response_types_map=_response_types_map,
3113
+ ).data
3114
+
3115
+ @validate_call
3116
+ async def update_dataset_metadata_with_http_info(
3117
+ self,
3118
+ context_id: Annotated[
3119
+ str,
3120
+ Field(
3121
+ strict=True,
3122
+ description="The context (catalog) identifier in EntryStore",
3123
+ ),
3124
+ ],
3125
+ entry_id: Annotated[
3126
+ str,
3127
+ Field(strict=True, description="The entry identifier within the context"),
3128
+ ],
3129
+ metadata_request: Annotated[
3130
+ MetadataRequest,
3131
+ Field(
3132
+ description="Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
3133
+ ),
3134
+ ],
3135
+ x_entrystore_host: Annotated[
3136
+ Optional[StrictStr],
3137
+ Field(
3138
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
3139
+ ),
3140
+ ] = None,
3141
+ entrystore_host: Annotated[
3142
+ Optional[StrictStr],
3143
+ Field(
3144
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
3145
+ ),
3146
+ ] = None,
3147
+ _request_timeout: Union[
3148
+ None,
3149
+ Annotated[StrictFloat, Field(gt=0)],
3150
+ Tuple[
3151
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3152
+ ],
3153
+ ] = None,
3154
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3155
+ _content_type: Optional[StrictStr] = None,
3156
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3157
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3158
+ ) -> ApiResponse[Dict[str, object]]:
3159
+ """Update dataset metadata
3160
+
3161
+ Replaces the DCAT-AP metadata for a specific dataset. The request body is forwarded directly to EntryStore without structural transformation; use the Content-Type header to select the RDF serialization (application/ld+json, text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json). This is a full replacement, not a partial update. Requires authentication with write access to the entry's context.
3162
+
3163
+ :param context_id: The context (catalog) identifier in EntryStore (required)
3164
+ :type context_id: str
3165
+ :param entry_id: The entry identifier within the context (required)
3166
+ :type entry_id: str
3167
+ :param metadata_request: Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
3168
+ :type metadata_request: MetadataRequest
3169
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
3170
+ :type x_entrystore_host: str
3171
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
3172
+ :type entrystore_host: str
3173
+ :param _request_timeout: timeout setting for this request. If one
3174
+ number provided, it will be total request
3175
+ timeout. It can also be a pair (tuple) of
3176
+ (connection, read) timeouts.
3177
+ :type _request_timeout: int, tuple(int, int), optional
3178
+ :param _request_auth: set to override the auth_settings for an a single
3179
+ request; this effectively ignores the
3180
+ authentication in the spec for a single request.
3181
+ :type _request_auth: dict, optional
3182
+ :param _content_type: force content-type for the request.
3183
+ :type _content_type: str, Optional
3184
+ :param _headers: set to override the headers for a single
3185
+ request; this effectively ignores the headers
3186
+ in the spec for a single request.
3187
+ :type _headers: dict, optional
3188
+ :param _host_index: set to override the host_index for a single
3189
+ request; this effectively ignores the host_index
3190
+ in the spec for a single request.
3191
+ :type _host_index: int, optional
3192
+ :return: Returns the result object.
3193
+ """ # noqa: E501
3194
+
3195
+ _param = self._update_dataset_metadata_serialize(
3196
+ context_id=context_id,
3197
+ entry_id=entry_id,
3198
+ metadata_request=metadata_request,
3199
+ x_entrystore_host=x_entrystore_host,
3200
+ entrystore_host=entrystore_host,
3201
+ _request_auth=_request_auth,
3202
+ _content_type=_content_type,
3203
+ _headers=_headers,
3204
+ _host_index=_host_index,
3205
+ )
3206
+
3207
+ _response_types_map: Dict[str, Optional[str]] = {
3208
+ "200": "Dict[str, object]",
3209
+ "400": "Error",
3210
+ "401": "Error",
3211
+ "403": "Error",
3212
+ "404": "Error",
3213
+ "409": "Error",
3214
+ "422": "ValidationResponse",
3215
+ "500": "Error",
3216
+ "503": "Error",
3217
+ }
3218
+ response_data = await self.api_client.call_api(
3219
+ *_param, _request_timeout=_request_timeout
3220
+ )
3221
+ await response_data.read()
3222
+ return self.api_client.response_deserialize(
3223
+ response_data=response_data,
3224
+ response_types_map=_response_types_map,
3225
+ )
3226
+
3227
+ @validate_call
3228
+ async def update_dataset_metadata_without_preload_content(
3229
+ self,
3230
+ context_id: Annotated[
3231
+ str,
3232
+ Field(
3233
+ strict=True,
3234
+ description="The context (catalog) identifier in EntryStore",
3235
+ ),
3236
+ ],
3237
+ entry_id: Annotated[
3238
+ str,
3239
+ Field(strict=True, description="The entry identifier within the context"),
3240
+ ],
3241
+ metadata_request: Annotated[
3242
+ MetadataRequest,
3243
+ Field(
3244
+ description="Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
3245
+ ),
3246
+ ],
3247
+ x_entrystore_host: Annotated[
3248
+ Optional[StrictStr],
3249
+ Field(
3250
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
3251
+ ),
3252
+ ] = None,
3253
+ entrystore_host: Annotated[
3254
+ Optional[StrictStr],
3255
+ Field(
3256
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
3257
+ ),
3258
+ ] = None,
3259
+ _request_timeout: Union[
3260
+ None,
3261
+ Annotated[StrictFloat, Field(gt=0)],
3262
+ Tuple[
3263
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3264
+ ],
3265
+ ] = None,
3266
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3267
+ _content_type: Optional[StrictStr] = None,
3268
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3269
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3270
+ ) -> RESTResponseType:
3271
+ """Update dataset metadata
3272
+
3273
+ Replaces the DCAT-AP metadata for a specific dataset. The request body is forwarded directly to EntryStore without structural transformation; use the Content-Type header to select the RDF serialization (application/ld+json, text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json). This is a full replacement, not a partial update. Requires authentication with write access to the entry's context.
3274
+
3275
+ :param context_id: The context (catalog) identifier in EntryStore (required)
3276
+ :type context_id: str
3277
+ :param entry_id: The entry identifier within the context (required)
3278
+ :type entry_id: str
3279
+ :param metadata_request: Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
3280
+ :type metadata_request: MetadataRequest
3281
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
3282
+ :type x_entrystore_host: str
3283
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
3284
+ :type entrystore_host: str
3285
+ :param _request_timeout: timeout setting for this request. If one
3286
+ number provided, it will be total request
3287
+ timeout. It can also be a pair (tuple) of
3288
+ (connection, read) timeouts.
3289
+ :type _request_timeout: int, tuple(int, int), optional
3290
+ :param _request_auth: set to override the auth_settings for an a single
3291
+ request; this effectively ignores the
3292
+ authentication in the spec for a single request.
3293
+ :type _request_auth: dict, optional
3294
+ :param _content_type: force content-type for the request.
3295
+ :type _content_type: str, Optional
3296
+ :param _headers: set to override the headers for a single
3297
+ request; this effectively ignores the headers
3298
+ in the spec for a single request.
3299
+ :type _headers: dict, optional
3300
+ :param _host_index: set to override the host_index for a single
3301
+ request; this effectively ignores the host_index
3302
+ in the spec for a single request.
3303
+ :type _host_index: int, optional
3304
+ :return: Returns the result object.
3305
+ """ # noqa: E501
3306
+
3307
+ _param = self._update_dataset_metadata_serialize(
3308
+ context_id=context_id,
3309
+ entry_id=entry_id,
3310
+ metadata_request=metadata_request,
3311
+ x_entrystore_host=x_entrystore_host,
3312
+ entrystore_host=entrystore_host,
3313
+ _request_auth=_request_auth,
3314
+ _content_type=_content_type,
3315
+ _headers=_headers,
3316
+ _host_index=_host_index,
3317
+ )
3318
+
3319
+ _response_types_map: Dict[str, Optional[str]] = {
3320
+ "200": "Dict[str, object]",
3321
+ "400": "Error",
3322
+ "401": "Error",
3323
+ "403": "Error",
3324
+ "404": "Error",
3325
+ "409": "Error",
3326
+ "422": "ValidationResponse",
3327
+ "500": "Error",
3328
+ "503": "Error",
3329
+ }
3330
+ response_data = await self.api_client.call_api(
3331
+ *_param, _request_timeout=_request_timeout
3332
+ )
3333
+ return response_data.response
3334
+
3335
+ def _update_dataset_metadata_serialize(
3336
+ self,
3337
+ context_id,
3338
+ entry_id,
3339
+ metadata_request,
3340
+ x_entrystore_host,
3341
+ entrystore_host,
3342
+ _request_auth,
3343
+ _content_type,
3344
+ _headers,
3345
+ _host_index,
3346
+ ) -> RequestSerialized:
3347
+
3348
+ _host = None
3349
+
3350
+ _collection_formats: Dict[str, str] = {}
3351
+
3352
+ _path_params: Dict[str, str] = {}
3353
+ _query_params: List[Tuple[str, str]] = []
3354
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3355
+ _form_params: List[Tuple[str, str]] = []
3356
+ _files: Dict[
3357
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3358
+ ] = {}
3359
+ _body_params: Optional[bytes] = None
3360
+
3361
+ # process the path parameters
3362
+ if context_id is not None:
3363
+ _path_params["context_id"] = context_id
3364
+ if entry_id is not None:
3365
+ _path_params["entry_id"] = entry_id
3366
+ # process the query parameters
3367
+ if entrystore_host is not None:
3368
+
3369
+ _query_params.append(("entrystore_host", entrystore_host))
3370
+
3371
+ # process the header parameters
3372
+ if x_entrystore_host is not None:
3373
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
3374
+ # process the form parameters
3375
+ # process the body parameter
3376
+ if metadata_request is not None:
3377
+ _body_params = metadata_request
3378
+
3379
+ # set the HTTP header `Accept`
3380
+ if "Accept" not in _header_params:
3381
+ _header_params["Accept"] = self.api_client.select_header_accept(
3382
+ ["application/ld+json", "application/json"]
3383
+ )
3384
+
3385
+ # set the HTTP header `Content-Type`
3386
+ if _content_type:
3387
+ _header_params["Content-Type"] = _content_type
3388
+ else:
3389
+ _default_content_type = self.api_client.select_header_content_type(
3390
+ ["application/ld+json"]
3391
+ )
3392
+ if _default_content_type is not None:
3393
+ _header_params["Content-Type"] = _default_content_type
3394
+
3395
+ # authentication setting
3396
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
3397
+
3398
+ return self.api_client.param_serialize(
3399
+ method="PUT",
3400
+ resource_path="/dataset/{context_id}/{entry_id}/metadata",
3401
+ path_params=_path_params,
3402
+ query_params=_query_params,
3403
+ header_params=_header_params,
3404
+ body=_body_params,
3405
+ post_params=_form_params,
3406
+ files=_files,
3407
+ auth_settings=_auth_settings,
3408
+ collection_formats=_collection_formats,
3409
+ _host=_host,
3410
+ _request_auth=_request_auth,
3411
+ )
3412
+
3413
+ @validate_call
3414
+ async def validate_dataset(
3415
+ self,
3416
+ context_id: Annotated[
3417
+ str,
3418
+ Field(
3419
+ strict=True,
3420
+ description="The context (catalog) identifier in EntryStore",
3421
+ ),
3422
+ ],
3423
+ entry_id: Annotated[
3424
+ str,
3425
+ Field(strict=True, description="The entry identifier within the context"),
3426
+ ],
3427
+ profile: Annotated[
3428
+ ValidationProfile,
3429
+ Field(
3430
+ description="DCAT-AP profile to validate against. Determines which SHACL shapes are used. Supported profiles: - `dcat-ap-2.1.1` - EU DCAT-AP 2.1.1 (stable, widely adopted) - `dcat-ap-3.0` - EU DCAT-AP 3.0 (current version) "
3431
+ ),
3432
+ ],
3433
+ x_entrystore_host: Annotated[
3434
+ Optional[StrictStr],
3435
+ Field(
3436
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
3437
+ ),
3438
+ ] = None,
3439
+ entrystore_host: Annotated[
3440
+ Optional[StrictStr],
3441
+ Field(
3442
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
3443
+ ),
3444
+ ] = None,
3445
+ _request_timeout: Union[
3446
+ None,
3447
+ Annotated[StrictFloat, Field(gt=0)],
3448
+ Tuple[
3449
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3450
+ ],
3451
+ ] = None,
3452
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3453
+ _content_type: Optional[StrictStr] = None,
3454
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3455
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3456
+ ) -> ValidationResponse:
3457
+ """Validate dataset metadata
3458
+
3459
+ Retrieves the stored metadata for this dataset entry from EntryStore and validates it against the SHACL shapes for the requested profile (a DCAT-AP profile, or the domain's custom shapes with profile=custom). No request body is needed — the endpoint operates on the entry's existing metadata, similar to how the `/metadata` endpoint returns it. Returns a detailed report with any violations, warnings, or informational findings. A 200 response with `conforms: false` is expected when the metadata has issues — it means validation completed successfully. `conforms: true` alone does not mean the metadata was checked. If no shape in the profile targets the entry — usually because its `rdf:type` is missing or wrong — the report conforms with nothing in it. `summary.targetedShapes` counts the shapes that had something to check; `0` means nothing was. Authentication is optional. Public entries can be validated without authentication. Authenticated requests may validate additional non-public entries.
3460
+
3461
+ :param context_id: The context (catalog) identifier in EntryStore (required)
3462
+ :type context_id: str
3463
+ :param entry_id: The entry identifier within the context (required)
3464
+ :type entry_id: str
3465
+ :param profile: DCAT-AP profile to validate against. Determines which SHACL shapes are used. Supported profiles: - `dcat-ap-2.1.1` - EU DCAT-AP 2.1.1 (stable, widely adopted) - `dcat-ap-3.0` - EU DCAT-AP 3.0 (current version) (required)
3466
+ :type profile: ValidationProfile
3467
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
3468
+ :type x_entrystore_host: str
3469
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
3470
+ :type entrystore_host: str
3471
+ :param _request_timeout: timeout setting for this request. If one
3472
+ number provided, it will be total request
3473
+ timeout. It can also be a pair (tuple) of
3474
+ (connection, read) timeouts.
3475
+ :type _request_timeout: int, tuple(int, int), optional
3476
+ :param _request_auth: set to override the auth_settings for an a single
3477
+ request; this effectively ignores the
3478
+ authentication in the spec for a single request.
3479
+ :type _request_auth: dict, optional
3480
+ :param _content_type: force content-type for the request.
3481
+ :type _content_type: str, Optional
3482
+ :param _headers: set to override the headers for a single
3483
+ request; this effectively ignores the headers
3484
+ in the spec for a single request.
3485
+ :type _headers: dict, optional
3486
+ :param _host_index: set to override the host_index for a single
3487
+ request; this effectively ignores the host_index
3488
+ in the spec for a single request.
3489
+ :type _host_index: int, optional
3490
+ :return: Returns the result object.
3491
+ """ # noqa: E501
3492
+
3493
+ _param = self._validate_dataset_serialize(
3494
+ context_id=context_id,
3495
+ entry_id=entry_id,
3496
+ profile=profile,
3497
+ x_entrystore_host=x_entrystore_host,
3498
+ entrystore_host=entrystore_host,
3499
+ _request_auth=_request_auth,
3500
+ _content_type=_content_type,
3501
+ _headers=_headers,
3502
+ _host_index=_host_index,
3503
+ )
3504
+
3505
+ _response_types_map: Dict[str, Optional[str]] = {
3506
+ "200": "ValidationResponse",
3507
+ "400": "Error",
3508
+ "401": "Error",
3509
+ "404": "Error",
3510
+ "500": "Error",
3511
+ "503": "Error",
3512
+ }
3513
+ response_data = await self.api_client.call_api(
3514
+ *_param, _request_timeout=_request_timeout
3515
+ )
3516
+ await response_data.read()
3517
+ return self.api_client.response_deserialize(
3518
+ response_data=response_data,
3519
+ response_types_map=_response_types_map,
3520
+ ).data
3521
+
3522
+ @validate_call
3523
+ async def validate_dataset_with_http_info(
3524
+ self,
3525
+ context_id: Annotated[
3526
+ str,
3527
+ Field(
3528
+ strict=True,
3529
+ description="The context (catalog) identifier in EntryStore",
3530
+ ),
3531
+ ],
3532
+ entry_id: Annotated[
3533
+ str,
3534
+ Field(strict=True, description="The entry identifier within the context"),
3535
+ ],
3536
+ profile: Annotated[
3537
+ ValidationProfile,
3538
+ Field(
3539
+ description="DCAT-AP profile to validate against. Determines which SHACL shapes are used. Supported profiles: - `dcat-ap-2.1.1` - EU DCAT-AP 2.1.1 (stable, widely adopted) - `dcat-ap-3.0` - EU DCAT-AP 3.0 (current version) "
3540
+ ),
3541
+ ],
3542
+ x_entrystore_host: Annotated[
3543
+ Optional[StrictStr],
3544
+ Field(
3545
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
3546
+ ),
3547
+ ] = None,
3548
+ entrystore_host: Annotated[
3549
+ Optional[StrictStr],
3550
+ Field(
3551
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
3552
+ ),
3553
+ ] = None,
3554
+ _request_timeout: Union[
3555
+ None,
3556
+ Annotated[StrictFloat, Field(gt=0)],
3557
+ Tuple[
3558
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3559
+ ],
3560
+ ] = None,
3561
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3562
+ _content_type: Optional[StrictStr] = None,
3563
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3564
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3565
+ ) -> ApiResponse[ValidationResponse]:
3566
+ """Validate dataset metadata
3567
+
3568
+ Retrieves the stored metadata for this dataset entry from EntryStore and validates it against the SHACL shapes for the requested profile (a DCAT-AP profile, or the domain's custom shapes with profile=custom). No request body is needed — the endpoint operates on the entry's existing metadata, similar to how the `/metadata` endpoint returns it. Returns a detailed report with any violations, warnings, or informational findings. A 200 response with `conforms: false` is expected when the metadata has issues — it means validation completed successfully. `conforms: true` alone does not mean the metadata was checked. If no shape in the profile targets the entry — usually because its `rdf:type` is missing or wrong — the report conforms with nothing in it. `summary.targetedShapes` counts the shapes that had something to check; `0` means nothing was. Authentication is optional. Public entries can be validated without authentication. Authenticated requests may validate additional non-public entries.
3569
+
3570
+ :param context_id: The context (catalog) identifier in EntryStore (required)
3571
+ :type context_id: str
3572
+ :param entry_id: The entry identifier within the context (required)
3573
+ :type entry_id: str
3574
+ :param profile: DCAT-AP profile to validate against. Determines which SHACL shapes are used. Supported profiles: - `dcat-ap-2.1.1` - EU DCAT-AP 2.1.1 (stable, widely adopted) - `dcat-ap-3.0` - EU DCAT-AP 3.0 (current version) (required)
3575
+ :type profile: ValidationProfile
3576
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
3577
+ :type x_entrystore_host: str
3578
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
3579
+ :type entrystore_host: str
3580
+ :param _request_timeout: timeout setting for this request. If one
3581
+ number provided, it will be total request
3582
+ timeout. It can also be a pair (tuple) of
3583
+ (connection, read) timeouts.
3584
+ :type _request_timeout: int, tuple(int, int), optional
3585
+ :param _request_auth: set to override the auth_settings for an a single
3586
+ request; this effectively ignores the
3587
+ authentication in the spec for a single request.
3588
+ :type _request_auth: dict, optional
3589
+ :param _content_type: force content-type for the request.
3590
+ :type _content_type: str, Optional
3591
+ :param _headers: set to override the headers for a single
3592
+ request; this effectively ignores the headers
3593
+ in the spec for a single request.
3594
+ :type _headers: dict, optional
3595
+ :param _host_index: set to override the host_index for a single
3596
+ request; this effectively ignores the host_index
3597
+ in the spec for a single request.
3598
+ :type _host_index: int, optional
3599
+ :return: Returns the result object.
3600
+ """ # noqa: E501
3601
+
3602
+ _param = self._validate_dataset_serialize(
3603
+ context_id=context_id,
3604
+ entry_id=entry_id,
3605
+ profile=profile,
3606
+ x_entrystore_host=x_entrystore_host,
3607
+ entrystore_host=entrystore_host,
3608
+ _request_auth=_request_auth,
3609
+ _content_type=_content_type,
3610
+ _headers=_headers,
3611
+ _host_index=_host_index,
3612
+ )
3613
+
3614
+ _response_types_map: Dict[str, Optional[str]] = {
3615
+ "200": "ValidationResponse",
3616
+ "400": "Error",
3617
+ "401": "Error",
3618
+ "404": "Error",
3619
+ "500": "Error",
3620
+ "503": "Error",
3621
+ }
3622
+ response_data = await self.api_client.call_api(
3623
+ *_param, _request_timeout=_request_timeout
3624
+ )
3625
+ await response_data.read()
3626
+ return self.api_client.response_deserialize(
3627
+ response_data=response_data,
3628
+ response_types_map=_response_types_map,
3629
+ )
3630
+
3631
+ @validate_call
3632
+ async def validate_dataset_without_preload_content(
3633
+ self,
3634
+ context_id: Annotated[
3635
+ str,
3636
+ Field(
3637
+ strict=True,
3638
+ description="The context (catalog) identifier in EntryStore",
3639
+ ),
3640
+ ],
3641
+ entry_id: Annotated[
3642
+ str,
3643
+ Field(strict=True, description="The entry identifier within the context"),
3644
+ ],
3645
+ profile: Annotated[
3646
+ ValidationProfile,
3647
+ Field(
3648
+ description="DCAT-AP profile to validate against. Determines which SHACL shapes are used. Supported profiles: - `dcat-ap-2.1.1` - EU DCAT-AP 2.1.1 (stable, widely adopted) - `dcat-ap-3.0` - EU DCAT-AP 3.0 (current version) "
3649
+ ),
3650
+ ],
3651
+ x_entrystore_host: Annotated[
3652
+ Optional[StrictStr],
3653
+ Field(
3654
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
3655
+ ),
3656
+ ] = None,
3657
+ entrystore_host: Annotated[
3658
+ Optional[StrictStr],
3659
+ Field(
3660
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
3661
+ ),
3662
+ ] = None,
3663
+ _request_timeout: Union[
3664
+ None,
3665
+ Annotated[StrictFloat, Field(gt=0)],
3666
+ Tuple[
3667
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3668
+ ],
3669
+ ] = None,
3670
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3671
+ _content_type: Optional[StrictStr] = None,
3672
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3673
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3674
+ ) -> RESTResponseType:
3675
+ """Validate dataset metadata
3676
+
3677
+ Retrieves the stored metadata for this dataset entry from EntryStore and validates it against the SHACL shapes for the requested profile (a DCAT-AP profile, or the domain's custom shapes with profile=custom). No request body is needed — the endpoint operates on the entry's existing metadata, similar to how the `/metadata` endpoint returns it. Returns a detailed report with any violations, warnings, or informational findings. A 200 response with `conforms: false` is expected when the metadata has issues — it means validation completed successfully. `conforms: true` alone does not mean the metadata was checked. If no shape in the profile targets the entry — usually because its `rdf:type` is missing or wrong — the report conforms with nothing in it. `summary.targetedShapes` counts the shapes that had something to check; `0` means nothing was. Authentication is optional. Public entries can be validated without authentication. Authenticated requests may validate additional non-public entries.
3678
+
3679
+ :param context_id: The context (catalog) identifier in EntryStore (required)
3680
+ :type context_id: str
3681
+ :param entry_id: The entry identifier within the context (required)
3682
+ :type entry_id: str
3683
+ :param profile: DCAT-AP profile to validate against. Determines which SHACL shapes are used. Supported profiles: - `dcat-ap-2.1.1` - EU DCAT-AP 2.1.1 (stable, widely adopted) - `dcat-ap-3.0` - EU DCAT-AP 3.0 (current version) (required)
3684
+ :type profile: ValidationProfile
3685
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
3686
+ :type x_entrystore_host: str
3687
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
3688
+ :type entrystore_host: str
3689
+ :param _request_timeout: timeout setting for this request. If one
3690
+ number provided, it will be total request
3691
+ timeout. It can also be a pair (tuple) of
3692
+ (connection, read) timeouts.
3693
+ :type _request_timeout: int, tuple(int, int), optional
3694
+ :param _request_auth: set to override the auth_settings for an a single
3695
+ request; this effectively ignores the
3696
+ authentication in the spec for a single request.
3697
+ :type _request_auth: dict, optional
3698
+ :param _content_type: force content-type for the request.
3699
+ :type _content_type: str, Optional
3700
+ :param _headers: set to override the headers for a single
3701
+ request; this effectively ignores the headers
3702
+ in the spec for a single request.
3703
+ :type _headers: dict, optional
3704
+ :param _host_index: set to override the host_index for a single
3705
+ request; this effectively ignores the host_index
3706
+ in the spec for a single request.
3707
+ :type _host_index: int, optional
3708
+ :return: Returns the result object.
3709
+ """ # noqa: E501
3710
+
3711
+ _param = self._validate_dataset_serialize(
3712
+ context_id=context_id,
3713
+ entry_id=entry_id,
3714
+ profile=profile,
3715
+ x_entrystore_host=x_entrystore_host,
3716
+ entrystore_host=entrystore_host,
3717
+ _request_auth=_request_auth,
3718
+ _content_type=_content_type,
3719
+ _headers=_headers,
3720
+ _host_index=_host_index,
3721
+ )
3722
+
3723
+ _response_types_map: Dict[str, Optional[str]] = {
3724
+ "200": "ValidationResponse",
3725
+ "400": "Error",
3726
+ "401": "Error",
3727
+ "404": "Error",
3728
+ "500": "Error",
3729
+ "503": "Error",
3730
+ }
3731
+ response_data = await self.api_client.call_api(
3732
+ *_param, _request_timeout=_request_timeout
3733
+ )
3734
+ return response_data.response
3735
+
3736
+ def _validate_dataset_serialize(
3737
+ self,
3738
+ context_id,
3739
+ entry_id,
3740
+ profile,
3741
+ x_entrystore_host,
3742
+ entrystore_host,
3743
+ _request_auth,
3744
+ _content_type,
3745
+ _headers,
3746
+ _host_index,
3747
+ ) -> RequestSerialized:
3748
+
3749
+ _host = None
3750
+
3751
+ _collection_formats: Dict[str, str] = {}
3752
+
3753
+ _path_params: Dict[str, str] = {}
3754
+ _query_params: List[Tuple[str, str]] = []
3755
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3756
+ _form_params: List[Tuple[str, str]] = []
3757
+ _files: Dict[
3758
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3759
+ ] = {}
3760
+ _body_params: Optional[bytes] = None
3761
+
3762
+ # process the path parameters
3763
+ if context_id is not None:
3764
+ _path_params["context_id"] = context_id
3765
+ if entry_id is not None:
3766
+ _path_params["entry_id"] = entry_id
3767
+ # process the query parameters
3768
+ if entrystore_host is not None:
3769
+
3770
+ _query_params.append(("entrystore_host", entrystore_host))
3771
+
3772
+ if profile is not None:
3773
+
3774
+ _query_params.append(("profile", profile.value))
3775
+
3776
+ # process the header parameters
3777
+ if x_entrystore_host is not None:
3778
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
3779
+ # process the form parameters
3780
+ # process the body parameter
3781
+
3782
+ # set the HTTP header `Accept`
3783
+ if "Accept" not in _header_params:
3784
+ _header_params["Accept"] = self.api_client.select_header_accept(
3785
+ ["application/json"]
3786
+ )
3787
+
3788
+ # authentication setting
3789
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
3790
+
3791
+ return self.api_client.param_serialize(
3792
+ method="GET",
3793
+ resource_path="/dataset/{context_id}/{entry_id}/validate",
3794
+ path_params=_path_params,
3795
+ query_params=_query_params,
3796
+ header_params=_header_params,
3797
+ body=_body_params,
3798
+ post_params=_form_params,
3799
+ files=_files,
3800
+ auth_settings=_auth_settings,
3801
+ collection_formats=_collection_formats,
3802
+ _host=_host,
3803
+ _request_auth=_request_auth,
3804
+ )