# Cluster Operations

# Create Snapshot (for backups)

Creates a point-in-time snapshot of a Typesense node's state and data in the specified directory.

You can then backup the snapshot directory that gets created and later restore it as a data directory, as needed.

# Sample Response

# Definition

POST ${TYPESENSE_HOST}/operations/snapshot

# Arguments

Parameter Required Description
snapshot_path yes The directory on the server where the snapshot should be saved.

# Re-elect Leader

Triggers a follower node to initiate the raft voting process, which triggers leader re-election.

The follower node that you run this operation against will become the new leader, once this command succeeds.

# Sample Response

# Definition

POST ${TYPESENSE_HOST}/operations/vote

# Toggle Slow Request Log

Enable logging of requests that take over a defined threshold of time.

Default: -1 which disables slow request logging.

Slow requests are logged to the primary log file, with the prefix SLOW REQUEST.

# Sample Response

# Definition

POST ${TYPESENSE_HOST}/config

# Cluster Metrics

Get current RAM, CPU, Disk & Network usage metrics.

# Sample Response

# Definition

GET ${TYPESENSE_HOST}/metrics.json

# API Stats

Get stats about API endpoints.

This endpoint returns average requests per second and latencies for all requests in the last 10 seconds.

# Sample Response

# Definition

GET ${TYPESENSE_HOST}/stats.json

# Health

Get health information about a Typesense node.

# Sample Response

# Definition

GET ${TYPESENSE_HOST}/health

Last Updated: 6/6/2022, 6:26:17 PM