NetBackup™ for Apache Cassandra Administrator's Guide

Last Published:
Product(s): NetBackup & Alta Data Protection (10.5)

Using APIs to manage, protect, or recover Cassandra assets

In this document, you will find details about NetBackup APIs for the Cassandra workload operations. The operations include asset management, filtering, sorting, recovery management and protection plan management. For each API end point, the user can find detailed information about the requests, responses, errors, and payloads in this document.

See the following for information on the APIs:

Create or update Cassandra assets

The API creates the requested Cassandra assets - Cassandra cluster, Cassandra node, DSS cluster, and DSS node.

The request payload can contain detailed information about a single asset or a combination of assets. A Cassandra asset can be created or updated in two steps:

  • To retrieve the generated ID, a POST request must be made.

  • It is necessary to make a GET request, which saves the asset in the database.

Table: 1. Request parameters for Cassandra Cluster and Cassandra Nodes

API

Important variables and options

https://PrimaryerverName

/netbackup/asset-service/queries/
  • Workloads: cassandra

  • assetType: Defines the asset type - cluster

  • credentialName: Credential name used for asset service.

  • workloadType: cassandra

  • clusterName: Valid Cassandra Cluster name.

https://PrimaryServerName
/netbackup/asset-service/queries/
  • Workloads: cassandra

  • assetType: Defines the asset type - node

  • workloadType: cassandra

Table: 2. 3. Request parameters for Data Staging Cluster and Nodes

API

Important variables and options

https://PrimaryServerName
/netbackup/asset-service/queries/
  • Workloads: cassandra

  • assetType: Defines the asset type - cluster, node, dataStagingCluster

  • workloadType: cassandra

  • clusterName: Valid Cassandra Cluster name.

https://PrimaryServerName
/netbackup/asset-service/queries/
  • Workloads: cassandra

  • assetType: Defines the asset type - dataStagingNode.

  • workloadType: cassandra

Table: Response parameters

API

Important variables and options

https://PrimaryServerName
/netbackup/asset-service/queries/
Response parameters
  • type Name of the query response type.

  • id: Response Id for asset creations/modification

  • links: Complete asset link

Method: Get

Assets are stored using this API in the NetBackup database. It uses the GET method with a valid asset response ID in the URL.

Table: Response of storing Assets to Database

API

Important variables and options

https://PrimaryServerName
/netbackup/asset-service/queries/
Asset Response ID
  • id: Response Asset ID for create-or-update-assets query

  • status: Asset Response status - Success, Failed and In progress

  • percentComplete: Percent of completion

  • totalWorkItems: Number of Response Items

  • totalSuccessfulWorkItems: Number of successful items

  • totalFailedWorkItems: Number of failed items

  • totalInProgressWorkItems

Delete Asset Payload

A specific asset or all assets can be deleted from the NetBackup database using this API. An individual assetType, such as a node or dataStagingNode, can be deleted. It deletes all corresponding child nodes associated with a cluster or dataStagingCluster if you use this API to delete assetType as cluster or dataStagingCluster.

Table: Request Payload for Deleting Assets

API options

Important variables and options

https://PrimaryServerName
/netbackup/asset-service/queries
  • type Name of the query response type.

  • queryName Name of the query to create or update different assets

  • workloads - cassandra

  • correlationId - It is an identifier for tracking a work item

  • id - Id assigned to the asset

  • assetType - Type of Asset {node, dataStagingNode, dataStagingCluster, cluster}

Request Payload for removing Assets from Database

Database assets can be deleted using this API. This is the 2nd request used with the delete response id received from the previous request.

Table:

Method

URL

GET

https://PrimaryServerName
/netbackup/asset-service/queries/
Asset Delete Response ID

For example: bcc0eb1f-6613-427d-8101-19376fd689f7

Table: Response of removing Assets from Database

API

Important variables and options

https://PrimaryServerName
/netbackup/asset-service/queries/
Asset Delete Response ID

