aas_client3_2.concept_description_repository

Implement the operations of the Concept Description Repository API.

Every public function implements exactly one operation of the specification. The private functions _build_* and _parse_* build the request and parse the response of the operation. They do no I/O, and constitute a semi-public interface for the testing client, which is released in lockstep with this client.

aas_client3_2.concept_description_repository.get_all_concept_descriptions(server: Server, *, id_short: str | None = None, is_case_of: Reference | None = None, data_specification_ref: Reference | None = None, created_from: datetime | None = None, updated_from: datetime | None = None, limit: int | None = None, cursor: str | None = None) → GetConceptDescriptionsResult[source]

List a page of the concept descriptions in the repository.

The operation also implements GetAllConceptDescriptionsByIdShort, GetAllConceptDescriptionsByIsCaseOf and GetAllConceptDescriptionsByDataSpecificationReference of Part 2, which differ only in the filter. The filters are combined with “and”.

Parameters:
  • server – where to send the request

  • id_short – if set, only the concept descriptions with this ID-short

  • is_case_of – if set, only the concept descriptions with this reference among their isCaseOf

  • data_specification_ref – if set, only the concept descriptions with an embedded data specification of this reference

  • created_from – if set, only the concept descriptions created at or after this time

  • updated_from – if set, only the concept descriptions updated at or after this time

  • limit – maximum number of the concept descriptions in the page

  • cursor – where to continue the listing from

Returns:

a page of the concept descriptions

Raises:

ValueError before sending anything if a time has no time zone

Implements:
  • GetAllConceptDescriptions – GET /concept-descriptions

aas_client3_2.concept_description_repository.post_concept_description(server: Server, concept_description: ConceptDescription) → ConceptDescription[source]

Create a new concept description in the repository.

Parameters:
  • server – where to send the request

  • concept_description – the concept description to be created

Returns:

the created concept description, as stored by the server

Implements:
  • PostConceptDescription – POST /concept-descriptions

aas_client3_2.concept_description_repository.get_concept_description_by_id(server: Server, cd_identifier: str) → ConceptDescription[source]

Get the concept description with the given identifier.

Parameters:
  • server – where to send the request

  • cd_identifier – identifier of the concept description

Returns:

the concept description

Implements:
  • GetConceptDescriptionById – GET /concept-descriptions/{cdIdentifier}

aas_client3_2.concept_description_repository.put_concept_description_by_id(server: Server, cd_identifier: str, concept_description: ConceptDescription) → None[source]

Create or replace the concept description with the given identifier.

Parameters:
  • server – where to send the request

  • cd_identifier – identifier of the concept description

  • concept_description – the concept description to be stored

Implements:
  • PutConceptDescriptionById – PUT /concept-descriptions/{cdIdentifier}

aas_client3_2.concept_description_repository.delete_concept_description_by_id(server: Server, cd_identifier: str) → None[source]

Delete the concept description with the given identifier.

Parameters:
  • server – where to send the request

  • cd_identifier – identifier of the concept description

Implements:
  • DeleteConceptDescriptionById – DELETE /concept-descriptions/{cdIdentifier}

aas_client3_2.concept_description_repository.get_concept_description_by_id_signed(server: Server, cd_identifier: str) → str[source]

Get the concept description with the given identifier, signed by the server.

The concept description is the payload of a JSON Web Signature (JWS, RFC 7515), signed with RS256, with the certificate chain of the signing key in the header x5c. The client does not verify the signature, since only the users know which certificates they trust; verifying against the certificate in the JWS itself would prove nothing. Verify it with a JWS library, and parse the verified payload with aas_core3_2.jsonization.concept_description_from_jsonable().

Parameters:
  • server – where to send the request

  • cd_identifier – identifier of the concept description

Returns:

the JWS in the compact serialization

Implements:
  • GetConceptDescriptionByIdSigned – GET /concept-descriptions/{cdIdentifier}/$signed

aas_client3_2.concept_description_repository.get_all_concept_descriptions_recent_changes(server: Server, *, created_from: datetime | None = None, updated_from: datetime | None = None, limit: int | None = None, cursor: str | None = None) → GetAllConceptDescriptionsRecentChangesResult[source]

List a page of the changes of the concept descriptions in the repository.

A change gives only the identifier of a concept description, and when it was created and last updated, so that also a large number of changes can be listed; get the concept descriptions themselves with get_concept_description_by_id().

The filters created_from and updated_from are combined with “or”: a concept description is listed if it was created at or after created_from, or updated at or after updated_from.

The operation is experimental in Part 2 V3.2.

The times are createdAt and updatedAt of the administrative information as the users wrote them. The server does not set them (see https://github.com/eclipse-basyx/basyx-go-components/issues/821), so a concept description without them is not listed.

Parameters:
  • server – where to send the request

  • created_from – if set, the concept descriptions created at or after this time

  • updated_from – if set, the concept descriptions updated at or after this time

  • limit – maximum number of the changes in the page

  • cursor – where to continue the listing from

Returns:

a page of the changes

Raises:

ValueError before sending anything if a time has no time zone

Implements:
  • GetAllConceptDescriptionsRecentChanges – GET /concept-descriptions/$recent-changes

aas_client3_2.concept_description_repository.query_concept_descriptions(server: Server, query: Query, *, limit: int | None = None, cursor: str | None = None) → GetConceptDescriptionsResult[source]

List a page of the concept descriptions which match query.

The query must not select the identifiers ("$select": "id"); use query_concept_description_ids() for that. Both functions implement the same operation, but give different results.

The filters of the query ($filters) may remove parts of the concept descriptions, so the concept descriptions in the page are not necessarily complete.

Parameters:
  • server – where to send the request

  • query – query in the AAS Query Language

  • limit – maximum number of the concept descriptions in the page

  • cursor – where to continue the listing from

Returns:

a page of the matching concept descriptions

Raises:

ValueError before sending anything if query selects the identifiers, or can not be serialized to JSON (e.g., a number literal is not finite)

Implements:
  • QueryConceptDescriptions – POST /query/concept-descriptions

aas_client3_2.concept_description_repository.query_concept_description_ids(server: Server, query: Query, *, limit: int | None = None, cursor: str | None = None) → IdsResult[source]

List a page of the identifiers of the concept descriptions which match query.

The query must select the identifiers ("$select": "id"); use query_concept_descriptions() for the full concept descriptions. Both functions implement the same operation, but give different results.

Parameters:
  • server – where to send the request

  • query – query in the AAS Query Language

  • limit – maximum number of the identifiers in the page

  • cursor – where to continue the listing from

Returns:

a page of the identifiers of the matching concept descriptions

Raises:

ValueError before sending anything if query does not select the identifiers, or can not be serialized to JSON (e.g., a number literal is not finite)

Implements:
  • QueryConceptDescriptions – POST /query/concept-descriptions