Slite Search Notes API

The Search Notes API from Slite — 1 operation(s) for search notes.

OpenAPI Specification

slite-search-notes-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Public Slite api Ask Search Notes API
  version: '1'
  description: Access your Slite documents, search, create, update...
  license:
    name: private
  contact:
    name: Slite
servers:
- url: https://api.slite.com/v1
tags:
- name: Search Notes
paths:
  /search-notes:
    get:
      operationId: searchNotes
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchNoteResult'
              examples:
                Example 1:
                  value:
                    nbPages: 2
                    page: 0
                    hits:
                    - lastEditedAt: '2021-01-02T00:00:00.000Z'
                      highlight: '...easily connect Slite to your own process, you can use <b>Slite public api</b> to perform search...'
                      id: noteId
                      title: Slite interconnection
                      type: rich_text
                      updatedAt: '2021-01-01T00:00:00.000Z'
                      archivedAt: null
                      parentNotes:
                      - id: channelId
                        title: Channel
                      - id: parentId
                        title: Parent note
        '401':
          description: Invalid authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiAuthError'
        '422':
          description: Input validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiFieldValidationError'
        '429':
          description: Rate limitation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiRateLimitError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
      description: 'Search notes based on a query.

        The scope of the notes is restricted to the authenticated user.

        Various optional filters are available to restrict the scope of the search even more.'
      summary: Search notes
      security:
      - bearer: []
      parameters:
      - description: Query used to perform the note search, default to empty string
        in: query
        name: query
        required: false
        schema:
          type: string
        example: Slite public api
      - description: Optional filter to only return notes under this parent note id
        in: query
        name: parentNoteId
        required: false
        schema:
          type: string
      - description: Optional filter to only return notes with a depth (number of parents) equal to a specified value
        in: query
        name: depth
        required: false
        schema:
          format: double
          type: number
      - description: 'Optional filter to return notes in a special review state

          Can be Verified, Outdated, VerificationRequested or VerificationExpired'
        in: query
        name: reviewState
        required: false
        schema:
          $ref: '#/components/schemas/PublicApiReviewState'
      - description: Used to perform pagination on search
        in: query
        name: page
        required: false
        schema:
          $ref: '#/components/schemas/SearchNotePage'
      - description: Specify how many notes to return per page
        in: query
        name: hitsPerPage
        required: false
        schema:
          $ref: '#/components/schemas/SearchNoteHitsPerPage'
      - description: Inject a tag before the matching query
        in: query
        name: highlightPreTag
        required: false
        schema:
          type: string
        example: <b>
      - description: Inject a tag after the matching query
        in: query
        name: highlightPostTag
        required: false
        schema:
          type: string
        example: </b>
      - description: Optional filter to only return notes edited after a specific date
        in: query
        name: lastEditedAfter
        required: false
        schema: {}
      - description: Optional filter to only return notes where metadata has changed after a specific date
        in: query
        name: lastUpdatedAfter
        required: false
        schema: {}
      - description: Optional filter to also include archived notes in the search results (default to false)
        in: query
        name: includeArchived
        required: false
        schema:
          type: boolean
      tags:
      - Search Notes
components:
  schemas:
    SearchNotePage:
      type: integer
      format: int32
      minimum: 0
    SearchNoteHit:
      properties:
        parentNotes:
          items:
            properties:
              title:
                type: string
              id:
                type: string
            required:
            - title
            - id
            type: object
          type: array
          description: 'Breadcrumb of the note

            The first element is the channel'
        reviewState:
          $ref: '#/components/schemas/PublicApiReviewState'
          description: 'Review state of the note

            Can be Verified, Outdated, VerificationRequested or VerificationExpired'
        highlight:
          type: string
          description: 'Part of the note that matched the query.

            If an empty string is returned, it means only the title matched.'
        type:
          $ref: '#/components/schemas/SearchNoteType'
          description: 'Type of the note

            It can be a collection, a discussion or a default rich_text.'
        archivedAt:
          type: string
          format: date-time
          nullable: true
          description: Date of the archiving of the note (null if not archived)
        iconColor:
          type: string
          nullable: true
          description: Optional icon color for the note.
        iconShape:
          type: string
          nullable: true
          description: Optional icon identifier for the note.
        lastEditedAt:
          type: string
          format: date-time
          description: Date of the last edition of the note
        updatedAt:
          type: string
          format: date-time
          description: Date of the last update of the note
        title:
          type: string
          description: Title of the note
        id:
          type: string
          description: Id of the note
      required:
      - parentNotes
      - highlight
      - type
      - archivedAt
      - lastEditedAt
      - updatedAt
      - title
      - id
      type: object
    PublicApiReviewState:
      enum:
      - Verified
      - Outdated
      - VerificationRequested
      - VerificationExpired
      type: string
    SearchNoteType:
      enum:
      - rich_text
      - discussion
      - collection
      type: string
    SearchNoteResult:
      properties:
        hits:
          items:
            $ref: '#/components/schemas/SearchNoteHit'
          type: array
        nbPages:
          type: number
          format: double
          description: Total number of pages for the current query
        page:
          type: number
          format: double
          description: Current page number of the search pagination
      required:
      - hits
      - nbPages
      - page
      type: object
    PublicApiFieldValidationError:
      properties:
        details:
          $ref: '#/components/schemas/FieldErrors'
        message:
          type: string
          enum:
          - Validation Failed
          nullable: false
        id:
          type: string
          enum:
          - field-validation
          nullable: false
      required:
      - message
      - id
      type: object
    SearchNoteHitsPerPage:
      type: integer
      format: int32
      minimum: 1
      maximum: 100
    PublicApiRateLimitError:
      properties:
        message:
          type: string
          enum:
          - You've reached the api rate limit. Please wait and retry later.
          nullable: false
        id:
          type: string
          enum:
          - rate-limit
          nullable: false
      required:
      - message
      - id
      type: object
    FieldErrors:
      properties: {}
      type: object
      additionalProperties:
        properties:
          value: {}
          message:
            type: string
        required:
        - message
        type: object
    PublicApiError:
      properties:
        message:
          type: string
        id:
          type: string
      required:
      - message
      - id
      type: object
    PublicApiAuthError:
      properties:
        message:
          type: string
          enum:
          - Invalid apiKey
          nullable: false
        id:
          type: string
          enum:
          - auth/unauthorized
          nullable: false
      required:
      - message
      - id
      type: object
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: API keys can be generated under Settings > API