For example: bcc0eb1f-6613-427d-8101-19376fd689f7

  • type Name of the Operation response type

  • id - Response Id for Generic delete-assets

  • status - - Asset Response status - SUCCESS

  • percentComplete - Percent of completion

  • totalWorkItems - No of total Response work Items

  • totalSuccessfulWorkItems - No of total Success work Items

  • totalFailedWorkItems - No of total failed work Items

  • totalInProgressWorkItems - No of total in progress work Items

  • correlationId - It is an identifier for tracking a work item

  • status - Asset response status

  • message - Asset response message

  • percentComplete - Percent of completion

  • offset

  • limit

  • hasNext

  • first

Table: Request for Get all Asset

https://PrimaryServerName
/netbackup/asset-service/
workloads/cassandra/assets

Assets

Response of Get all Assets

All the assets are listed on default descending order, refer Get asset by ID table for response parameter details. According to the Get asset by ID table, all assets are listed in default descending order.

Get asset by ID

This API is used to get specific asset details. Details about specific assets can be obtained using this API.

Method: GET

Table:

API

Important variables and options

https://PrimaryServerName/
netbackup/asset-service/workloads/
cassandra/assets/Asset ID
  • type - Name of the Operation response type

  • id - Response Id for Generic delete-assets

  • assetType - Defines type of asset

  • displayName - Name of asset

  • providerGeneratedId - Auto generated ID for asset

https://PrimaryServerName/
netbackup/asset-service/workloads/
cassandra//Asset ID
  • parentProviderGeneratedId - Auto generated id for nodes and dataStagingNodes

  • clusterName - cassndra

Filters

Filters can be applied on any of the below API endpoints:

  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'node'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'dataStagingCluster'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'dataStagingNode'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'node' and parentProviderGeneratedId eq '
    CASSANDRA_cluster_Cassandra10'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster' and commonAssetAttributes/
    providerGeneratedId eq 'CASSANDRA_cluster_Cassandra1'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster' and 
    dataStagingClusterName eq 'DSS1'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster' and 
    backupDataCenterName eq 'earthCenter'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'node' and 
    nodeIp eq '10.221.110.234'
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=(assetType eq 'cluster') and 
    (contains(tolower(clusterName), 'cassandra1'))
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=(assetType eq 'cluster') and 
    (clusterName eq 'Cassandra1')&meta=accessControlId
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster' and 
    clusterName eq 'Cassandra10'

Table:

Fil

er Parameters

Filter Criteria

Value

Description

assetType/
queryName/
workloads/
correlationId/
credentialName/
workloadType/
displayName/
clusterName/
dataStaging
ClusterName/
backupData
CenterName/
nodeDownThreshold
Percentage/
parentProvider
Generated

eq

cluster, node, dataStagingCluster and dataStagingNode

Asset filter based on asset types

eq

'node' and parentProviderGeneratedId

eq 'CASSANDRA_cluster_Cassandra1'

 

eq

'cluster' and commonAssetAttributes/

providerGeneratedId eq 'CASSANDRA_cluster_Cassandra1'

 

eq

'cluster' and dataStagingClusterName

eq 'DSS1'

 

eq

'cluster' and backupDataCenterName

eq 'earthCenter'

 

eq

'node' and nodeIp

eq '10.221.105.94'

 

eq

(assetType eq 'cluster') and

(contains(tolower(clusterName), 'cassandra1'))

 

eq

(assetType eq 'cluster') and

(clusterName eq

'Cassandra1')&meta=accessControlId

 
Sorting

Sorting can be applied on any of the below API endpoints:

  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster'&sort=clusterName
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster'&sort=-clusterName
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster'&sort=commonAssetAttributes.
    credentials.credentialName
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'cluster'&sort=-commonAssetAttributes
    .credentials.credentialName
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'node'&sort=
    parentProviderGeneratedId
  • https://PrimaryServerName/netbackup/asset-service/workloads/cassandra/
    assets?filter=assetType eq 'node'&sort=
    -parentProviderGeneratedId

Table:

Filter Parameters

Filter Criteria

Value

Description

assetType

eq

cluster'&sort=clusterName

 

assetType

eq

node and parentProviderGeneratedId eq 'CASSANDRA_cluster_Cassandra1

 

