smia_ism.utilities.acl_open_api_utils module

smia_ism.utilities.acl_open_api_utils.encode_string_in_base64_url(content_string)[source]

This method encodes a string in a base64 url format. This is required as the AAS and ontology identifiers need to be added in HTTP request paths.

smia_ism.utilities.acl_open_api_utils.decode_base64_url_in_string(content_base64_url_string)[source]

This method encodes a string in a base64 url format. This is required as the AAS and ontology identifiers need to be added in HTTP request paths.

smia_ism.utilities.acl_open_api_utils.send_openapi_http_get_request(url, headers=None, timeout: int = 5)[source]

This method sends an HTTP GET request to the AAS Repository and obtains the response JSON.

smia_ism.utilities.acl_open_api_utils.send_openapi_http_post_request(url, headers=None, body=None, timeout: int = 5)[source]

This method sends an HTTP GET request to the AAS Repository and obtains the response JSON.

smia_ism.utilities.acl_open_api_utils.check_and_get_response_error(response)[source]

This method checks if the response is valid adn extracts the errors message if it is not valid.

Parameters:

response – response object

Returns:

‘’ if it is valid and “ERROR…” if it is not.

Return type:

str