Undeletes a dataset which is within time travel window based on datasetId. If a time is specified, the dataset version deleted at that time is undeleted, else the last live version is undeleted.
HTTP request
POST https://bigquery.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}:undelete
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-02 UTC."],[[["\u003cp\u003eThis webpage outlines how to undelete a dataset within its time travel window using the BigQuery API.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves sending an HTTP POST request to a specific URL, including the project ID and dataset ID in the path.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must be empty, and upon successful execution, the response body will return an instance of the \u003ccode\u003eDataset\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization for this action requires either the \u003ccode\u003ehttps://www.googleapis.com/auth/bigquery\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scopes.\u003c/p\u003e\n"],["\u003cp\u003eIf a time is specified, the dataset version deleted at that time is undeleted, otherwise the last live version will be restored.\u003c/p\u003e\n"]]],[],null,["# Method: datasets.undelete\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUndeletes a dataset which is within time travel window based on datasetId. If a time is specified, the dataset version deleted at that time is undeleted, else the last live version is undeleted.\n\n### HTTP request\n\n`POST https://bigquery.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}:undelete`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Dataset](/bigquery/docs/reference/rest/v2/datasets#Dataset).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/bigquery`\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]