Documents
Query documents with natural language
Changed onThis method allows asking direct questions of your documents – where possible an answer will be provided. Search results will be restricted to those accessible by the current access token. Note that "AI answers" must be enabled for the workspace.
post/documents.answerQuestion
Request
- Base URLhttps://app.getoutline.com/api
- URLhttps://app.getoutline.com/api/documents.answerQuestion
- Auth
- HTTP bearer
- or OAuth 2Authorization code: https://app.getoutline.com/oauth/authorizeToken URL: https://app.getoutline.com/oauth/token scopes: read, write
Request body
Example request
{
"query": "What is our holiday policy?"
}Response
OK
Example response
{
"documents": [
{
"title": "Welcome to Acme Inc",
"icon": "🎉",
"text": "…",
"urlId": "hDYep1TPAM",
"createdBy": {
"name": "Jane Doe"
},
"updatedBy": {
"name": "Jane Doe"
},
"deletedBy": {
"name": "Jane Doe"
}
}
],
"policies": [
{
"abilities": {
"read": true,
"update": true,
"delete": false
}
}
],
"search": {
"query": "What is our hiring policy?",
"answer": "Our hiring policy can be summarized as…",
"source": "app"
}
}Changes
- info
added the optional property
//to the response with the status - info
response property
documents/items/urldeprecated
- info
- info
added the optional property
//to the response with the status
- info