Retrieve views
Action:GETEndpoint:
/views
This endpoint returns an array of objects that describe the available views. Each object contains metadata about a view, such as the default filters and aggregation level, if available.
Response body
| Fields | Description |
|---|---|
| default_date string Returned | Date field used in the default filter for API requests without a date range in the query filter. Allowable Values: Name of a date field in the view schema. |
| default_filter object Returned | Object that describes the default filter for API requests without a date range in the query filter. Allowable Values: default_date_field_name , fields |
| display string Returned | Summary field for the related report in the Marqeta Dashboard. Allowable Values: 255 char max |
| endpoint string Returned | Relative URL to the DiVA API endpoint for retrieving the view. Allowable Values: 255 char max |
| expansion object Returned | Object that describes the expandable fields for a schema. Expanding a field value returns a more detailed breakdown of data for that field. For example, you can pass the expand=pin_purchase_net parameter to the /views/activitybalances/day endpoint to break out PIN purchases by card network (such as maestro_pin_net and cirrus_pin_net ).Null if no values are expandable. Allowable Values: expand_argument_<n> |
| fields_domain string Returned | List of all fields that are available in the view schema. Allowable Values: Comma-delimited list of fields in the view schema. |
| filter_domain string Returned | List of fields that are not returned as data in the view but that you can use for filtering results (indicated by the is_filter_only field in the view schema).Allowable Values: Comma-delimited list of fields in the view schema. |
| report string Returned | Category of the related report in the Marqeta Dashboard. Allowable Values: 255 char max |
| schema string Returned | Relative URL to the DiVA API endpoint for retrieving the view schema. Allowable Values: 255 char max |
| type string Returned | Name of the related report in the Marqeta Dashboard. Allowable Values: 255 char max |
The default_filter object (response)
| Fields | Description |
|---|---|
| fields string Returned | View fields returned by default for API requests without a field filter. Allowable Values: Comma-delimited list of fields in the view schema. |
| default_date_field_name string Returned | Date range filter applied for API requests without a date range in the query filter. The default date range includes results for a recent period of time based on when the query is run. Allowable Values: Date range following the query filter syntax . |
The expansion object (response)
| Fields | Description |
|---|---|
| expand_argument_1 … expand_argument_N string Returned | Name of an argument to the expand query parameter, and list of additional fields that the argument returns. For example,json JSON "expansion": { "pin_purchases_net": "maestro_pin_net,...", "sig_purchases_net": "mastercard_sig_purchases,...", } Allowable Values: Name-value pairs of an argument name and a comma-delimited list of additional field names. |
Sample response body
The following sample shows a representative JSON response for aGET request to the /views?program=my_program endpoint.
JSON