Interface ISearchEndpointOptions

The possible options when creating a SearchEndpoint

Index

Properties

Optional accessToken

accessToken: string

This allows using an OAuth2 or a search token to authenticate against the Search API.

Optional anonymous

anonymous: boolean

Specifies that the request (and the Coveo Search API) does not need any kind of authentication.
This flag is only needed for specific setups when your requests are being blocked by your browser. If your queries are executing correctly, you do not need to bother.
Setting this flag will prevent the withCredentials option to be set on the XMLHttpRequest, allowing performing cross-domain requests on a server that returns * in the Access-Control-Allow-Origin HTTP header.

Optional password

password: string

This is the password part of the credentials used to authenticate with the REST API.
This option should only be used for development purposes. Including secret credentials in an HTML page that is sent to a client browser is not secure.

Optional queryStringArguments

queryStringArguments: IStringMap<any>

Query string arguments to add to every request to the search endpoint.
eg : {'foo':'bar', 'a':'b'}

Optional renewAccessToken

renewAccessToken: function

Specifies a function that, when called, will arrange for a new search token to be generated.
It is expected to return a Promise that should be resolved with the new token once it's available.

Type declaration

    • (): Promise<string>
    • Returns Promise<string>

Optional requestModifier

requestModifier: function

A function which will allow external code to modify all endpoint call parameters before they are sent by the browser.

Used in very specific scenario where the network infrastructure require special request headers to be added or removed, for example.

Type declaration

Optional restUri

restUri: string

The uri for the search endpoint. eg: cloudplatform.coveo.com/rest/search

Optional searchAlertsUri

searchAlertsUri: string

The uri for the Coveo search alerts service. If not specified, will automatically resolve using the restUri otherwise

Optional username

username: string

This is the username part of the credentials used to authenticate with the Search API using Basic Authentication.
This option should only be used for development purposes. Including secret credentials in an HTML page that is sent to a client browser is not secure.

Optional xmlHttpRequest

xmlHttpRequest: object

The XmlHttpRequest implementation to use instead of the native one. If not specified, the native one is used.

Type declaration

Hierarchy