HomeWorkplace SearchCustom connector API (legacy)

Custom connector API (legacy)

Reference for the legacy Workplace Search custom connector API, retained for existing integrations.

Important: Use the richer custom connector API for adding documents to the search index. These legacy APIs remain available, and this documentation is retained for reference only.

Before you start

Pushing documents to Interact

To add documents, use a REST endpoint exposed as part of your intranet:

https://{{intranet_url}}/api/searchapp

Use the following URL to manage documents for your search application:

https://{{intranet_url}}/api/searchapp/{{appid}}/document

Note: The appid component of the URL refers to the ID of your Workplace Search configuration in Interact. Find it by editing the Workplace Search configuration and looking at the URL. For example, if the URL is https://interactgo.com/InteractV7/SearchApp/Edit/1, the appid is 1.

The content type must be application/json. The endpoint accepts an HTTP PUT request with JSON data containing the text of the document you want to submit.

Deletes

To delete a document, use the following with the HTTP DELETE verb:

https://{{intranet_url}}/api/searchapp/1/document/{{documentid}}

Authentication

Each search application you create has its own authentication key, sent as part of the request in the X-ApiKey header. Set and change the key using the Workplace Search page within your intranet.

Warning: Never expose your secret key in any public website or client-side code.

Available fields

Field name Type Searchable Show in results Required
Id Text (max 45 characters) No No Yes
Title Text Yes Yes Yes
Summary Text Yes Yes Yes
Body Text Yes No Yes
Url Text No Yes Yes
Author Text Yes Yes No
BestBets Text Array Yes Yes No
Keywords Text Yes No No
IsPublic Boolean No No Yes
AllowedPeople Integer Array No No No
DisallowedPeople Integer Array No No No
AllowedOrganisations Integer Array No No No
DisallowedOrganisations Integer Array No No No

For example:

{
  "Url": "http://example/example.aspx",
  "Id": "12345a",
  "Title": "I'm from SearchApps",
  "IsPublic": true,
  "Body": "This text is only searchable, not viewable",
  "Summary": "The user will see a truncated part of this",
  "Author": "Peter Smith",
  "BestBets": [ "SearchApps" ],
  "Keywords": "Keyword1 Keyword2"
}

Security

The five security fields let you define who can see the document in the search results at a granular level. The logic for whether a user can see the content is:

  • If you are in DisallowedPeople, you cannot access it.
  • If any of your organisations are in DisallowedOrganisations, you cannot access it.
  • If IsPublic is true, or you are in AllowedPeople, or one of your organisations is in AllowedOrganisations, you are allowed access.
Section: Workplace Search