Professional Documents
Culture Documents
Restful Api Modeling Language: Arjun Kumar Bachuwar
Restful Api Modeling Language: Arjun Kumar Bachuwar
Agenda
Web APIs
Web APIs Externalizes the enterprise
Web APIs
Online population statistics
Web APIs
1 medium not enough to reach all
Web APIs
Way to reach all
Good Documentation
Stability and Consistency
Flexibility
Security
Ease of Adoption
RESTful API
Representational State Transfer
A flavor of web API
RESTful systems typically, communicate over the Hypertext Transfer
Protocol with the same HTTP verbs (GET, POST, PUT, DELETE, etc.)
used by web browsers to retrieve web pages and send data to
remote servers.
RESTful is Clientserver, Stateless, Cacheable, Layered system,
Uniform interface, Identification of resources, Self-descriptive
messages
Example
RESTful API HTTP methods
Resource
Collection
URI, such as
http://exampl
e.com/songs/
GET
List songs
from songs
collection.
PUT
POST
Replace/Upd
atethe song
in song
collection.
Createa new
song in the
song
collection
DELETE
Deletethe
song from
songs
collection.
RAML-What is it?
RESTful API Modeling Language (RAML) is a
simple and concise way of describing
practically-RESTful APIs.
It encourages reuse, enables discovery and
pattern-sharing
RAML is built on broadly-used standards
such as YAML and JSON and is a nonproprietary, vendor-neutral open spec
Built on broadly used standards such as
YAML and JSON
Why to use
Its enables well-defined human
readable contract
This can understood by Developers,
Partners, API-consumers
Flexible
Sample RAML
RESTful API
RAML Header
RESTful API
Basic info of
your API
RESTful API
Representational State Transfer
REST is a flavor of web API
SOAP is another flavor
Common
Parameters/Hea
ders
RESTful API
Representational State Transfer
Resource
REST is a flavor of web API
SOAP is another flavor
RESTful API
Representational State Transfer
Zero or More
REST is a flavor of web APItraits can be
specified for
SOAP is another flavor resource
RESTful API
Specify Action
Using HTTP
Verb
RESTful API
Representational State Transfer
Specifying query
REST is a flavor of web API
parameters
SOAP is another flavor
RESTful API
Responses for
Representational State Transfer
the particular
action, You can
REST is a flavor of web API
have multiple
SOAP is another flavor responses
!include
Schema file can
be specified as
separate file and
you can include
it using !include
!include
!include
tags.example.json
songs.raml
tags.schema.json
resourceTypes
resourceTypes
More Info
Thank You