11) RESTful
22) API
3An API is an interface through which one program or web site talks to another.
4They are used to share data and services, and they come in many different
5formats and types.
6
7A RESTful API is one of the many possible ways that programs, servers,
8and web sites can share data and services. REST (Representational State Transfer
9) describes the general rules for how the data and services are represented
10through the API so that other programs will be able to correctly request and
11receive the data and services that an API makes available
1Let's break it into two components:
2
31) RESTful
42) API
5An API is an interface through which one program or web site talks to another.
6They are used to share data and services, and they come in many different
7formats and types.
8
9A RESTful API is one of the many possible ways that programs, servers,
10and web sites can share data and services. REST (Representational State Transfer
11) describes the general rules for how the data and services are represented
12through the API so that other programs will be able to correctly request and
13receive the data and services that an API makes available
11) REQUEST
22) RESPONSE
3When we send request, we need to know the API
4methods/endpoints that are available:
5 - read documentation about API methods.
6 - Swagger tool, that has API methods and descriptions
7simple endpoint:
8 …school.com/api/students
9Types of Requests:
10 GET -> Read data
11 POST -> Create/insert data
12 PUT -> Update data
13 DELETE-> Delete data
14I send GET, POST, PUT, DELETE type of API requests to
15API endpoint/method and get response.
16ORDS (oracle data service) API -> HR Database
17ORDS API has methods that we can send request to, and it sends
18response with Data from HR database.
19
1Representational state transfer is a software architectural style that defines
2a set of constraints to be used for creating Web services.
3
4Web services that conform to the REST architectural style, called RESTful Web
5services, provide interoperability between computer systems on the internet
1[{"id":1,"username":"admin","email":"admin@example.com"},{"id":2,"username":"Vagner","email":"vagner@example.com"},{"id":3,"username":"Administrator","email":"administrador@example.com"}]