Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UML Diagram to Model API

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

Thanks in advance,

like image 311
Hugo Avatar asked Nov 13 '09 18:11

Hugo


People also ask

Which UML diagram is used to model an API?

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.

What is API diagram?

What is an API Diagram? An API diagram documents the routines and protocols of an API to clarify its structure and behavior. API diagrams are helpful because they quickly show both developers and non-technical stakeholders like product managers understand how the system will behave.

Can UML be used for data modeling?

While UML does not have specifications for data modeling, it can be a useful tool for diagramming, especially since data from databases can be used in object-oriented programming.

Can UML diagrams show interfaces?

In UML 1.4 interface was formally equivalent to an abstract class with no attributes and no methods and only abstract operations. An interface may be shown using a rectangle symbol with the keyword «interface» preceding the name.


1 Answers

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.

like image 187
CesarGon Avatar answered Sep 22 '22 05:09

CesarGon