Searchcraft Synonyms API

The Synonyms API from Searchcraft — 2 operation(s) for synonyms.

OpenAPI Specification

searchcraft-synonyms-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Searchcraft Authentication Synonyms API
  description: REST API for the Searchcraft developer search engine. Manage indexes and their schemas, ingest and delete documents, run fuzzy/exact full-text and federated search, and manage synonyms, stopwords, federations, access keys, and usage measurement. Available as the managed Searchcraft Cloud service and the self-hosted Searchcraft Core engine.
  termsOfService: https://www.searchcraft.io/
  contact:
    name: Searchcraft
    url: https://www.searchcraft.io/
  version: '1.0'
servers:
- url: https://your-cluster.searchcraft.io
  description: Searchcraft Cloud cluster endpoint. Each Searchcraft Cloud account is provisioned a unique cluster host; replace "your-cluster" with your cluster subdomain. Self-hosted Searchcraft Core instances use their own host.
security:
- SearchcraftKey: []
tags:
- name: Synonyms
paths:
  /index/{index}/synonyms:
    parameters:
    - $ref: '#/components/parameters/IndexName'
    get:
      operationId: getSynonyms
      tags:
      - Synonyms
      summary: Returns the synonyms configured for an index.
      responses:
        '200':
          description: The synonyms for the index.
    post:
      operationId: addSynonyms
      tags:
      - Synonyms
      summary: Adds synonyms to an index using the "synonym:original-term" format.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
      responses:
        '200':
          description: The synonyms were added.
    delete:
      operationId: deleteSynonyms
      tags:
      - Synonyms
      summary: Deletes specific synonyms from an index.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
      responses:
        '200':
          description: The synonyms were deleted.
  /index/{index}/synonyms/all:
    parameters:
    - $ref: '#/components/parameters/IndexName'
    delete:
      operationId: deleteAllSynonyms
      tags:
      - Synonyms
      summary: Deletes all synonyms from an index.
      responses:
        '200':
          description: All synonyms were deleted.
components:
  parameters:
    IndexName:
      name: index
      in: path
      required: true
      description: The name of the index.
      schema:
        type: string
  securitySchemes:
    SearchcraftKey:
      type: apiKey
      in: header
      name: Authorization
      description: 'Searchcraft access key passed directly in the Authorization header (no "Bearer" prefix). Keys are tiered by permission: read (search), ingest (document, synonym, stopword, transaction, and measure writes), and admin (index, federation, and key management). Keys may be scoped to specific indexes via allowed_indexes.'