Retrieve the length of a given view ID based on specified options.
dama[{keys:pgEnvs}].viewsbyId[{keys:viewIds}].options[{keys:options}].length
pgEnvs
(path parameter): The environment key.viewIds
(path parameter): The ID of the view for which the length is to be retrieved.options
(path parameter): A JSON stringified object containing various options to filter, exclude, group, and order the data.The options
parameter should be a JSON stringified object. Below is an example and description of its structure:
JSON.stringify({
"aggregatedLen": true,
"filter": { "geoid": [36001, 36002], "status": ["active"] },
"exclude": { "year": [2011, 2012], "status": ["inactive"] },
"groupBy": ["geoid", "status"],
"orderBy": { "geoid": "desc", "status": "asc" },
"gt": {col1: 150000000, col2: 150000},
"gte": {col3: 150000000, col4: 150000},
"lt": {col5: 150000000, col6: 150000},
"lte": {col7: 150000000, col8: 150000},
"like": {"geoid": '36%'}
})
boolean
): Indicates if the result should consider aggregation. Set to true
if groupBy
is used.object
): Specifies the filter conditions. Keys are column names, and values are arrays of acceptable values for those columns."filter": { "geoid": [36001, 36002], "status": ["active"] }
object
): Specifies the exclude conditions. Keys are column names, and values are arrays of values to be excluded from those columns."exclude": { "year": [2011, 2012], "status": ["inactive"] }
object
): Specifies the comparison conditions. Keys are column names, and values are numbers to be compared."gt": { "loss": 15000 }
%
character will be included in the strings to denote wildcard matches.%
: Represents zero or more characters._
: Represents a single character.jsonCopy code"like": { "name": "John%" }
array
): An array of column names or numbers to group the data by."groupBy": ["geoid", "status"]
object
): Specifies the ordering of the results. Keys are column names, and values are the sort order ('asc'
for ascending, 'desc'
for descending)."orderBy": { "geoid": "desc", "status": "asc" }
options
parameter is properly JSON stringified before sending the request.aggregatedLen
should be set to true
if you are using the groupBy
option to get the correct length considering the aggregation.Retrieve data for a given view ID based on specified options, indices, and attributes.
dama[{keys:pgEnvs}].viewsbyId[{keys:viewIds}].options[{keys:options}].databyIndex[{integers:indices}][{keys:attributes}]
pgEnvs
(path parameter): The environment key.viewIds
(path parameter): The ID of the view for which the data is to be retrieved.options
(path parameter): A JSON stringified object containing various options to filter, exclude, group, and order the data.indices
(path parameter): An object specifying the range of indices in the form {from: x, to: y}
.attributes
(path parameter): An array of column names for which the data is to be retrieved.The indices
parameter should specify the range of indices to retrieve. It is an object with from
and to
keys.
{ "from": 0, "to": 10 }
The attributes
parameter should be an array of column names for which the data is to be retrieved.
["geoid", "status", "year"]
options
parameter is properly JSON stringified before sending the request.indices
parameter must specify a valid range in the form {from: x, to: y}
.attributes
parameter must be an array of valid column names.options
parameter and other shared information, refer to the "Get Length by View ID"