Learn about the new Picker API and important Library API changes.
Details here.
RESTful API 简介
REST 是一种软件架构样式,可提供便利、一致的方法来请求和修改数据。
术语 REST 是“具象状态传输”的简称。在 Google API 的上下文中,指的是使用 HTTP 谓词来检索和修改由 Google 存储的数据的表示法。
在 RESTful 系统中,资源存储在数据存储区中;在客户端发送要求服务器执行特定操作(例如创建、检索、更新或删除资源)的请求之后,服务器便会执行该操作并发送响应,此响应的格式通常为所指定资源的表示法。
在 Google 的 RESTful API 中,客户端使用 HTTP 谓词(例如 POST
、GET
、PUT
或 DELETE
)指定操作。它通过以下格式的全局唯一 URI 来指定资源:
https://www.googleapis.com/apiName/apiVersion/resourcePath?parameters
由于所有 API 资源都具有 HTTP 可访问的唯一 URI,因此 REST 启用了数据缓存,而且经过优化以与网络的分布式基础架构一起使用。
您可能会发现 HTTP 1.1 标准文档中的方法定义十分有用;这些定义中包含了 GET
、POST
、PUT
和 DELETE
的规范。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-20。
[null,null,["最后更新时间 (UTC):2024-09-20。"],[[["REST, or Representational State Transfer, is an architectural style for exchanging data using standard HTTP methods."],["Google APIs utilize REST to allow clients to interact with Google's data by sending requests using verbs like `GET`, `POST`, `PUT`, and `DELETE`."],["Each Google API resource is uniquely identified by a URI allowing efficient caching and interaction within the web's infrastructure."]]],["REST is a software architecture style employing HTTP verbs to interact with data. Clients send requests to servers to perform actions like creating, retrieving, updating, or deleting resources. Resources are identified by unique URIs, structured as `https://www.googleapis.com/apiName/apiVersion/resourcePath?parameters`. The server executes the requested action and responds. Common HTTP verbs used include `POST`, `GET`, `PUT`, and `DELETE`, defining the specific action. This structure supports data caching and is optimized for web infrastructure.\n"]]