Reference documentation and code samples for the Google API Common Protos Client class PathTranslation.
Path Translation specifies how to combine the backend address with the
request path in order to produce the appropriate forwarding URL for the
request.
Path Translation is applicable only to HTTP-based backends. Backends which
do not accept requests over HTTP/HTTPS should leave path_translation
unspecified.
Protobuf type google.api.BackendRule.PathTranslation
Namespace
Google \ Api \ BackendRule
Methods
static::name
Parameter
Name
Description
value
mixed
static::value
Parameter
Name
Description
name
mixed
Constants
PATH_TRANSLATION_UNSPECIFIED
Value: 0
Generated from protobuf enum PATH_TRANSLATION_UNSPECIFIED = 0;
CONSTANT_ADDRESS
Value: 1
Use the backend address as-is, with no modification to the path. If the
URL pattern contains variables, the variable names and values will be
appended to the query string. If a query string parameter and a URL
pattern variable have the same name, this may result in duplicate keys in
the query string.
[[["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-08-28 UTC."],[],[],null,["# Google API Common Protos Client - Class PathTranslation (4.12.3)\n\nVersion latestkeyboard_arrow_down\n\n- [4.12.3 (latest)](/php/docs/reference/common-protos/latest/Api.BackendRule.PathTranslation)\n- [4.12.2](/php/docs/reference/common-protos/4.12.2/Api.BackendRule.PathTranslation)\n- [4.11.0](/php/docs/reference/common-protos/4.11.0/Api.BackendRule.PathTranslation)\n- [4.10.0](/php/docs/reference/common-protos/4.10.0/Api.BackendRule.PathTranslation)\n- [4.9.0](/php/docs/reference/common-protos/4.9.0/Api.BackendRule.PathTranslation)\n- [4.8.3](/php/docs/reference/common-protos/4.8.3/Api.BackendRule.PathTranslation) \nReference documentation and code samples for the Google API Common Protos Client class PathTranslation.\n\nPath Translation specifies how to combine the backend address with the\nrequest path in order to produce the appropriate forwarding URL for the\nrequest.\n\nPath Translation is applicable only to HTTP-based backends. Backends which\ndo not accept requests over HTTP/HTTPS should leave `path_translation`\nunspecified.\n\nProtobuf type `google.api.BackendRule.PathTranslation`\n\nNamespace\n---------\n\nGoogle \\\\ Api \\\\ BackendRule\n\nMethods\n-------\n\n### static::name\n\n### static::value\n\nConstants\n---------\n\n### PATH_TRANSLATION_UNSPECIFIED\n\n Value: 0\n\nGenerated from protobuf enum `PATH_TRANSLATION_UNSPECIFIED = 0;`\n\n### CONSTANT_ADDRESS\n\n Value: 1\n\nUse the backend address as-is, with no modification to the path. If the\nURL pattern contains variables, the variable names and values will be\nappended to the query string. If a query string parameter and a URL\npattern variable have the same name, this may result in duplicate keys in\nthe query string.\n\nExamples\n========\n\nGiven the following operation config:\nMethod path: /api/company/{cid}/user/{uid}\nBackend address: \u003chttps://example.cloudfunctions.net/getUser\u003e\nRequests to the following request paths will call the backend at the\ntranslated path:\nRequest path: /api/company/widgetworks/user/johndoe\nTranslated:\n[https://example.cloudfunctions.net/getUser?cid=widgetworks\\&uid=johndoe](https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe)\nRequest path: /api/company/widgetworks/user/johndoe?timezone=EST\nTranslated:\n[https://example.cloudfunctions.net/getUser?timezone=EST\\&cid=widgetworks\\&uid=johndoe](https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe)\n\nGenerated from protobuf enum `CONSTANT_ADDRESS = 1;`\n\n### APPEND_PATH_TO_ADDRESS\n\n Value: 2\n\nThe request path will be appended to the backend address.\n\nExamples\n========\n\nGiven the following operation config:\nMethod path: /api/company/{cid}/user/{uid}\nBackend address: \u003chttps://example.appspot.com\u003e\nRequests to the following request paths will call the backend at the\ntranslated path:\nRequest path: /api/company/widgetworks/user/johndoe\nTranslated:\n\u003chttps://example.appspot.com/api/company/widgetworks/user/johndoe\u003e\nRequest path: /api/company/widgetworks/user/johndoe?timezone=EST\nTranslated:\n\u003chttps://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST\u003e\n\nGenerated from protobuf enum `APPEND_PATH_TO_ADDRESS = 2;`"]]