Guide to Using the APIs
This document serves as a comprehensive guide for utilizing the CloudiDR Cyber Policy APIs. It outlines the necessary steps to view cyber policy details, list policies for customers, initiate disaster recovery events, and terminate ongoing events. Each section provides clear instructions and highlights potential errors that may arise during API interactions, ensuring users can effectively manage their cyber policies.
1. Viewing Cyber Policy Details
To view details of a specific cyber policy, make a GET request to the endpoint with the required cidr_id
. Include the authorization token in the request headers. If the cidr_id
is valid, the response will contain detailed policy information, including region settings, instances, and disaster recovery events. If the cidr_id
is incorrect, you will receive a 404 Not Found error. Ensure that the access token is valid to avoid a 401 Unauthorized error.
2. Listing Cyber Policies for a Customer
To fetch all cyber policies associated with a customer, send a GET request to the endpoint using the cid_ext
identifier. You can include optional query parameters like page
, pageSize
, sort
, policyStatus
, and policyName
to refine the results. If policies exist for the customer, they will be listed in the response. If none are found, an empty result set will be returned. Invalid or missing authentication will lead to a 401 Unauthorized error, and server issues may result in a 500 Internal Server Error.
3. Initiating a Cyber Policy Event
To initiate a disaster recovery event, send a POST request to the endpoint with the cidr_id
. The authorization token must be included in the headers. If the event is successfully created, the response will confirm its initiation. If an event has already been triggered, the response will indicate that no new event is required. If the cidr_id
does not exist, a 404 Not Found error will be returned. Invalid authentication will lead to a 401 Unauthorized error.
4. Terminating a Cyber Policy Event
To terminate an ongoing disaster recovery event, send a POST request to the endpoint with the cidr_id
. Ensure the request includes a valid authorization token. A successful response confirms event termination. If the event has already been terminated, the response will indicate that no further action is needed. If the cidr_id
is incorrect, a 404 Not Found error will occur. An invalid token will result in a 401 Unauthorized error.
Ensure all API requests include valid authentication and correct identifiers to avoid errors.