Creates a Cloud Dataflow job from a template. Do not enter confidential information when you supply string values using the API.
To create a job, we recommend using projects.locations.templates.create with a regional endpoint. Using projects.templates.create is not recommended, because your job will always start in us-central1.
HTTP request
POST https://dataflow.googleapis.com/v1b3/projects/{projectId}/locations/{location}/templates
The request body contains data with the following structure:
JSON representation
{"jobName": string,"parameters": {string: string,...},"environment": {object (RuntimeEnvironment)},// Union field template can be only one of the following:"gcsPath": string// End of list of possible types for union field template.}
Fields
jobName
string
Required. The job name to use for the created job.
[[["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 endpoint, \u003ccode\u003eprojects.locations.templates.create\u003c/code\u003e, is used to create a Cloud Dataflow job from a template, and using regional endpoints is highly recommended over the non-regional alternative.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request is a \u003ccode\u003ePOST\u003c/code\u003e request to \u003ccode\u003ehttps://dataflow.googleapis.com/v1b3/projects/{projectId}/locations/{location}/templates\u003c/code\u003e, where \u003ccode\u003eprojectId\u003c/code\u003e and \u003ccode\u003elocation\u003c/code\u003e are required path parameters.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include the job name, runtime parameters, runtime environment, and a Cloud Storage path (beginning with \u003ccode\u003egs://\u003c/code\u003e) to the template location.\u003c/p\u003e\n"],["\u003cp\u003eThe response to a successful request will contain a new instance of a \u003ccode\u003eJob\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis request requires authorization using either the \u003ccode\u003ehttps://www.googleapis.com/auth/compute\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scopes.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.templates.create\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- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates a Cloud Dataflow job from a template. Do not enter confidential information when you supply string values using the API.\n\nTo create a job, we recommend using `projects.locations.templates.create` with a [regional endpoint](https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.templates.create` is not recommended, because your job will always start in `us-central1`.\n\n### HTTP request\n\n`POST https://dataflow.googleapis.com/v1b3/projects/{projectId}/locations/{location}/templates`\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\nIf successful, the response body contains a newly created instance of [Job](/dataflow/docs/reference/rest/v1b3/projects.jobs#Job).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/compute`\n- `\n https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]