search-tools

Update Search Tool

Changed on

Update a stored search or fetch instance. Omitted fields are left as-is; an explicit null clears them.

api_key follows the same rule: omit it to keep the stored key, send a new one to rotate, or send null to clear it (a keyless SearXNG backend). The row is locked FOR UPDATE so the expected_updated_at check and the write it guards are atomic. The tool as it will be after the update is validated, so a change that would leave it unusable (clearing the key of a provider that needs one) is refused rather than stored. Its options are checked against the provider's when the update sets them or changes the provider, and fetch_tool when the update sets it, so rotating the key of an instance stored before those rules never trips on them. kind cannot change, so an instance never moves between the search and fetch maps.

patch/api/v1/search-tools/{name}

Request

  • The document declares no server URL.
  • Auth: one of:
    • API key in header Otari-Key
    • API key in header x-api-key

Path parameters

namestring required

Request body

api_basestring nullable
api_keystring nullable

New API key. Omit to keep the existing one. Never returned.

expected_updated_atstring nullable

Optimistic concurrency: if set, the update 412s unless it matches the stored updated_at.

fetch_toolstring nullable

For a search instance: the fetch instance that enriches its results. Null clears it.

kind'search' | 'fetch' nullable

Accepted only when it matches the stored kind, which cannot change.

optionsobject nullable
providerstring nullable
timeoutnumber nullable

Response

Successful Response

api_basestring nullable
created_atstring nullable
decryptableboolean
fetch_toolstring nullable

A search instance's enrichment fetch instance. Null means the fetch default enriches it.

kind'search' | 'fetch'

Whether this is a search or a fetch instance.

last4string nullable
namestring required
optionsobject
providerstring required
shadows_configboolean

True when a config-file search tool of the same name exists; the stored one is in effect.

timeoutnumber nullable
updated_atstring nullable

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status