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