REST Resource:

Resource: Service

A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle tasks such as backend data analysis or API requests from mobile devices. Each service has a collection of versions that define a specific set of code used to implement the functionality of that service.

JSON representation
  "name": string,
  "id": string,
  "split": {
    object (TrafficSplit)


Full path to the Service resource in the API. Example: apps/myapp/services/default.

Note: This field is used in responses only. Any value specified here in a request is ignored.



Relative name of the service within the application. Example: default.

Note: This field is used in responses only. Any value specified here in a request is ignored.


object (TrafficSplit)

Mapping that defines fractional HTTP traffic diversion to different versions within the service.


Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.

JSON representation
  "shardBy": enum (ShardBy),
  "allocations": {
    string: number,

enum (ShardBy)

Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.


map (key: string, value: number)

Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.


Available sharding mechanisms.

UNSPECIFIED Diversion method unspecified.
COOKIE Diversion based on a specially named cookie, "GOOGAPPUID." The cookie must be set by the application itself or no diversion will occur.
IP Diversion based on applying the modulus operation to a fingerprint of the IP address.
RANDOM Diversion based on weighted random assignment. An incoming request is randomly routed to a version in the traffic split, with probability proportional to the version's traffic share.



Deletes the specified service and all enclosed versions.


Gets the current configuration of the specified service.


Lists all the services in the application.


Updates the configuration of the specified service.