# Create Snapshot

Creates a snapshot for the current base. The pre-conditions are, that there's at least one change since the last snapshot and at least 10 minutes have passed. 
To get a list of already existing snapshots, use the the request [List Snapshots](/reference/listsnapshots).

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Base Operations",
    "description": "The official SeaTable API Reference (OpenAPI 3.0).",
    "version": "7.0"
  },
  "servers": [
    {
      "url": "https://{server}",
      "variables": {
        "server": {
          "default": "cloud.seatable.io"
        }
      }
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "metrics-enabled": false,
    "proxy-enabled": false
  },
  "tags": [
    {
      "name": "Snapshots",
      "description": "Manage base snapshots"
    }
  ],
  "components": {
    "securitySchemes": {
      "BaseTokenAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "This is the [Base-Token](/reference/authentication)."
      }
    },
    "parameters": {
      "base_uuid": {
        "name": "base_uuid",
        "in": "path",
        "schema": {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$"
        },
        "required": true,
        "description": "The unique identifier of a base. Sometimes also called dtable_uuid.",
        "example": "5c264e76-0e5a-448a-9f34-580b551364ca"
      }
    },
    "schemas": {
      "generate_snapshot": {
        "type": "object",
        "properties": {
          "dtable_name": {
            "type": "string",
            "example": "Example"
          }
        }
      }
    }
  },
  "paths": {
    "/api-gateway/api/v2/dtables/{base_uuid}/snapshot/": {
      "post": {
        "tags": [
          "Snapshots"
        ],
        "summary": "Create Snapshot",
        "operationId": "createSnapshot",
        "description": "Creates a snapshot for the current base. The pre-conditions are, that there's at least one change since the last snapshot and at least 10 minutes have passed. \nTo get a list of already existing snapshots, use the the request [List Snapshots](/reference/listsnapshots).\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/generate_snapshot"
              }
            }
          }
        },
        "security": [
          {
            "BaseTokenAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/base_uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "status": "created",
                  "snapshot": {
                    "dtable_uuid": "650d8a0d-7e27-46a8-8b18-6cc6f3dbvh46",
                    "dtable_name": "Example.dtable",
                    "commit_id": "1234567813a3e0950d4d4f32bd744137929cef23",
                    "ctime": 1622111992159
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "_id": {
    "buffer": {
      "0": 106,
      "1": 215,
      "2": 108,
      "3": 15,
      "4": 227,
      "5": 154,
      "6": 119,
      "7": 91,
      "8": 88,
      "9": 173,
      "10": 68,
      "11": 86
    }
  }
}
```