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,2446 @@
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.metadata_format import MetadataFormat
25
+ from entryscape.models.metadata_request import MetadataRequest
26
+
27
+ from entryscape.api_client import ApiClient, RequestSerialized
28
+ from entryscape.api_response import ApiResponse
29
+ from entryscape.rest import RESTResponseType
30
+
31
+
32
+ class ModelApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+ @validate_call
45
+ async def create_model(
46
+ self,
47
+ x_entrystore_host: Annotated[
48
+ Optional[StrictStr],
49
+ Field(
50
+ 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. "
51
+ ),
52
+ ] = None,
53
+ entrystore_host: Annotated[
54
+ Optional[StrictStr],
55
+ Field(
56
+ 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. "
57
+ ),
58
+ ] = None,
59
+ metadata_request: Annotated[
60
+ Optional[MetadataRequest],
61
+ Field(
62
+ description="Optional initial descriptive metadata for the model context. With Content-Type application/ld+json the 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. "
63
+ ),
64
+ ] = None,
65
+ _request_timeout: Union[
66
+ None,
67
+ Annotated[StrictFloat, Field(gt=0)],
68
+ Tuple[
69
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
70
+ ],
71
+ ] = None,
72
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
73
+ _content_type: Optional[StrictStr] = None,
74
+ _headers: Optional[Dict[StrictStr, Any]] = None,
75
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
76
+ ) -> EntityReference:
77
+ """Create model
78
+
79
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Creates a new model. A model is provisioned as a new EntryStore context (`esc:FormsContext`); the returned `context_id` is the addressing root for the model's classes, properties, forms, fields, namespaces, diagrams and specifications. An optional request body provides the model's initial descriptive metadata (for example a `dcterms:title`); it may be omitted to create an empty model whose metadata is set later via `PUT /model/{context_id}/metadata`. Requires authentication with permission to create contexts.
80
+
81
+ :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.
82
+ :type x_entrystore_host: str
83
+ :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.
84
+ :type entrystore_host: str
85
+ :param metadata_request: Optional initial descriptive metadata for the model context. With Content-Type application/ld+json the 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.
86
+ :type metadata_request: MetadataRequest
87
+ :param _request_timeout: timeout setting for this request. If one
88
+ number provided, it will be total request
89
+ timeout. It can also be a pair (tuple) of
90
+ (connection, read) timeouts.
91
+ :type _request_timeout: int, tuple(int, int), optional
92
+ :param _request_auth: set to override the auth_settings for an a single
93
+ request; this effectively ignores the
94
+ authentication in the spec for a single request.
95
+ :type _request_auth: dict, optional
96
+ :param _content_type: force content-type for the request.
97
+ :type _content_type: str, Optional
98
+ :param _headers: set to override the headers for a single
99
+ request; this effectively ignores the headers
100
+ in the spec for a single request.
101
+ :type _headers: dict, optional
102
+ :param _host_index: set to override the host_index for a single
103
+ request; this effectively ignores the host_index
104
+ in the spec for a single request.
105
+ :type _host_index: int, optional
106
+ :return: Returns the result object.
107
+ """ # noqa: E501
108
+
109
+ _param = self._create_model_serialize(
110
+ x_entrystore_host=x_entrystore_host,
111
+ entrystore_host=entrystore_host,
112
+ metadata_request=metadata_request,
113
+ _request_auth=_request_auth,
114
+ _content_type=_content_type,
115
+ _headers=_headers,
116
+ _host_index=_host_index,
117
+ )
118
+
119
+ _response_types_map: Dict[str, Optional[str]] = {
120
+ "201": "EntityReference",
121
+ "400": "Error",
122
+ "401": "Error",
123
+ "403": "Error",
124
+ "404": "Error",
125
+ "409": "Error",
126
+ "422": "ValidationResponse",
127
+ "500": "Error",
128
+ "503": "Error",
129
+ }
130
+ response_data = await self.api_client.call_api(
131
+ *_param, _request_timeout=_request_timeout
132
+ )
133
+ await response_data.read()
134
+ return self.api_client.response_deserialize(
135
+ response_data=response_data,
136
+ response_types_map=_response_types_map,
137
+ ).data
138
+
139
+ @validate_call
140
+ async def create_model_with_http_info(
141
+ self,
142
+ x_entrystore_host: Annotated[
143
+ Optional[StrictStr],
144
+ Field(
145
+ 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. "
146
+ ),
147
+ ] = None,
148
+ entrystore_host: Annotated[
149
+ Optional[StrictStr],
150
+ Field(
151
+ 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. "
152
+ ),
153
+ ] = None,
154
+ metadata_request: Annotated[
155
+ Optional[MetadataRequest],
156
+ Field(
157
+ description="Optional initial descriptive metadata for the model context. With Content-Type application/ld+json the 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. "
158
+ ),
159
+ ] = None,
160
+ _request_timeout: Union[
161
+ None,
162
+ Annotated[StrictFloat, Field(gt=0)],
163
+ Tuple[
164
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
165
+ ],
166
+ ] = None,
167
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
168
+ _content_type: Optional[StrictStr] = None,
169
+ _headers: Optional[Dict[StrictStr, Any]] = None,
170
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
171
+ ) -> ApiResponse[EntityReference]:
172
+ """Create model
173
+
174
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Creates a new model. A model is provisioned as a new EntryStore context (`esc:FormsContext`); the returned `context_id` is the addressing root for the model's classes, properties, forms, fields, namespaces, diagrams and specifications. An optional request body provides the model's initial descriptive metadata (for example a `dcterms:title`); it may be omitted to create an empty model whose metadata is set later via `PUT /model/{context_id}/metadata`. Requires authentication with permission to create contexts.
175
+
176
+ :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.
177
+ :type x_entrystore_host: str
178
+ :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.
179
+ :type entrystore_host: str
180
+ :param metadata_request: Optional initial descriptive metadata for the model context. With Content-Type application/ld+json the 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.
181
+ :type metadata_request: MetadataRequest
182
+ :param _request_timeout: timeout setting for this request. If one
183
+ number provided, it will be total request
184
+ timeout. It can also be a pair (tuple) of
185
+ (connection, read) timeouts.
186
+ :type _request_timeout: int, tuple(int, int), optional
187
+ :param _request_auth: set to override the auth_settings for an a single
188
+ request; this effectively ignores the
189
+ authentication in the spec for a single request.
190
+ :type _request_auth: dict, optional
191
+ :param _content_type: force content-type for the request.
192
+ :type _content_type: str, Optional
193
+ :param _headers: set to override the headers for a single
194
+ request; this effectively ignores the headers
195
+ in the spec for a single request.
196
+ :type _headers: dict, optional
197
+ :param _host_index: set to override the host_index for a single
198
+ request; this effectively ignores the host_index
199
+ in the spec for a single request.
200
+ :type _host_index: int, optional
201
+ :return: Returns the result object.
202
+ """ # noqa: E501
203
+
204
+ _param = self._create_model_serialize(
205
+ x_entrystore_host=x_entrystore_host,
206
+ entrystore_host=entrystore_host,
207
+ metadata_request=metadata_request,
208
+ _request_auth=_request_auth,
209
+ _content_type=_content_type,
210
+ _headers=_headers,
211
+ _host_index=_host_index,
212
+ )
213
+
214
+ _response_types_map: Dict[str, Optional[str]] = {
215
+ "201": "EntityReference",
216
+ "400": "Error",
217
+ "401": "Error",
218
+ "403": "Error",
219
+ "404": "Error",
220
+ "409": "Error",
221
+ "422": "ValidationResponse",
222
+ "500": "Error",
223
+ "503": "Error",
224
+ }
225
+ response_data = await self.api_client.call_api(
226
+ *_param, _request_timeout=_request_timeout
227
+ )
228
+ await response_data.read()
229
+ return self.api_client.response_deserialize(
230
+ response_data=response_data,
231
+ response_types_map=_response_types_map,
232
+ )
233
+
234
+ @validate_call
235
+ async def create_model_without_preload_content(
236
+ self,
237
+ x_entrystore_host: Annotated[
238
+ Optional[StrictStr],
239
+ Field(
240
+ 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. "
241
+ ),
242
+ ] = None,
243
+ entrystore_host: Annotated[
244
+ Optional[StrictStr],
245
+ Field(
246
+ 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. "
247
+ ),
248
+ ] = None,
249
+ metadata_request: Annotated[
250
+ Optional[MetadataRequest],
251
+ Field(
252
+ description="Optional initial descriptive metadata for the model context. With Content-Type application/ld+json the 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. "
253
+ ),
254
+ ] = None,
255
+ _request_timeout: Union[
256
+ None,
257
+ Annotated[StrictFloat, Field(gt=0)],
258
+ Tuple[
259
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
260
+ ],
261
+ ] = None,
262
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
263
+ _content_type: Optional[StrictStr] = None,
264
+ _headers: Optional[Dict[StrictStr, Any]] = None,
265
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
266
+ ) -> RESTResponseType:
267
+ """Create model
268
+
269
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Creates a new model. A model is provisioned as a new EntryStore context (`esc:FormsContext`); the returned `context_id` is the addressing root for the model's classes, properties, forms, fields, namespaces, diagrams and specifications. An optional request body provides the model's initial descriptive metadata (for example a `dcterms:title`); it may be omitted to create an empty model whose metadata is set later via `PUT /model/{context_id}/metadata`. Requires authentication with permission to create contexts.
270
+
271
+ :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.
272
+ :type x_entrystore_host: str
273
+ :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.
274
+ :type entrystore_host: str
275
+ :param metadata_request: Optional initial descriptive metadata for the model context. With Content-Type application/ld+json the 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.
276
+ :type metadata_request: MetadataRequest
277
+ :param _request_timeout: timeout setting for this request. If one
278
+ number provided, it will be total request
279
+ timeout. It can also be a pair (tuple) of
280
+ (connection, read) timeouts.
281
+ :type _request_timeout: int, tuple(int, int), optional
282
+ :param _request_auth: set to override the auth_settings for an a single
283
+ request; this effectively ignores the
284
+ authentication in the spec for a single request.
285
+ :type _request_auth: dict, optional
286
+ :param _content_type: force content-type for the request.
287
+ :type _content_type: str, Optional
288
+ :param _headers: set to override the headers for a single
289
+ request; this effectively ignores the headers
290
+ in the spec for a single request.
291
+ :type _headers: dict, optional
292
+ :param _host_index: set to override the host_index for a single
293
+ request; this effectively ignores the host_index
294
+ in the spec for a single request.
295
+ :type _host_index: int, optional
296
+ :return: Returns the result object.
297
+ """ # noqa: E501
298
+
299
+ _param = self._create_model_serialize(
300
+ x_entrystore_host=x_entrystore_host,
301
+ entrystore_host=entrystore_host,
302
+ metadata_request=metadata_request,
303
+ _request_auth=_request_auth,
304
+ _content_type=_content_type,
305
+ _headers=_headers,
306
+ _host_index=_host_index,
307
+ )
308
+
309
+ _response_types_map: Dict[str, Optional[str]] = {
310
+ "201": "EntityReference",
311
+ "400": "Error",
312
+ "401": "Error",
313
+ "403": "Error",
314
+ "404": "Error",
315
+ "409": "Error",
316
+ "422": "ValidationResponse",
317
+ "500": "Error",
318
+ "503": "Error",
319
+ }
320
+ response_data = await self.api_client.call_api(
321
+ *_param, _request_timeout=_request_timeout
322
+ )
323
+ return response_data.response
324
+
325
+ def _create_model_serialize(
326
+ self,
327
+ x_entrystore_host,
328
+ entrystore_host,
329
+ metadata_request,
330
+ _request_auth,
331
+ _content_type,
332
+ _headers,
333
+ _host_index,
334
+ ) -> RequestSerialized:
335
+
336
+ _host = None
337
+
338
+ _collection_formats: Dict[str, str] = {}
339
+
340
+ _path_params: Dict[str, str] = {}
341
+ _query_params: List[Tuple[str, str]] = []
342
+ _header_params: Dict[str, Optional[str]] = _headers or {}
343
+ _form_params: List[Tuple[str, str]] = []
344
+ _files: Dict[
345
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
346
+ ] = {}
347
+ _body_params: Optional[bytes] = None
348
+
349
+ # process the path parameters
350
+ # process the query parameters
351
+ if entrystore_host is not None:
352
+
353
+ _query_params.append(("entrystore_host", entrystore_host))
354
+
355
+ # process the header parameters
356
+ if x_entrystore_host is not None:
357
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
358
+ # process the form parameters
359
+ # process the body parameter
360
+ if metadata_request is not None:
361
+ _body_params = metadata_request
362
+
363
+ # set the HTTP header `Accept`
364
+ if "Accept" not in _header_params:
365
+ _header_params["Accept"] = self.api_client.select_header_accept(
366
+ ["application/json"]
367
+ )
368
+
369
+ # set the HTTP header `Content-Type`
370
+ if _content_type:
371
+ _header_params["Content-Type"] = _content_type
372
+ else:
373
+ _default_content_type = self.api_client.select_header_content_type(
374
+ ["application/ld+json"]
375
+ )
376
+ if _default_content_type is not None:
377
+ _header_params["Content-Type"] = _default_content_type
378
+
379
+ # authentication setting
380
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
381
+
382
+ return self.api_client.param_serialize(
383
+ method="POST",
384
+ resource_path="/model",
385
+ path_params=_path_params,
386
+ query_params=_query_params,
387
+ header_params=_header_params,
388
+ body=_body_params,
389
+ post_params=_form_params,
390
+ files=_files,
391
+ auth_settings=_auth_settings,
392
+ collection_formats=_collection_formats,
393
+ _host=_host,
394
+ _request_auth=_request_auth,
395
+ )
396
+
397
+ @validate_call
398
+ async def delete_model(
399
+ self,
400
+ context_id: Annotated[
401
+ str,
402
+ Field(
403
+ strict=True,
404
+ description="The context (catalog) identifier in EntryStore",
405
+ ),
406
+ ],
407
+ x_entrystore_host: Annotated[
408
+ Optional[StrictStr],
409
+ Field(
410
+ 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. "
411
+ ),
412
+ ] = None,
413
+ entrystore_host: Annotated[
414
+ Optional[StrictStr],
415
+ Field(
416
+ 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. "
417
+ ),
418
+ ] = None,
419
+ _request_timeout: Union[
420
+ None,
421
+ Annotated[StrictFloat, Field(gt=0)],
422
+ Tuple[
423
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
424
+ ],
425
+ ] = None,
426
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
427
+ _content_type: Optional[StrictStr] = None,
428
+ _headers: Optional[Dict[StrictStr, Any]] = None,
429
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
430
+ ) -> None:
431
+ """Delete model
432
+
433
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Deletes a specific model, including the EntryStore context and all of the classes, properties, forms, fields, namespaces, diagrams and specifications it contains. This operation is irreversible. Requires authentication with permission to delete the model's context.
434
+
435
+ :param context_id: The context (catalog) identifier in EntryStore (required)
436
+ :type context_id: str
437
+ :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.
438
+ :type x_entrystore_host: str
439
+ :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.
440
+ :type entrystore_host: str
441
+ :param _request_timeout: timeout setting for this request. If one
442
+ number provided, it will be total request
443
+ timeout. It can also be a pair (tuple) of
444
+ (connection, read) timeouts.
445
+ :type _request_timeout: int, tuple(int, int), optional
446
+ :param _request_auth: set to override the auth_settings for an a single
447
+ request; this effectively ignores the
448
+ authentication in the spec for a single request.
449
+ :type _request_auth: dict, optional
450
+ :param _content_type: force content-type for the request.
451
+ :type _content_type: str, Optional
452
+ :param _headers: set to override the headers for a single
453
+ request; this effectively ignores the headers
454
+ in the spec for a single request.
455
+ :type _headers: dict, optional
456
+ :param _host_index: set to override the host_index for a single
457
+ request; this effectively ignores the host_index
458
+ in the spec for a single request.
459
+ :type _host_index: int, optional
460
+ :return: Returns the result object.
461
+ """ # noqa: E501
462
+
463
+ _param = self._delete_model_serialize(
464
+ context_id=context_id,
465
+ x_entrystore_host=x_entrystore_host,
466
+ entrystore_host=entrystore_host,
467
+ _request_auth=_request_auth,
468
+ _content_type=_content_type,
469
+ _headers=_headers,
470
+ _host_index=_host_index,
471
+ )
472
+
473
+ _response_types_map: Dict[str, Optional[str]] = {
474
+ "204": None,
475
+ "400": "Error",
476
+ "401": "Error",
477
+ "403": "Error",
478
+ "404": "Error",
479
+ "409": "Error",
480
+ "500": "Error",
481
+ "503": "Error",
482
+ }
483
+ response_data = await self.api_client.call_api(
484
+ *_param, _request_timeout=_request_timeout
485
+ )
486
+ await response_data.read()
487
+ return self.api_client.response_deserialize(
488
+ response_data=response_data,
489
+ response_types_map=_response_types_map,
490
+ ).data
491
+
492
+ @validate_call
493
+ async def delete_model_with_http_info(
494
+ self,
495
+ context_id: Annotated[
496
+ str,
497
+ Field(
498
+ strict=True,
499
+ description="The context (catalog) identifier in EntryStore",
500
+ ),
501
+ ],
502
+ x_entrystore_host: Annotated[
503
+ Optional[StrictStr],
504
+ Field(
505
+ 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. "
506
+ ),
507
+ ] = None,
508
+ entrystore_host: Annotated[
509
+ Optional[StrictStr],
510
+ Field(
511
+ 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. "
512
+ ),
513
+ ] = None,
514
+ _request_timeout: Union[
515
+ None,
516
+ Annotated[StrictFloat, Field(gt=0)],
517
+ Tuple[
518
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
519
+ ],
520
+ ] = None,
521
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
522
+ _content_type: Optional[StrictStr] = None,
523
+ _headers: Optional[Dict[StrictStr, Any]] = None,
524
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
525
+ ) -> ApiResponse[None]:
526
+ """Delete model
527
+
528
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Deletes a specific model, including the EntryStore context and all of the classes, properties, forms, fields, namespaces, diagrams and specifications it contains. This operation is irreversible. Requires authentication with permission to delete the model's context.
529
+
530
+ :param context_id: The context (catalog) identifier in EntryStore (required)
531
+ :type context_id: str
532
+ :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.
533
+ :type x_entrystore_host: str
534
+ :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.
535
+ :type entrystore_host: str
536
+ :param _request_timeout: timeout setting for this request. If one
537
+ number provided, it will be total request
538
+ timeout. It can also be a pair (tuple) of
539
+ (connection, read) timeouts.
540
+ :type _request_timeout: int, tuple(int, int), optional
541
+ :param _request_auth: set to override the auth_settings for an a single
542
+ request; this effectively ignores the
543
+ authentication in the spec for a single request.
544
+ :type _request_auth: dict, optional
545
+ :param _content_type: force content-type for the request.
546
+ :type _content_type: str, Optional
547
+ :param _headers: set to override the headers for a single
548
+ request; this effectively ignores the headers
549
+ in the spec for a single request.
550
+ :type _headers: dict, optional
551
+ :param _host_index: set to override the host_index for a single
552
+ request; this effectively ignores the host_index
553
+ in the spec for a single request.
554
+ :type _host_index: int, optional
555
+ :return: Returns the result object.
556
+ """ # noqa: E501
557
+
558
+ _param = self._delete_model_serialize(
559
+ context_id=context_id,
560
+ x_entrystore_host=x_entrystore_host,
561
+ entrystore_host=entrystore_host,
562
+ _request_auth=_request_auth,
563
+ _content_type=_content_type,
564
+ _headers=_headers,
565
+ _host_index=_host_index,
566
+ )
567
+
568
+ _response_types_map: Dict[str, Optional[str]] = {
569
+ "204": None,
570
+ "400": "Error",
571
+ "401": "Error",
572
+ "403": "Error",
573
+ "404": "Error",
574
+ "409": "Error",
575
+ "500": "Error",
576
+ "503": "Error",
577
+ }
578
+ response_data = await self.api_client.call_api(
579
+ *_param, _request_timeout=_request_timeout
580
+ )
581
+ await response_data.read()
582
+ return self.api_client.response_deserialize(
583
+ response_data=response_data,
584
+ response_types_map=_response_types_map,
585
+ )
586
+
587
+ @validate_call
588
+ async def delete_model_without_preload_content(
589
+ self,
590
+ context_id: Annotated[
591
+ str,
592
+ Field(
593
+ strict=True,
594
+ description="The context (catalog) identifier in EntryStore",
595
+ ),
596
+ ],
597
+ x_entrystore_host: Annotated[
598
+ Optional[StrictStr],
599
+ Field(
600
+ 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. "
601
+ ),
602
+ ] = None,
603
+ entrystore_host: Annotated[
604
+ Optional[StrictStr],
605
+ Field(
606
+ 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. "
607
+ ),
608
+ ] = None,
609
+ _request_timeout: Union[
610
+ None,
611
+ Annotated[StrictFloat, Field(gt=0)],
612
+ Tuple[
613
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
614
+ ],
615
+ ] = None,
616
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
617
+ _content_type: Optional[StrictStr] = None,
618
+ _headers: Optional[Dict[StrictStr, Any]] = None,
619
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
620
+ ) -> RESTResponseType:
621
+ """Delete model
622
+
623
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Deletes a specific model, including the EntryStore context and all of the classes, properties, forms, fields, namespaces, diagrams and specifications it contains. This operation is irreversible. Requires authentication with permission to delete the model's context.
624
+
625
+ :param context_id: The context (catalog) identifier in EntryStore (required)
626
+ :type context_id: str
627
+ :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.
628
+ :type x_entrystore_host: str
629
+ :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.
630
+ :type entrystore_host: str
631
+ :param _request_timeout: timeout setting for this request. If one
632
+ number provided, it will be total request
633
+ timeout. It can also be a pair (tuple) of
634
+ (connection, read) timeouts.
635
+ :type _request_timeout: int, tuple(int, int), optional
636
+ :param _request_auth: set to override the auth_settings for an a single
637
+ request; this effectively ignores the
638
+ authentication in the spec for a single request.
639
+ :type _request_auth: dict, optional
640
+ :param _content_type: force content-type for the request.
641
+ :type _content_type: str, Optional
642
+ :param _headers: set to override the headers for a single
643
+ request; this effectively ignores the headers
644
+ in the spec for a single request.
645
+ :type _headers: dict, optional
646
+ :param _host_index: set to override the host_index for a single
647
+ request; this effectively ignores the host_index
648
+ in the spec for a single request.
649
+ :type _host_index: int, optional
650
+ :return: Returns the result object.
651
+ """ # noqa: E501
652
+
653
+ _param = self._delete_model_serialize(
654
+ context_id=context_id,
655
+ x_entrystore_host=x_entrystore_host,
656
+ entrystore_host=entrystore_host,
657
+ _request_auth=_request_auth,
658
+ _content_type=_content_type,
659
+ _headers=_headers,
660
+ _host_index=_host_index,
661
+ )
662
+
663
+ _response_types_map: Dict[str, Optional[str]] = {
664
+ "204": None,
665
+ "400": "Error",
666
+ "401": "Error",
667
+ "403": "Error",
668
+ "404": "Error",
669
+ "409": "Error",
670
+ "500": "Error",
671
+ "503": "Error",
672
+ }
673
+ response_data = await self.api_client.call_api(
674
+ *_param, _request_timeout=_request_timeout
675
+ )
676
+ return response_data.response
677
+
678
+ def _delete_model_serialize(
679
+ self,
680
+ context_id,
681
+ x_entrystore_host,
682
+ entrystore_host,
683
+ _request_auth,
684
+ _content_type,
685
+ _headers,
686
+ _host_index,
687
+ ) -> RequestSerialized:
688
+
689
+ _host = None
690
+
691
+ _collection_formats: Dict[str, str] = {}
692
+
693
+ _path_params: Dict[str, str] = {}
694
+ _query_params: List[Tuple[str, str]] = []
695
+ _header_params: Dict[str, Optional[str]] = _headers or {}
696
+ _form_params: List[Tuple[str, str]] = []
697
+ _files: Dict[
698
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
699
+ ] = {}
700
+ _body_params: Optional[bytes] = None
701
+
702
+ # process the path parameters
703
+ if context_id is not None:
704
+ _path_params["context_id"] = context_id
705
+ # process the query parameters
706
+ if entrystore_host is not None:
707
+
708
+ _query_params.append(("entrystore_host", entrystore_host))
709
+
710
+ # process the header parameters
711
+ if x_entrystore_host is not None:
712
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
713
+ # process the form parameters
714
+ # process the body parameter
715
+
716
+ # set the HTTP header `Accept`
717
+ if "Accept" not in _header_params:
718
+ _header_params["Accept"] = self.api_client.select_header_accept(
719
+ ["application/json"]
720
+ )
721
+
722
+ # authentication setting
723
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
724
+
725
+ return self.api_client.param_serialize(
726
+ method="DELETE",
727
+ resource_path="/model/{context_id}",
728
+ path_params=_path_params,
729
+ query_params=_query_params,
730
+ header_params=_header_params,
731
+ body=_body_params,
732
+ post_params=_form_params,
733
+ files=_files,
734
+ auth_settings=_auth_settings,
735
+ collection_formats=_collection_formats,
736
+ _host=_host,
737
+ _request_auth=_request_auth,
738
+ )
739
+
740
+ @validate_call
741
+ async def get_model(
742
+ self,
743
+ context_id: Annotated[
744
+ str,
745
+ Field(
746
+ strict=True,
747
+ description="The context (catalog) identifier in EntryStore",
748
+ ),
749
+ ],
750
+ x_entrystore_host: Annotated[
751
+ Optional[StrictStr],
752
+ Field(
753
+ 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. "
754
+ ),
755
+ ] = None,
756
+ entrystore_host: Annotated[
757
+ Optional[StrictStr],
758
+ Field(
759
+ 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. "
760
+ ),
761
+ ] = None,
762
+ _request_timeout: Union[
763
+ None,
764
+ Annotated[StrictFloat, Field(gt=0)],
765
+ Tuple[
766
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
767
+ ],
768
+ ] = None,
769
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
770
+ _content_type: Optional[StrictStr] = None,
771
+ _headers: Optional[Dict[StrictStr, Any]] = None,
772
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
773
+ ) -> EntityReference:
774
+ """Get model
775
+
776
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Returns basic reference information for a specific model. A model is addressed by its `context_id` (the model is the EntryStore `esc:FormsContext`). Use the `/metadata` sub-endpoint to retrieve the model's full descriptive metadata, and the `/model/{context_id}/classes` endpoints to work with the classes it contains. Authentication is optional. Public models are accessible without authentication. Authenticated requests may access additional non-public models.
777
+
778
+ :param context_id: The context (catalog) identifier in EntryStore (required)
779
+ :type context_id: str
780
+ :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.
781
+ :type x_entrystore_host: str
782
+ :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.
783
+ :type entrystore_host: str
784
+ :param _request_timeout: timeout setting for this request. If one
785
+ number provided, it will be total request
786
+ timeout. It can also be a pair (tuple) of
787
+ (connection, read) timeouts.
788
+ :type _request_timeout: int, tuple(int, int), optional
789
+ :param _request_auth: set to override the auth_settings for an a single
790
+ request; this effectively ignores the
791
+ authentication in the spec for a single request.
792
+ :type _request_auth: dict, optional
793
+ :param _content_type: force content-type for the request.
794
+ :type _content_type: str, Optional
795
+ :param _headers: set to override the headers for a single
796
+ request; this effectively ignores the headers
797
+ in the spec for a single request.
798
+ :type _headers: dict, optional
799
+ :param _host_index: set to override the host_index for a single
800
+ request; this effectively ignores the host_index
801
+ in the spec for a single request.
802
+ :type _host_index: int, optional
803
+ :return: Returns the result object.
804
+ """ # noqa: E501
805
+
806
+ _param = self._get_model_serialize(
807
+ context_id=context_id,
808
+ x_entrystore_host=x_entrystore_host,
809
+ entrystore_host=entrystore_host,
810
+ _request_auth=_request_auth,
811
+ _content_type=_content_type,
812
+ _headers=_headers,
813
+ _host_index=_host_index,
814
+ )
815
+
816
+ _response_types_map: Dict[str, Optional[str]] = {
817
+ "200": "EntityReference",
818
+ "400": "Error",
819
+ "401": "Error",
820
+ "404": "Error",
821
+ "500": "Error",
822
+ "503": "Error",
823
+ }
824
+ response_data = await self.api_client.call_api(
825
+ *_param, _request_timeout=_request_timeout
826
+ )
827
+ await response_data.read()
828
+ return self.api_client.response_deserialize(
829
+ response_data=response_data,
830
+ response_types_map=_response_types_map,
831
+ ).data
832
+
833
+ @validate_call
834
+ async def get_model_with_http_info(
835
+ self,
836
+ context_id: Annotated[
837
+ str,
838
+ Field(
839
+ strict=True,
840
+ description="The context (catalog) identifier in EntryStore",
841
+ ),
842
+ ],
843
+ x_entrystore_host: Annotated[
844
+ Optional[StrictStr],
845
+ Field(
846
+ 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. "
847
+ ),
848
+ ] = None,
849
+ entrystore_host: Annotated[
850
+ Optional[StrictStr],
851
+ Field(
852
+ 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. "
853
+ ),
854
+ ] = None,
855
+ _request_timeout: Union[
856
+ None,
857
+ Annotated[StrictFloat, Field(gt=0)],
858
+ Tuple[
859
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
860
+ ],
861
+ ] = None,
862
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
863
+ _content_type: Optional[StrictStr] = None,
864
+ _headers: Optional[Dict[StrictStr, Any]] = None,
865
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
866
+ ) -> ApiResponse[EntityReference]:
867
+ """Get model
868
+
869
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Returns basic reference information for a specific model. A model is addressed by its `context_id` (the model is the EntryStore `esc:FormsContext`). Use the `/metadata` sub-endpoint to retrieve the model's full descriptive metadata, and the `/model/{context_id}/classes` endpoints to work with the classes it contains. Authentication is optional. Public models are accessible without authentication. Authenticated requests may access additional non-public models.
870
+
871
+ :param context_id: The context (catalog) identifier in EntryStore (required)
872
+ :type context_id: str
873
+ :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.
874
+ :type x_entrystore_host: str
875
+ :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.
876
+ :type entrystore_host: str
877
+ :param _request_timeout: timeout setting for this request. If one
878
+ number provided, it will be total request
879
+ timeout. It can also be a pair (tuple) of
880
+ (connection, read) timeouts.
881
+ :type _request_timeout: int, tuple(int, int), optional
882
+ :param _request_auth: set to override the auth_settings for an a single
883
+ request; this effectively ignores the
884
+ authentication in the spec for a single request.
885
+ :type _request_auth: dict, optional
886
+ :param _content_type: force content-type for the request.
887
+ :type _content_type: str, Optional
888
+ :param _headers: set to override the headers for a single
889
+ request; this effectively ignores the headers
890
+ in the spec for a single request.
891
+ :type _headers: dict, optional
892
+ :param _host_index: set to override the host_index for a single
893
+ request; this effectively ignores the host_index
894
+ in the spec for a single request.
895
+ :type _host_index: int, optional
896
+ :return: Returns the result object.
897
+ """ # noqa: E501
898
+
899
+ _param = self._get_model_serialize(
900
+ context_id=context_id,
901
+ x_entrystore_host=x_entrystore_host,
902
+ entrystore_host=entrystore_host,
903
+ _request_auth=_request_auth,
904
+ _content_type=_content_type,
905
+ _headers=_headers,
906
+ _host_index=_host_index,
907
+ )
908
+
909
+ _response_types_map: Dict[str, Optional[str]] = {
910
+ "200": "EntityReference",
911
+ "400": "Error",
912
+ "401": "Error",
913
+ "404": "Error",
914
+ "500": "Error",
915
+ "503": "Error",
916
+ }
917
+ response_data = await self.api_client.call_api(
918
+ *_param, _request_timeout=_request_timeout
919
+ )
920
+ await response_data.read()
921
+ return self.api_client.response_deserialize(
922
+ response_data=response_data,
923
+ response_types_map=_response_types_map,
924
+ )
925
+
926
+ @validate_call
927
+ async def get_model_without_preload_content(
928
+ self,
929
+ context_id: Annotated[
930
+ str,
931
+ Field(
932
+ strict=True,
933
+ description="The context (catalog) identifier in EntryStore",
934
+ ),
935
+ ],
936
+ x_entrystore_host: Annotated[
937
+ Optional[StrictStr],
938
+ Field(
939
+ 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. "
940
+ ),
941
+ ] = None,
942
+ entrystore_host: Annotated[
943
+ Optional[StrictStr],
944
+ Field(
945
+ 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. "
946
+ ),
947
+ ] = None,
948
+ _request_timeout: Union[
949
+ None,
950
+ Annotated[StrictFloat, Field(gt=0)],
951
+ Tuple[
952
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
953
+ ],
954
+ ] = None,
955
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
956
+ _content_type: Optional[StrictStr] = None,
957
+ _headers: Optional[Dict[StrictStr, Any]] = None,
958
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
959
+ ) -> RESTResponseType:
960
+ """Get model
961
+
962
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Returns basic reference information for a specific model. A model is addressed by its `context_id` (the model is the EntryStore `esc:FormsContext`). Use the `/metadata` sub-endpoint to retrieve the model's full descriptive metadata, and the `/model/{context_id}/classes` endpoints to work with the classes it contains. Authentication is optional. Public models are accessible without authentication. Authenticated requests may access additional non-public models.
963
+
964
+ :param context_id: The context (catalog) identifier in EntryStore (required)
965
+ :type context_id: str
966
+ :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.
967
+ :type x_entrystore_host: str
968
+ :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.
969
+ :type entrystore_host: str
970
+ :param _request_timeout: timeout setting for this request. If one
971
+ number provided, it will be total request
972
+ timeout. It can also be a pair (tuple) of
973
+ (connection, read) timeouts.
974
+ :type _request_timeout: int, tuple(int, int), optional
975
+ :param _request_auth: set to override the auth_settings for an a single
976
+ request; this effectively ignores the
977
+ authentication in the spec for a single request.
978
+ :type _request_auth: dict, optional
979
+ :param _content_type: force content-type for the request.
980
+ :type _content_type: str, Optional
981
+ :param _headers: set to override the headers for a single
982
+ request; this effectively ignores the headers
983
+ in the spec for a single request.
984
+ :type _headers: dict, optional
985
+ :param _host_index: set to override the host_index for a single
986
+ request; this effectively ignores the host_index
987
+ in the spec for a single request.
988
+ :type _host_index: int, optional
989
+ :return: Returns the result object.
990
+ """ # noqa: E501
991
+
992
+ _param = self._get_model_serialize(
993
+ context_id=context_id,
994
+ x_entrystore_host=x_entrystore_host,
995
+ entrystore_host=entrystore_host,
996
+ _request_auth=_request_auth,
997
+ _content_type=_content_type,
998
+ _headers=_headers,
999
+ _host_index=_host_index,
1000
+ )
1001
+
1002
+ _response_types_map: Dict[str, Optional[str]] = {
1003
+ "200": "EntityReference",
1004
+ "400": "Error",
1005
+ "401": "Error",
1006
+ "404": "Error",
1007
+ "500": "Error",
1008
+ "503": "Error",
1009
+ }
1010
+ response_data = await self.api_client.call_api(
1011
+ *_param, _request_timeout=_request_timeout
1012
+ )
1013
+ return response_data.response
1014
+
1015
+ def _get_model_serialize(
1016
+ self,
1017
+ context_id,
1018
+ x_entrystore_host,
1019
+ entrystore_host,
1020
+ _request_auth,
1021
+ _content_type,
1022
+ _headers,
1023
+ _host_index,
1024
+ ) -> RequestSerialized:
1025
+
1026
+ _host = None
1027
+
1028
+ _collection_formats: Dict[str, str] = {}
1029
+
1030
+ _path_params: Dict[str, str] = {}
1031
+ _query_params: List[Tuple[str, str]] = []
1032
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1033
+ _form_params: List[Tuple[str, str]] = []
1034
+ _files: Dict[
1035
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1036
+ ] = {}
1037
+ _body_params: Optional[bytes] = None
1038
+
1039
+ # process the path parameters
1040
+ if context_id is not None:
1041
+ _path_params["context_id"] = context_id
1042
+ # process the query parameters
1043
+ if entrystore_host is not None:
1044
+
1045
+ _query_params.append(("entrystore_host", entrystore_host))
1046
+
1047
+ # process the header parameters
1048
+ if x_entrystore_host is not None:
1049
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
1050
+ # process the form parameters
1051
+ # process the body parameter
1052
+
1053
+ # set the HTTP header `Accept`
1054
+ if "Accept" not in _header_params:
1055
+ _header_params["Accept"] = self.api_client.select_header_accept(
1056
+ ["application/json"]
1057
+ )
1058
+
1059
+ # authentication setting
1060
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
1061
+
1062
+ return self.api_client.param_serialize(
1063
+ method="GET",
1064
+ resource_path="/model/{context_id}",
1065
+ path_params=_path_params,
1066
+ query_params=_query_params,
1067
+ header_params=_header_params,
1068
+ body=_body_params,
1069
+ post_params=_form_params,
1070
+ files=_files,
1071
+ auth_settings=_auth_settings,
1072
+ collection_formats=_collection_formats,
1073
+ _host=_host,
1074
+ _request_auth=_request_auth,
1075
+ )
1076
+
1077
+ @validate_call
1078
+ async def get_model_metadata(
1079
+ self,
1080
+ context_id: Annotated[
1081
+ str,
1082
+ Field(
1083
+ strict=True,
1084
+ description="The context (catalog) identifier in EntryStore",
1085
+ ),
1086
+ ],
1087
+ x_entrystore_host: Annotated[
1088
+ Optional[StrictStr],
1089
+ Field(
1090
+ 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. "
1091
+ ),
1092
+ ] = None,
1093
+ entrystore_host: Annotated[
1094
+ Optional[StrictStr],
1095
+ Field(
1096
+ 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. "
1097
+ ),
1098
+ ] = None,
1099
+ format: Annotated[
1100
+ Optional[MetadataFormat],
1101
+ Field(
1102
+ 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 "
1103
+ ),
1104
+ ] = None,
1105
+ _request_timeout: Union[
1106
+ None,
1107
+ Annotated[StrictFloat, Field(gt=0)],
1108
+ Tuple[
1109
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1110
+ ],
1111
+ ] = None,
1112
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1113
+ _content_type: Optional[StrictStr] = None,
1114
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1115
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1116
+ ) -> Dict[str, object]:
1117
+ """Get model metadata
1118
+
1119
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Returns the raw descriptive metadata for a specific model (the EntryStore context's metadata). The response serialization can be selected with the `format` query parameter. Authentication is optional. Public models are accessible without authentication. Authenticated requests may access additional non-public models.
1120
+
1121
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1122
+ :type context_id: str
1123
+ :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.
1124
+ :type x_entrystore_host: str
1125
+ :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.
1126
+ :type entrystore_host: str
1127
+ :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
1128
+ :type format: MetadataFormat
1129
+ :param _request_timeout: timeout setting for this request. If one
1130
+ number provided, it will be total request
1131
+ timeout. It can also be a pair (tuple) of
1132
+ (connection, read) timeouts.
1133
+ :type _request_timeout: int, tuple(int, int), optional
1134
+ :param _request_auth: set to override the auth_settings for an a single
1135
+ request; this effectively ignores the
1136
+ authentication in the spec for a single request.
1137
+ :type _request_auth: dict, optional
1138
+ :param _content_type: force content-type for the request.
1139
+ :type _content_type: str, Optional
1140
+ :param _headers: set to override the headers for a single
1141
+ request; this effectively ignores the headers
1142
+ in the spec for a single request.
1143
+ :type _headers: dict, optional
1144
+ :param _host_index: set to override the host_index for a single
1145
+ request; this effectively ignores the host_index
1146
+ in the spec for a single request.
1147
+ :type _host_index: int, optional
1148
+ :return: Returns the result object.
1149
+ """ # noqa: E501
1150
+
1151
+ _param = self._get_model_metadata_serialize(
1152
+ context_id=context_id,
1153
+ x_entrystore_host=x_entrystore_host,
1154
+ entrystore_host=entrystore_host,
1155
+ format=format,
1156
+ _request_auth=_request_auth,
1157
+ _content_type=_content_type,
1158
+ _headers=_headers,
1159
+ _host_index=_host_index,
1160
+ )
1161
+
1162
+ _response_types_map: Dict[str, Optional[str]] = {
1163
+ "200": "Dict[str, object]",
1164
+ "400": "Error",
1165
+ "401": "Error",
1166
+ "404": "Error",
1167
+ "500": "Error",
1168
+ "503": "Error",
1169
+ }
1170
+ response_data = await self.api_client.call_api(
1171
+ *_param, _request_timeout=_request_timeout
1172
+ )
1173
+ await response_data.read()
1174
+ return self.api_client.response_deserialize(
1175
+ response_data=response_data,
1176
+ response_types_map=_response_types_map,
1177
+ ).data
1178
+
1179
+ @validate_call
1180
+ async def get_model_metadata_with_http_info(
1181
+ self,
1182
+ context_id: Annotated[
1183
+ str,
1184
+ Field(
1185
+ strict=True,
1186
+ description="The context (catalog) identifier in EntryStore",
1187
+ ),
1188
+ ],
1189
+ x_entrystore_host: Annotated[
1190
+ Optional[StrictStr],
1191
+ Field(
1192
+ 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. "
1193
+ ),
1194
+ ] = None,
1195
+ entrystore_host: Annotated[
1196
+ Optional[StrictStr],
1197
+ Field(
1198
+ 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. "
1199
+ ),
1200
+ ] = None,
1201
+ format: Annotated[
1202
+ Optional[MetadataFormat],
1203
+ Field(
1204
+ 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 "
1205
+ ),
1206
+ ] = None,
1207
+ _request_timeout: Union[
1208
+ None,
1209
+ Annotated[StrictFloat, Field(gt=0)],
1210
+ Tuple[
1211
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1212
+ ],
1213
+ ] = None,
1214
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1215
+ _content_type: Optional[StrictStr] = None,
1216
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1217
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1218
+ ) -> ApiResponse[Dict[str, object]]:
1219
+ """Get model metadata
1220
+
1221
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Returns the raw descriptive metadata for a specific model (the EntryStore context's metadata). The response serialization can be selected with the `format` query parameter. Authentication is optional. Public models are accessible without authentication. Authenticated requests may access additional non-public models.
1222
+
1223
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1224
+ :type context_id: str
1225
+ :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.
1226
+ :type x_entrystore_host: str
1227
+ :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.
1228
+ :type entrystore_host: str
1229
+ :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
1230
+ :type format: MetadataFormat
1231
+ :param _request_timeout: timeout setting for this request. If one
1232
+ number provided, it will be total request
1233
+ timeout. It can also be a pair (tuple) of
1234
+ (connection, read) timeouts.
1235
+ :type _request_timeout: int, tuple(int, int), optional
1236
+ :param _request_auth: set to override the auth_settings for an a single
1237
+ request; this effectively ignores the
1238
+ authentication in the spec for a single request.
1239
+ :type _request_auth: dict, optional
1240
+ :param _content_type: force content-type for the request.
1241
+ :type _content_type: str, Optional
1242
+ :param _headers: set to override the headers for a single
1243
+ request; this effectively ignores the headers
1244
+ in the spec for a single request.
1245
+ :type _headers: dict, optional
1246
+ :param _host_index: set to override the host_index for a single
1247
+ request; this effectively ignores the host_index
1248
+ in the spec for a single request.
1249
+ :type _host_index: int, optional
1250
+ :return: Returns the result object.
1251
+ """ # noqa: E501
1252
+
1253
+ _param = self._get_model_metadata_serialize(
1254
+ context_id=context_id,
1255
+ x_entrystore_host=x_entrystore_host,
1256
+ entrystore_host=entrystore_host,
1257
+ format=format,
1258
+ _request_auth=_request_auth,
1259
+ _content_type=_content_type,
1260
+ _headers=_headers,
1261
+ _host_index=_host_index,
1262
+ )
1263
+
1264
+ _response_types_map: Dict[str, Optional[str]] = {
1265
+ "200": "Dict[str, object]",
1266
+ "400": "Error",
1267
+ "401": "Error",
1268
+ "404": "Error",
1269
+ "500": "Error",
1270
+ "503": "Error",
1271
+ }
1272
+ response_data = await self.api_client.call_api(
1273
+ *_param, _request_timeout=_request_timeout
1274
+ )
1275
+ await response_data.read()
1276
+ return self.api_client.response_deserialize(
1277
+ response_data=response_data,
1278
+ response_types_map=_response_types_map,
1279
+ )
1280
+
1281
+ @validate_call
1282
+ async def get_model_metadata_without_preload_content(
1283
+ self,
1284
+ context_id: Annotated[
1285
+ str,
1286
+ Field(
1287
+ strict=True,
1288
+ description="The context (catalog) identifier in EntryStore",
1289
+ ),
1290
+ ],
1291
+ x_entrystore_host: Annotated[
1292
+ Optional[StrictStr],
1293
+ Field(
1294
+ 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. "
1295
+ ),
1296
+ ] = None,
1297
+ entrystore_host: Annotated[
1298
+ Optional[StrictStr],
1299
+ Field(
1300
+ 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. "
1301
+ ),
1302
+ ] = None,
1303
+ format: Annotated[
1304
+ Optional[MetadataFormat],
1305
+ Field(
1306
+ 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 "
1307
+ ),
1308
+ ] = None,
1309
+ _request_timeout: Union[
1310
+ None,
1311
+ Annotated[StrictFloat, Field(gt=0)],
1312
+ Tuple[
1313
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1314
+ ],
1315
+ ] = None,
1316
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1317
+ _content_type: Optional[StrictStr] = None,
1318
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1319
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1320
+ ) -> RESTResponseType:
1321
+ """Get model metadata
1322
+
1323
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Returns the raw descriptive metadata for a specific model (the EntryStore context's metadata). The response serialization can be selected with the `format` query parameter. Authentication is optional. Public models are accessible without authentication. Authenticated requests may access additional non-public models.
1324
+
1325
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1326
+ :type context_id: str
1327
+ :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.
1328
+ :type x_entrystore_host: str
1329
+ :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.
1330
+ :type entrystore_host: str
1331
+ :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
1332
+ :type format: MetadataFormat
1333
+ :param _request_timeout: timeout setting for this request. If one
1334
+ number provided, it will be total request
1335
+ timeout. It can also be a pair (tuple) of
1336
+ (connection, read) timeouts.
1337
+ :type _request_timeout: int, tuple(int, int), optional
1338
+ :param _request_auth: set to override the auth_settings for an a single
1339
+ request; this effectively ignores the
1340
+ authentication in the spec for a single request.
1341
+ :type _request_auth: dict, optional
1342
+ :param _content_type: force content-type for the request.
1343
+ :type _content_type: str, Optional
1344
+ :param _headers: set to override the headers for a single
1345
+ request; this effectively ignores the headers
1346
+ in the spec for a single request.
1347
+ :type _headers: dict, optional
1348
+ :param _host_index: set to override the host_index for a single
1349
+ request; this effectively ignores the host_index
1350
+ in the spec for a single request.
1351
+ :type _host_index: int, optional
1352
+ :return: Returns the result object.
1353
+ """ # noqa: E501
1354
+
1355
+ _param = self._get_model_metadata_serialize(
1356
+ context_id=context_id,
1357
+ x_entrystore_host=x_entrystore_host,
1358
+ entrystore_host=entrystore_host,
1359
+ format=format,
1360
+ _request_auth=_request_auth,
1361
+ _content_type=_content_type,
1362
+ _headers=_headers,
1363
+ _host_index=_host_index,
1364
+ )
1365
+
1366
+ _response_types_map: Dict[str, Optional[str]] = {
1367
+ "200": "Dict[str, object]",
1368
+ "400": "Error",
1369
+ "401": "Error",
1370
+ "404": "Error",
1371
+ "500": "Error",
1372
+ "503": "Error",
1373
+ }
1374
+ response_data = await self.api_client.call_api(
1375
+ *_param, _request_timeout=_request_timeout
1376
+ )
1377
+ return response_data.response
1378
+
1379
+ def _get_model_metadata_serialize(
1380
+ self,
1381
+ context_id,
1382
+ x_entrystore_host,
1383
+ entrystore_host,
1384
+ format,
1385
+ _request_auth,
1386
+ _content_type,
1387
+ _headers,
1388
+ _host_index,
1389
+ ) -> RequestSerialized:
1390
+
1391
+ _host = None
1392
+
1393
+ _collection_formats: Dict[str, str] = {}
1394
+
1395
+ _path_params: Dict[str, str] = {}
1396
+ _query_params: List[Tuple[str, str]] = []
1397
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1398
+ _form_params: List[Tuple[str, str]] = []
1399
+ _files: Dict[
1400
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1401
+ ] = {}
1402
+ _body_params: Optional[bytes] = None
1403
+
1404
+ # process the path parameters
1405
+ if context_id is not None:
1406
+ _path_params["context_id"] = context_id
1407
+ # process the query parameters
1408
+ if entrystore_host is not None:
1409
+
1410
+ _query_params.append(("entrystore_host", entrystore_host))
1411
+
1412
+ if format is not None:
1413
+
1414
+ _query_params.append(("format", format.value))
1415
+
1416
+ # process the header parameters
1417
+ if x_entrystore_host is not None:
1418
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
1419
+ # process the form parameters
1420
+ # process the body parameter
1421
+
1422
+ # set the HTTP header `Accept`
1423
+ if "Accept" not in _header_params:
1424
+ _header_params["Accept"] = self.api_client.select_header_accept(
1425
+ [
1426
+ "application/ld+json",
1427
+ "application/rdf+json",
1428
+ "text/turtle",
1429
+ "application/n-triples",
1430
+ "application/rdf+xml",
1431
+ "application/json",
1432
+ ]
1433
+ )
1434
+
1435
+ # authentication setting
1436
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
1437
+
1438
+ return self.api_client.param_serialize(
1439
+ method="GET",
1440
+ resource_path="/model/{context_id}/metadata",
1441
+ path_params=_path_params,
1442
+ query_params=_query_params,
1443
+ header_params=_header_params,
1444
+ body=_body_params,
1445
+ post_params=_form_params,
1446
+ files=_files,
1447
+ auth_settings=_auth_settings,
1448
+ collection_formats=_collection_formats,
1449
+ _host=_host,
1450
+ _request_auth=_request_auth,
1451
+ )
1452
+
1453
+ @validate_call
1454
+ async def list_models(
1455
+ self,
1456
+ x_entrystore_host: Annotated[
1457
+ Optional[StrictStr],
1458
+ Field(
1459
+ 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. "
1460
+ ),
1461
+ ] = None,
1462
+ entrystore_host: Annotated[
1463
+ Optional[StrictStr],
1464
+ Field(
1465
+ 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. "
1466
+ ),
1467
+ ] = None,
1468
+ limit: Annotated[
1469
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1470
+ Field(description="Results per page"),
1471
+ ] = None,
1472
+ offset: Annotated[
1473
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
1474
+ Field(description="Results to skip before the first one returned"),
1475
+ ] = None,
1476
+ cursor: Annotated[
1477
+ Optional[Annotated[str, Field(strict=True, max_length=512)]],
1478
+ Field(
1479
+ 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. "
1480
+ ),
1481
+ ] = None,
1482
+ query: Annotated[
1483
+ Optional[Annotated[str, Field(strict=True, max_length=1000)]],
1484
+ Field(
1485
+ 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. "
1486
+ ),
1487
+ ] = None,
1488
+ sort: Annotated[
1489
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]],
1490
+ Field(
1491
+ 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. "
1492
+ ),
1493
+ ] = None,
1494
+ public: Annotated[
1495
+ Optional[StrictBool],
1496
+ Field(
1497
+ description="true: only publicly readable entries; false: only non-public entries"
1498
+ ),
1499
+ ] = None,
1500
+ created_after: Annotated[
1501
+ Optional[datetime], Field(description="Created at or after this instant")
1502
+ ] = None,
1503
+ created_before: Annotated[
1504
+ Optional[datetime], Field(description="Created before this instant")
1505
+ ] = None,
1506
+ modified_after: Annotated[
1507
+ Optional[datetime], Field(description="Modified at or after this instant")
1508
+ ] = None,
1509
+ modified_before: Annotated[
1510
+ Optional[datetime], Field(description="Modified before this instant")
1511
+ ] = None,
1512
+ _request_timeout: Union[
1513
+ None,
1514
+ Annotated[StrictFloat, Field(gt=0)],
1515
+ Tuple[
1516
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1517
+ ],
1518
+ ] = None,
1519
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1520
+ _content_type: Optional[StrictStr] = None,
1521
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1522
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1523
+ ) -> EntityListResponse:
1524
+ """List models
1525
+
1526
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Returns a paginated list of all EntryScape Models (application-profile contexts). A model is an EntryStore context (`esc:FormsContext`) that holds the classes, properties, forms, fields, namespaces, diagrams and specifications that make up an information model, so a model is addressed by its `context_id` alone. Authentication is optional. Without authentication, only publicly available models are returned. Authenticated requests may return additional non-public models. Answered from an asynchronously updated index: an entry created moments ago may be missing here while reading it by id already returns it.
1527
+
1528
+ :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.
1529
+ :type x_entrystore_host: str
1530
+ :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.
1531
+ :type entrystore_host: str
1532
+ :param limit: Results per page
1533
+ :type limit: int
1534
+ :param offset: Results to skip before the first one returned
1535
+ :type offset: int
1536
+ :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.
1537
+ :type cursor: str
1538
+ :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.
1539
+ :type query: str
1540
+ :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.
1541
+ :type sort: str
1542
+ :param public: true: only publicly readable entries; false: only non-public entries
1543
+ :type public: bool
1544
+ :param created_after: Created at or after this instant
1545
+ :type created_after: datetime
1546
+ :param created_before: Created before this instant
1547
+ :type created_before: datetime
1548
+ :param modified_after: Modified at or after this instant
1549
+ :type modified_after: datetime
1550
+ :param modified_before: Modified before this instant
1551
+ :type modified_before: datetime
1552
+ :param _request_timeout: timeout setting for this request. If one
1553
+ number provided, it will be total request
1554
+ timeout. It can also be a pair (tuple) of
1555
+ (connection, read) timeouts.
1556
+ :type _request_timeout: int, tuple(int, int), optional
1557
+ :param _request_auth: set to override the auth_settings for an a single
1558
+ request; this effectively ignores the
1559
+ authentication in the spec for a single request.
1560
+ :type _request_auth: dict, optional
1561
+ :param _content_type: force content-type for the request.
1562
+ :type _content_type: str, Optional
1563
+ :param _headers: set to override the headers for a single
1564
+ request; this effectively ignores the headers
1565
+ in the spec for a single request.
1566
+ :type _headers: dict, optional
1567
+ :param _host_index: set to override the host_index for a single
1568
+ request; this effectively ignores the host_index
1569
+ in the spec for a single request.
1570
+ :type _host_index: int, optional
1571
+ :return: Returns the result object.
1572
+ """ # noqa: E501
1573
+
1574
+ _param = self._list_models_serialize(
1575
+ x_entrystore_host=x_entrystore_host,
1576
+ entrystore_host=entrystore_host,
1577
+ limit=limit,
1578
+ offset=offset,
1579
+ cursor=cursor,
1580
+ query=query,
1581
+ sort=sort,
1582
+ public=public,
1583
+ created_after=created_after,
1584
+ created_before=created_before,
1585
+ modified_after=modified_after,
1586
+ modified_before=modified_before,
1587
+ _request_auth=_request_auth,
1588
+ _content_type=_content_type,
1589
+ _headers=_headers,
1590
+ _host_index=_host_index,
1591
+ )
1592
+
1593
+ _response_types_map: Dict[str, Optional[str]] = {
1594
+ "200": "EntityListResponse",
1595
+ "400": "Error",
1596
+ "401": "Error",
1597
+ "500": "Error",
1598
+ "503": "Error",
1599
+ }
1600
+ response_data = await self.api_client.call_api(
1601
+ *_param, _request_timeout=_request_timeout
1602
+ )
1603
+ await response_data.read()
1604
+ return self.api_client.response_deserialize(
1605
+ response_data=response_data,
1606
+ response_types_map=_response_types_map,
1607
+ ).data
1608
+
1609
+ @validate_call
1610
+ async def list_models_with_http_info(
1611
+ self,
1612
+ x_entrystore_host: Annotated[
1613
+ Optional[StrictStr],
1614
+ Field(
1615
+ 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. "
1616
+ ),
1617
+ ] = None,
1618
+ entrystore_host: Annotated[
1619
+ Optional[StrictStr],
1620
+ Field(
1621
+ 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. "
1622
+ ),
1623
+ ] = None,
1624
+ limit: Annotated[
1625
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1626
+ Field(description="Results per page"),
1627
+ ] = None,
1628
+ offset: Annotated[
1629
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
1630
+ Field(description="Results to skip before the first one returned"),
1631
+ ] = None,
1632
+ cursor: Annotated[
1633
+ Optional[Annotated[str, Field(strict=True, max_length=512)]],
1634
+ Field(
1635
+ 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. "
1636
+ ),
1637
+ ] = None,
1638
+ query: Annotated[
1639
+ Optional[Annotated[str, Field(strict=True, max_length=1000)]],
1640
+ Field(
1641
+ 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. "
1642
+ ),
1643
+ ] = None,
1644
+ sort: Annotated[
1645
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]],
1646
+ Field(
1647
+ 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. "
1648
+ ),
1649
+ ] = None,
1650
+ public: Annotated[
1651
+ Optional[StrictBool],
1652
+ Field(
1653
+ description="true: only publicly readable entries; false: only non-public entries"
1654
+ ),
1655
+ ] = None,
1656
+ created_after: Annotated[
1657
+ Optional[datetime], Field(description="Created at or after this instant")
1658
+ ] = None,
1659
+ created_before: Annotated[
1660
+ Optional[datetime], Field(description="Created before this instant")
1661
+ ] = None,
1662
+ modified_after: Annotated[
1663
+ Optional[datetime], Field(description="Modified at or after this instant")
1664
+ ] = None,
1665
+ modified_before: Annotated[
1666
+ Optional[datetime], Field(description="Modified before this instant")
1667
+ ] = None,
1668
+ _request_timeout: Union[
1669
+ None,
1670
+ Annotated[StrictFloat, Field(gt=0)],
1671
+ Tuple[
1672
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1673
+ ],
1674
+ ] = None,
1675
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1676
+ _content_type: Optional[StrictStr] = None,
1677
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1678
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1679
+ ) -> ApiResponse[EntityListResponse]:
1680
+ """List models
1681
+
1682
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Returns a paginated list of all EntryScape Models (application-profile contexts). A model is an EntryStore context (`esc:FormsContext`) that holds the classes, properties, forms, fields, namespaces, diagrams and specifications that make up an information model, so a model is addressed by its `context_id` alone. Authentication is optional. Without authentication, only publicly available models are returned. Authenticated requests may return additional non-public models. Answered from an asynchronously updated index: an entry created moments ago may be missing here while reading it by id already returns it.
1683
+
1684
+ :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.
1685
+ :type x_entrystore_host: str
1686
+ :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.
1687
+ :type entrystore_host: str
1688
+ :param limit: Results per page
1689
+ :type limit: int
1690
+ :param offset: Results to skip before the first one returned
1691
+ :type offset: int
1692
+ :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.
1693
+ :type cursor: str
1694
+ :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.
1695
+ :type query: str
1696
+ :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.
1697
+ :type sort: str
1698
+ :param public: true: only publicly readable entries; false: only non-public entries
1699
+ :type public: bool
1700
+ :param created_after: Created at or after this instant
1701
+ :type created_after: datetime
1702
+ :param created_before: Created before this instant
1703
+ :type created_before: datetime
1704
+ :param modified_after: Modified at or after this instant
1705
+ :type modified_after: datetime
1706
+ :param modified_before: Modified before this instant
1707
+ :type modified_before: datetime
1708
+ :param _request_timeout: timeout setting for this request. If one
1709
+ number provided, it will be total request
1710
+ timeout. It can also be a pair (tuple) of
1711
+ (connection, read) timeouts.
1712
+ :type _request_timeout: int, tuple(int, int), optional
1713
+ :param _request_auth: set to override the auth_settings for an a single
1714
+ request; this effectively ignores the
1715
+ authentication in the spec for a single request.
1716
+ :type _request_auth: dict, optional
1717
+ :param _content_type: force content-type for the request.
1718
+ :type _content_type: str, Optional
1719
+ :param _headers: set to override the headers for a single
1720
+ request; this effectively ignores the headers
1721
+ in the spec for a single request.
1722
+ :type _headers: dict, optional
1723
+ :param _host_index: set to override the host_index for a single
1724
+ request; this effectively ignores the host_index
1725
+ in the spec for a single request.
1726
+ :type _host_index: int, optional
1727
+ :return: Returns the result object.
1728
+ """ # noqa: E501
1729
+
1730
+ _param = self._list_models_serialize(
1731
+ x_entrystore_host=x_entrystore_host,
1732
+ entrystore_host=entrystore_host,
1733
+ limit=limit,
1734
+ offset=offset,
1735
+ cursor=cursor,
1736
+ query=query,
1737
+ sort=sort,
1738
+ public=public,
1739
+ created_after=created_after,
1740
+ created_before=created_before,
1741
+ modified_after=modified_after,
1742
+ modified_before=modified_before,
1743
+ _request_auth=_request_auth,
1744
+ _content_type=_content_type,
1745
+ _headers=_headers,
1746
+ _host_index=_host_index,
1747
+ )
1748
+
1749
+ _response_types_map: Dict[str, Optional[str]] = {
1750
+ "200": "EntityListResponse",
1751
+ "400": "Error",
1752
+ "401": "Error",
1753
+ "500": "Error",
1754
+ "503": "Error",
1755
+ }
1756
+ response_data = await self.api_client.call_api(
1757
+ *_param, _request_timeout=_request_timeout
1758
+ )
1759
+ await response_data.read()
1760
+ return self.api_client.response_deserialize(
1761
+ response_data=response_data,
1762
+ response_types_map=_response_types_map,
1763
+ )
1764
+
1765
+ @validate_call
1766
+ async def list_models_without_preload_content(
1767
+ self,
1768
+ x_entrystore_host: Annotated[
1769
+ Optional[StrictStr],
1770
+ Field(
1771
+ 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. "
1772
+ ),
1773
+ ] = None,
1774
+ entrystore_host: Annotated[
1775
+ Optional[StrictStr],
1776
+ Field(
1777
+ 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. "
1778
+ ),
1779
+ ] = None,
1780
+ limit: Annotated[
1781
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1782
+ Field(description="Results per page"),
1783
+ ] = None,
1784
+ offset: Annotated[
1785
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
1786
+ Field(description="Results to skip before the first one returned"),
1787
+ ] = None,
1788
+ cursor: Annotated[
1789
+ Optional[Annotated[str, Field(strict=True, max_length=512)]],
1790
+ Field(
1791
+ 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. "
1792
+ ),
1793
+ ] = None,
1794
+ query: Annotated[
1795
+ Optional[Annotated[str, Field(strict=True, max_length=1000)]],
1796
+ Field(
1797
+ 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. "
1798
+ ),
1799
+ ] = None,
1800
+ sort: Annotated[
1801
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]],
1802
+ Field(
1803
+ 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. "
1804
+ ),
1805
+ ] = None,
1806
+ public: Annotated[
1807
+ Optional[StrictBool],
1808
+ Field(
1809
+ description="true: only publicly readable entries; false: only non-public entries"
1810
+ ),
1811
+ ] = None,
1812
+ created_after: Annotated[
1813
+ Optional[datetime], Field(description="Created at or after this instant")
1814
+ ] = None,
1815
+ created_before: Annotated[
1816
+ Optional[datetime], Field(description="Created before this instant")
1817
+ ] = None,
1818
+ modified_after: Annotated[
1819
+ Optional[datetime], Field(description="Modified at or after this instant")
1820
+ ] = None,
1821
+ modified_before: Annotated[
1822
+ Optional[datetime], Field(description="Modified before this instant")
1823
+ ] = None,
1824
+ _request_timeout: Union[
1825
+ None,
1826
+ Annotated[StrictFloat, Field(gt=0)],
1827
+ Tuple[
1828
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1829
+ ],
1830
+ ] = None,
1831
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1832
+ _content_type: Optional[StrictStr] = None,
1833
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1834
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1835
+ ) -> RESTResponseType:
1836
+ """List models
1837
+
1838
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Returns a paginated list of all EntryScape Models (application-profile contexts). A model is an EntryStore context (`esc:FormsContext`) that holds the classes, properties, forms, fields, namespaces, diagrams and specifications that make up an information model, so a model is addressed by its `context_id` alone. Authentication is optional. Without authentication, only publicly available models are returned. Authenticated requests may return additional non-public models. Answered from an asynchronously updated index: an entry created moments ago may be missing here while reading it by id already returns it.
1839
+
1840
+ :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.
1841
+ :type x_entrystore_host: str
1842
+ :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.
1843
+ :type entrystore_host: str
1844
+ :param limit: Results per page
1845
+ :type limit: int
1846
+ :param offset: Results to skip before the first one returned
1847
+ :type offset: int
1848
+ :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.
1849
+ :type cursor: str
1850
+ :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.
1851
+ :type query: str
1852
+ :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.
1853
+ :type sort: str
1854
+ :param public: true: only publicly readable entries; false: only non-public entries
1855
+ :type public: bool
1856
+ :param created_after: Created at or after this instant
1857
+ :type created_after: datetime
1858
+ :param created_before: Created before this instant
1859
+ :type created_before: datetime
1860
+ :param modified_after: Modified at or after this instant
1861
+ :type modified_after: datetime
1862
+ :param modified_before: Modified before this instant
1863
+ :type modified_before: datetime
1864
+ :param _request_timeout: timeout setting for this request. If one
1865
+ number provided, it will be total request
1866
+ timeout. It can also be a pair (tuple) of
1867
+ (connection, read) timeouts.
1868
+ :type _request_timeout: int, tuple(int, int), optional
1869
+ :param _request_auth: set to override the auth_settings for an a single
1870
+ request; this effectively ignores the
1871
+ authentication in the spec for a single request.
1872
+ :type _request_auth: dict, optional
1873
+ :param _content_type: force content-type for the request.
1874
+ :type _content_type: str, Optional
1875
+ :param _headers: set to override the headers for a single
1876
+ request; this effectively ignores the headers
1877
+ in the spec for a single request.
1878
+ :type _headers: dict, optional
1879
+ :param _host_index: set to override the host_index for a single
1880
+ request; this effectively ignores the host_index
1881
+ in the spec for a single request.
1882
+ :type _host_index: int, optional
1883
+ :return: Returns the result object.
1884
+ """ # noqa: E501
1885
+
1886
+ _param = self._list_models_serialize(
1887
+ x_entrystore_host=x_entrystore_host,
1888
+ entrystore_host=entrystore_host,
1889
+ limit=limit,
1890
+ offset=offset,
1891
+ cursor=cursor,
1892
+ query=query,
1893
+ sort=sort,
1894
+ public=public,
1895
+ created_after=created_after,
1896
+ created_before=created_before,
1897
+ modified_after=modified_after,
1898
+ modified_before=modified_before,
1899
+ _request_auth=_request_auth,
1900
+ _content_type=_content_type,
1901
+ _headers=_headers,
1902
+ _host_index=_host_index,
1903
+ )
1904
+
1905
+ _response_types_map: Dict[str, Optional[str]] = {
1906
+ "200": "EntityListResponse",
1907
+ "400": "Error",
1908
+ "401": "Error",
1909
+ "500": "Error",
1910
+ "503": "Error",
1911
+ }
1912
+ response_data = await self.api_client.call_api(
1913
+ *_param, _request_timeout=_request_timeout
1914
+ )
1915
+ return response_data.response
1916
+
1917
+ def _list_models_serialize(
1918
+ self,
1919
+ x_entrystore_host,
1920
+ entrystore_host,
1921
+ limit,
1922
+ offset,
1923
+ cursor,
1924
+ query,
1925
+ sort,
1926
+ public,
1927
+ created_after,
1928
+ created_before,
1929
+ modified_after,
1930
+ modified_before,
1931
+ _request_auth,
1932
+ _content_type,
1933
+ _headers,
1934
+ _host_index,
1935
+ ) -> RequestSerialized:
1936
+
1937
+ _host = None
1938
+
1939
+ _collection_formats: Dict[str, str] = {}
1940
+
1941
+ _path_params: Dict[str, str] = {}
1942
+ _query_params: List[Tuple[str, str]] = []
1943
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1944
+ _form_params: List[Tuple[str, str]] = []
1945
+ _files: Dict[
1946
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1947
+ ] = {}
1948
+ _body_params: Optional[bytes] = None
1949
+
1950
+ # process the path parameters
1951
+ # process the query parameters
1952
+ if entrystore_host is not None:
1953
+
1954
+ _query_params.append(("entrystore_host", entrystore_host))
1955
+
1956
+ if limit is not None:
1957
+
1958
+ _query_params.append(("limit", limit))
1959
+
1960
+ if offset is not None:
1961
+
1962
+ _query_params.append(("offset", offset))
1963
+
1964
+ if cursor is not None:
1965
+
1966
+ _query_params.append(("cursor", cursor))
1967
+
1968
+ if query is not None:
1969
+
1970
+ _query_params.append(("query", query))
1971
+
1972
+ if sort is not None:
1973
+
1974
+ _query_params.append(("sort", sort))
1975
+
1976
+ if public is not None:
1977
+
1978
+ _query_params.append(("public", public))
1979
+
1980
+ if created_after is not None:
1981
+ if isinstance(created_after, datetime):
1982
+ _query_params.append(
1983
+ (
1984
+ "created_after",
1985
+ created_after.strftime(
1986
+ self.api_client.configuration.datetime_format
1987
+ ),
1988
+ )
1989
+ )
1990
+ else:
1991
+ _query_params.append(("created_after", created_after))
1992
+
1993
+ if created_before is not None:
1994
+ if isinstance(created_before, datetime):
1995
+ _query_params.append(
1996
+ (
1997
+ "created_before",
1998
+ created_before.strftime(
1999
+ self.api_client.configuration.datetime_format
2000
+ ),
2001
+ )
2002
+ )
2003
+ else:
2004
+ _query_params.append(("created_before", created_before))
2005
+
2006
+ if modified_after is not None:
2007
+ if isinstance(modified_after, datetime):
2008
+ _query_params.append(
2009
+ (
2010
+ "modified_after",
2011
+ modified_after.strftime(
2012
+ self.api_client.configuration.datetime_format
2013
+ ),
2014
+ )
2015
+ )
2016
+ else:
2017
+ _query_params.append(("modified_after", modified_after))
2018
+
2019
+ if modified_before is not None:
2020
+ if isinstance(modified_before, datetime):
2021
+ _query_params.append(
2022
+ (
2023
+ "modified_before",
2024
+ modified_before.strftime(
2025
+ self.api_client.configuration.datetime_format
2026
+ ),
2027
+ )
2028
+ )
2029
+ else:
2030
+ _query_params.append(("modified_before", modified_before))
2031
+
2032
+ # process the header parameters
2033
+ if x_entrystore_host is not None:
2034
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
2035
+ # process the form parameters
2036
+ # process the body parameter
2037
+
2038
+ # set the HTTP header `Accept`
2039
+ if "Accept" not in _header_params:
2040
+ _header_params["Accept"] = self.api_client.select_header_accept(
2041
+ ["application/json"]
2042
+ )
2043
+
2044
+ # authentication setting
2045
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
2046
+
2047
+ return self.api_client.param_serialize(
2048
+ method="GET",
2049
+ resource_path="/model",
2050
+ path_params=_path_params,
2051
+ query_params=_query_params,
2052
+ header_params=_header_params,
2053
+ body=_body_params,
2054
+ post_params=_form_params,
2055
+ files=_files,
2056
+ auth_settings=_auth_settings,
2057
+ collection_formats=_collection_formats,
2058
+ _host=_host,
2059
+ _request_auth=_request_auth,
2060
+ )
2061
+
2062
+ @validate_call
2063
+ async def update_model_metadata(
2064
+ self,
2065
+ context_id: Annotated[
2066
+ str,
2067
+ Field(
2068
+ strict=True,
2069
+ description="The context (catalog) identifier in EntryStore",
2070
+ ),
2071
+ ],
2072
+ metadata_request: Annotated[
2073
+ MetadataRequest,
2074
+ Field(
2075
+ description="Metadata that replaces the model context's current metadata. With Content-Type application/ld+json the 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. "
2076
+ ),
2077
+ ],
2078
+ x_entrystore_host: Annotated[
2079
+ Optional[StrictStr],
2080
+ Field(
2081
+ 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. "
2082
+ ),
2083
+ ] = None,
2084
+ entrystore_host: Annotated[
2085
+ Optional[StrictStr],
2086
+ Field(
2087
+ 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. "
2088
+ ),
2089
+ ] = None,
2090
+ _request_timeout: Union[
2091
+ None,
2092
+ Annotated[StrictFloat, Field(gt=0)],
2093
+ Tuple[
2094
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2095
+ ],
2096
+ ] = None,
2097
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2098
+ _content_type: Optional[StrictStr] = None,
2099
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2100
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2101
+ ) -> Dict[str, object]:
2102
+ """Update model metadata
2103
+
2104
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Replaces the descriptive metadata for a specific model (the EntryStore context's metadata). 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 model's context.
2105
+
2106
+ :param context_id: The context (catalog) identifier in EntryStore (required)
2107
+ :type context_id: str
2108
+ :param metadata_request: Metadata that replaces the model context's current metadata. With Content-Type application/ld+json the 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. (required)
2109
+ :type metadata_request: MetadataRequest
2110
+ :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.
2111
+ :type x_entrystore_host: str
2112
+ :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.
2113
+ :type entrystore_host: str
2114
+ :param _request_timeout: timeout setting for this request. If one
2115
+ number provided, it will be total request
2116
+ timeout. It can also be a pair (tuple) of
2117
+ (connection, read) timeouts.
2118
+ :type _request_timeout: int, tuple(int, int), optional
2119
+ :param _request_auth: set to override the auth_settings for an a single
2120
+ request; this effectively ignores the
2121
+ authentication in the spec for a single request.
2122
+ :type _request_auth: dict, optional
2123
+ :param _content_type: force content-type for the request.
2124
+ :type _content_type: str, Optional
2125
+ :param _headers: set to override the headers for a single
2126
+ request; this effectively ignores the headers
2127
+ in the spec for a single request.
2128
+ :type _headers: dict, optional
2129
+ :param _host_index: set to override the host_index for a single
2130
+ request; this effectively ignores the host_index
2131
+ in the spec for a single request.
2132
+ :type _host_index: int, optional
2133
+ :return: Returns the result object.
2134
+ """ # noqa: E501
2135
+
2136
+ _param = self._update_model_metadata_serialize(
2137
+ context_id=context_id,
2138
+ metadata_request=metadata_request,
2139
+ x_entrystore_host=x_entrystore_host,
2140
+ entrystore_host=entrystore_host,
2141
+ _request_auth=_request_auth,
2142
+ _content_type=_content_type,
2143
+ _headers=_headers,
2144
+ _host_index=_host_index,
2145
+ )
2146
+
2147
+ _response_types_map: Dict[str, Optional[str]] = {
2148
+ "200": "Dict[str, object]",
2149
+ "400": "Error",
2150
+ "401": "Error",
2151
+ "403": "Error",
2152
+ "404": "Error",
2153
+ "409": "Error",
2154
+ "422": "ValidationResponse",
2155
+ "500": "Error",
2156
+ "503": "Error",
2157
+ }
2158
+ response_data = await self.api_client.call_api(
2159
+ *_param, _request_timeout=_request_timeout
2160
+ )
2161
+ await response_data.read()
2162
+ return self.api_client.response_deserialize(
2163
+ response_data=response_data,
2164
+ response_types_map=_response_types_map,
2165
+ ).data
2166
+
2167
+ @validate_call
2168
+ async def update_model_metadata_with_http_info(
2169
+ self,
2170
+ context_id: Annotated[
2171
+ str,
2172
+ Field(
2173
+ strict=True,
2174
+ description="The context (catalog) identifier in EntryStore",
2175
+ ),
2176
+ ],
2177
+ metadata_request: Annotated[
2178
+ MetadataRequest,
2179
+ Field(
2180
+ description="Metadata that replaces the model context's current metadata. With Content-Type application/ld+json the 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. "
2181
+ ),
2182
+ ],
2183
+ x_entrystore_host: Annotated[
2184
+ Optional[StrictStr],
2185
+ Field(
2186
+ 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. "
2187
+ ),
2188
+ ] = None,
2189
+ entrystore_host: Annotated[
2190
+ Optional[StrictStr],
2191
+ Field(
2192
+ 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. "
2193
+ ),
2194
+ ] = None,
2195
+ _request_timeout: Union[
2196
+ None,
2197
+ Annotated[StrictFloat, Field(gt=0)],
2198
+ Tuple[
2199
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2200
+ ],
2201
+ ] = None,
2202
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2203
+ _content_type: Optional[StrictStr] = None,
2204
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2205
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2206
+ ) -> ApiResponse[Dict[str, object]]:
2207
+ """Update model metadata
2208
+
2209
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Replaces the descriptive metadata for a specific model (the EntryStore context's metadata). 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 model's context.
2210
+
2211
+ :param context_id: The context (catalog) identifier in EntryStore (required)
2212
+ :type context_id: str
2213
+ :param metadata_request: Metadata that replaces the model context's current metadata. With Content-Type application/ld+json the 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. (required)
2214
+ :type metadata_request: MetadataRequest
2215
+ :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.
2216
+ :type x_entrystore_host: str
2217
+ :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.
2218
+ :type entrystore_host: str
2219
+ :param _request_timeout: timeout setting for this request. If one
2220
+ number provided, it will be total request
2221
+ timeout. It can also be a pair (tuple) of
2222
+ (connection, read) timeouts.
2223
+ :type _request_timeout: int, tuple(int, int), optional
2224
+ :param _request_auth: set to override the auth_settings for an a single
2225
+ request; this effectively ignores the
2226
+ authentication in the spec for a single request.
2227
+ :type _request_auth: dict, optional
2228
+ :param _content_type: force content-type for the request.
2229
+ :type _content_type: str, Optional
2230
+ :param _headers: set to override the headers for a single
2231
+ request; this effectively ignores the headers
2232
+ in the spec for a single request.
2233
+ :type _headers: dict, optional
2234
+ :param _host_index: set to override the host_index for a single
2235
+ request; this effectively ignores the host_index
2236
+ in the spec for a single request.
2237
+ :type _host_index: int, optional
2238
+ :return: Returns the result object.
2239
+ """ # noqa: E501
2240
+
2241
+ _param = self._update_model_metadata_serialize(
2242
+ context_id=context_id,
2243
+ metadata_request=metadata_request,
2244
+ x_entrystore_host=x_entrystore_host,
2245
+ entrystore_host=entrystore_host,
2246
+ _request_auth=_request_auth,
2247
+ _content_type=_content_type,
2248
+ _headers=_headers,
2249
+ _host_index=_host_index,
2250
+ )
2251
+
2252
+ _response_types_map: Dict[str, Optional[str]] = {
2253
+ "200": "Dict[str, object]",
2254
+ "400": "Error",
2255
+ "401": "Error",
2256
+ "403": "Error",
2257
+ "404": "Error",
2258
+ "409": "Error",
2259
+ "422": "ValidationResponse",
2260
+ "500": "Error",
2261
+ "503": "Error",
2262
+ }
2263
+ response_data = await self.api_client.call_api(
2264
+ *_param, _request_timeout=_request_timeout
2265
+ )
2266
+ await response_data.read()
2267
+ return self.api_client.response_deserialize(
2268
+ response_data=response_data,
2269
+ response_types_map=_response_types_map,
2270
+ )
2271
+
2272
+ @validate_call
2273
+ async def update_model_metadata_without_preload_content(
2274
+ self,
2275
+ context_id: Annotated[
2276
+ str,
2277
+ Field(
2278
+ strict=True,
2279
+ description="The context (catalog) identifier in EntryStore",
2280
+ ),
2281
+ ],
2282
+ metadata_request: Annotated[
2283
+ MetadataRequest,
2284
+ Field(
2285
+ description="Metadata that replaces the model context's current metadata. With Content-Type application/ld+json the 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. "
2286
+ ),
2287
+ ],
2288
+ x_entrystore_host: Annotated[
2289
+ Optional[StrictStr],
2290
+ Field(
2291
+ 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. "
2292
+ ),
2293
+ ] = None,
2294
+ entrystore_host: Annotated[
2295
+ Optional[StrictStr],
2296
+ Field(
2297
+ 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. "
2298
+ ),
2299
+ ] = None,
2300
+ _request_timeout: Union[
2301
+ None,
2302
+ Annotated[StrictFloat, Field(gt=0)],
2303
+ Tuple[
2304
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2305
+ ],
2306
+ ] = None,
2307
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2308
+ _content_type: Optional[StrictStr] = None,
2309
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2310
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2311
+ ) -> RESTResponseType:
2312
+ """Update model metadata
2313
+
2314
+ **Alpha:** part of the Models API. Paths and shapes may change, or this operation may be withdrawn, in any release — no deprecation period. Replaces the descriptive metadata for a specific model (the EntryStore context's metadata). 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 model's context.
2315
+
2316
+ :param context_id: The context (catalog) identifier in EntryStore (required)
2317
+ :type context_id: str
2318
+ :param metadata_request: Metadata that replaces the model context's current metadata. With Content-Type application/ld+json the 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. (required)
2319
+ :type metadata_request: MetadataRequest
2320
+ :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.
2321
+ :type x_entrystore_host: str
2322
+ :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.
2323
+ :type entrystore_host: str
2324
+ :param _request_timeout: timeout setting for this request. If one
2325
+ number provided, it will be total request
2326
+ timeout. It can also be a pair (tuple) of
2327
+ (connection, read) timeouts.
2328
+ :type _request_timeout: int, tuple(int, int), optional
2329
+ :param _request_auth: set to override the auth_settings for an a single
2330
+ request; this effectively ignores the
2331
+ authentication in the spec for a single request.
2332
+ :type _request_auth: dict, optional
2333
+ :param _content_type: force content-type for the request.
2334
+ :type _content_type: str, Optional
2335
+ :param _headers: set to override the headers for a single
2336
+ request; this effectively ignores the headers
2337
+ in the spec for a single request.
2338
+ :type _headers: dict, optional
2339
+ :param _host_index: set to override the host_index for a single
2340
+ request; this effectively ignores the host_index
2341
+ in the spec for a single request.
2342
+ :type _host_index: int, optional
2343
+ :return: Returns the result object.
2344
+ """ # noqa: E501
2345
+
2346
+ _param = self._update_model_metadata_serialize(
2347
+ context_id=context_id,
2348
+ metadata_request=metadata_request,
2349
+ x_entrystore_host=x_entrystore_host,
2350
+ entrystore_host=entrystore_host,
2351
+ _request_auth=_request_auth,
2352
+ _content_type=_content_type,
2353
+ _headers=_headers,
2354
+ _host_index=_host_index,
2355
+ )
2356
+
2357
+ _response_types_map: Dict[str, Optional[str]] = {
2358
+ "200": "Dict[str, object]",
2359
+ "400": "Error",
2360
+ "401": "Error",
2361
+ "403": "Error",
2362
+ "404": "Error",
2363
+ "409": "Error",
2364
+ "422": "ValidationResponse",
2365
+ "500": "Error",
2366
+ "503": "Error",
2367
+ }
2368
+ response_data = await self.api_client.call_api(
2369
+ *_param, _request_timeout=_request_timeout
2370
+ )
2371
+ return response_data.response
2372
+
2373
+ def _update_model_metadata_serialize(
2374
+ self,
2375
+ context_id,
2376
+ metadata_request,
2377
+ x_entrystore_host,
2378
+ entrystore_host,
2379
+ _request_auth,
2380
+ _content_type,
2381
+ _headers,
2382
+ _host_index,
2383
+ ) -> RequestSerialized:
2384
+
2385
+ _host = None
2386
+
2387
+ _collection_formats: Dict[str, str] = {}
2388
+
2389
+ _path_params: Dict[str, str] = {}
2390
+ _query_params: List[Tuple[str, str]] = []
2391
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2392
+ _form_params: List[Tuple[str, str]] = []
2393
+ _files: Dict[
2394
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2395
+ ] = {}
2396
+ _body_params: Optional[bytes] = None
2397
+
2398
+ # process the path parameters
2399
+ if context_id is not None:
2400
+ _path_params["context_id"] = context_id
2401
+ # process the query parameters
2402
+ if entrystore_host is not None:
2403
+
2404
+ _query_params.append(("entrystore_host", entrystore_host))
2405
+
2406
+ # process the header parameters
2407
+ if x_entrystore_host is not None:
2408
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
2409
+ # process the form parameters
2410
+ # process the body parameter
2411
+ if metadata_request is not None:
2412
+ _body_params = metadata_request
2413
+
2414
+ # set the HTTP header `Accept`
2415
+ if "Accept" not in _header_params:
2416
+ _header_params["Accept"] = self.api_client.select_header_accept(
2417
+ ["application/ld+json", "application/json"]
2418
+ )
2419
+
2420
+ # set the HTTP header `Content-Type`
2421
+ if _content_type:
2422
+ _header_params["Content-Type"] = _content_type
2423
+ else:
2424
+ _default_content_type = self.api_client.select_header_content_type(
2425
+ ["application/ld+json"]
2426
+ )
2427
+ if _default_content_type is not None:
2428
+ _header_params["Content-Type"] = _default_content_type
2429
+
2430
+ # authentication setting
2431
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
2432
+
2433
+ return self.api_client.param_serialize(
2434
+ method="PUT",
2435
+ resource_path="/model/{context_id}/metadata",
2436
+ path_params=_path_params,
2437
+ query_params=_query_params,
2438
+ header_params=_header_params,
2439
+ body=_body_params,
2440
+ post_params=_form_params,
2441
+ files=_files,
2442
+ auth_settings=_auth_settings,
2443
+ collection_formats=_collection_formats,
2444
+ _host=_host,
2445
+ _request_auth=_request_auth,
2446
+ )