# 介绍

这是一份针对网络API的通用设计指南。它从2014年开始用于Google内部，也用于设计Cloud APIs和Google APIs。这份指南在此处共享来告知外部开发者，以便我们所有人都能更轻松地合作。

Google Cloud Endpoints的开发者们可能会发现这份指南在设计gRPC APIs的时候特别有用，并且我们强烈推荐这些开发者们使用这些设计准则。但是我们并不强迫你使用它。你也可以使用Cloud Endpoints和gRPC却不遵循这份指南。

这份指导可同时应用于基于HTTP的REST APIs与基于socket的RPC APIs，尤其是gRPC APIs。gRPC APIs使用Protocol Buffers来定义它们的API接口，使用API Service Configuration来定义他们的API服务，包括HTTP映射，日志和监控。HTTP映射这个特性被Google APIs和Cloud Endpoints gRPC APIs使用，用于JSON/HTTP和Protocol Buffers/RPC之间的转码。

这份指南是一个活跃的文档，它的内容会随着新风格和新设计模式的采用和批准而有所增补。本着这种精神，它永远不会是完整的，并且API设计的艺术和工艺总是有足够的进步空间。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://google-cloud.gitbook.io/api-design-guide/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