assetType

eq

cluster'&sort=

commonAssetAttributes

.credentials.credentialName

 

assetType

eq

'cluster'&sort=-commonAssetAttributes.

credentials.credentialName

 

assetType

eq

'node'&sort=

 

assetType

eq

parentProvider

GeneratedId

 

assetType

eq

'node'

&sort=-parentProvider

GeneratedId

 
Protection plan

The below APIs create or update the policy which is used to trigger actual backup operation on the associated asset. These APIs help to create or update the policy for both incremental and full backup. Basis the created policies, the backup jobs are automatically triggered based on the schedule details provided.

Table: Create SLO : Full and Differential Incremental

Method

Post

https://PrimaryServerName/
netbackup/servicecatalog/slos
 

Table: Request Payload for Creating SLO:

API

Important variables and options

https://PrimaryServerName
/netbackup/servicecatalog/slos
  • name

  • scheduleType

  • backupStorageUnit

  • dayOfWeek

  • startSeconds

  • durationSeconds

  • frquencySeconds

  • workloadType

  • policyNamePrefix

  • policyDefinition

Table: Response of Creating SLO

API

Important variables and options

https://PrimaryServerName/
netbackup/servicecatalog/slos
  • 201 - Successfully created the SLO definition.

  • 400 - Bad request

  • 401 - The Authorization header is missing, the token is invalid, or you do not have permission for this action.

  • 409 - An SLO with the same name already exists.

  • 500 - An unexpected system error occurred.

Create Subscription

Table:

Method

Post

https://{{hostname}}/netbackup/
servicecatalog/slos/
{{newsloid}}/subscriptions
 

Table: Request Payload for Creating Subscription:

API

Important variables and options

https://{{hostname}}/netbackup/
servicecatalog/slos/
{{newsloid}}/subscriptions
  • selectionId

  • selectionType

Table: Response of Creating Subscription

API

Important variables and options

https://{{hostname}}/netbackup/
servicecatalog/slos/
{{newsloid}}/subscriptions
  • 201 - Successfully created the Subscription

  • 400 - Bad request

  • 401 - The Authorization header is missing, the token is invalid, or you do not have permission for this action.

  • 409 - An SLO with the same name already exists.

  • 500 - An unexpected system error occurred.

Discovery

The discovery APIs cater actual initiation or stopping of the discovery over given asset.

Table: Start discovery

API

Important variables and options

https://{{HOSTNAME}}/netbackup/
admin/discovery/workloads/cassandra/start
  • Data

  • Type

  • Attribute

  • serverName

Table: Stop discovery

API

Important variables and options

https://{{HOSTNAME}}/netbackup/admin/
discovery/workloads/cassandra/stop
  • Data

  • Type

  • Attribute

  • serverName

Recovery request

The Recovery APIs cater actual recovery of specific Cassandra asset, based on the details of recovery point, source, destination etc.

Table:

API

Important variables and options

POST /recovery/workloads/cassandra/
scenarios/cluster/recover
  • Data

  • Type

  • Attribute

  • recoveryPoint

  • client

  • filter

  • backupId

  • recoveryObject

  • clusterNewName

  • recoveryOptions

  • backupHost

  • additionalBackupHosts

  • nbu-backup-host2

  • nbu-backup-host3

  • nbu-backup-host4

  • overwrite

  • restoreSelections

  • selectionType

  • selectionCriteria

  • keyspace

Table: Response of Recover API

API

Important Response codes

POST /recovery/workloads/cassandra/
scenarios/cluster/recover
  • 201 - The recovery job started successfully.

  • 400 - Some mandatory attributes were not found or the specified client, backup image, or the input JSON was invalid.

  • 401 - The Authorization header is missing, the token is invalid, or you do not have permission for this action.

  • 404 - The specified client or backup image was not found

  • 406 - Invalid Accept type. Make sure your Accept header matches what this API produces

  • 415 - Unsupported Media Type. The media type specified in the Content-Type header is not supported by this API.

  • 500 - Internal server error. Failed to start recovery.

  • 503 - The server is busy. Failed to start recovery.