Newer Version Available

This content describes an older version of this product. View Latest

Lenses List Resource

Returns a list of Analytics lenses (GET), or creates a lens (POST).
Resource URL
Formats
JSON
Available Version
36.0
HTTP Methods
GET and POST
GET Request Parameters
Parameter Name Type Description Required or Optional Available Version
folderId ID Filters the results to include only the contents of a specific folder. Can be the requesting user’s ID for items in the user’s private folder. Optional 36.0
page String A generated token that indicates the view of the lenses to be returned. Optional 36.0
pageSize Int Number of items to be returned in a single page. Minimum is 1, maximum is 200, and default is 25. Optional 36.0
q String Search terms. Individual terms are separated by spaces. Wild cards aren’t supported.
For example, if you have lenses with the following names:
  • Opportunities_Created_2010
  • Opportunities_Created_2011
Setting q = “Opportunities 2010” returns only Opportunities_Created_2010.
Optional 36.0
scope Enum Type of scope to be applied to a collection resource representation (CreatedByMe, IncludeAllPrivate, or SharedWithMe) 41.0
sort String Sort order of the results. Values are:
  • LastModified
  • Mru: Most recently used (last viewed date)
  • Name

The default is Mru.

Optional 36.0
GET Response Body
Property Name Type Description Filter Group and Version Available Version
lenses Lens[] List of lenses available to the current user. Small, 36.0 36.0
nextPageUrl String The URL to retrieve the next page of contents in the collection. Small, 36.0 36.0
totalSize Integer The total count of the elements in the collection, including all pages. Medium, 36.0 36.0
url String The URL to retrieve the collection. Small, 36.0 36.0
Example Response Body
Request Body (for POST and /wave/lenses/<lens ID> PATCH)
Property Name Type Description Required or Optional Available Version
dataset Asset​Reference​Input​Representation The dataset to be used to create this lens. Required for POST, optional for PATCH 36.0
folder Asset​Reference​Input​Representation Folder in which this lens is stored. Required for POST, optional for PATCH 36.0
state State Input The state of the lens. Required for POST, optional for PATCH 36.0
visualizationType String The visualization type to be used for this lens. Values are:
  • calheatmap: Calendar heat map
  • comparisontable: Compare table
  • heatmap: Heat map
  • hbar: Bar
  • hbarhdot: Horizontal dot plot
  • matrix: Matrix
  • parallelcoords: Parallel coordinates
  • pie: Donut
  • pivottable: Pivot table
  • scatter: Scatter plot
  • stackhbar: Stacked bar
  • stackvbar: Stacked column
  • time: Timeline
  • valuestable: Values table
  • vbar: Column
  • vdot: Vertical dot plot
Required for POST, optional for PATCH 36.0
AssetReferenceInputRepresentation
Property Name Type Description Required or Optional Available Version
id String ID of the asset 36.0
name String Developer name of the asset 36.0
State Input
Property Name Type Description Required or Optional Available Version
columns Column[] A list of the columns for a comparison table lens. Must be specified for comparison tables only. 36.0
options Lens Visualization Options Input The configuration options for different lens visualizations. Optional 36.0
query Query​Input​Representation The SAQL query to be used to create this lens. If using any visualization type other than comparison table, you are required to specify this property. 36.0
QueryInputRepresentation
Property Name Type Description Required or Optional Available Version
query String The SAQL query. 36.0
version Double The version of the SAQL query. 36.0
Lens Visualization Options Input
Property Name Type Description Required or Optional Available Version
fit Boolean Indicates whether to scale the position and size of data shape so that it is proportional to the percentage of its category. Optional 36.0
hide​Header​Column Boolean Indicates whether to display a header column. Optional 36.0
legend Boolean Indicates whether to show a legend. Optional 36.0
legend​Hide​Header Boolean Indicates whether to hide the legend header. Optional 36.0
legendWidth Integer The width of the legend Optional 36.0
maxColumnWidth Integer The maximum width of the header column. Optional 36.0
minColumnWidth Integer The minimum width of the header column. Optional 36.0
miniBars Integer The width of the mini-bars, if used. Optional 36.0
multiMetrics Boolean When true, indicates that multiple measures are displayed on the same chart, side-by-side. When false, each measure is displayed on a separate chart. The default is false. Optional 36.0
normalize Boolean Scale the position and size of the data shape so that it’s proportional to the percentage of its category. Optional 36.0
splitAxis Boolean When true, each measure is projected onto one axis. When false, all measures use the same axis. Optional 36.0
sqrt Boolean Indicates that the horizontal and vertical axes use a square root scale. Optional 36.0
totals Boolean Indicates whether to display totals in the table. Optional 36.0
trellis Boolean When true, the last group is treated as a trellis dimension. Every distinct value of the dimension is a chart. Optional 36.0
POST Response Body
Lens