Is there a way to discover all endpoints of a ReST API?

后端 未结 3 1088
感情败类
感情败类 2020-12-08 06:51

I\'m wondering if its possible to programmatically discover all the endpoints of a particular API.

So for example if I GET this URL with a browser or curl: https://

3条回答
  •  遥遥无期
    2020-12-08 06:55

    Some RESTful APIs publish a Web Application Description Language resource (WADL - pronounced like the walk that ducks do - for short). JAX-RS, or at least Jersy webapps will do this by default at the application root URL /application.wadl. It doesn't appear that Twitter's API is one of these. Many REST purists would argue that the API should be self describing and self discoverable simply by interacting with it and seeing what other endpoints it will give you.

    More about WADL from wikipedia...

提交回复
热议问题