[[["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-04-30 UTC."],[[["\u003cp\u003eThis endpoint initiates a new transaction for the specified project using a \u003ccode\u003ePOST\u003c/code\u003e request to the provided URL structure, which includes the project ID.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a \u003ccode\u003eprojectId\u003c/code\u003e path parameter and a JSON body specifying the \u003ccode\u003edatabaseId\u003c/code\u003e and \u003ccode\u003etransactionOptions\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe successful response returns a JSON body containing the transaction identifier, which is a base64-encoded string under the field \u003ccode\u003etransaction\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization to use this endpoint requires one of two OAuth scopes: \u003ccode\u003ehttps://www.googleapis.com/auth/datastore\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: projects.beginTransaction\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.BeginTransactionResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nBegins a new transaction.\n\n### HTTP request\n\n`POST https://datastore.googleapis.com/v1/projects/{projectId}:beginTransaction`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nThe response for [Datastore.BeginTransaction](/datastore/docs/reference/data/rest/v1/projects/beginTransaction#google.datastore.v1.Datastore.BeginTransaction).\n\nIf successful, the response body contains data with the following structure:\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/datastore`\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]