filmov
tv
REST API Software Interview Questions

Показать описание
Richardson maturity model is a way to grade your api according to constraints of REST
It has 4 level level 3 designates a truly Restful APi
Level0 you just send post requests like rpc style system
Level 1 now you use resources
Level2 now you use post put patch and other http verbs
In level 3 you use HATEOAS hypertext as the engine of application state
It returns what you can do next responses contains some hypermedia control for different thins to do next
Firstly Rest means representational state transfer and it is an architectural style that gives standards of communication between computers on the web it aims at making it easier to communicate with each other.
Rest services are stateless which means there is no session information, which means you don't know
Previous request information
Other than rest you can choose to use soap or graphql or grpc
Rest means representational state transfer and it is an architectural style that gives standards of communication between computers on the web it aims at making it easier to communicate with each other.
Rest services are stateless which means there is no session information, which means you don't know Previous request information
• GET: for fetching details, read-only operation.
• POST: for the creation of new resources.
• PUT: for updating the old/existing resource.
• DELETE: for deleting resource on the server.
• PATCH: for modifying the resource on the server.
• OPTIONS: fetches the list of supported options.
Post is not idempotent if you invoke it n times you get n resources on server
If you run put n times you will have the same object and for the last n-1 requests you are not changing anything
If you are deleting with id than its idempotent but if you are deleting like last its not idempotent
It has 4 level level 3 designates a truly Restful APi
Level0 you just send post requests like rpc style system
Level 1 now you use resources
Level2 now you use post put patch and other http verbs
In level 3 you use HATEOAS hypertext as the engine of application state
It returns what you can do next responses contains some hypermedia control for different thins to do next
Firstly Rest means representational state transfer and it is an architectural style that gives standards of communication between computers on the web it aims at making it easier to communicate with each other.
Rest services are stateless which means there is no session information, which means you don't know
Previous request information
Other than rest you can choose to use soap or graphql or grpc
Rest means representational state transfer and it is an architectural style that gives standards of communication between computers on the web it aims at making it easier to communicate with each other.
Rest services are stateless which means there is no session information, which means you don't know Previous request information
• GET: for fetching details, read-only operation.
• POST: for the creation of new resources.
• PUT: for updating the old/existing resource.
• DELETE: for deleting resource on the server.
• PATCH: for modifying the resource on the server.
• OPTIONS: fetches the list of supported options.
Post is not idempotent if you invoke it n times you get n resources on server
If you run put n times you will have the same object and for the last n-1 requests you are not changing anything
If you are deleting with id than its idempotent but if you are deleting like last its not idempotent
Комментарии