API (Legacy)

❗️

New APIs now available!

It is recommended that the new richer Workplace Search Custom Connector APIs be used for adding documents to the search index.

These APIs continue be available and as such the documentation remains here for reference only.

Pushing Documents to Interact

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

The URL is:

https://{your_intranet_url}/api/searchapp

You can then use this to manage documents to your search application.

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

📘

Determining the app id

The appid component of the URL refers to the id of your Workplace search configuration in Interact. This can be discovered by editing the Workplace search configuration and looking at the URL.
For example the URL might be https://interactgo.com/InteractV7/SearchApp/Edit/1
In this example the appid is 1

The content-type must be application/json.

The above method accepts an HTTP PUT request and accepts JSON data with the text of the document you want to submit.

Deletes

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

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

Authentication

Each search application that you create will have its own authentication key. This is sent as part of the request in the X-ApiKey header.

The key can be set and changed using the Workplace Search page within your intranet.

The available fields are:

Field NameTypeSearchableShow in resultsRequired
IdText (Max 45 characters)NoNoYes
TitleTextYesYesYes
SummaryTextYesYesYes
BodyTextYesNoYes
UrlTextNoYesYes
AuthorTextYesYesNo
BestBetsText ArrayYesYesNo
KeywordsTextYesNoNo
IsPublicBooleanNoNoYes
AllowedPeopleInteger ArrayNoNoNo
DisallowedPeopleInteger ArrayNoNoNo
AllowedOrganisationsInteger ArrayNoNoNo
DisallowedOrganisationsInteger ArrayNoNoNo

e.g.

{   
  "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 5 security fields allow you to 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 I’m in DisallowedPeople
I won’t be able to access.

If any of my organisations are in the DisallowedOrganisations
I won't be able to access.

If “IsPublic” is true Or If I’m in AllowedPeople Or One of my organisations is in AllowedOrganisations
I will be allowed access