Schema Discovery

Link to section

Overview

The definitive source for the current schema is the /v1/meta endpoint. Always use schema discovery to:

  • Get the latest schema - New measures and dimensions are added over time
  • Validate your queries - Ensure measures and dimensions exist before querying
  • Discover data freshness - Check refresh intervals for each cube
  • Find available segments - Use predefined filters for common scenarios

For a complete guide to metadata structure, parsing, and caching strategies, see Metadata Discovery.

Link to section

Quick schema discovery

Link to section

Get All Available Cubes and Views

curl -X GET "https://connect.squareup.com/reporting/v1/meta" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" | jq '.cubes[] | {name, type}'
Link to section

Get Details for a Specific Cube

curl -X GET "https://connect.squareup.com/reporting/v1/meta" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" | \ jq '.cubes[] | select(.name == "Orders")'
Link to section

List All Measures for a Cube

curl -X GET "https://connect.squareup.com/reporting/v1/meta" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" | \ jq '.cubes[] | select(.name == "Orders") | .measures[] | {name, title, aggType, description}'
Link to section

List All Segments for a Cube

curl -X GET "https://connect.squareup.com/reporting/v1/meta" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" | \ jq '.cubes[] | select(.name == "Orders") | .segments[] | {name, title, description}'
Link to section

Interactive schema explorer

For interactive browsing and exploration, use the Schema Explorer.