11 Matching Annotations
  1. Oct 2022
    1. One final note is that Unspecified shows up as the third most frequent data format on both requests and responses. Our directory data model uses Unspecified as shorthand for when an API provider doesn’t provide this information.

      Unspecified 在请求和响应中都显示为第三常见的数据格式。当 API 提供者不提供此信息时,我们的目录数据模型使用 Unspecified 作为简写。

    2. GraphQL is an RPC styled approach to APIs that has been much discussed since its arrival in 2015. While a number of overzealous commenters were quick to declare that GraphQL would replace REST, it is more properly thought of as an alternative that works extremely well in specific use cases. It has been used in 53 APIs in the last two years which is a good showing but clearly pales in comparison to the more than 3,000 new RESTful APIs to appear during the same time.

      GraphQL 是一种 RPC 风格的 API 方法,自 2015 年问世以来一直在讨论。虽然许多过分热心的评论者很快宣布 GraphQL 将取代 REST,但更恰当地认为它是一种在特定方面效果非常好的替代方案用例。在过去的两年中,它已在 53 个 API 中使用,这是一个很好的展示,但与同时出现的 3,000 多个新的 RESTful API 相比显然相形见绌。

    3. The REST architectural style and JSON data format are the staples of the API space. However, they are not the only approaches when building an API. Event-driven API architectures have been steadily growing in popularity in the last few years due to the desire for applications that perform in real-time. Two of the most popular event-driven protocols are Webhooks and WebSockets; combined they have been used in nearly 200 APIs in the last two years.

      REST 架构风格和 JSON 数据格式是 API 空间的主要内容。但是,它们并不是构建 API 的唯一方法。由于对实时执行应用程序的需求,事件驱动的 API 架构在过去几年中越来越受欢迎。两个最流行的事件驱动协议是 Webhooks 和 WebSockets;在过去的两年中,它们已在近 200 个 API 中使用。

    4. we see that in the last two years JSON has been used as a response data format five-fold as many times as XML. XML is by far the number two response format used by API providers, but it is clear that JSON has been the unquestioned format of choice.

      我们看到在过去两年中,JSON 被用作响应数据格式的次数是 XML 的五倍。 XML 是 API 提供商使用的第二大响应格式,但显然 JSON 是毫无疑问的首选格式。

    5. While the all-time data are helpful for understanding APIs in the big picture, it may be useful to consider where APIs are trending in recent years. We queried our database from March 2018 through March 2020 to see what modern APIs can tell us about the direction things are heading and here’s what we found.

      虽然历史数据有助于从大局中理解 API,但考虑近年来 API 的趋势可能会很有用。从 2018 年 3 月到 2020 年 3 月,我们查询了我们的数据库,以了解现代 API 可以告诉我们有关事物发展方向的信息,

    6. The second result worth noting is that JSON, as expected, is the most popular response data format in use. The advantages of JSON over XML including lighter payloads, greater readability, reduced machine overhead for Serialization/ Deserialization, easier consumption by JavaScript among others, have been discussed for years. So it’s no surprise that JSON is the format of choice. It’s also interesting to see that XML is used about 90% as often as JSON.

      第二个值得注意的结果是,正如预期的那样,JSON 是最流行的响应数据格式。 JSON 相对于 XML 的优势,包括更轻的有效负载、更高的可读性、减少序列化/反序列化的机器开销、更容易被 JavaScript 使用等,已经讨论了多年。因此,JSON 是首选格式也就不足为奇了。有趣的是,XML 的使用频率大约是 JSON 的 90%。

    7. While we are discussing URI Query String/CRUD, you may notice that it appears more than 200 times as a response data format. The great majority of these are due to event-driven APIs that use Webhooks. In a Webhooks API the client request indicates what Webhooks-based stream it wants to subscribe to. The stream is implemented through an approach where the client provisions an HTTP-based API that the server calls. When the server has an update it makes a RESTful call to the client. That’s why the response from the server would include URI Query String as a data format.

      当我们讨论 URI 查询字符串/CRUD 时,您可能会注意到它作为响应数据格式出现了 200 多次。其中绝大多数是由于使用 Webhook 的事件驱动 API。在 Webhooks API 中,客户端请求指示它想要订阅的基于 Webhooks 的流。流是通过客户端提供服务器调用的基于 HTTP 的 API 的方法实现的。当服务器有更新时,它会向客户端发出 RESTful 调用。这就是为什么来自服务器的响应会包含 URI 查询字符串作为数据格式。

    8. The clearest finding is the dominance of REST styled APIs. URI Query String/CRUD as a request format refers to an APIs ability to leverage the HTTP protocol in order to take action on an API Resource. This is most commonly seen on REST-styled APIs and thus the use of URI Query String/CRUD in the request signals the use of RESTful architecture. With 18,985 web APIs using this request format, it is safe to say that REST is used by nearly 83% of the APIs in the directory.

      最明显的发现是 REST 风格的 API 占主导地位。作为请求格式的 URI 查询字符串/CRUD 是指 API 利用 HTTP 协议对 API 资源采取行动的能力。这在 REST 风格的 API 上最常见,因此在请求中使用 URI 查询字符串/CRUD 表示使用 RESTful 架构。使用这种请求格式的 Web API 有 18,985 个,可以肯定地说,目录中近 83% 的 API 使用 REST。

    1. 攻击者可以在发送的请求中改变对象的ID来攻击存在“失效的对象级授权”漏洞的API。这将导致敏感数据的未授权访问。

      是否可以对连续访问中的ID变化进行检测,来识别失效的对象级授权风险。