Returns a function with the given name from the requested project.
HTTP request
GET https://cloudfunctions.googleapis.com/v2/{name}
Path parameters
Parameters
name
string
Required. The name of the function which details should be obtained. It takes the formprojects/{project}/locations/{location}/functions/{function}.
Authorization requires the followingIAMpermission on the specified resourcename:
cloudfunctions.functions.get
Query parameters
Parameters
revision
string
Optional. The optional version of the 1st gen function whose details should be obtained. The version of a 1st gen function is an integer that starts from 1 and gets incremented on redeployments. GCF may keep historical configs for old versions of 1st gen function. This field can be specified to fetch the historical configs. This field is valid only for GCF 1st gen function.
Request body
The request body must be empty.
Response body
If successful, the response body contains an instance ofFunction.
[[["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-06-16 UTC."],[[["\u003cp\u003eThis endpoint retrieves details for a specified function using a GET request to the provided URL.\u003c/p\u003e\n"],["\u003cp\u003eThe function's name, formatted as \u003ccode\u003eprojects/{project}/locations/{location}/functions/{function}\u003c/code\u003e, is a mandatory path parameter.\u003c/p\u003e\n"],["\u003cp\u003eAn optional query parameter, \u003ccode\u003erevision\u003c/code\u003e, allows you to specify a version number for fetching details of a 1st gen function.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must be empty, and a successful request will return a \u003ccode\u003eFunction\u003c/code\u003e resource in the response body.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization to use this endpoint requires the \u003ccode\u003ecloudfunctions.functions.get\u003c/code\u003e IAM permission and the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.functions.get\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReturns a function with the given name from the requested project.\n\n### HTTP request\n\n`GET https://cloudfunctions.googleapis.com/v2/{name}`\n\n### Path parameters\n\n### Query 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 [Function](/functions/docs/reference/rest/v2/projects.locations.functions#Function).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]