Fetch automated test failover screenshot

  1. Authenticate to the cloud platform via the Python shell.

    The following variables should be available now:

    >>> base_url  # the base URL of the API
    '<the Acronis data center URL>/api/dr/v2'
    >>> auth  # the 'Authorization' header value with the access token
    {'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImMwMD...'}
    >>> tenant_id # the ID of the partner tenant that can be accessed with the token
    'ede9f834-70b3-476c-83d9-736f9f8c7dae'
    
  2. Obtain scoped access token for the customer tenant.

    As a result, the following variables should be available:

    >>> scoped_auth # the 'Authorization' header value with the scoped access token
    {'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImMwMD...'}
    
  3. Fetch the information about the recovery server by its ID and store the information in the recovery_server variable.

    >>> recovery_server = response.json()
    
  4. In the automated_test_failover field:

    1. Check the screenshot_link link for full-size of the automated test failover result:

      >>> screenshot_link = recovery_server['automated_test_failover']['screenshot_link']
      
    2. Check the screenshot_preview_link for a preview of the automated test failover result:

      >>> screenshot_link = recovery_server['automated_test_failover']['screenshot_preview_link']
      
  5. If the screenshot_link is not None, you can use it to download and view the automated test failover result, or open in a web browser.

    >>> if screenshot_link is not None:
    ...     print(f"Full-size screenshot: {screenshot_link}")
    ... else:
    ...     print("No screenshot available.")