Stay organized with collections
Save and categorize content based on your preferences.
API services typically use .proto files to define the API surface and
.yaml files to configure the API service. Each API service must have
an API directory inside an API repository. The API directory should
contain all API definition files and build scripts.
Each API directory should have the following standard layout:
API directory
Repository prerequisites
BUILD - The build file.
METADATA - The build metadata file.
OWNERS - The API directory owners.
README.md - The general information about the API service.
Configuration files
{service}.yaml - The baseline service config file, which is the
YAML representation of the google.api.Service proto message.
prod.yaml - The prod delta service config file.
staging.yaml - The staging delta service config file.
test.yaml - The test delta service config file.
local.yaml - The local delta service config file.
Documentation files
doc/* - The technical documentation files. They should be in
Markdown format.
Interface definitions
v[0-9]*/* - Each such directory contains a major version of the
API, mainly the proto files and build scripts.
{subapi}/v[0-9]*/* - Each {subapi} directory contains interface
definition of a sub-API. Each sub-API may have its own
independent major version.
type/* - proto files containing types that are shared between
different APIs, different versions of the same API, or between
the API and service implementation. Type definitions under type/*should not have breaking changes once they are released.
Public Google API definitions are published on GitHub, see
Google APIs repository.
[[["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-07 UTC."],[[["\u003cp\u003eAPI services utilize \u003ccode\u003e.proto\u003c/code\u003e files for API definition and \u003ccode\u003e.yaml\u003c/code\u003e files for service configuration.\u003c/p\u003e\n"],["\u003cp\u003eEach API service must reside in an API directory within an API repository, containing all definition files and build scripts.\u003c/p\u003e\n"],["\u003cp\u003eAn API directory should follow a standard layout including repository prerequisites, configuration files, documentation files, and interface definitions, like versioned sub-API directories, and type files for shared proto files.\u003c/p\u003e\n"],["\u003cp\u003ePublic Google API definitions are available on the \u003ca href=\"https://github.com/googleapis/googleapis\"\u003eGoogle APIs\u003c/a\u003e GitHub repository, as seen with the \u003ca href=\"https://github.com/googleapis/googleapis/tree/master/google/example/endpointsapis\"\u003eService Infrastructure Example API\u003c/a\u003e.\u003c/p\u003e\n"]]],[],null,[]]