[[["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 API call allocates IDs for specified keys, enabling referencing entities before insertion.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request uses a POST method to the provided URL, including the project ID as a path parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe request body is structured as a JSON object containing an array of incomplete keys, where no key may be reserved/read-only.\u003c/p\u003e\n"],["\u003cp\u003eThe response body returns an array of the requested keys, each with a newly allocated ID completing its key path.\u003c/p\u003e\n"],["\u003cp\u003eThe API requires either \u003ccode\u003ehttps://www.googleapis.com/auth/datastore\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e authorization scopes.\u003c/p\u003e\n"]]],[],null,["# Method: projects.allocateIds\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.AllocateIdsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nAllocates IDs for the given keys, which is useful for referencing an entity before it is inserted.\n\n### HTTP request\n\n`POST https://datastore.googleapis.com/v1beta3/projects/{projectId}:allocateIds`\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.AllocateIds](/datastore/docs/reference/data/rest/v1beta3/projects/allocateIds#google.datastore.v1beta3.Datastore.AllocateIds).\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)."]]