Slide 1

Slide 1 text

A CREAR UN
 RESTFUL API

Slide 2

Slide 2 text

Rubens Mariuzzo RMARIUZZO full stack web developer

Slide 3

Slide 3 text

A CREAR UN
 RESTFUL API

Slide 4

Slide 4 text

QUÉ ES UN RESTFUL API ? Un servicio web que se adhiere a los principios de REST.

Slide 5

Slide 5 text

QUÉ ES REST ?

Slide 6

Slide 6 text

QUÉ ES REST ? Es un estilo arquitectural de software descrito por Roy Fielding en el 2000.

Slide 7

Slide 7 text

QUÉ ES REST ? 1. Arquitectura cliente servidor SERVIDOR CLIENTE SISTEMA

Slide 8

Slide 8 text

QUÉ ES REST ? 1. Arquitectura cliente servidor 2. Sin estado (stateless)

Slide 9

Slide 9 text

QUÉ ES REST ? 1. Arquitectura cliente servidor 2. Sin estado (stateless) 3. Cache

Slide 10

Slide 10 text

QUÉ ES REST ? 1. Arquitectura cliente servidor 2. Sin estado (stateless) 3. Caché 4. Sistema en capa

Slide 11

Slide 11 text

QUÉ ES REST ? 1. Arquitectura cliente servidor 2. Sin estado (stateless) 3. Caché 4. Sistema en capa 5. Código a la medida

Slide 12

Slide 12 text

QUÉ ES REST ? 1. Arquitectura cliente servidor 2. Sin estado (stateless) 3. Caché 4. Sistema en capa 5. Código a la medida NOPE

Slide 13

Slide 13 text

QUÉ ES REST ? 1. Arquitectura cliente servidor 2. Sin estado (stateless) 3. Caché 4. Sistema en capa 5. Código a la medida 6. Interfaz uniforme

Slide 14

Slide 14 text

ASPECTOS DE UN RESTFUL API

Slide 15

Slide 15 text

ASPECTOS DE UN RESTFUL API 1. URL base https://api.twitter.com

Slide 16

Slide 16 text

ASPECTOS DE UN RESTFUL API 1. URL base 2. Media Type https://api.twitter.com JSON / XML

Slide 17

Slide 17 text

ASPECTOS DE UN RESTFUL API 1. URL base 2. Media Type 3. Métodos HTTP https://api.twitter.com JSON / XML GET, POST, PUT, DELETE

Slide 18

Slide 18 text

EJEMPLOS DE PETICIONES

Slide 19

Slide 19 text

EJEMPLOS DE PETICIONES GET: https://myapi.com/customers Content-Type: application/json

Slide 20

Slide 20 text

EJEMPLOS DE PETICIONES GET: https://myapi.com/customers Content-Type: application/json Método

Slide 21

Slide 21 text

EJEMPLOS DE PETICIONES GET: https://myapi.com/customers Content-Type: application/json Método URL base

Slide 22

Slide 22 text

EJEMPLOS DE PETICIONES GET: https://myapi.com/customers Content-Type: application/json Método URL base Recurso

Slide 23

Slide 23 text

EJEMPLOS DE PETICIONES GET: https://myapi.com/customers Content-Type: application/json Método URL base Recurso Media Type

Slide 24

Slide 24 text

EJEMPLOS DE PETICIONES GET: https://myapi.com/customers/123 Content-Type: application/json Método URL base Recurso Media Type

Slide 25

Slide 25 text

EJEMPLOS DE PETICIONES POST: https://myapi.com/customers Content-Type: application/json Método URL base Recurso Media Type

Slide 26

Slide 26 text

EJEMPLOS DE PETICIONES PUT: https://myapi.com/customers/123 Content-Type: application/json Método URL base Recurso Media Type

Slide 27

Slide 27 text

EJEMPLOS DE PETICIONES DELETE: https://myapi.com/customers/123 Content-Type: application/json Método URL base Recurso Media Type

Slide 28

Slide 28 text

EJEMPLOS DE PETICIONES GET: GET: POST: PUT: DELETE: /recurso /recurso/:id /recurso /recurso/:id /recurso/:id obtener todos obtener por id crear actualizar por id borrar por id

Slide 29

Slide 29 text

QUÉ VAMOS A CREAR?

Slide 30

Slide 30 text

QUÉ VAMOS A CREAR? Un RESTful API para administrar clientes y órdenes de compras.