T
T
Timur2015-09-15 17:46:23
RESTful API
Timur, 2015-09-15 17:46:23

Do I understand the essence of RESTFul correctly?

First time developing RESTful API. I'm doing it in Yii2. It seems like everything is clear, but still I want to understand if I understand the very idea of ​​​​RESTful correctly? I feel like I'm missing something. You can google a lot of information about RESTful, but it seems that all the information is written for those who already know what it is. Yes, I read about a single interface, the absence of states, I understand how and in what cases to send requests (GET, POST, PUT, DELETE and my methods) and so on, but still I want to ask my questions.
Please refute or confirm my statements and help "catch" the essence

  1. RESTful is not a standard. Those. we are free to give data in any format and in any structure. And in the documentation for the API, we describe the resulting format and structures that you need to expect from it.
  2. For requests to the API, we use GET, POST, PUT, DELETE and our own methods, if necessary
  3. By the response http code, we determine what exactly we received in the response (information about the resource, information about the error, or something else)
  4. In the body of the response, we receive only data (data of the resource itself or detailed information about the error)
  5. All additional information (pagination, links to resources, etc. are transmitted in http headers)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Entelis, 2015-09-15
@DmitriyEntelis

There is a good article: habrahabr.ru/post/204958
In short: it is impossible to make complex business logic on pure REST.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question