REST V2 connector
FUSION_HOST:FUSION_PORT
with your Fusion address.AUTHORIZATION_CREDENTIALS
with your Lucidworks login information in Base64.JSON_RECIPE
with the preconfigured recipe obtained from GitHub, making sure to update any placeholders found in that recipe.Parameter | Description |
---|---|
parserId | The parser ID is the name of the parser as set up in the Fusion UI under Indexing > Parsers. |
id | This populates the Configuration ID for the connector in the Fusion UI. You can name this whatever you want as long as the name does not already exist as another Configuration ID in your Fusion instance. |
Parameter | Description |
---|---|
serviceURL | REST API base URL for the external service from where the data is extracted. Endpoints for the API call are added in the service endpoints section described below. Be sure to add additional levels of security for any content you do not want indexed, otherwise the connector will include all of the content it finds through that URL. |
Parameter | Description |
---|---|
basicAuth | Uses password and user properties for authentication. Depending on the API used to connect to resources outside of Lucidworks, it may require an API Key to authenticate. In this case, enter the username and replace the password with the API Key. |
oAuth | Allows for fetching an authentication token used to authorize the request for the service endpoints crawl. See how to authenticate using OAuth. |
serviceEndpoints
), known as list of requests configuration in some recipes (requestConfigurations
), specifies the API endpoint paths appended to the base URL (serviceURL
) used to crawl a datasource. Query parameters will not work if added directly in the endpoints, so be sure to include any query parameters using queryKey
and queryValue
fields, as the query fields are mapped to Solr using a queryKey
and populated with results from queryValue
.
Parameter | Description |
---|---|
endpoint | The endpoint to append to the cURL location base URL path, for example /rest/api/content . |
httpMethod | HTTP method to use for the request, for example GET and POST . |
queryKey | The name of the field as it will appear in the Solr documents in the index. |
queryValue | The name of the field being queried in the datasource. Used in Solr documents to populate the value of the field entered in queryKey . |
Parameter | Description |
---|---|
paginationKey | Key that contains the nextPageUrl in the response. If the key is nested, use dot notation, for example list.nextPageUrl . |
batchSize | Number of objects to retrieve per page, for example "batchSize": 20 . This value must be indicated in the parent (root) query parameters from the data request. An example of such a query parameter is {"queryKey": "limit", "queryValue": "${LW_BATCH_SIZE}"} . All parent objects that are located are then indexed as Solr documents, and the batch size sets a limit and determines how many of those documents are displayed in the results at a time. The pagination is automatically set to stop when a response object returns as empty, indicating it has reached the end. |
indexStart | Index from where to start pagination. The default is "indexStart": 0 . This value must be indicated in the parent (root) query parameters from the data request. An example of such a query parameter is {"queryKey": "start", "queryValue": "${LW_INDEX_START}"} . |
binaryResponse
. For attachments, ensure Send as Binary Response is enabled. If it is not, then no attachments are received and indexed. When enabled, the connector looks for MIME type other than .json for attachments to index. For a JSON response, ensure Send as Binary Response is not enabled.
Parameter | Description |
---|---|
dataId | Name of the field in the data objects extracted with dataPath used to create the unique ID for Solr documents. If not provided, a random UUID will be used. This property also accepts JSONPath expressions. |
dataPath | The name of a specific data object from a datasource that is returned within a response. For example, in order to extract a list of elements named objects in the datasource, the dataPath would be objects , with each element indexed as a separate Solr document. If not provided or left blank as "" , the entire response body will be indexed as a single Solr document. This property also accepts JSONPath expressions,for example, objects[] or $.objects[] . |
binaryResponse | Set to true for indexing content other than text, for example images and attachments. This selects the Send as Binary Response checkbox in the Fusion UI. If true , the response will be sent as binary data to Fusion, properties dataId and dataPath will be ignored, and pagination will not be performed. |
Parameter | Description |
---|---|
endpoint | The API endpoint to append to the cURL location base URL path, for example /rest/api/content/${LW_PARENT_DATA_KEY}/child/comment . |
httpMethod | HTTP method to use for the request. GET and POST are supported. |
queries | Contains the array of queries to use within the request definition, each with a queryKey and queryValue pair. |
queryKey | The name of the field as it will appear in the Solr documents in the index. |
queryValue | The name of the field being queried in the datasource. Used in Solr documents to populate the value of the field entered in queryKey . |
dataId
and dataPath
in the root response mapping described earlier through the use of a parentIdKey
. The parentIdKey
should match the dataId
in the root response mapping.
For example, with root response mapping:
Parameter | Description |
---|---|
idKey | This creates the ID Key in the Data Object Mapping section of the UI as the Solr document ID. Fill this property when Destination Key is empty. If neither idKey or destinationKey are specified, the document’s ID will be automatically assigned as a random UUID. When using some recipes with multiple endpoints, documents run the risk of being assigned the same idKey value, which can cause missing documents when indexing. To avoid this, set the idKey to self instead of id . |
objectKey (optional) | The key from the data object entry. This value is used to perform the additional requests. It is mapped to the variable ${LW_PARAM_KEY} , which should be referenced in the additional data request configuration (endpoint, query parameters, or body). Endpoint example: /api/path/${LW_PARAM_KEY}/additionalInfo . Query parameter example: queryValue=${LW_PARAM_KEY} . |
accessKey (optional) | The key to access the data objects in the response. If not set, the response is assumed to be the whole response body. |
destinationKey (optional) | The key used to store the additional data objects in the main data objects. If not set, the additional data objects will be indexed as individual Solr documents. |
Parameter | Description |
---|---|
collection | The name of the app used in the Fusion UI. This must match the name of the app, or the connector will not show up in datasources. |
pipeline | The name for the Pipeline ID used. For example, rest_connector . |
connector | The value for the connector in the Datasources API. For the REST V2 connector, this will be lucidworks.rest . |
FUSION_HOST:FUSION_PORT
with the URL of your Fusion instance.APP_NAME
with the name of the app you are using in Fusion.AUTHORIZATION_CREDENTIALS
with your Lucidworks login information in Base64.JSON_RECIPE
with the recipe you copied from GitHub.id
: This populates the Configuration ID for the connector in the Fusion UI and sets the name of the datasource. You can keep the default or choose a different name to fit your needs.serviceURL
: API base URL from where the data is extracted. Change this to match your own datasource URL.password
and user
: Change these values to your login information.collection
: This must match the name of the Fusion app that you are using.parserId
or pipeline
.id
as the name of the datasource.