def retrieve_artifact_history_date(artifact_id, START): """ Allows the client side API call to "retrieve" the artifact and display its history for the specified date. Returns: type: str String representing JSON object which contains the result of the "artifact retrieve --range START END {uuid}" if the call was a success; else, JSON object which contains error message. Raises: Exception: * If the request does not contain JSON payload """ config = configparser.ConfigParser() config.set("DEFAULT", "url", "http://127.0.0.1:8008") try: output = artifact_cli.api_do_retrieve_artifact(artifact_id, config, range_flag=["0", START]) return output except Exception as e: return e
def retrieve_artifact_history(artifact_id): """ Allows the client side API call to "retrieve" the artifact and display its history up to its creation block. Returns: type: str String representing JSON object which contains the result of the "artifact retrieve --all {uuid}" if the call was a success; else, JSON object which contains error message. Raises: Exception: * If the request does not contain JSON payload """ config = configparser.ConfigParser() config.set("DEFAULT", "url", "http://127.0.0.1:8008") try: output = artifact_cli.api_do_retrieve_artifact(artifact_id, config, all_flag=True) return output except Exception as e: return e