Reference documentation and code samples for the Google API Common Protos Client class Endpoint.
Endpointdescribes a network address of a service that serves a set of
APIs. It is commonly known as a service endpoint. A service may expose
any number of service endpoints, and all service endpoints share the same
service definition, such as quota limits and monitoring metrics.
# for service `library-example.googleapis.com`. The `https` scheme
# is implicit for all service endpoints. Other schemes may be
# supported in the future.
- name: library-example.googleapis.com
allow_cors: false
- name: content-staging-library-example.googleapis.com
# Allows HTTP OPTIONS calls to be passed to the API frontend, for it
# to decide whether the subsequent cross-origin request is allowed
# to proceed.
allow_cors: true
Generated from protobuf messagegoogle.api.Endpoint
Namespace
Google \ Api
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
The canonical name of this endpoint.
↳ aliases
array
Aliases for this endpoint, these will be served by the same UrlMap as the parent endpoint, and will be provisioned in the GCP stack for the Regional Endpoints.
↳ target
string
The specification of an Internet routable address of API frontend that will handle requests to thisAPI Endpoint. It should be either a valid IPv4 address or a fully-qualified domain name. For example, "8.8.8.8" or "myservice.appspot.com".
↳ allow_cors
bool
AllowingCORS, aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.
getName
The canonical name of this endpoint.
Returns
Type
Description
string
setName
The canonical name of this endpoint.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getAliases
Aliases for this endpoint, these will be served by the same UrlMap as the
parent endpoint, and will be provisioned in the GCP stack for the Regional
Endpoints.
Aliases for this endpoint, these will be served by the same UrlMap as the
parent endpoint, and will be provisioned in the GCP stack for the Regional
Endpoints.
Parameter
Name
Description
var
string[]
Returns
Type
Description
$this
getTarget
The specification of an Internet routable address of API frontend that will
handle requests to thisAPI
Endpoint. It should be
either a valid IPv4 address or a fully-qualified domain name. For example,
"8.8.8.8" or "myservice.appspot.com".
Returns
Type
Description
string
setTarget
The specification of an Internet routable address of API frontend that will
handle requests to thisAPI
Endpoint. It should be
either a valid IPv4 address or a fully-qualified domain name. For example,
"8.8.8.8" or "myservice.appspot.com".
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getAllowCors
AllowingCORS, aka
cross-domain traffic, would allow the backends served from this endpoint to
receive and respond to HTTP OPTIONS requests. The response will be used by
the browser to determine whether the subsequent cross-origin request is
allowed to proceed.
Returns
Type
Description
bool
setAllowCors
AllowingCORS, aka
cross-domain traffic, would allow the backends served from this endpoint to
receive and respond to HTTP OPTIONS requests. The response will be used by
the browser to determine whether the subsequent cross-origin request is
allowed to proceed.
[[["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-09-04 UTC."],[],[],null,["# Google API Common Protos Client - Class Endpoint (4.12.3)\n\nVersion latestkeyboard_arrow_down\n\n- [4.12.3 (latest)](/php/docs/reference/common-protos/latest/Api.Endpoint)\n- [4.12.2](/php/docs/reference/common-protos/4.12.2/Api.Endpoint)\n- [4.11.0](/php/docs/reference/common-protos/4.11.0/Api.Endpoint)\n- [4.10.0](/php/docs/reference/common-protos/4.10.0/Api.Endpoint)\n- [4.9.0](/php/docs/reference/common-protos/4.9.0/Api.Endpoint)\n- [4.8.3](/php/docs/reference/common-protos/4.8.3/Api.Endpoint) \nReference documentation and code samples for the Google API Common Protos Client class Endpoint.\n\n`Endpoint` describes a network address of a service that serves a set of\nAPIs. It is commonly known as a service endpoint. A service may expose\nany number of service endpoints, and all service endpoints share the same\nservice definition, such as quota limits and monitoring metrics.\n\nExample:\ntype: google.api.Service\nname: library-example.googleapis.com\nendpoints:\n\nDeclares network address `https://library-example.googleapis.com`\n=================================================================\n\n # for service `library-example.googleapis.com`. The `https` scheme\n # is implicit for all service endpoints. Other schemes may be\n # supported in the future.\n - name: library-example.googleapis.com\n allow_cors: false\n - name: content-staging-library-example.googleapis.com\n # Allows HTTP OPTIONS calls to be passed to the API frontend, for it\n # to decide whether the subsequent cross-origin request is allowed\n # to proceed.\n allow_cors: true\n\nGenerated from protobuf message `google.api.Endpoint`\n\nNamespace\n---------\n\nGoogle \\\\ Api\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nThe canonical name of this endpoint.\n\n### setName\n\nThe canonical name of this endpoint.\n\n### getAliases\n\nAliases for this endpoint, these will be served by the same UrlMap as the\nparent endpoint, and will be provisioned in the GCP stack for the Regional\nEndpoints.\n\n### setAliases\n\nAliases for this endpoint, these will be served by the same UrlMap as the\nparent endpoint, and will be provisioned in the GCP stack for the Regional\nEndpoints.\n\n### getTarget\n\nThe specification of an Internet routable address of API frontend that will\nhandle requests to this [API\nEndpoint](https://cloud.google.com/apis/design/glossary). It should be\neither a valid IPv4 address or a fully-qualified domain name. For example,\n\"8.8.8.8\" or \"myservice.appspot.com\".\n\n### setTarget\n\nThe specification of an Internet routable address of API frontend that will\nhandle requests to this [API\nEndpoint](https://cloud.google.com/apis/design/glossary). It should be\neither a valid IPv4 address or a fully-qualified domain name. For example,\n\"8.8.8.8\" or \"myservice.appspot.com\".\n\n### getAllowCors\n\nAllowing\n[CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka\ncross-domain traffic, would allow the backends served from this endpoint to\nreceive and respond to HTTP OPTIONS requests. The response will be used by\nthe browser to determine whether the subsequent cross-origin request is\nallowed to proceed.\n\n### setAllowCors\n\nAllowing\n[CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka\ncross-domain traffic, would allow the backends served from this endpoint to\nreceive and respond to HTTP OPTIONS requests. The response will be used by\nthe browser to determine whether the subsequent cross-origin request is\nallowed to proceed."]]