C
C
chincharovpc2020-06-12 09:37:30
RESTful API
chincharovpc, 2020-06-12 09:37:30

Correct Rest API?

The user has projects.
Every project has events.
I display a list of projects. To do this, I pull the projects method.
For each project, I need to display the time of the next event.
How to implement if I write api not only for the site?
Should I send in the projects method for each project or do I need another method?
5ee321346069a870096815.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daria Motorina, 2020-06-12
@glaphire

from the point of view of the number of requests, it is better to save money and get the next event along with the project (based on the article about N + 1 ), but from the point of view of the purity of the response of data on a specific entity (projects), this may be superfluous. It is necessary to focus on those indicators that are more important now and in the short term.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question