Package: chinoscriba
Chino.io :: Scriba Documentation: the Application Programming InterfaceThis Python package is automatically generated by theSwagger Codegenproject:API version: v1Package version: 1.0.0Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegenRequirements.Python 2.7 and 3.4+Installation & UsageInstall the generated package (see on top here or):pip install chinoscribaGetting Startedimportchinoscribafromchinoscriba.restimportApiExceptionfrompprintimportpprint# Configure HTTP basic authorization: Basicconfiguration=chinoscriba.Configuration()configuration.username='customer_id'configuration.password='customer_key'# create an instance of the API classeslogs_api=chinoscriba.LogsApi(chinoscriba.ApiClient(configuration))stats_api=chinoscriba.StatsApi(chinoscriba.ApiClient(configuration))blocks_api=chinoscriba.BlocksApi(chinoscriba.ApiClient(configuration))limit=56# int | Number of results to return per pageoffset=0# int | The initial index from which to return the results# # Audit logs # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ## Create a new Logbody=chinoscriba.AuditLog()# AuditLog |try:api_response=logs_api.logs_create(body)pprint(api_response)exceptApiExceptionase:print("Exception when calling DefaultApi->logs_create:%s\n"%e)# Create multiple Logs (bulk)body=[chinoscriba.AuditLog()]# list[AuditLog] |try:api_response=logs_api.logs_multiple(body)pprint(api_response)exceptApiExceptionase:print("Exception when calling DefaultApi->logs_multiple:%s\n"%e)try:# List all Logsapi_response=logs_api.logs_list(limit=limit,offset=offset)pprint(api_response)exceptApiExceptionase:print("Exception when calling DefaultApi->logs_list:%s\n"%e)try:# Search by queryapi_response=logs_api.logs_search(body,limit=limit,offset=offset)pprint(api_response)exceptApiExceptionase:print("Exception when calling DefaultApi->logs_search:%s\n"%e)# # Stats # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #try:# Retrieve customer statisticsapi_response=stats_api.stats_read()pprint(api_response)exceptApiExceptionase:print("Exception when calling DefaultApi->stats_read:%s\n"%e)# # Exporter # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #try:# List exportable Blocksapi_response=blocks_api.exported_list(limit=limit,offset=offset)pprint(api_response)exceptApiExceptionase:print("Exception when calling DefaultApi->exported_list:%s\n"%e)# Export a Blockblock_id=""# string | ID of the Block to downloadtry:# NOTE: due to an issue in a third-party library, this only works with#  '_preload_content' disabled. This will bypass the malfunctioning code#  and return directly the HTTPResponse, which contains the zip file bytes#  in the 'data' attribute.res=blocks_api.exported_read(block_id,_preload_content=False)zip_bytes=res.data# You can read this using python library 'zipfile'.exceptApiExceptionase:print("Exception when calling BlocksApi->exported_read:%s\n"%e)Changelog[2.1.1] - 2023-11-29added support for new endpoint: "Validate downloaded Block" (/validate/)fixed events' tests[2.0.0] - 2021-01-22CHANGELOG.md (this file)added support for new events endpointsremoved unique classDefaultApiin favour of specific classes based on
endpoint semantic groups:LogApi,BlockApi,EventsApi,StatsApi[1.0.1] - 2021-01-15DefaultApiclass which manages logs (create, list, search) and block
downloads