Unable to schedule reports through API - Aria Operations
search cancel

Unable to schedule reports through API - Aria Operations

book

Article ID: 382508

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

When attempting to schedule a report using the API call:

POST ​/api​/reportdefinitions​/{id}​/schedules


The operations fails with a response HTTP response code 422.

{
  "message": "The combination of resource id, report template id and the traversal spec is invalid : Report template id - \"<REPORT_ID>\" , resource id - \"<RESOURCE_ID>\" , traversal spec - \"<TRAVERSAL_SPEC_DETAILS>\".",
  "httpStatusCode": 422,
  "apiErrorCode": 422
}

 

Environment

Aria Operations 8.x

Cause

  • The traversal spec in the body of the request is incorrect
  • The object that the report is being scheduled on is not valid and scheduling would also not be possible in the UI.

Resolution

Confirm that the traversal spec is correct and the object is a valid object for scheduling this report on.

  1. Login to the Aria Operations UI as the same user that you intend to schedule the report though the API for.
  2. Browse to Operations >> Reports
  3. Click on Manage
  4. Schedule the report on the same object using the UI to confirm that the object is valid.
  5. Take note of the ID of the report by enabling the ID from the "Show Columns" box at the bottom of the "Report Templates" table
  6. Open the Aria Ops Swagger UI by browsing to:

    https://<Aria_Ops_FQDN>/suite-api/

  7. Expand the Reports section 
  8. Run the following API call using the ID from step 5.

    GET ​/api​/reportdefinitions​/{id}​/schedules

  9. The response from the previous call will contain the correct traversalSpec details for the object.
    Retry the following call to schedule the report using this traversalSpec instead:

    POST ​/api​/reportdefinitions​/{id}​/schedules