Get Backup Details

Scenario Overview

Get Details of the Data Backup jobs performed in the Crosswork.

Prerequisites

Before running this example, ensure to obtain access token. Refer 'Getting Started' section.

Get Backup Details

Run the script _get_backup_restore_details from the example directory.

cd cnc-bnr-api-examples;./get_backup_restore_details.sh

Script Details

#!/bin/bash
. ./cnc-api-common.sh

get_backup_restore_details() {
    # assume cnc jwt is obtained prior to invoking this method by executing get-cnc-jwt.sh script
    # read from jwt file and export it as AUTH_TOKEN_HDR
     export_jwt

    # STEP 1 :  User to update input json with details of job to be created in the file CNC_API_INPUT
    # STEP 2 :  trigger Get Backup Restore Details API
    # STEP 3 :  store the output in CNC_API_OUTPUT file

    CNC_BNR_API=$CNC_BNR_API_CTX/backup/get
    CNC_API_INPUT="$PRJ/input/get_backup_restore_details.json"	 
    CNC_API_OUTPUT="$PRJ/output/get_backup_restore_details_response.json"
    http_post $CNC_API_URL $CNC_API_INPUT $CNC_API_OUTPUT
    
}
get_backup_restore_details