AAS HTTP Client Documentation
Loading...
Searching...
No Matches
shell_implementation.py
Go to the documentation of this file.
1"""Implementation of Asset Administration Shell related API calls."""
2
3import json
4import logging
5import mimetypes
6from pathlib import Path
7from typing import TYPE_CHECKING, Any
8
9import requests
10from pydantic import BaseModel
11
12if TYPE_CHECKING:
13 from aas_http_client.classes.client.aas_client import AasHttpClient
14
15from aas_http_client.utilities.constants import LogIntensity
16from aas_http_client.utilities.encoder import encode_base_64
18 STATUS_CODE_200,
19 STATUS_CODE_201,
20 STATUS_CODE_204,
21 STATUS_CODE_404,
22 log_response,
23)
24
25_logger = logging.getLogger(__name__)
26
27
28class ShellRepoImplementation(BaseModel):
29 """Implementation of Asset Administration Shell related API calls."""
30
31 def __init__(self, client: "AasHttpClient"):
32 """Initializes the ShellImplementation with the given parameters."""
33 self._client = client
34
35 session = client.get_session()
36 if session is None:
37 raise ValueError(
38 "HTTP session is not initialized in the client. Call 'initialize()' method of the client before creating ShellRepoImplementation instance."
39 )
40
41 self._session: requests.Session = session
42
43 # GET /shells/{aasIdentifier}
44 def get_asset_administration_shell_by_id(self, aas_identifier: str) -> dict | None:
45 """Returns a specific Asset Administration Shell.
46
47 :param aas_identifier: The Asset Administration Shells unique id
48 :return: Asset Administration Shells data or None if an error occurred
49 """
50 if not self._client.encoded_ids:
51 aas_identifier = encode_base_64(aas_identifier)
53 url = f"{self._client.base_url}/shells/{aas_identifier}"
54
55 self._client.set_token()
56
57 try:
58 response = self._session.get(url, timeout=self._client.time_out)
59 _logger.debug(f"Call REST API url '{response.url}'")
60
61 if response.status_code == STATUS_CODE_404:
62 if self._client.get_log_intensity() == LogIntensity.HIGH:
63 _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
64 elif self._client.get_log_intensity() == LogIntensity.STANDARD:
65 _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
66
67 _logger.debug(response.text)
68 return None
69
70 if response.status_code != STATUS_CODE_200:
71 log_response(response)
72 return None
73
74 except requests.exceptions.RequestException as e:
75 _logger.error(f"Error call REST API: {e}")
76 return None
77
78 content = response.content.decode("utf-8")
79 return json.loads(content)
80
81 # PUT /shells/{aasIdentifier}
82 def put_asset_administration_shell_by_id(self, aas_identifier: str, request_body: dict) -> bool:
83 """Creates or replaces an existing Asset Administration Shell.
84
85 :param aas_identifier: The Asset Administration Shells unique id
86 :param request_body: Json data of the Asset Administration Shell data to put
87 :return: True if the update was successful, False otherwise
88 """
89 if not self._client.encoded_ids:
90 aas_identifier = encode_base_64(aas_identifier)
92 url = f"{self._client.base_url}/shells/{aas_identifier}"
93
94 self._client.set_token()
95
96 try:
97 response = self._session.put(url, json=request_body, timeout=self._client.time_out)
98 _logger.debug(f"Call REST API url '{response.url}'")
99
100 if response.status_code == STATUS_CODE_404: #
101 if self._client.get_log_intensity() == LogIntensity.HIGH:
102 _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
103 elif self._client.get_log_intensity() == LogIntensity.STANDARD:
104 _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
105
106 _logger.debug(response.text)
107 return False
108
109 if response.status_code != STATUS_CODE_204:
110 log_response(response)
111 return False
112
113 except requests.exceptions.RequestException as e:
114 _logger.error(f"Error call REST API: {e}")
115 return False
116
117 return True
118
119 # DELETE /shells/{aasIdentifier}
120 def delete_asset_administration_shell_by_id(self, aas_identifier: str) -> bool:
121 """Deletes an Asset Administration Shell.
122
123 :param aas_identifier: The Asset Administration Shells unique id
124 :return: True if the deletion was successful, False otherwise
125 """
126 if not self._client.encoded_ids:
127 aas_identifier = encode_base_64(aas_identifier)
129 url = f"{self._client.base_url}/shells/{aas_identifier}"
130
131 self._client.set_token()
132
133 try:
134 response = self._session.delete(url, timeout=self._client.time_out)
135 _logger.debug(f"Call REST API url '{response.url}'")
136
137 if response.status_code == STATUS_CODE_404:
138 if self._client.get_log_intensity() == LogIntensity.HIGH:
139 _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
140 elif self._client.get_log_intensity() == LogIntensity.STANDARD:
141 _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
142
143 _logger.debug(response.text)
144 return False
145
146 if response.status_code != STATUS_CODE_204:
147 log_response(response)
148 return False
149
150 except requests.exceptions.RequestException as e:
151 _logger.error(f"Error call REST API: {e}")
152 return False
153
154 return True
155
156 # GET /shells/{aasIdentifier}/asset-information/thumbnail
157 def get_thumbnail_aas_repository(self, aas_identifier: str) -> bytes | None:
158 """Returns the thumbnail of the Asset Administration Shell.
159
160 :param aas_identifier: The Asset Administration Shells unique id
161 :return: Thumbnail file data as bytes (octet-stream) or None if an error occurred
162 """
163 if not self._client.encoded_ids:
164 aas_identifier = encode_base_64(aas_identifier)
166 url = f"{self._client.base_url}/shells/{aas_identifier}/asset-information/thumbnail"
167
168 self._client.set_token()
169
170 try:
171 response = self._session.get(url, timeout=self._client.time_out)
172 _logger.debug(f"Call REST API url '{response.url}'")
173
174 if response.status_code == STATUS_CODE_404:
175 if self._client.get_log_intensity() == LogIntensity.HIGH:
176 _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' or thumbnail file not found.")
177 elif self._client.get_log_intensity() == LogIntensity.STANDARD:
178 _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or thumbnail file not found.")
179
180 _logger.debug(response.text)
181 return None
182
183 if response.status_code != STATUS_CODE_200:
184 log_response(response)
185 return None
186
187 except requests.exceptions.RequestException as e:
188 _logger.error(f"Error call REST API: {e}")
189 return None
190
191 return response.content
192
193 def put_thumbnail_aas_repository(self, aas_identifier: str, file_name: str, file: Path) -> bool:
194 """Creates or updates the thumbnail of the Asset Administration Shell.
195
196 :param aas_identifier: The Asset Administration Shells unique id
197 :param file_name: The name of the thumbnail file
198 :param file: Path to the thumbnail file to upload as attachment
199 :return: True if the update was successful, False otherwise
200 """
201 if file.exists() is False or not file.is_file():
202 _logger.error(f"Attachment file '{file}' does not exist.")
203 return False
204
205 mime_type, _ = mimetypes.guess_type(file)
206
207 with file.open("rb") as f:
208 file_octet_stream = f.read()
209
210 return self.put_thumbnail_aas_repository_stream(aas_identifier, file_name, file_octet_stream, mime_type or "application/octet-stream")
211
212 # PUT /shells/{aasIdentifier}/asset-information/thumbnail
214 self, aas_identifier: str, file_name: str, file_octet_stream: Any, mime_type: str = "application/octet-stream"
215 ) -> bool:
216 """Creates or updates the thumbnail of the Asset Administration Shell.
217
218 :param aas_identifier: The Asset Administration Shells unique id
219 :param file_name: The name of the thumbnail file
220 :param file_octet_stream: The octet stream of the thumbnail file
221 :param mime_type: The MIME type of the thumbnail file (e.g., "image/png")
222 :return: True if the update was successful, False otherwise
223 """
224 if file_name is None or file_name == "" or file_octet_stream is None or mime_type is None or mime_type == "":
225 _logger.error(f"Attachment file '{file_name}' does not exist.")
226 return False
227
228 if not self._client.encoded_ids:
229 aas_identifier = encode_base_64(aas_identifier)
230
231 url = f"{self._client.base_url}/shells/{aas_identifier}/asset-information/thumbnail"
232
233 params = {"fileName": file_name}
234
235 self._client.set_token()
236
237 try:
238 files: dict[str, tuple[str, Any, str]] = {"file": (file_name, file_octet_stream, mime_type)}
239 response = self._session.put(url, files=files, params=params, timeout=self._client.time_out)
240
241 _logger.debug(f"Call REST API url '{response.url}'")
242
243 if response.status_code == STATUS_CODE_404:
244 if self._client.get_log_intensity() == LogIntensity.HIGH:
245 _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
246 elif self._client.get_log_intensity() == LogIntensity.STANDARD:
247 _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
248
249 _logger.debug(response.text)
250 return False
251
252 # original dotnet server delivers 200 instead of 204
253 if response.status_code not in (STATUS_CODE_200, STATUS_CODE_204):
254 log_response(response)
255 return False
256
257 except requests.exceptions.RequestException as e:
258 _logger.error(f"Error call REST API: {e}")
259 return False
260
261 return True
262
263 # DELETE /shells/{aasIdentifier}/asset-information/thumbnail
264 def delete_thumbnail_aas_repository(self, aas_identifier: str) -> bool:
265 """Deletes the thumbnail of the Asset Administration Shell.
266
267 :param aas_identifier: The Asset Administration Shells unique id
268 :return: True if the deletion was successful, False otherwise
269 """
270 if not self._client.encoded_ids:
271 aas_identifier = encode_base_64(aas_identifier)
273 url = f"{self._client.base_url}/shells/{aas_identifier}/asset-information/thumbnail"
274
275 self._client.set_token()
276
277 try:
278 response = self._session.delete(url, timeout=self._client.time_out)
279 _logger.debug(f"Call REST API url '{response.url}'")
280
281 if response.status_code == STATUS_CODE_404:
282 if self._client.get_log_intensity() == LogIntensity.HIGH:
283 _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' or thumbnail file not found.")
284 elif self._client.get_log_intensity() == LogIntensity.STANDARD:
285 _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or thumbnail file not found.")
286
287 _logger.debug(response.text)
288 return False
289
290 if response.status_code != STATUS_CODE_200:
291 log_response(response)
292 return False
293
294 except requests.exceptions.RequestException as e:
295 _logger.error(f"Error call REST API: {e}")
296 return False
297
298 return True
299
300 # GET /shells
302 self, asset_ids: list[dict] | None = None, id_short: str = "", limit: int = 100, cursor: str = ""
303 ) -> dict | None:
304 """Returns all Asset Administration Shells.
305
306 :param assetIds: A list of specific Asset identifiers (format: {"identifier": "string", "encodedIdentifier": "string"})
307 :param idShort: The Asset Administration Shells IdShort
308 :param limit: The maximum number of elements in the response array
309 :param cursor: A server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
310 :return: List of paginated Asset Administration Shells data or None if an error occurred
311 """
312 url = f"{self._client.base_url}/shells"
313
314 # Build query parameters
315 if asset_ids is None:
316 asset_ids = []
317
318 params: dict[str, Any] = {}
319 if asset_ids is not None and len(asset_ids) > 0:
320 params["assetIds"] = asset_ids
321 if id_short:
322 params["idShort"] = id_short
323 if limit:
324 params["limit"] = str(limit)
325 if cursor:
326 params["cursor"] = cursor
327
328 self._client.set_token()
329
330 try:
331 response = self._session.get(url, timeout=self._client.time_out, params=params)
332 _logger.debug(f"Call REST API url '{response.url}'")
333
334 if response.status_code != STATUS_CODE_200:
335 log_response(response)
336 return None
337
338 except requests.exceptions.RequestException as e:
339 _logger.error(f"Error call REST API: {e}")
340 return None
341
342 content = response.content.decode("utf-8")
343 return json.loads(content)
344
345 # POST /shells
346 def post_asset_administration_shell(self, request_body: dict) -> dict | None:
347 """Creates a new Asset Administration Shell.
348
349 :param request_body: Json data of the Asset Administration Shell to post
350 :return: Response data as a dictionary or None if an error occurred
351 """
352 url = f"{self._client.base_url}/shells"
353
354 self._client.set_token()
355
356 try:
357 response = self._session.post(url, json=request_body, timeout=self._client.time_out)
358 _logger.debug(f"Call REST API url '{response.url}'")
359
360 if response.status_code != STATUS_CODE_201:
361 log_response(response)
362 return None
363
364 except requests.exceptions.RequestException as e:
365 _logger.error(f"Error call REST API: {e}")
366 return None
367
368 content = response.content.decode("utf-8")
369 return json.loads(content)
370
371 # GET /shells/{aasIdentifier}/submodel-refs
372 def get_all_submodel_references_aas_repository(self, aas_identifier: str, limit: int = 100, cursor: str = "") -> dict | None:
373 """Returns all submodel references.
374
375 :param aas_identifier: The Asset Administration Shells unique id
376 :param limit: The maximum number of elements in the response array
377 :param cursor: A server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
378 :return: List of Submodel references or None if an error occurred
379 """
380 if not self._client.encoded_ids:
381 aas_identifier = encode_base_64(aas_identifier)
383 url = f"{self._client.base_url}/shells/{aas_identifier}/submodel-refs"
384
385 params: dict[str, str] = {}
386 if limit:
387 params["limit"] = str(limit)
388 if cursor:
389 params["cursor"] = cursor
390
391 self._client.set_token()
392
393 try:
394 response = self._session.get(url, timeout=self._client.time_out, params=params)
395 _logger.debug(f"Call REST API url '{response.url}'")
396
397 if response.status_code == STATUS_CODE_404:
398 if self._client.get_log_intensity() == LogIntensity.HIGH:
399 _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
400 elif self._client.get_log_intensity() == LogIntensity.STANDARD:
401 _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
402
403 _logger.debug(response.text)
404 return None
405
406 if response.status_code != STATUS_CODE_200:
407 log_response(response)
408 return None
409
410 except requests.exceptions.RequestException as e:
411 _logger.error(f"Error call REST API: {e}")
412 return None
413
414 content = response.content.decode("utf-8")
415 return json.loads(content)
416
417 # POST /shells/{aasIdentifier}/submodel-refs
418 def post_submodel_reference_aas_repository(self, aas_identifier: str, request_body: dict) -> dict | None:
419 """Creates a submodel reference at the Asset Administration Shell.
420
421 :param aas_identifier: The Asset Administration Shells unique id
422 :param request_body: Reference to the Submodel
423 :return: Response data as a dictionary or None if an error occurred
424 """
425 if not self._client.encoded_ids:
426 aas_identifier = encode_base_64(aas_identifier)
428 url = f"{self._client.base_url}/shells/{aas_identifier}/submodel-refs"
429
430 self._client.set_token()
431
432 try:
433 response = self._session.post(url, json=request_body, timeout=self._client.time_out)
434 _logger.debug(f"Call REST API url '{response.url}'")
435
436 if response.status_code == STATUS_CODE_404:
437 if self._client.get_log_intensity() == LogIntensity.HIGH:
438 _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
439 elif self._client.get_log_intensity() == LogIntensity.STANDARD:
440 _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
441
442 _logger.debug(response.text)
443 return None
444
445 if response.status_code != STATUS_CODE_201:
446 log_response(response)
447 return None
448
449 except requests.exceptions.RequestException as e:
450 _logger.error(f"Error call REST API: {e}")
451 return None
452
453 content = response.content.decode("utf-8")
454 return json.loads(content)
455
456 # DELETE /shells/{aasIdentifier}/submodel-refs/{submodelIdentifier}
457 def delete_submodel_reference_by_id_aas_repository(self, aas_identifier: str, submodel_identifier: str) -> bool:
458 """Deletes the submodel reference from the Asset Administration Shell. Does not delete the submodel itself.
459
460 :param aas_identifier: The Asset Administration Shells unique id
461 :param submodel_identifier: The Submodels unique id
462 :return: True if the deletion was successful, False otherwise
463 """
464 if not self._client.encoded_ids:
465 aas_identifier = encode_base_64(aas_identifier)
466 submodel_identifier = encode_base_64(submodel_identifier)
467
468 url = f"{self._client.base_url}/shells/{aas_identifier}/submodel-refs/{submodel_identifier}"
469
470 self._client.set_token()
471
472 try:
473 response = self._session.delete(url, timeout=self._client.time_out)
474 _logger.debug(f"Call REST API url '{response.url}'")
475
476 if response.status_code == STATUS_CODE_404:
477 if self._client.get_log_intensity() == LogIntensity.HIGH:
478 _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
479 elif self._client.get_log_intensity() == LogIntensity.STANDARD:
480 _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
481
482 _logger.debug(response.text)
483 return False
484
485 if response.status_code not in (STATUS_CODE_204, STATUS_CODE_200):
486 log_response(response)
487 return False
488
489 except requests.exceptions.RequestException as e:
490 _logger.error(f"Error call REST API: {e}")
491 return False
492
493 return True
494
495 # not supported by Java Server
496
497 # PUT /shells/{aasIdentifier}/submodels/{submodelIdentifier}
498 def put_submodel_by_id_aas_repository(self, aas_identifier: str, submodel_identifier: str, request_body: dict) -> bool:
499 """Updates the Submodel.
500
501 :param aas_identifier: ID of the AAS to update the submodel for
502 :param submodel_identifier: ID of the submodel to update
503 :param request_body: Json data to the Submodel to put
504 :return: True if the update was successful, False otherwise
505 """
506 if not self._client.encoded_ids:
507 aas_identifier = encode_base_64(aas_identifier)
508 submodel_identifier = encode_base_64(submodel_identifier)
509
510 url = f"{self._client.base_url}/shells/{aas_identifier}/submodels/{submodel_identifier}"
511
512 self._client.set_token()
513
514 try:
515 response = self._session.put(url, json=request_body, timeout=self._client.time_out)
516 _logger.debug(f"Call REST API url '{response.url}'")
517
518 if response.status_code == STATUS_CODE_404:
519 if self._client.get_log_intensity() == LogIntensity.HIGH:
520 _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
521 elif self._client.get_log_intensity() == LogIntensity.STANDARD:
522 _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
523
524 _logger.debug(response.text)
525 return False
526
527 if response.status_code != STATUS_CODE_204:
528 log_response(response)
529 return False
530
531 except requests.exceptions.RequestException as e:
532 _logger.error(f"Error call REST API: {e}")
533 return False
534
535 return True
536
537 # GET /shells/{aasIdentifier}/$reference
538 def get_asset_administration_shell_by_id_reference_aas_repository(self, aas_identifier: str) -> dict | None:
539 """Returns a specific Asset Administration Shell as a Reference.
540
541 :param aas_identifier: ID of the AAS reference to retrieve
542 :return: Asset Administration Shells reference data or None if an error occurred
543 """
544 if not self._client.encoded_ids:
545 aas_identifier = encode_base_64(aas_identifier)
547 url = f"{self._client.base_url}/shells/{aas_identifier}/$reference"
548
549 self._client.set_token()
550
551 try:
552 response = self._session.get(url, timeout=self._client.time_out)
553 _logger.debug(f"Call REST API url '{response.url}'")
554
555 if response.status_code == STATUS_CODE_404:
556 if self._client.get_log_intensity() == LogIntensity.HIGH:
557 _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' not found.")
558 elif self._client.get_log_intensity() == LogIntensity.STANDARD:
559 _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' not found.")
560
561 _logger.debug(response.text)
562 return None
563
564 if response.status_code != STATUS_CODE_200:
565 log_response(response)
566 return None
567
568 except requests.exceptions.RequestException as e:
569 _logger.error(f"Error call REST API: {e}")
570 return None
571
572 ref_dict_string = response.content.decode("utf-8")
573 return json.loads(ref_dict_string)
574
575 # GET /shells/{aasIdentifier}/submodels/{submodelIdentifier}
576 def get_submodel_by_id_aas_repository(self, aas_identifier: str, submodel_identifier: str) -> dict | None:
577 """Returns the Submodel.
578
579 :param aas_identifier: ID of the AAS to retrieve the submodel from
580 :param submodel_identifier: ID of the submodel to retrieve
581 :return: Submodel object or None if an error occurred
582 """
583 if not self._client.encoded_ids:
584 aas_identifier = encode_base_64(aas_identifier)
585 submodel_identifier = encode_base_64(submodel_identifier)
586
587 url = f"{self._client.base_url}/shells/{aas_identifier}/submodels/{submodel_identifier}"
588
589 self._client.set_token()
590
591 try:
592 response = self._session.get(url, timeout=self._client.time_out)
593 _logger.debug(f"Call REST API url '{response.url}'")
594
595 if response.status_code == STATUS_CODE_404:
596 if self._client.get_log_intensity() == LogIntensity.HIGH:
597 _logger.warning(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
598 elif self._client.get_log_intensity() == LogIntensity.STANDARD:
599 _logger.debug(f"Asset Administration Shell with id '{aas_identifier}' or submodel with id '{submodel_identifier}' not found.")
600
601 _logger.debug(response.text)
602 return None
603
604 if response.status_code != STATUS_CODE_200:
605 log_response(response)
606 return None
607
608 except requests.exceptions.RequestException as e:
609 _logger.error(f"Error call REST API: {e}")
610 return None
611
612 content = response.content.decode("utf-8")
613 return json.loads(content)
Implementation of Asset Administration Shell related API calls.
bool delete_thumbnail_aas_repository(self, str aas_identifier)
Deletes the thumbnail of the Asset Administration Shell.
dict|None post_asset_administration_shell(self, dict request_body)
Creates a new Asset Administration Shell.
dict|None get_all_submodel_references_aas_repository(self, str aas_identifier, int limit=100, str cursor="")
Returns all submodel references.
dict|None get_asset_administration_shell_by_id(self, str aas_identifier)
Returns a specific Asset Administration Shell.
__init__(self, "AasHttpClient" client)
Initializes the ShellImplementation with the given parameters.
bytes|None get_thumbnail_aas_repository(self, str aas_identifier)
Returns the thumbnail of the Asset Administration Shell.
dict|None get_asset_administration_shell_by_id_reference_aas_repository(self, str aas_identifier)
Returns a specific Asset Administration Shell as a Reference.
dict|None get_all_asset_administration_shells(self, list[dict]|None asset_ids=None, str id_short="", int limit=100, str cursor="")
Returns all Asset Administration Shells.
bool put_submodel_by_id_aas_repository(self, str aas_identifier, str submodel_identifier, dict request_body)
Updates the Submodel.
bool delete_asset_administration_shell_by_id(self, str aas_identifier)
Deletes an Asset Administration Shell.
dict|None get_submodel_by_id_aas_repository(self, str aas_identifier, str submodel_identifier)
Returns the Submodel.
bool put_thumbnail_aas_repository_stream(self, str aas_identifier, str file_name, Any file_octet_stream, str mime_type="application/octet-stream")
Creates or updates the thumbnail of the Asset Administration Shell.
dict|None post_submodel_reference_aas_repository(self, str aas_identifier, dict request_body)
Creates a submodel reference at the Asset Administration Shell.
bool delete_submodel_reference_by_id_aas_repository(self, str aas_identifier, str submodel_identifier)
Deletes the submodel reference from the Asset Administration Shell.
bool put_asset_administration_shell_by_id(self, str aas_identifier, dict request_body)
Creates or replaces an existing Asset Administration Shell.
bool put_thumbnail_aas_repository(self, str aas_identifier, str file_name, Path file)
Creates or updates the thumbnail of the Asset Administration Shell.