API Endpoint Semantics

2019-01-30 07:46发布

Is an API endpoint the 'method', like https://api.foursquare.com/v2/venues/ or the full URL including non-query-string parameters like https://api.foursquare.com/v2/venues/5104

In other words, are these two separate endpoints or considered the same endpoint? http://myapi.com/somemodel/1
http://myapi.com/somemodel/2

标签: api-design
1条回答
小情绪 Triste *
2楼-- · 2019-01-30 08:25

According to this Wikipedia article, the endpoint is a web service, defined by a WSDL file, and

does nothing more than define the address or connection point to a web service. It is typically represented by a simple HTTP URL string.

Microsoft uses the term endpoint in various contexts, but they all amount to the same thing: the endpoint is the entire interface, not one particular method.

In the context of a REST endpoint, the endpoint would contain the requisite GET, PUT, POST and DELETE methods (as applicable).

查看更多
登录 后发表回答