Skip to content

Commit

Permalink
[7.13] Add 7.13 release notes
Browse files Browse the repository at this point in the history
Co-authored-by: Seth Michael Larson <[email protected]>
  • Loading branch information
github-actions[bot] and sethmlarson authored May 24, 2021
1 parent 4b52137 commit 824cddc
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 1 deletion.
20 changes: 20 additions & 0 deletions docs/guide/release-notes/7-13-0.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[[release-notes-7-13-0]]
=== 7.13.0 Release Notes

[discrete]
==== General

- Updated APIs to the 7.13 specification

[discrete]
==== Workplace Search

- The client now supports Basic Authentication and Elasticsearch tokens.
All Workplace Search APIs support Basic Authentication, Elasticsearch tokens
and Workplace Search admin user access tokens as an authentication method.
You still need to set up user access tokens generated by the Workplace Search OAuth
Service for the Search API and the Analytics Events API.

- Added the `get_document`, `delete_all_documents`, `get_content_source`,
`create_content_source`, `delete_content_source`, `list_content_sources`,
and `put_content_source` APIs.
2 changes: 2 additions & 0 deletions docs/guide/release-notes/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
[discrete]
=== 7.x

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

include::7-13-0.asciidoc[]
include::7-12-0.asciidoc[]
include::7-11-0.asciidoc[]
include::7-10-0.asciidoc[]
122 changes: 121 additions & 1 deletion docs/guide/workplace-search-api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* <<workplace-search-initializing>>
* <<workplace-search-document-apis>>
* <<workplace-search-content-source-apis>>
* <<workplace-search-search-apis>>
* <<workplace-search-permissions-apis>>
* <<oauth-apps>>
Expand Down Expand Up @@ -100,6 +101,33 @@ workplace_search.index_documents(
}
---------------

==== Get Document

To get a single document by ID use the `get_document()` method:

[source,python]
---------------
# Request:
workplace_search.get_document(
content_source_id="<CONTENT_SOURCE_ID>",
document_id="<DOCUMENT_ID>"
)
# Response:
{
"id": "<DOCUMENT_ID>",
"source": "custom",
"content_source_id": "<CONTENT_SOURCE_ID>",
"last_updated": "2021-03-02T22:41:16+00:00",
"text_field": "some text value",
"number_field": 42,
"date_field": "2021-03-02T22:41:16+00:00",
"geolocation_field": "44.35,-68.21",
"_allow_permissions": ["perm1", "perm2"],
"_deny_permissions": ["perm3", "perm4"]
}
---------------

==== Delete Documents

To remove documents from a custom content source use the `delete_documents()` method
Expand All @@ -111,7 +139,7 @@ and supply a list of document IDs to `body`:
workplace_search.delete_documents(
http_auth="<CONTENT_SOURCE_ACCESS_TOKEN>",
content_source_id="<CONTENT_SOURCE_ID>",
body=[1234, 1235]
document_ids=[1234, 1235]
)
# Response:
Expand All @@ -129,6 +157,98 @@ workplace_search.delete_documents(
}
---------------

[[workplace-search-content-source-apis]]
=== Content Source APIs

==== Create Content Source

[source,python]
---------------
workplace_search.create_content_source(
body={
"name": "Content Source Name",
"schema": {
"title": "text",
"body": "text",
"url": "text"
},
"display": {
"title_field": "title",
"url_field": "url",
"color": "#f00f00"
},
"is_searchable": True
}
)
---------------

==== Get Content Source

[source,python]
---------------
workplace_search.get_content_source(
content_source_id="<CONTENT_SOURCE_ID>"
)
---------------

==== List Content Sources

[source,python]
---------------
# Request:
workplace_search.list_content_sources()
# Response:
{
"meta": {
"page": {
"current": 1,
"total_pages": 1,
"total_results": 4,
"size": 25
}
},
"results": [
{ <CONTENT SOURCE> },
...
]
}
---------------

==== Update Content Source

[source,python]
---------------
workplace_search.put_content_source(
content_source_id="<CONTENT_SOURCE_ID>",
body={
"name": "Content Source Name",
"schema": {
"title": "text",
"body": "text",
"url": "text"
},
"display": {
"title_field": "title",
"url_field": "url",
"color": "#f00f00"
},
"is_searchable": True
}
)
---------------

==== Delete Content Source

[source,python]
---------------
workplace_search.delete_content_source(
content_source_id="<CONTENT_SOURCE_ID>"
)
---------------

[[workplace-search-search-apis]]
=== Search APIs

Expand Down

0 comments on commit 824cddc

Please sign in to comment.