Version 2021

Filter Data

You can use REST API requests to filter data that is returned and to retrieve information about filters that were applied:

Filter Report and Cube Onstances

You can use the following REST APIs to filter the data that is returned when you create an instance of a report or cube:

  • POST /reports/{reportId}/instances
  • POST /cubes/{cubeId}/instances

Because these filters are applied to instances, they are not persisted.

You define how the data should be filtered in the body parameter of the request. You can filter the data that is returned in the following ways:

If you use both a viewFilter and a requestedObjects parameter in the HTTP request, the view filter will be applied first. The requested objects definition will then be applied to the filtered results (a subset of the cube data), rather than to the cube data itself.

Filter Dossier Instances

You can use the following REST APIs to filter the data that is returned when you create or update an instance of a dossier, including clearing the filter selections.

  • POST /dossiers/{dossierId}/instances
    Create an instance of a specific dossier with the existing filter applied, including clearing all of the current filter selections.
  • PUT /dossiers/{dossierId}/instances/{instanceId}/filters
    Execute an existing dossier instance with new filter selections, including clearing all of the current filter selections.

We have provided a sample workflow that illustrates how to create an instance of a dossier with an existing filter applied, and then re-execute the same dossier instance with updated selections for the same filter.

For detailed information about filtering data in dossiers, see the MicroStrategy product help.

Retrieve Filters Applied in Dossier Chapters

You can use the following REST API to get information about the filter applied in each chapter in a specific dossier, including the key and name of the filter, a text summary of the filter expression, and information for the filter source.

  • GET /dossiers/{dossierId}/definition

Retrieve Filters Applied to a Visualization in a Dossier

You can use the following REST API request to return information about the filters that were applied to a visualization in a dossier:

  • GET /dossiers/{dossierId}/instances/{instanceId}/chapters/{chapterKey/visualizations/{visualizationKey}

The following types of filters are applied at specific points in the data aggregation process.