Computation

Listing of label values. The resulting data are limited by the static platform limit to the maximum of 10000 rows.

Returns paged list of elements (values) of given label satisfying given filtering criteria.

post/api/v1/actions/workspaces/{workspaceId}/execution/collectLabelElements

Request

  • Base URL
    https://www.gooddata.ai
  • Auth
    none declared

Path parameters

workspaceIdstring required

Workspace identifier

Query parameters

offsetinteger

Request page with this offset. Must be positive integer. The API is limited to the maximum of 10000 items. Therefore this parameter is limited to this number as well.

limitinteger

Return only this number of items. Must be positive integer. The API is limited to the maximum of 10000 items. Therefore this parameter is limited to this number as well.

Headers

skip-cacheboolean

Ignore all caches during execution of current request.

Request body

cacheIdstring

If specified, the element data will be taken from the result with the same cacheId if it is available.

complementFilterboolean

Inverse filters:

  • false - return items matching patternFilter and exactFilter
  • true - return items not matching patternFilter and exactFilter
dataSamplingPercentagenumber float

Specifies percentage of source table data scanned during the computation. This field is deprecated and is no longer used during the elements computation.

exactFilterstring[]

Return only items, whose label title exactly matches one of filter.

excludePrimaryLabelboolean

Excludes items from the result that differ only by primary label

  • false - return items with distinct primary label
  • true - return items with distinct requested label
labelstring required

Requested label.

patternFilterstring

Return only items, whose label title case insensitively contains filter as substring.

sortOrder'ASC' | 'DESC'

Sort order of returned items. Items are sorted by label title. If no sort order is specified then attribute's sortDirection is used, which is ASC by default

timezonestring

Time zone (IANA id, e.g. "Europe/Prague") used to resolve relative date filters in dependsOn. If set it takes precedence over the workspace/user time zone setting; if not set the setting is used.

type'label' | 'computedAttribute'

Type of the object label refers to. A set type is taken at its word; an unset one means a label, with a computed attribute of the same id accepted as a fallback.

Example request

{
  "dependsOn": [
    {
      "dateFilter": {
        "absoluteGranularityDateFilter": {
          "dataset": {
            "identifier": {
              "id": "sample_item.price"
            }
          },
          "from": "2012-05",
          "granularity": "MONTH",
          "to": "2012-08"
        }
      }
    }
  ],
  "label": "label_id",
  "timezone": "Europe/Prague"
}

Response

List of label values.

cacheIdstring

The client can use this in subsequent requests (like paging or search) to get results from the same point in time as the previous request. This is useful when the underlying data source has caches disabled and the client wants to avoid seeing inconsistent results and to also avoid excessive queries to the database itself.

dataType'INT' | 'STRING' | 'DATE' | 'NUMERIC' | 'TIMESTAMP' | 'TIMESTAMP_TZ' | 'BOOLEAN' | 'HLL'

Data type of the element values, only filled for computed attributes.

granularity'SECOND' | 'SECOND_OF_MINUTE' | 'SECOND_OF_DAY' | 'MINUTE' | 'MINUTE_OF_HOUR' | 'MINUTE_OF_DAY' | 'HOUR' | 'HOUR_OF_DAY' | 'DAY' | 'DAY_OF_WEEK' | 'DAY_OF_MONTH' | 'DAY_OF_QUARTER' | 'DAY_OF_YEAR' | 'WEEK' | 'WEEK_OF_YEAR' | 'MONTH' | 'MONTH_OF_YEAR' | 'QUARTER' | 'QUARTER_OF_YEAR' | 'YEAR' | 'FISCAL_DAY_OF_FISCAL_WEEK' | 'FISCAL_DAY_OF_FISCAL_MONTH' | 'FISCAL_DAY_OF_FISCAL_QUARTER' | 'FISCAL_DAY_OF_FISCAL_SEMESTER' | 'FISCAL_DAY_OF_FISCAL_YEAR' | 'FISCAL_WEEK' | 'FISCAL_WEEK_OF_FISCAL_MONTH' | 'FISCAL_WEEK_OF_FISCAL_QUARTER' | 'FISCAL_WEEK_OF_FISCAL_SEMESTER' | 'FISCAL_WEEK_OF_FISCAL_YEAR' | 'FISCAL_MONTH' | 'FISCAL_MONTH_OF_FISCAL_QUARTER' | 'FISCAL_MONTH_OF_FISCAL_SEMESTER' | 'FISCAL_MONTH_OF_FISCAL_YEAR' | 'FISCAL_QUARTER' | 'FISCAL_QUARTER_OF_FISCAL_SEMESTER' | 'FISCAL_QUARTER_OF_FISCAL_YEAR' | 'FISCAL_SEMESTER' | 'FISCAL_SEMESTER_OF_FISCAL_YEAR' | 'FISCAL_YEAR'

Granularity of requested label in case of date attribute

numberFormatstring

Format to be used to format the element values, the same kind of format string as the measure format. Only filled for computed attributes with a format and INT or NUMERIC data type.

Example response

{
  "paging": {
    "count": 5,
    "next": "https://sample.gooddata.ai/api/v1/actions/workspaces/sampleWorkspace/execution/collectLabelElements?label=sample.price&limit=5&offset=10",
    "offset": 10,
    "total": 100
  },
  "primaryLabel": {
    "id": "sample_item.price",
    "type": "fact"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.