File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
packages/enterprise-search/docs Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,21 @@ See <<quickstart-client>> for details on initializing the client.
3131Note that App Search also has its own application-specific API keys and tokens.
3232Refer to <<authentication>> for more information and relevant links.
3333
34+ Example of initializing the client using an App Search API private key for authorization.
35+
36+ [source,javascript]
37+ ----
38+ const { Client } = require('@elastic/enterprise-search')
39+ const client = new Client({
40+ url: 'https://d84b2890a1d7f30699b04c7b1d6930f8.ent-search.europe-west1.gcp.cloud.es.io',
41+ auth: {
42+ token: 'private-abcdef17grbg9jg8m1zam9q'
43+ }
44+ })
45+ ----
46+
47+ Once instantiated you can use the `client` object to make API requests to App Search.
48+
3449[discrete#app-search-api-initializing-api-key]
3550==== API key privileges
3651
@@ -1997,4 +2012,4 @@ async function run() {
19972012}
19982013
19992014run().catch(console.error)
2000- ----
2015+ ----
You can’t perform that action at this time.
0 commit comments