Search with the API
Learn how to search your data using the API
Info
Search is an intermediate/advanced topic.
The Onna API provides a rich search experience through the @frontsearch
endpoint.
By providing different values in the payload of the POST
, you can find content in your Onna account.
# Requirements
Make sure that you're authenticated with your Onna instance.
- You'll need access to the
curl
command to follow the examples below. - You'll need your access token when you run the
curl
commands below.
Info
You can get your token from the Inspector tools in Google Chrome, Firefox, Safari.
Inspect XHR calls and look in the header for the bearer token.
Check our Postman documentation if you need more info about how to lookup your token in Firefox or Chrome.
# Examples
# Multi-word query - Search constrained by path
curl 'https://enterprise.onna.com/api/<container>/<account>/@frontsearch' \
-H 'authority: enterprise.onna.com' \
-H 'pragma: no-cache' \
-H 'cache-control: no-cache' \
-H 'accept: application/json' \
-H 'dnt: 1' \
-H 'authorization: Bearer ...' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36' \
-H 'content-type: application/json' \
-H 'origin: https://enterprise.onna.com' \
-H 'sec-fetch-site: same-origin' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-dest: empty' \
--data-binary '{"facets":[],"size":0,"from":0,"hide_children":true,"includes":["@id","@name","@uid","uuid","computed_title","parent_datasource","extension","parent_title","parent_content_type","path","favorites","md5","processing_date","behaviors","creators","parent_user","parent_origin_resource_kind","origin","breadcrumbs","summary","description","content_length","from_mail","from_mail_name","to_mail","to_mail_name","origin_label_ids","date_created","parent_workspace"],"highlight":true,"advanced":{"and":[{"text_contains":[{"var":"extracted_text"},"german"]},{"text_contains":[{"var":"extracted_text"},"shorthair"]},{"text_contains":[{"var":"extracted_text"},"pointer"]},{"text_contains":[{"var":"path"},"/user@domain.com/folder-1585684422048"]},{"text_contains":[{"var":"type_name"},"Resource"]},{"and_not":[{"and":[{"text_contains":[{"var":"subresource"},"quip"]},{"in":[{"var":"extension"},["Image"]]}]}]},{"and_not":[{"and":[{"text_contains":[{"var":"parent_content_type"},"message/rfc822"]},{"in":[{"var":"extension"},["Image"]]}]}]}]},"aggs_includes":["workspaces","parent_source_types","extension_types","users","tags","date_created"]}' \
--compressed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
The body of the POST
to @frontsearch
is what controls the search:
Expand to see the example
{
"facets": [],
"size": 0,
"from": 0,
"hide_children": true,
"includes": [
"@id",
"@name",
"@uid",
"uuid",
"computed_title",
"parent_datasource",
"extension",
"parent_title",
"parent_content_type",
"path",
"favorites",
"md5",
"processing_date",
"behaviors",
"creators",
"parent_user",
"parent_origin_resource_kind",
"origin",
"breadcrumbs",
"summary",
"description",
"content_length",
"from_mail",
"from_mail_name",
"to_mail",
"to_mail_name",
"origin_label_ids",
"date_created",
"parent_workspace"
],
"highlight": true,
"advanced": {
"and": [
{
"text_contains": [
{
"var": "extracted_text"
},
"german"
]
},
{
"text_contains": [
{
"var": "extracted_text"
},
"shorthair"
]
},
{
"text_contains": [
{
"var": "extracted_text"
},
"pointer"
]
},
{
"text_contains": [
{
"var": "path"
},
"/user@domain.com/folder-1585684422048"
]
},
{
"text_contains": [
{
"var": "type_name"
},
"Resource"
]
},
{
"and_not": [
{
"and": [
{
"text_contains": [
{
"var": "subresource"
},
"quip"
]
},
{
"in": [
{
"var": "extension"
},
[
"Image"
]
]
}
]
}
]
},
{
"and_not": [
{
"and": [
{
"text_contains": [
{
"var": "parent_content_type"
},
"message/rfc822"
]
},
{
"in": [
{
"var": "extension"
},
[
"Image"
]
]
}
]
}
]
}
]
},
"aggs_includes": [
"workspaces",
"parent_source_types",
"extension_types",
"users",
"tags",
"date_created"
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
This search is restricted to a specific path and the search terms are in body of the post.
Path restriction is via {"text_contains":[{"var":"path"},"/user@domain.com/folder-1585684422048"]}
in the POST
body.
In this case, the folder-1585684422048
is the internal ID of a Folder.
The search terms are:
`"advanced":{"and":[{"text_contains":[{"var":"extracted_text"},"german"]},{"text_contains":[{"var":"extracted_text"},"shorthair"]},{"text_contains":[{"var":"extracted_text"},"pointer"]}`
By default, highlighting is turned on: "highlight":true
The includes
key is a list of the rich metadata fields that are populated on a Resource as part of the Onna processing pipeline.
To search for the same terms across all the content you have access to, remove the path.
The body will look like the following example:
Expand to see the example
{
"facets": [],
"size": 0,
"from": 0,
"hide_children": true,
"includes": [
"@id",
"@name",
"@uid",
"uuid",
"computed_title",
"parent_datasource",
"extension",
"parent_title",
"parent_content_type",
"path",
"favorites",
"md5",
"processing_date",
"behaviors",
"creators",
"parent_user",
"parent_origin_resource_kind",
"origin",
"breadcrumbs",
"summary",
"description",
"content_length",
"from_mail",
"from_mail_name",
"to_mail",
"to_mail_name",
"origin_label_ids",
"date_created",
"parent_workspace"
],
"highlight": true,
"advanced": {
"and": [
{
"text_contains": [
{
"var": "extracted_text"
},
"german"
]
},
{
"text_contains": [
{
"var": "extracted_text"
},
"shorthair"
]
},
{
"text_contains": [
{
"var": "extracted_text"
},
"pointer"
]
},
{
"and_not": [
{
"and": [
{
"text_contains": [
{
"var": "subresource"
},
"quip"
]
},
{
"in": [
{
"var": "extension"
},
[
"Image"
]
]
}
]
}
]
},
{
"and_not": [
{
"and": [
{
"text_contains": [
{
"var": "parent_content_type"
},
"message/rfc822"
]
},
{
"in": [
{
"var": "extension"
},
[
"Image"
]
]
}
]
}
]
}
]
},
"aggs_includes": [
"workspaces",
"parent_source_types",
"extension_types",
"users",
"tags",
"date_created"
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
The search endpoint will be used with the above POST
body:
https://enterprise.onna.com/api/<container>/<account>/@frontsearch
# Date modifiers
Using the same @frontsearch
endpoint as above, substituting the following JSON
body.
Expand to see the example
{
"facets": [],
"size": 100,
"from": 0,
"hide_children": true,
"includes": [
"@id",
"@name",
"@uid",
"uuid",
"computed_title",
"parent_datasource",
"extension",
"parent_title",
"parent_content_type",
"path",
"favorites",
"md5",
"processing_date",
"behaviors",
"creators",
"parent_user",
"parent_origin_resource_kind",
"origin",
"breadcrumbs",
"summary",
"description",
"content_length",
"from_mail",
"from_mail_name",
"to_mail",
"to_mail_name",
"origin_label_ids",
"date_created",
"parent_workspace"
],
"highlight": true,
"advanced": {
"and": [
{
">": [
{
"var": "date_modified"
},
"2020-07-28"
]
},
{
"and_not": [
{
"and": [
{
"text_contains": [
{
"var": "subresource"
},
"quip"
]
},
{
"in": [
{
"var": "extension"
},
[
"Image"
]
]
}
]
}
]
},
{
"and_not": [
{
"and": [
{
"text_contains": [
{
"var": "parent_content_type"
},
"message/rfc822"
]
},
{
"in": [
{
"var": "extension"
},
[
"Image"
]
]
}
]
}
]
}
]
},
"aggs_includes": [
"workspaces",
"parent_source_types",
"extension_types",
"users",
"tags",
"date_created"
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
In this case, only searching for content that has been modified after 2020-07-28. This will return all content that meets this criteria.
You can combine the above searches:
Expand to see the example
{
"facets": [],
"size": 50,
"from": 0,
"hide_children": true,
"includes": [
"@id",
"@name",
"@uid",
"uuid",
"computed_title",
"parent_datasource",
"extension",
"parent_title",
"parent_content_type",
"path",
"favorites",
"md5",
"processing_date",
"behaviors",
"creators",
"parent_user",
"parent_origin_resource_kind",
"origin",
"breadcrumbs",
"summary",
"description",
"content_length",
"from_mail",
"from_mail_name",
"to_mail",
"to_mail_name",
"origin_label_ids",
"date_created",
"parent_workspace"
],
"highlight": true,
"advanced": {
"and": [
{
">": [
{
"var": "date_modified"
},
"2020-07-28"
]
},
{
"text_contains": [
{
"var": "extracted_text"
},
"german"
]
},
{
"text_contains": [
{
"var": "extracted_text"
},
"shorthair"
]
},
{
"text_contains": [
{
"var": "extracted_text"
},
"pointer"
]
},
{
"and_not": [
{
"and": [
{
"text_contains": [
{
"var": "subresource"
},
"quip"
]
},
{
"in": [
{
"var": "extension"
},
[
"Image"
]
]
}
]
}
]
},
{
"and_not": [
{
"and": [
{
"text_contains": [
{
"var": "parent_content_type"
},
"message/rfc822"
]
},
{
"in": [
{
"var": "extension"
},
[
"Image"
]
]
}
]
}
]
}
]
},
"aggs_includes": [
"workspaces",
"parent_source_types",
"extension_types",
"users",
"tags",
"date_created"
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Search only for PDF
To search for a specific resource type PDF, the payload looks like the following:
Expand to see the example
{
"facets": [],
"size": 100,
"from": 0,
"hide_children": true,
"includes": [
"@id",
"@name",
"@uid",
"uuid",
"computed_title",
"parent_datasource",
"extension",
"parent_title",
"parent_content_type",
"path",
"favorites",
"md5",
"processing_date",
"behaviors",
"creators",
"parent_user",
"parent_origin_resource_kind",
"origin",
"breadcrumbs",
"summary",
"description",
"content_length",
"from_mail",
"from_mail_name",
"to_mail",
"to_mail_name",
"origin_label_ids",
"date_created",
"parent_workspace"
],
"highlight": true,
"advanced": {
"and": [
{
"or": [
{
"in": [
{
"var": "origin_resource_kind"
},
[
"pdf"
]
]
},
{
"in": [
{
"var": "extension_type"
},
[
"pdf"
]
]
},
{
"in": [
{
"var": "extension"
},
[
"pdf"
]
]
}
]
},
{
"and_not": [
{
"and": [
{
"text_contains": [
{
"var": "subresource"
},
"quip"
]
},
{
"in": [
{
"var": "extension"
},
[
"Image"
]
]
}
]
}
]
},
{
"and_not": [
{
"and": [
{
"text_contains": [
{
"var": "parent_content_type"
},
"message/rfc822"
]
},
{
"in": [
{
"var": "extension"
},
[
"Image"
]
]
}
]
}
]
}
]
},
"aggs_includes": [
"workspaces",
"parent_source_types",
"extension_types",
"users",
"tags",
"date_created"
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
The relevant part being:
"advanced":{"and":[{"or":[{"in":[{"var":"origin_resource_kind"},["pdf"]]},{"in":[{"var":"extension_type"},["pdf"]]},{"in":[{"var":"extension"},["pdf"]]}]}, ...
# Search only in conversations
You can also search conversations:
"advanced":{"and":[{"or":[{"in":[{"var":"origin_resource_kind"},["conversation"]]},{"in":[{"var":"extension_type"},["conversation"]]},{"in":[{"var":"extension"},["conversation"]]}]}, ...
This will search across Slack conversations that involve User1, User2 and User3
Expand to see the example
{
"facets": [],
"size": 50,
"from": 0,
"hide_children": true,
"includes": [
"@id",
"@name",
"@uid",
"uuid",
"computed_title",
"parent_datasource",
"extension",
"parent_title",
"parent_content_type",
"path",
"favorites",
"md5",
"processing_date",
"behaviors",
"creators",
"parent_user",
"parent_origin_resource_kind",
"origin",
"breadcrumbs",
"summary",
"description",
"content_length",
"from_mail",
"from_mail_name",
"to_mail",
"to_mail_name",
"origin_label_ids",
"date_created",
"parent_workspace"
],
"highlight": true,
"advanced": {
"and": [
{
"or": [
{
"in": [
{
"var": "origin_resource_kind"
},
[
"conversation"
]
]
},
{
"in": [
{
"var": "extension_type"
},
[
"conversation"
]
]
},
{
"in": [
{
"var": "extension"
},
[
"conversation"
]
]
}
]
},
{
"or": [
{
"text_contains": [
{
"var": "related_users_names"
},
"user1"
]
},
{
"text_contains": [
{
"var": "entities_person"
},
"user1"
]
}
]
},
{
"or": [
{
"text_contains": [
{
"var": "related_users_names"
},
"User2"
]
},
{
"text_contains": [
{
"var": "entities_person"
},
"User2"
]
}
]
},
{
"or": [
{
"text_contains": [
{
"var": "related_users_names"
},
"User3"
]
},
{
"text_contains": [
{
"var": "entities_person"
},
"User3"
]
}
]
},
{
"text_contains": [
{
"var": "path"
},
"/user1@domain.com/a850a1cc483b44678dbf024675c5fa76"
]
},
{
"text_contains": [
{
"var": "type_name"
},
"Resource"
]
},
{
"and_not": [
{
"and": [
{
"text_contains": [
{
"var": "subresource"
},
"quip"
]
},
{
"in": [
{
"var": "extension"
},
[
"Image"
]
]
}
]
}
]
},
{
"and_not": [
{
"and": [
{
"text_contains": [
{
"var": "parent_content_type"
},
"message/rfc822"
]
},
{
"in": [
{
"var": "extension"
},
[
"Image"
]
]
}
]
}
]
}
]
},
"aggs_includes": [
"workspaces",
"parent_source_types",
"extension_types",
"users",
"tags",
"date_created"
]
}}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
Resource types available include:
- Documents
- Emails
- Conversations
- Spreadsheets
- Presentations
You also can refine our searches by the extension of the content, txt
or docx
.
You may also want to find content that has been created by a specific user:
Expand to see the example
{
"facets": [],
"size": 50,
"from": 0,
"hide_children": true,
"includes": [
"@id",
"@name",
"@uid",
"uuid",
"computed_title",
"parent_datasource",
"extension",
"parent_title",
"parent_content_type",
"path",
"favorites",
"md5",
"processing_date",
"behaviors",
"creators",
"parent_user",
"parent_origin_resource_kind",
"origin",
"breadcrumbs",
"summary",
"description",
"content_length",
"from_mail",
"from_mail_name",
"to_mail",
"to_mail_name",
"origin_label_ids",
"date_created",
"parent_workspace"
],
"highlight": true,
"advanced": {
"and": [
{
"not_in": [
{
"var": "creators"
},
[
"user@domain.com"
]
]
},
{
"and_not": [
{
"and": [
{
"text_contains": [
{
"var": "subresource"
},
"quip"
]
},
{
"in": [
{
"var": "extension"
},
[
"Image"
]
]
}
]
}
]
},
{
"and_not": [
{
"and": [
{
"text_contains": [
{
"var": "parent_content_type"
},
"message/rfc822"
]
},
{
"in": [
{
"var": "extension"
},
[
"Image"
]
]
}
]
}
]
}
]
},
"aggs_includes": [
"workspaces",
"parent_source_types",
"extension_types",
"users",
"tags",
"date_created"
]
}}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Here, you are searching for resources that have been created by user@domain.com
:
"advanced":{"and":[{"not_in":[{"var":"creators"},["user@domain.com"]]}...
# Suggestions
Based on metadata fields, the search engine can create a list of suggestions based on the search terms provided and the content you have access to.
This works at the account level, so you won't see suggestions based off of data you don't have permissions to.
curl 'https://enterprise.onna.com/api/<container>/<account>/@suggestions?term=CORS' \
-H 'authority: enterprise.onna.com' \
-H 'pragma: no-cache' \
-H 'cache-control: no-cache' \
-H 'accept: application/json' \
-H 'dnt: 1' \
-H 'authorization: Bearer ...' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36' \
-H 'content-type: application/json' \
-H 'sec-fetch-site: same-origin' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-dest: empty' \
-H 'accept-language: en-US,en;q=0.9' \
--compressed
2
3
4
5
6
7
8
9
10
11
12
13
14
# Filtering, sorting, pagination
Search on term "commit"
# Pagination
In the payload the size
parameter defines the number of results in this batch, and the from
parameter defines the starting value.
{"facets":[],"size":100,"from":0,"hide_children":true,"includes":["@id","@name","@uid","uuid","computed_title","parent_datasource","extension","parent_title","parent_content_type","path","favorites","md5","processing_date","behaviors","creators","parent_user","parent_origin_resource_kind","origin","breadcrumbs","summary","description","content_length","from_mail","from_mail_name","to_mail","to_mail_name","origin_label_ids","date_created","parent_workspace"],"highlight":true,"advanced":{"and":[{"text_contains":[{"var":"extracted_text"},"commit"]},{"and_not":[{"and":[{"text_contains":[{"var":"subresource"},"quip"]},{"in":[{"var":"extension"},["Image"]]}]}]},{"and_not":[{"and":[{"text_contains":[{"var":"parent_content_type"},"message/rfc822"]},{"in":[{"var":"extension"},["Image"]]}]}]}]},"aggs_includes":["workspaces","parent_source_types","extension_types","users","tags","date_created"]}
Paginate from the 100th result, show the next 50 results
{"facets":[],"size":50,"from":100,"hide_children":true,"includes":["@id","@name","@uid","uuid","computed_title","parent_datasource","extension","parent_title","parent_content_type","path","favorites","md5","processing_date","behaviors","creators","parent_user","parent_origin_resource_kind","origin","breadcrumbs","summary","description","content_length","from_mail","from_mail_name","to_mail","to_mail_name","origin_label_ids","date_created","parent_workspace"],"highlight":true,"advanced":{"and":[{"text_contains":[{"var":"extracted_text"},"commit"]},{"and_not":[{"and":[{"text_contains":[{"var":"subresource"},"quip"]},{"in":[{"var":"extension"},["Image"]]}]}]},{"and_not":[{"and":[{"text_contains":[{"var":"parent_content_type"},"message/rfc822"]},{"in":[{"var":"extension"},["Image"]]}]}]}]},"aggs_includes":["workspaces","parent_source_types","extension_types","users","tags","date_created"]}
Adjusting the from
parameter will fetch the next results. The number of results fetched is determined by the size
parameter.
To filter the results, the facets
parameter is populated. In this example, the results are filtered on the source type, in this case GMail.
{"facets":[{"facetType":"parent_source_types","facetsSelected":["GMailDatasource"]}],"size":100,"from":0,"hide_children":true,"includes":["@id","@name","@uid","uuid","computed_title","parent_datasource","extension","parent_title","parent_content_type","path","favorites","md5","processing_date","behaviors","creators","parent_user","parent_origin_resource_kind","origin","breadcrumbs","summary","description","content_length","from_mail","from_mail_name","to_mail","to_mail_name","origin_label_ids","date_created","parent_workspace"],"highlight":true,"advanced":{"and":[{"text_contains":[{"var":"extracted_text"},"commit"]},{"and_not":[{"and":[{"text_contains":[{"var":"subresource"},"quip"]},{"in":[{"var":"extension"},["Image"]]}]}]},{"and_not":[{"and":[{"text_contains":[{"var":"parent_content_type"},"message/rfc822"]},{"in":[{"var":"extension"},["Image"]]}]}]}]},"aggs_includes":["workspaces","parent_source_types","extension_types","users","tags","date_created"]}
The filter is applied via the facets
value:
{"facets":[{"facetType":"parent_source_types","facetsSelected":["GMailDatasource"]}]...
You can add more than one filter condition to the query:
{"facets":[{"facetType":"parent_source_types","facetsSelected":["GMailDatasource"]},{"facetType":"users","facetsSelected":["user@domain.com"]}]...
In this example the query is filtered on both users
and parent_source_type
.
Adding a file type filter looks like the following:
{"facets":[{"facetType":"parent_source_types","facetsSelected":["GMailDatasource"]},{"facetType":"users","facetsSelected":["user@domain.com"]},{"facetType":"extension_types","facetsSelected":["Email"]}]...
Limit to the past 60 days:
{"facets":[{"facetType":"parent_source_types","facetsSelected":["GMailDatasource"]},{"facetType":"users","facetsSelected":["user@domain.com"]},{"facetType":"extension_types","facetsSelected":["Email"]},{"facetType":"date_created","facetsSelected":["60"]}]...
Filter on a tag:
{"facets":[{"facetType":"tags","facetsSelected":["contract"]}]...
Filter on a workspace and a tag:
{"facets":[{"facetType":"tags","facetsSelected":["contract"]},{"facetType":"workspaces","facetsSelected":["06e063f3d76445adb8..."]}]