Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.50.2 #215

Merged
merged 4 commits into from
Jan 13, 2023
Merged

4.50.2 #215

merged 4 commits into from
Jan 13, 2023

Conversation

lifehackjim
Copy link
Contributor

4.50.2

KNOWN BUG: Making private copies of Saved Queries that are public

  • Currently the API Client does not yet know how to work with folders, and private saved queries can not be saved
    in a shared folder (the default folder). The next version will be adding support for working with folders.

Bugfix: Remove spurious json serialization errors in logs

  • Logging request and/or response bodies will no longer generate errors when bodies are empty

Bugfix: Reduce warnings from extra attributes

  • Extra attribute warnings serve as a notice that the version of the API client being used does not know
    about a schema change in an object presented by the Axonius API. They serve as a helpful notice that you
    may need to update your API client to ensure compatibility with the version of Axonius that is being utilized.
  • Extra attributes now have their own warning class: axonius_api_client.exceptions.ExtraAttributeWarning
  • Extra attribute warnings will now only happen once per schema
  • Extra attribute warnings can be disabled entirely using OS environment variable AX_EXTRA_WARN="no"
  • Extra attribute warning message updated to:
To silence these warnings please upgrade to latest API client.
If there is not a newer version available yet, you can disable these warnings using:
- from command line, use OS environment variable AX_EXTRA_WARN='no'
- or from python, use warnings module:
import warnings, axonius_api_client
warnings.filterwarnings(action="ignore", category=axonius_api_client.exceptions.ExtraAttributeWarning)
  • As part of this effort, all schemas in the API Client have been updated to match the schema definitions in the Axonius 4.8.0.4 API

Bugfix: switch all API endpoints for saved queries from /views/ path to /queries/ path

  • The /views/ path is deprecated and problematic.
  • A large number of back end changes to saved query schemas and private methods were made to support this effort.

Bugfix: axonshell devices count can sometimes throw an error:

  • Running:
axonshell devices count --history-days-ago 1
  • Would produce an error:
min() arg is an empty sequence
  • Implemented check for None when no history is available

Bugfix: Bug in enforcements schedule_weekly logic

  • Running:
axonshell enforcements update-schedule-weekly -r 1 -sh 23 -sm 3 --value xyz
  • Would produce an error:
Enforcements.update_schedule_weekly() got an unexpected keyword argument 'schedule_hour'"
  • Updated the keywords being used for the click arguments from "schedule_hour" and "schedule_minute" to "hour" and "minute"

Features: multiple dashboard spaces and chart features

  • CLI command group added: axonshell spaces

  • New commands in axonshell spaces:

    • export: Export Dashboard Spaces.
    • export-charts-to-csv: Export Multiple Charts to CSV.
    • import: Import Dashboard Spaces.
  • API model added: axonius_api_client.api.system.dashboard_spaces.DashboardSpaces

  • Connect now has a new property to access the new API model: connect.dashboard_spaces

  • Methods in axonius_api_client.api.system.dashboard_spaces.DashboardSpaces:

    • get: get all dashboard space objects
    • export_charts_to_csv: export charts to CSV format
    • export_charts_to_csv_path: exports charts to CSV format and save to files in a directory
    • export_spaces: export spaces and their charts and their queries to a JSON format
    • import_spaces: import spaces and their charts and their queries from a JSON export
    • get_exportables: get a list of all exportable space names
    • load_export_data: load a JSON export into a dataclass and validate it
    • _get_exportables: direct api method to get all exportable space names
    • _get: direct api method to get all dashboard space objects
    • _get_single: direct api method to get a single dashboard space object along with it's chart objects
    • _export_chart_csv: direct api method to export a chart to CSV
    • _import_spaces: direct api method to import a JSON export
    • _export_spaces: direct api method to create a JSON export

Jim Olsen added 4 commits November 22, 2022 15:06
need to figure out what as_template means
# 4.50.2
<!-- MarkdownTOC -->

