HTTP request
curl \
-X POST 'MEILISEARCH_URL/snapshots' \
-H 'Authorization: Bearer API_KEY'client.createSnapshot()$client->createSnapshot();client.create_snapshot()client.createSnapshot();client.create_snapshotclient.CreateSnapshot()await client.CreateSnapshotAsync();client
.create_snapshot()
.await
.unwrap();let task = try await self.client.createSnapshot(){
"taskUid": 0,
"indexUid": null,
"status": "enqueued",
"type": "snapshotCreation",
"enqueuedAt": "2021-01-01T09:39:00.000000Z"
}{
"message": "The Authorization header is missing. It must use the bearer authorization method.",
"code": "missing_authorization_header",
"type": "auth",
"link": "https://docs.meilisearch.com/errors#missing_authorization_header"
}Snapshots
Create snapshot
Trigger a snapshot creation process. When complete, a snapshot file is written to the snapshot directory. The directory is created if it does not exist.
POST
/
snapshots
HTTP request
curl \
-X POST 'MEILISEARCH_URL/snapshots' \
-H 'Authorization: Bearer API_KEY'client.createSnapshot()$client->createSnapshot();client.create_snapshot()client.createSnapshot();client.create_snapshotclient.CreateSnapshot()await client.CreateSnapshotAsync();client
.create_snapshot()
.await
.unwrap();let task = try await self.client.createSnapshot(){
"taskUid": 0,
"indexUid": null,
"status": "enqueued",
"type": "snapshotCreation",
"enqueuedAt": "2021-01-01T09:39:00.000000Z"
}{
"message": "The Authorization header is missing. It must use the bearer authorization method.",
"code": "missing_authorization_header",
"type": "auth",
"link": "https://docs.meilisearch.com/errors#missing_authorization_header"
}Authorizations
An API key is a token that you provide when making API calls. Read more about how to secure your project.
Include the API key to the Authorization header, for instance:
-H 'Authorization: Bearer 6436fc5237b0d6e0d64253fbaac21d135012ecf1'
If you use a SDK, ensure you instantiate the client with the API key, for instance with JS SDK:
const client = new MeiliSearch({ host: 'MEILISEARCH_URL', apiKey: '6436fc5237b0d6e0d64253fbaac21d135012ecf1' });
Response
Snapshot is being created.
A summarized view of a task, returned when a task is enqueued
Type of operation performed by the task.
Available options:
documentAdditionOrUpdate, documentEdition, documentDeletion, settingsUpdate, indexCreation, indexDeletion, indexUpdate, indexSwap, taskCancelation, taskDeletion, dumpCreation, snapshotCreation, export, upgradeDatabase, indexCompaction, networkTopologyChange, dsrUpdate, dsrClear Example:
"documentAdditionOrUpdate"