NetBackup™ Asset Service APIs Getting Started Guide

Last Published:
Product(s): NetBackup & Alta Data Protection (9.1, 9.0.0.1, 9.0, 8.3.0.1, 8.3)

Named Queries

A Named Query is a capability exposed by workload providers in the Asset Service. The Asset Service provides generic REST endpoints/APIs to allow the execution of the provider's Named Query.

The execution of a Named Query is a two step process:

  1. Initiate a query by POSTing to Asset Service with a request payload.

    POST /asset-service/queries

    The request payload includes the query name, workloads, and workload/query specific parameters. If the workloads field is empty, the query will be executed by all supported workloads

    For the JSON schema definition of the request payload for a specified workload, refer to data.attributes.requestSchema of the response of the following API:

    GET /asset-service/workloads/{workload}/schemas/{queryName}

    Query Id{queryId} is returned as a response.

    The query ID of this Named Query execution is a short-lived resource. It expires after 30 minutes of inactivity. If the Asset Service is under heavy load, the result set could expire earlier.

  2. A GET on the query ID should fetch the results of the initiated query.

    GET /asset-service/queries/{queryId}

    For a complete JSON schema definition of the results of a specified Named Query for a specified workload, refer to data.attributes.responseSchema of the response of the following API:

    GET /asset-service/workloads/{workload}/schemas/{queryName}