Skip to content

Commit 824cddc

Browse files
[7.13] Add 7.13 release notes
Co-authored-by: Seth Michael Larson <[email protected]>
1 parent 4b52137 commit 824cddc

File tree

3 files changed

+143
-1
lines changed

3 files changed

+143
-1
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[[release-notes-7-13-0]]
2+
=== 7.13.0 Release Notes
3+
4+
[discrete]
5+
==== General
6+
7+
- Updated APIs to the 7.13 specification
8+
9+
[discrete]
10+
==== Workplace Search
11+
12+
- The client now supports Basic Authentication and Elasticsearch tokens.
13+
All Workplace Search APIs support Basic Authentication, Elasticsearch tokens
14+
and Workplace Search admin user access tokens as an authentication method.
15+
You still need to set up user access tokens generated by the Workplace Search OAuth
16+
Service for the Search API and the Analytics Events API.
17+
18+
- Added the `get_document`, `delete_all_documents`, `get_content_source`,
19+
`create_content_source`, `delete_content_source`, `list_content_sources`,
20+
and `put_content_source` APIs.

docs/guide/release-notes/index.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
[discrete]
55
=== 7.x
66

7+
* <<release-notes-7-13-0, 7.13.0 Release Notes>>
78
* <<release-notes-7-12-0, 7.12.0 Release Notes>>
89
* <<release-notes-7-11-0, 7.11.0 Release Notes>>
910
* <<release-notes-7-10-0, 7.10.0-beta1 Release Notes>>
1011

12+
include::7-13-0.asciidoc[]
1113
include::7-12-0.asciidoc[]
1214
include::7-11-0.asciidoc[]
1315
include::7-10-0.asciidoc[]

docs/guide/workplace-search-api.asciidoc

Lines changed: 121 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
* <<workplace-search-initializing>>
66
* <<workplace-search-document-apis>>
7+
* <<workplace-search-content-source-apis>>
78
* <<workplace-search-search-apis>>
89
* <<workplace-search-permissions-apis>>
910
* <<oauth-apps>>
@@ -100,6 +101,33 @@ workplace_search.index_documents(
100101
}
101102
---------------
102103

104+
==== Get Document
105+
106+
To get a single document by ID use the `get_document()` method:
107+
108+
[source,python]
109+
---------------
110+
# Request:
111+
workplace_search.get_document(
112+
content_source_id="<CONTENT_SOURCE_ID>",
113+
document_id="<DOCUMENT_ID>"
114+
)
115+
116+
# Response:
117+
{
118+
"id": "<DOCUMENT_ID>",
119+
"source": "custom",
120+
"content_source_id": "<CONTENT_SOURCE_ID>",
121+
"last_updated": "2021-03-02T22:41:16+00:00",
122+
"text_field": "some text value",
123+
"number_field": 42,
124+
"date_field": "2021-03-02T22:41:16+00:00",
125+
"geolocation_field": "44.35,-68.21",
126+
"_allow_permissions": ["perm1", "perm2"],
127+
"_deny_permissions": ["perm3", "perm4"]
128+
}
129+
---------------
130+
103131
==== Delete Documents
104132

105133
To remove documents from a custom content source use the `delete_documents()` method
@@ -111,7 +139,7 @@ and supply a list of document IDs to `body`:
111139
workplace_search.delete_documents(
112140
http_auth="<CONTENT_SOURCE_ACCESS_TOKEN>",
113141
content_source_id="<CONTENT_SOURCE_ID>",
114-
body=[1234, 1235]
142+
document_ids=[1234, 1235]
115143
)
116144
117145
# Response:
@@ -129,6 +157,98 @@ workplace_search.delete_documents(
129157
}
130158
---------------
131159

160+
[[workplace-search-content-source-apis]]
161+
=== Content Source APIs
162+
163+
==== Create Content Source
164+
165+
[source,python]
166+
---------------
167+
workplace_search.create_content_source(
168+
body={
169+
"name": "Content Source Name",
170+
"schema": {
171+
"title": "text",
172+
"body": "text",
173+
"url": "text"
174+
},
175+
"display": {
176+
"title_field": "title",
177+
"url_field": "url",
178+
"color": "#f00f00"
179+
},
180+
"is_searchable": True
181+
}
182+
)
183+
---------------
184+
185+
==== Get Content Source
186+
187+
[source,python]
188+
---------------
189+
workplace_search.get_content_source(
190+
content_source_id="<CONTENT_SOURCE_ID>"
191+
)
192+
---------------
193+
194+
==== List Content Sources
195+
196+
[source,python]
197+
---------------
198+
# Request:
199+
workplace_search.list_content_sources()
200+
201+
# Response:
202+
{
203+
"meta": {
204+
"page": {
205+
"current": 1,
206+
"total_pages": 1,
207+
"total_results": 4,
208+
"size": 25
209+
}
210+
},
211+
"results": [
212+
{ <CONTENT SOURCE> },
213+
...
214+
]
215+
}
216+
217+
218+
---------------
219+
220+
==== Update Content Source
221+
222+
[source,python]
223+
---------------
224+
workplace_search.put_content_source(
225+
content_source_id="<CONTENT_SOURCE_ID>",
226+
body={
227+
"name": "Content Source Name",
228+
"schema": {
229+
"title": "text",
230+
"body": "text",
231+
"url": "text"
232+
},
233+
"display": {
234+
"title_field": "title",
235+
"url_field": "url",
236+
"color": "#f00f00"
237+
},
238+
"is_searchable": True
239+
}
240+
)
241+
---------------
242+
243+
==== Delete Content Source
244+
245+
[source,python]
246+
---------------
247+
workplace_search.delete_content_source(
248+
content_source_id="<CONTENT_SOURCE_ID>"
249+
)
250+
---------------
251+
132252
[[workplace-search-search-apis]]
133253
=== Search APIs
134254

0 commit comments

Comments
 (0)