|
| 1 | +type: object |
| 2 | +properties: |
| 3 | + website_id: |
| 4 | + type: string |
| 5 | + format: uuid |
| 6 | + description: ID of a website. |
| 7 | + example: 70236925-724f-404e-b634-7b5633bc0bcc |
| 8 | + columns: |
| 9 | + type: array |
| 10 | + description: | |
| 11 | + Definitions of additional columns that should be returned (timestamp and |
| 12 | + identifiers will be returned by default). |
| 13 | + items: |
| 14 | + type: object |
| 15 | + properties: |
| 16 | + column_id: |
| 17 | + type: string |
| 18 | + description: ID of the dimension column. |
| 19 | + transformation_id: |
| 20 | + type: string |
| 21 | + description: | |
| 22 | + Optional ID of the transformation. Must be supported by |
| 23 | + the column that was specified and must convert the column |
| 24 | + into another dimension (and not a metric). |
| 25 | + required: |
| 26 | + - column_id |
| 27 | + example: [{"column_id":"resolution"},{"column_id":"device_type"}] |
| 28 | + date_from: |
| 29 | + type: string |
| 30 | + format: datetime |
| 31 | + description: Start date (with time) for the query (inclusive, in website's timezone). |
| 32 | + date_to: |
| 33 | + type: string |
| 34 | + format: datetime |
| 35 | + description: End date (with time) for the query (exclusive, in website's timezone). |
| 36 | + filters: |
| 37 | + type: object |
| 38 | + description: | |
| 39 | + Dimension filters for the query. The top-level object must specify |
| 40 | + AND/OR clause, but any nested objects may either specify another AND/OR |
| 41 | + clause or a single filter. |
| 42 | + properties: |
| 43 | + operator: |
| 44 | + type: string |
| 45 | + description: Logical operator (AND/OR) for the clause. |
| 46 | + enum: |
| 47 | + - and |
| 48 | + - or |
| 49 | + conditions: |
| 50 | + type: array |
| 51 | + description: List of filters or recursively nested clauses. |
| 52 | + items: |
| 53 | + type: object |
| 54 | + required: |
| 55 | + - column_id |
| 56 | + - condition |
| 57 | + properties: |
| 58 | + column_id: |
| 59 | + type: string |
| 60 | + description: ID of the dimension column. |
| 61 | + transformation_id: |
| 62 | + type: string |
| 63 | + description: | |
| 64 | + Optional ID of the transformation. Must be supported by |
| 65 | + the column that was specified and must convert the column |
| 66 | + into another dimension (and not a metric). |
| 67 | + condition: |
| 68 | + type: object |
| 69 | + description: Definition of a the condition for this column. |
| 70 | + properties: |
| 71 | + operator: |
| 72 | + type: string |
| 73 | + description: | |
| 74 | + Filtering operator. Available choices depend on |
| 75 | + the specified column's type. |
| 76 | +
|
| 77 | + String operators: ``eq``, ``neq``, |
| 78 | + ``starts_with``, ``ends_with``. |
| 79 | + ``starts_with``, ``ends_with``, |
| 80 | + ``matches``, ``not_matches``. For regular expressions (operators: ``matches`` and ``not_matches``) |
| 81 | + use [re2](https://github.com/google/re2/wiki/Syntax) syntax. |
| 82 | +
|
| 83 | + Numeric operators: ``eq``, ``neq``, ``gt``, ``gte``, |
| 84 | + ``lt``, ``lte``. |
| 85 | +
|
| 86 | + Boolean operators: ``eq``, ``neq``. |
| 87 | +
|
| 88 | + Enum operators: ``eq``, ``neq``, ``empty``, ``not_empty``. |
| 89 | + value: |
| 90 | + description: | |
| 91 | + Value that should be matched by filter. Value type must |
| 92 | + match the type of the specified column. For enumerated |
| 93 | + fields, you must use the ID value. |
| 94 | + required: |
| 95 | + - operator |
| 96 | + - value |
| 97 | + example: {"column_id":"browser_name","condition":{"operator":"eq","value":"FF"}} |
| 98 | + required: |
| 99 | + - operator |
| 100 | + - conditions |
| 101 | + offset: |
| 102 | + type: integer |
| 103 | + default: 0 |
| 104 | + minimum: 0 |
| 105 | + description: Number of rows to skip before beginning to return rows. |
| 106 | + limit: |
| 107 | + type: integer |
| 108 | + default: 100 |
| 109 | + minimum: 1 |
| 110 | + maximum: 100000 |
| 111 | + description: Number of rows to return. |
| 112 | + format: |
| 113 | + type: string |
| 114 | + enum: |
| 115 | + - json |
| 116 | + - json-kv |
| 117 | + - csv |
| 118 | + default: json |
| 119 | + description: | |
| 120 | + Data format of a successful response (error responses are always in json). |
| 121 | + column_format: |
| 122 | + type: string |
| 123 | + enum: |
| 124 | + - id |
| 125 | + - name |
| 126 | + default: id |
| 127 | + description: | |
| 128 | + Format of the columns header (in CSV responses) and metadata labels |
| 129 | + (in JSON responses). By default uses identifiers (``id`` option), set to |
| 130 | + ``name`` to use human-readable names. |
| 131 | +required: |
| 132 | + - website_id |
| 133 | + - columns |
| 134 | + - date_from |
| 135 | + - date_to |
| 136 | +example: |
| 137 | + website_id: 70236925-724f-404e-b634-7b5633bc0bcc |
| 138 | + columns: |
| 139 | + - column_id: resolution |
| 140 | + - column_id: device_type |
| 141 | + date_from: '2024-02-10 12:23:00' |
| 142 | + date_to: '2024-02-10 12:58:00' |
| 143 | + filters: |
| 144 | + operator: and |
| 145 | + conditions: |
| 146 | + - column_id: browser_name |
| 147 | + condition: |
| 148 | + operator: eq |
| 149 | + value: FF |
| 150 | + offset: 0 |
| 151 | + limit: 100 |
| 152 | + format: json |
0 commit comments