controllers.reports_controller module¶
-
class
controllers.reports_controller.
ReportsController
(config=None, client=None, call_back=None)[source]¶ Bases:
cohesity_management_sdk.controllers.base_controller.BaseController
A Controller to access Endpoints in the cohesity_management_sdk API.
-
get_agent_deployment_report
(host_os_type=None, compact_version=None, output_format=None, health_status=None)[source]¶ Does a GET request to /public/reports/agents.
Get the list of all the installed agents which includes the health status and upgradability of the agent.
- Args:
- host_os_type (HostOsTypeEnum, optional): Specifies the host type
on which the Cohesity agent is installed.
- compact_version (string, optional): Specifies the compact version
of Cohesity agent. For example, 6.0.1. Setting this parameter will filter the response based on installed agent version.
- output_format (string): Specifies the format for the
output such as ‘csv’ or ‘json’. If not specified, the json format is returned. If ‘csv’ is specified, a comma-separated list with a heading row is returned.
- health_status (HealthStatusEnum): Specifies the health status of
the Cohesity agent.
- Returns:
- list of AgentDeploymentStatusResponse: Response from the API.
Successful Response
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-
get_cloud_archive_report_request
()[source]¶ Does a GET request to /public/reports/cloudArchiveReport.
last run status by each protection job. Cohesity Cluster to Vaults (External Targets).
- Returns:
CloudArchiveSummary: Response from the API. Success
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-
get_data_transfer_from_vaults_report_request
(start_time_msecs=None, end_time_msecs=None, vault_ids=None, output_format=None, group_by=None)[source]¶ Does a GET request to /public/reports/dataTransferFromVaults.
A Vault can provide an additional Cloud Tier where cold data of the Cohesity Cluster is stored in the Cloud. A Vault can also provide archive storage for backup data. This archive data is stored on Tapes and in Cloud Vaults.
- Args:
- start_time_msecs (int|long, optional): Filter by a start time.
Specify the start time as a Unix epoch Timestamp (in milliseconds). If startTimeMsecs and endTimeMsecs are not specified, the time period is the last 7 days.
- end_time_msecs (int|long, optional): Filter by end time.
Specify the end time as a Unix epoch Timestamp (in milliseconds). If startTimeMsecs and endTimeMsecs are not specified, the time period is the last 7 days.
vault_ids (list of int, required): Filter by a list of Vault ids. output_format (string, optional): Specifies the format for the
output such as ‘csv’ or ‘json’. If not specified, the json format is returned. If ‘csv’ is specified, a comma-separated list with a heading row is returned.
- group_by (string, optional): Specifies wheather the report should
be grouped by target when scheduled or downloaded. If not set or set to false, report is grouped by protection jobs. It is ignored if outformat is not “csv” and response contains whole report.
- Returns:
list of DataTransferFromVaultsSummaryResponse: Response from the API.
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-
get_data_transfer_to_vaults_report_request
(start_time_msecs=None, end_time_msecs=None, vault_ids=None, output_format=None, group_by=None)[source]¶ Does a GET request to /public/reports/dataTransferToVaults.
A Vault can provide an additional Cloud Tier where cold data of the Cohesity Cluster can be stored in the Cloud. A Vault can also provide archive storage for backup data. This archive data is stored on Tapes and in Cloud Vaults.
- Args:
- start_time_msecs (int|long, optional): Filter by a start time.
Specify the start time as a Unix epoch Timestamp (in milliseconds). If startTimeMsecs and endTimeMsecs are not specified, the time period is the last 7 days.
- end_time_msecs (int|long, optional): Filter by end time.
Specify the end time as a Unix epoch Timestamp (in milliseconds). If startTimeMsecs and endTimeMsecs are not specified, the time period is the last 7 days.
vault_ids (list of int, required): Filter by a list of Vault ids. output_format (string, optional): Specifies the format for the
output such as ‘csv’ or ‘json’. If not specified, the json format is returned. If ‘csv’ is specified, a comma-separated list with a heading row is returned.
- group_by (string, optional): Specifies wheather the report should
be grouped by target when scheduled or downloaded. If not set or set to false, report is grouped by protection jobs. It is ignored if outformat is not “csv” and response contains whole report.
- Returns:
list of DataTransferToVaultsSummaryResponse: Response from the API.
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-
get_gdpr_report
(id=None, accessible_users=None, parent_source_id=None, output_format=None, actions=None, search=None, start_time_usecs=None, end_time_usecs=None)[source]¶ Does a GET request to /public/reports/gdpr.
Returns the GDPR report information.
- Args:
- id (list of int|long): Specifies the objects for which to
get the gdpr information.
- accessible_users (list of string, optional): Specifies the users
for which to get the accessible objects.
- parent_source_id (list of int|long, optional): Specifies the
parent sources of objects for which to get info for.
- output_format (string, optional): Specifies the format for
the output such as ‘csv’ or ‘json’. If not specified, the json format is returned. If ‘csv’ is specified, a comma-separated list with a heading row is returned.
- actions (list of string, optional): Specifies the action for the
audit logs.
- search (string, optional): Specifies the search string for the
audit logs.
- start_time_usecs (long|int, optional): Specifies the start time
for the audit logs as a Unix epoch Timestamp (in microseconds).
- end_time_usecs (long|int, optional): Specifies the end time for
the audit logsas a Unix epoch Timestamp (in microseconds).
- Returns:
list of ObjectInformation: Response from the API. Success
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-
get_protected_objects_trends_report_request
(job_ids=None, start_time_usecs=None, timezone=None, end_time_usecs=None, environments=None, protected_object_ids=None, registered_source_id=None, rollup=None, tenant_ids=None, all_under_hierarchy=None)[source]¶ Does a GET request to /public/reports/protectedObjectsTrends.
This gives a summary of protection trend for protected resources during the given time range. If no roll up is specified, then the trends will be grouped by days.
- Args:
- job_ids (list of int|long, optional): Filter by a list of Job ids.
Snapshots summary statistics for the specified Protection Jobs are reported.
- start_time_usecs (int|long, optional): Filter by a start time.
Snapshot summary statistics for Job Runs that started after the specified time are reported. Specify the start time as a Unix epoch Timestamp (in microseconds).
- timezone (string, required): Specifies the timezone to use when
calculating day/week/month Specify the timezone in the following format: “Area/Location”, for example:”America/New_York”.
- end_time_usecs (int|long, optional): Filter by end time.
Snapshot summary statistics
- environments (EnvironmentEnum, optional): Filter by a list of
environment types suchas ‘kVMware’, ‘kView’, etc. Supported environment types such as ‘kView’, ‘kSQL’, ‘kVMware’, etc. NOTE: ‘kPuppeteer’ refers to Cohesity’s Remote Adapter. ‘kVMware’ indicates the VMware Protection Source environment. ‘kHyperV’ indicates the HyperV Protection Source environment. ‘kSQL’ indicates the SQL Protection Source environment. ‘kView’ indicates the View Protection Source environment. ‘kPuppeteer’ indicates the Cohesity’s Remote Adapter. ‘kPhysical’ indicates the physical Protection Source environment. ‘kPure’ indicates the Pure Storage Protection Source environment. ‘Nimble’ indicates the Nimble Storage Protection Source environment. ‘kAzure’ indicates the Microsoft’s Azure Protection Source environment. ‘kNetapp’ indicates the Netapp Protection Source environment. ‘kAgent’ indicates the Agent Protection Source environment. ‘kGenericNas’ indicates the Generic Network Attached Storage Protection Source environment. ‘kAcropolis’ indicates the Acropolis Protection Source environment. ‘kPhsicalFiles’ indicates the Physical Files Protection Source environment. ‘kIsilon’ indicates the Dell EMC’s Isilon Protection Source environment. ‘kGPFS’ indicates IBM’s GPFS Protection Source environment. ‘kKVM’ indicates the KVM Protection Source environment. ‘kAWS’ indicates the AWS Protection Source environment. ‘kExchange’ indicates the Exchange Protection Source environment. ‘kHyperVVSS’ indicates the HyperV VSS Protection Source environment. ‘kOracle’ indicates the Oracle Protection Source environment. ‘kGCP’ indicates the Google Cloud Platform Protection Source environment. ‘kFlashBlade’ indicates the Flash Blade Protection Source environment. ‘kAWSNative’ indicates the AWS Native Protection Source environment. ‘kO365’ indicates the Office 365 Protection Source environment. ‘kO365Outlook’ indicates Office 365 outlook Protection Source environment. ‘kHyperFlex’ indicates the Hyper Flex Protection Source environment. ‘kGCPNative’ indicates the GCP Native Protection Source environment. ‘kAzureNative’ indicates the Azure Native Protection Source environment. ‘kKubernetes’ indicates a Kubernetes Protection Source environment. ‘kElastifile’ indicates Elastifile Protection Source environment. ‘kAD’ indicates Active Directory Protection Source environment. ‘kRDSSnapshotManager’ indicates AWS RDS Protection Source environment. ‘kCassandra’ indicates Cassandra Protection Source environment. ‘kMongoDB’ indicates MongoDB Protection Source environment. ‘kCouchbase’ indicates Couchbase Protection Source environment. ‘kHdfs’ indicates Hdfs Protection Source environment. ‘kHive’ indicates Hive Protection Source environment. ‘kHBase’ indicates HBase Protection Source environment.
- protected_object_ids (list of int|long, optional): Filter by a
list of leaf Protection Sources Objects (such as VMs).
- registered_source_id (int|long, optional): Specifies an id of a
top level Registered Source such as a vCenter Server. If specified, Snapshot summary statistics for all the leaf Protection Sources (such as VMs) that are children of this Registered Source are reported. NOTE: If specified, filtering by other fields is not supported.
- rollup (string, optional): Roll up type for grouping. Valid values
are day, week, month
- tenant_ids (list of string, optional): TenantIds contains ids of
the tenants for which objects are to be returned.
- all_under_hierarchy (bool, optional): AllUnderHierarchy specifies
if objects of all the tenants under the hierarchy of the logged in user’s organization should be returned.
- Returns:
list of ProtectionTrend: Response from the API. Success
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-
get_protection_sources_job_runs_report_request
(tenant_ids=None, all_under_hierarchy=None, job_ids=None, start_time_usecs=None, end_time_usecs=None, environments=None, protection_source_ids=None, output_format=None, page_count=None, run_status=None)[source]¶ Does a GET request to /public/reports/protectionSourcesJobRuns.
Returns the Snapshots that contain backups of the specified Protection Source Objects and match the specified filter criteria.
- Args:
- tenant_ids (list of string, optional): TenantIds contains ids of
the tenants for which objects are to be returned.
- all_under_hierarchy (bool, optional): AllUnderHierarchy specifies
if objects of all the tenants under the hierarchy of the logged in user’s organization should be returned.
- job_ids (list of int|long, optional): Filter by a list of Job ids.
Snapshots for the specified Protection Jobs are listed.
- start_time_usecs (int|long, optional): Filter by a start time.
Snapshots that started after the specified time are returned. Specify the end time as a Unix epoch Timestamp (in microseconds).
- end_time_usecs (int|long, optional): Filter by a end time.
Snapshots that ended before the specified time are returned. Specify the end time as a Unix epoch Timestamp (in microseconds).
- environments (EnvironmentEnum, optional): Filter by a list of
environment types such as ‘kVMware’, ‘kView’, etc.
- protection_source_ids (int|long, required): Filter by a list of
leaf Protection Sources Objects (such as VMs). Snapshots of the specified Protection Source Objects are returned.
- output_format (string, optional): Specifies the format for the
output such as ‘cvs’ or ‘json’. If not specified, the json format is returned. If ‘csv’ is specified, a comma-separated list with a heading row is returned.
- page_count (int, optional): Specifies the number of Snapshots to
return in the response for pagination purposes. Used in combination with the paginationCookie in the response to return multiple sets of Snapshots.
- run_status (RunStatusEnum, optional): Filter by a list of run
statuses such as ‘kRunning’, ‘kSuccess’, ‘kFailure’ etc. Snapshots of Job Runs with the specified run statuses are reported. ‘kSuccess’ indicates that the Job Run was successful. ‘kRunning’ indicates that the Job Run is currently running. ‘kWarning’ indicates that the Job Run was successful but warnings were issued. ‘kCancelled’ indicates that the Job Run was canceled. ‘kError’ indicates the Job Run encountered an error and did not run to completion.
- Returns:
- list of ProtectionSourcesJobRunsReportElement: Response from the
API. Success
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-
get_protection_sources_jobs_summary_report_request
(job_ids=None, start_time_usecs=None, end_time_usecs=None, environments=None, protection_source_ids=None, statuses=None, output_format=None, registered_source_id=None, consecutive_failures=None, report_name=None, report_type=None, tenant_ids=None, all_under_hierarchy=None)[source]¶ Does a GET request to /public/reports/protectionSourcesJobsSummary.
For example, if two Job ids are passed in, Snapshot summary statistics about all the leaf Objects that have been protected by the two specified Jobs are reported. For example, if a top level registered Source id is passed in, summary statistics about all the Snapshots backing up leaf Objects in the specified Source are reported.
- Args:
- job_ids (list of int|long, optional): Filter by a list of Job ids.
Snapshots summary statistics for the specified Protection Jobs are reported.
- start_time_usecs (int|long, optional): Filter by a start time.
Snapshot summary statistics for Job Runs that started after the specified time are reported. Specify the start time as a Unix epoch Timestamp (in microseconds).
- end_time_usecs (int|long, optional): Filter by end time. Snapshot
summary statistics for Job Runs that ended before the specified time are returned. Specify the end time as a Unix epoch Timestamp (in microseconds).
- environments (EnvironmentEnum, optional): Filter by a list of
environment types such as ‘kVMware’, ‘kView’, etc. NOTE: ‘kPuppeteer’ refers to Cohesity’s Remote Adapter.
- protection_source_ids (list of long|int, optional): Filter by a list of
leaf Protection Sources Objects (such as VMs). Snapshot summary statistics for the listed Protection Source Objects are reported.
- statuses (RunStatusEnum, optional): Filter by a list of run
statuses. ‘kSuccess’ indicates that the Job Run was successful. ‘kRunning’ indicates that the Job Run is currently running. ‘kWarning’ indicates that the Job Run was successful but warnings were issued. ‘kCancelled’ indicates that the Job Run was canceled. ‘kError’ indicates the Job Run encountered an error and did not run to completion.
- output_format (string, optional): Specifies the format for
the output such as ‘csv’ or ‘json’. If not specified, the json format is returned. If ‘csv’ is specified, a comma-separated list with a heading row is returned.
- registered_source_id (int, optional): Specifies an id of a top level
Registered Source such as a vCenter Server. If specified, Snapshot summary statistics for allthe leaf Protection Sources (such as VMs) that are children of this Registered Source are reported. NOTE: If specified, filtering by other fields is not supported.
- consecutive_failures (int, optional): Filters out those jobs
which have number of consecutive run failures less than consecutiveFailures.
- report_name (string, optional): Specifies the custom report name
the user wants to set for this report.
- report_type (int, optional): Specifies the report type that will
be used to set the right label & subject line for the report when downloaded or emailed because same API is used for 3 reports currently 1. kAvailableLocalSnapshotsReport 2. kFailedObjectsReport 3. kProtectionSummaryByObjectTypeReport
- tenant_ids (list of string, optional): TenantIds contains ids of
the tenants for which objects are to be returned.
- all_under_hierarchy (bool, optional): AllUnderHierarchy specifies
if objects of all the tenants under the hierarchy of the logged in user’s organization should be returned.
- Returns:
ProtectionSourcesJobsSummaryReportResponseWrapper: Response from the API. Success
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-