| @@ 104-145 (lines=42) @@ | ||
| 101 | ||
| 102 | return self._send_xml_command(cmd) |
|
| 103 | ||
| 104 | def get_reports( |
|
| 105 | self, |
|
| 106 | *, |
|
| 107 | filter: Optional[str] = None, |
|
| 108 | filter_id: Optional[str] = None, |
|
| 109 | note_details: Optional[bool] = None, |
|
| 110 | override_details: Optional[bool] = None, |
|
| 111 | details: Optional[bool] = None, |
|
| 112 | ) -> Any: |
|
| 113 | """Request a list of reports |
|
| 114 | ||
| 115 | Arguments: |
|
| 116 | filter: Filter term to use for the query |
|
| 117 | filter_id: UUID of an existing filter to use for the query |
|
| 118 | note_details: If notes are included, whether to include note details |
|
| 119 | override_details: If overrides are included, whether to include |
|
| 120 | override details |
|
| 121 | details: Whether to exclude results |
|
| 122 | ||
| 123 | Returns: |
|
| 124 | The response. See :py:meth:`send_command` for details. |
|
| 125 | """ |
|
| 126 | cmd = XmlCommand("get_reports") |
|
| 127 | ||
| 128 | if filter: |
|
| 129 | cmd.set_attribute("report_filter", filter) |
|
| 130 | ||
| 131 | if filter_id: |
|
| 132 | cmd.set_attribute("report_filt_id", filter_id) |
|
| 133 | ||
| 134 | if note_details is not None: |
|
| 135 | cmd.set_attribute("note_details", to_bool(note_details)) |
|
| 136 | ||
| 137 | if override_details is not None: |
|
| 138 | cmd.set_attribute("override_details", to_bool(override_details)) |
|
| 139 | ||
| 140 | if details is not None: |
|
| 141 | cmd.set_attribute("details", to_bool(details)) |
|
| 142 | ||
| 143 | cmd.set_attribute("ignore_pagination", "1") |
|
| 144 | ||
| 145 | return self._send_xml_command(cmd) |
|
| 146 | ||
| 147 | def import_report( |
|
| 148 | self, |
|
| @@ 4701-4741 (lines=41) @@ | ||
| 4698 | cmd.set_attribute("details", "1") |
|
| 4699 | return self._send_xml_command(cmd) |
|
| 4700 | ||
| 4701 | def get_results( |
|
| 4702 | self, |
|
| 4703 | *, |
|
| 4704 | filter: Optional[str] = None, |
|
| 4705 | filter_id: Optional[str] = None, |
|
| 4706 | task_id: Optional[str] = None, |
|
| 4707 | note_details: Optional[bool] = None, |
|
| 4708 | override_details: Optional[bool] = None, |
|
| 4709 | details: Optional[bool] = None, |
|
| 4710 | ) -> Any: |
|
| 4711 | """Request a list of results |
|
| 4712 | ||
| 4713 | Arguments: |
|
| 4714 | filter: Filter term to use for the query |
|
| 4715 | filter_id: UUID of an existing filter to use for the query |
|
| 4716 | task_id: UUID of task for note and override handling |
|
| 4717 | note_details: If notes are included, whether to include note details |
|
| 4718 | override_details: If overrides are included, whether to include |
|
| 4719 | override details |
|
| 4720 | details: Whether to include additional details of the results |
|
| 4721 | ||
| 4722 | Returns: |
|
| 4723 | The response. See :py:meth:`send_command` for details. |
|
| 4724 | """ |
|
| 4725 | cmd = XmlCommand("get_results") |
|
| 4726 | ||
| 4727 | add_filter(cmd, filter, filter_id) |
|
| 4728 | ||
| 4729 | if task_id: |
|
| 4730 | cmd.set_attribute("task_id", task_id) |
|
| 4731 | ||
| 4732 | if details is not None: |
|
| 4733 | cmd.set_attribute("details", to_bool(details)) |
|
| 4734 | if note_details is not None: |
|
| 4735 | cmd.set_attribute("note_details", to_bool(note_details)) |
|
| 4736 | ||
| 4737 | if override_details is not None: |
|
| 4738 | cmd.set_attribute("override_details", to_bool(override_details)) |
|
| 4739 | ||
| 4740 | return self._send_xml_command(cmd) |
|
| 4741 | ||
| 4742 | def get_result(self, result_id: str) -> Any: |
|
| 4743 | """Request a single result |
|
| 4744 | ||