# Interface ISearchEndpointOptions

The possible options when creating a SearchEndpoint

## Index

### Properties

- accessToken
- anonymous
- password
- queryStringArguments
- renewAccessToken
- requestModifier
- restUri
- searchAlertsUri
- username
- xmlHttpRequest

## Properties

### Optional accessToken

accessToken: string

Overwrites IEndpointCallerOptions.accessToken

- Defined in rest/SearchEndpointInterface.ts :44

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

### Optional anonymous

anonymous: boolean

Overwrites IEndpointCallerOptions.anonymous

- Defined in rest/SearchEndpointInterface.ts :40

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

Overwrites IEndpointCallerOptions.password

- Defined in rest/SearchEndpointInterface.ts :59

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>

- Defined in rest/SearchEndpointInterface.ts :34

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

### Optional renewAccessToken

renewAccessToken: function

- Defined in rest/SearchEndpointInterface.ts :49

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

Inherited from IEndpointCallerOptions.requestModifier

- Defined in rest/EndpointCaller.ts :165

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

- - (params: IRequestInfo<any>): IRequestInfo<any>

  - #### Parameters

    - ##### params: IRequestInfo<any>

    #### Returns IRequestInfo<any>

### Optional restUri

restUri: string

- Defined in rest/SearchEndpointInterface.ts :28

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

### Optional searchAlertsUri

searchAlertsUri: string

- Defined in rest/SearchEndpointInterface.ts :63

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

### Optional username

username: string

Overwrites IEndpointCallerOptions.username

- Defined in rest/SearchEndpointInterface.ts :54

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

Inherited from IEndpointCallerOptions.xmlHttpRequest

- Defined in rest/EndpointCaller.ts :171

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

#### Type declaration

### Hierarchy

- IEndpointCallerOptions