- [KNOWN BUG: Making private copies of Saved Queries that are public](#known-bug-making-private-copies-of-saved-queries-that-are-public)
- [Bugfix: Reduce warnings from extra attributes](#bugfix-reduce-warnings-from-extra-attributes)
- [Bugfix: switch all API endpoints for saved queries from /views/ path to /queries/ path](#bugfix-switch-all-api-endpoints-for-saved-queries-from-views-path-to-queries-path)
- [Bugfix: axonshell devices count can sometimes throw an error:](#bugfix-axonshell-devices-count-can-sometimes-throw-an-error)
- [Bugfix: Bug in enforcements schedule_weekly logic](#bugfix-bug-in-enforcements-schedule_weekly-logic)
- [Features: multiple dashboard spaces and chart features](#features-multiple-dashboard-spaces-and-chart-features)

<!-- /MarkdownTOC -->

## KNOWN BUG: Making private copies of Saved Queries that are public

- Currently the API Client does not yet know how to work with folders, and private saved queries can not be saved
  in a shared folder (the default folder). The next version will be adding support for working with folders.

## Bugfix: Reduce warnings from extra attributes

- Extra attribute warnings serve as a notice that the version of the API client being used does not know
  about a schema change in an object presented by the Axonius API. They serve as a helpful notice that you
  may need to update your API client to ensure compatibility with the version of Axonius that is being utilized.
- Extra attributes now have their own warning class: axonius_api_client.exceptions.ExtraAttributeWarning
- Extra attribute warnings will now only happen once per schema
- Extra attribute warnings can be disabled entirely using OS environment variable AX_EXTRA_WARN="no"
- Extra attribute warning message updated to:
  ```text
To silence these warnings please upgrade to latest API client.
If there is not a newer version available yet, you can disable these warnings using:
- from command line, use OS environment variable AX_EXTRA_WARN='no'
- or from python, use warnings module:
import warnings, axonius_api_client
warnings.filterwarnings(action="ignore", category=axonius_api_client.exceptions.ExtraAttributeWarning)
  ```
- As part of this effort, all schemas in the API Client have been updated to match the schema definitions in the Axonius 4.8.0.4 API

## Bugfix: switch all API endpoints for saved queries from /views/ path to /queries/ path

- The /views/ path is deprecated and problematic.
- A large number of back end changes to saved query schemas and private methods were made to support this effort.

## Bugfix: axonshell devices count can sometimes throw an error:

- Running:
```shell

axonshell devices count --history-days-ago 1
```

- Would produce an error:
```text
min() arg is an empty sequence
```

- Implemented check for None when no history is available

## Bugfix: Bug in enforcements schedule_weekly logic

- Running:
```shell
axonshell enforcements update-schedule-weekly -r 1 -sh 23 -sm 3 --value xyz
```

- Would produce an error:
```text
Enforcements.update_schedule_weekly() got an unexpected keyword argument 'schedule_hour'"
```

- Updated the keywords being used for the click arguments from "schedule_hour" and "schedule_minute" to "hour" and "minute"

## Features: multiple dashboard spaces and chart features

- CLI command group added: axonshell spaces
- New commands in axonshell spaces:
  - export: Export Dashboard Spaces.
  - export-charts-to-csv: Export Multiple Charts to CSV.
  - import: Import Dashboard Spaces.

- API model added: axonius_api_client.api.system.dashboard_spaces.DashboardSpaces
- Connect now has a new property to access the new API model: connect.dashboard_spaces
- Methods in axonius_api_client.api.system.dashboard_spaces.DashboardSpaces:
  - get: get all dashboard space objects
  - export_charts_to_csv: export charts to CSV format
  - export_charts_to_csv_path: exports charts to CSV format and save to files in a directory
  - export_spaces: export spaces and their charts and their queries to a JSON format
  - import_spaces: import spaces and their charts and their queries from a JSON export
  - get_exportables: get a list of all exportable space names
  - load_export_data: load a JSON export into a dataclass and validate it
  - _get_exportables: direct api method to get all exportable space names
  - _get: direct api method to get all dashboard space objects
  - _get_single: direct api method to get a single dashboard space object along with it's chart objects
  - _export_chart_csv: direct api method to export a chart to CSV
  - _import_spaces: direct api method to import a JSON export
  - _export_spaces: direct api method to create a JSON export
@lifehackjim lifehackjim self-assigned this Jan 13, 2023
@lifehackjim lifehackjim merged commit e6d913b into master Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants