UML Diagram to Model API

Hugo picture Hugo · Nov 13, 2009 · Viewed 26.9k times · Source

I need to create a diagram to document a RESTFul API that build, which UML diagram should I use?

Thanks in advance,

Answer

CesarGon picture CesarGon · Nov 21, 2009

A sequence diagram shows the dynamics of a system. So, if you want to show the flow of calls that will occur when clients call your API, then that's your choice.

A class diagram shows the structure of a system. So, if you want to show the method/function signatures of your API and how they are distributed across types, then this is what you should use.

Or you could use both to depict different views of your API.