Script API: View
Fetch a list of views.
This page describes StackState version 4.0.
The StackState 4.0 version range is End of Life (EOL) and no longer supported. We encourage customers still running the 4.0 version range to upgrade to a more recent release.
Function getAll
getAll
Returns a list of all views.
Args:
None
Return type:
AsyncScriptResult[List[QueryViewResponse]]
Fields:
QueryViewResponse.view
- theQueryView
objectQueryViewResponse.viewInfo
- (optional)ViewInfo
structure holding extra information that can be requested using builder methods
The QueryView
type has the following fields:
QueryView.name
- the name of the viewQueryView.description
- the description of the viewQueryView.state
- View state object, holding view stateQueryView.query
- STQL query which can be used subsequently in getting topology using Topology Script Api
The ViewInfo
type has the following fields:
ViewInfo.stars.count
- the number of times a star was given by any user to the view
Builder methods
withStarCount
- adds the number of times a star was given by any user to the view info of each view.
If this flag is set the query response will contain the viewInfo
holding star count. The stars count is available on this path viewResponse.viewInfo.stars.count
Examples:
The following example collects the names of all components in all views.
Last updated