- Has 4 components:
-
Operation
- Defines the resource and the HTTP method (GET, POST, PUT, PATCH, DELETE ...)
- resource is the path to query, for example
/flights
, or/accounts
- resource is the path to query, for example
#%RAML 1.0 /accounts
- Defines the resource and the HTTP method (GET, POST, PUT, PATCH, DELETE ...)
-
Input
- is the data and or metadata used for the method request, involves 3 parts:
- URI Paramters:
/{ID}
identify a nested resource like:/{Gender}
,{CustomerID}
tec. - Query Parameter: used for filtering conditions like:
salary = 1000
,age=13
,name=Dan
etc. - Header: it contains metadata like: content-length, content-type, clientID, clientSecret.
- Body: It will contain resource details, for example, when creating a customer account, we would need customer data like name, age, location, payment details etc.
- GET, DELETE does not need body
- Other methods might need body, like PUT, PATCH
-
Output:
- HTTP Status response:
- Body: It will contain resource details
-
Uderlying Data type:
- It is data type of our input or output, which can be in:
- XML format.
- JSON format.
- Java Object format.
- CSV format.
- Text file format ... etc
- It is data type of our input or output, which can be in:
-