Documents

Search all documents

Changed on

This methods allows you to search your workspace's documents with keywords. Note that search results will be restricted to those accessible by the current access token.

post/documents.search

Request

  • Base URL
    https://app.getoutline.com/api
  • URL
    https://app.getoutline.com/api/documents.search
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization code: https://app.getoutline.com/oauth/authorize
      Token URL: https://app.getoutline.com/oauth/token scopes: read, write

Request body

offsetnumber
limitnumber
querystring
userIdstring uuid

Any documents that have not been edited by the user identifier will be filtered out. Deprecated – prefer the filters parameter.

collectionIdstring uuid

A collection to search within. Deprecated – prefer the filters parameter.

documentIdstring uuid

A document to search within. Deprecated – prefer the filters parameter.

statusFilterstring[]

Document statuses to include in results. Deprecated – prefer the filters parameter.

dateFilter'day' | 'week' | 'month' | 'year'

Any documents that have not been updated within the specified period will be filtered out. Deprecated – prefer the filters parameter with a date field and an ISO 8601 duration value.

shareIdstring

Filter results to the collection or document referenced by the shareId

snippetMinWordsnumber

Minimum number of words to show in search result snippets

snippetMaxWordsnumber

Maximum number of words to show in search result snippets

sort'relevance' | 'createdAt' | 'updatedAt' | 'title'

Specifies the attributes by which search results will be sorted

direction'ASC' | 'DESC'

Specifies the sort order with respect to sort field

Example request

{
  "limit": 25,
  "query": "hiring",
  "dateFilter": "month"
}

Response

OK

Example response

{
  "data": [
    {
      "context": "At Acme Inc our hiring practices are inclusive",
      "ranking": 1.1844109,
      "document": {
        "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
      }
    }
  ],
  "pagination": {
    "limit": 25
  }
}

Changes

    • info

      added the optional property /// to the response with the status

    • info

      response property data/items/document/url deprecated

    • info

      added the new createdById enum value to the request property ////