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 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 |
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
Updated 4 months ago