Logo
Acronis Cyber Platform's Public API Documentation

Alerts Generator

Number of APIs: 6


To generate real alerts in the Acronis protection console, API users have to pass real data in the payloads.

To facilitate this, Acronis has prepared a Qodex collection, which includes a set of alert examples and their payloads.

Prerequisites

  1. [Download and install Qodex]

  2. [If not created] Create an API client in your tenant as described in the following document:
    https://www.acronis.com/en-us/support/documentation/AcronisCyberCloud/index.html#creating-api-client.html

  3. [If not created] Create a customer tenant where you will register your workload and create alerts as described in the following document:
    https://www.acronis.com/en-us/support/documentation/AcronisCyberCloud/index.html#tenant-create.html

  4. Obtain the customer tenant ID as follows:

    1. Log in to the management portal.
    2. On the Clients tab, select the target customer tenant where your workload is or will be registered.
    3. On the tenant properties panel, click the vertical ellipsis icon, and then click Show ID.
    4. Copy the text string that is shown in the Internal ID field, and then click Cancel.
  5. [If there are no workloads in the customer tenant] Install the Acronis agent on your workload and register it in the customer tenant as described in the following document:
    https://www.acronis.com/en-us/support/documentation/CyberProtectionService/#installing-software.html

  6. [If not created] Create a protection plan and assign it to your registered workload as described here:
    https://www.acronis.com/en-us/support/documentation/CyberProtectionService/#creating-protection-plan.html

Qodex collection contents

  1. Authenticate - fetches the authentication token using your API client credentials. The token is used by other requests in this collection.

  2. Fetch workloads - fetches the list of workloads and their attributes.

  3. Fetch applied protection plans - fetches the list of protection plans applied to the workload.

  4. Fetch protection plan - fetches the information about the protection plan.

  5. Post an alert - post an alert to Acronis Cyber Protect Cloud.

  6. Retrieve alert types - fetches the list of available alert types.

StartFragment

Configure the collection variables

Base variables

  1. In the Alerts Generator collection, open the Variables tab.

  2. Set base_url to the URL of your data center. For example, https://eu8-cloud.acronis.com

  3. Set tenant_id to the customer tenant ID.

  4. Set client_id to the client ID of your API client.

  5. Set client_secret to the client secret of your API client.

Workload variables

  1. [If not authenticated] Open the Authenticate request and click Send.

  2. Open the Fetch workloads request and click Send.

  3. Set the following variables with corresponding payload field values:

    1. Set resourceId to the value of the id field.
    2. Set resourceName and machineName to the value of the name field.
    3. Set causingTenantName to the value of the tenant_name field.
    4. Set causingTenantId to the value of the tenant_id field.
    5. Set agentId to the value of the agent_id field.

Protection plan variables

  1. [If not authenticated] Open the Authenticate request and click Send.

  2. Open the Fetch applied protection plans request and click Send. The planId variable will be automatically populated from the payload if your workload has the plan assigned.

  3. Open the Fetch protection plan request and click Send. The planName variable will be automatically populated from the payload.

StartFragment

Post an alert

  1. [If not authenticated] Open the Authenticate request and click Send.

  2. Expand the Post an alert request.

  3. Select any alert example and click Try.

If the request is successful, the alert will appear in the Acronis protection console.
StartFragment

To add more examples of alerts

  1. [If not authenticated] Open the Authenticate request and click Send.

  2. Open the Retrieve alert types request and click Send. The response payload will include the list of alerts types.
    In this way, we can determine what the minimum requirement for a payload of a specific alert is.

  3. It's a must for us the satisfy the contextKeys list for a type and place those as keys in the payload.
    Alerts with a null value in searchableDetails are general alerts, which are not bound to a device. Alerts that require resourceId to be passed are considered device alerts.


1. Authenticate

POST {{base_url}}/api/2/idp/token



2. Fetch workloads

GET {{base_url}}/api/resource_management/v4/resources?type=resource.machine&include_attributes=true



3. Fetch protection plan

GET {{base_url}}/api/policy_management/v4/policies/{{planId}}



4. Post an alert

POST {{base_url}}/api/alert_manager/v1/alerts



ENDPOINTS