pele_mele:stack_exchange:stack_overflow:29661578
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédente | |||
pele_mele:stack_exchange:stack_overflow:29661578 [2024/11/23 04:02] – supprimée - modification externe (Date inconnue) 127.0.0.1 | pele_mele:stack_exchange:stack_overflow:29661578 [2024/11/23 04:02] (Version actuelle) – ↷ Nom de la page changé de pele_mele:stack_exchange:stack_overflow:stackoverflow-29661578 à pele_mele:stack_exchange:stack_overflow:29661578 alexis | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ====== How to handle a POST method that generate multiple resource with REST? ====== | ||
+ | I am building my first REST API. I could do most of my queries without any problem but now I encountered a use case I don't know how to solve. | ||
+ | |||
+ | Here is the use case. | ||
+ | I submit a dataset to the API, the dataset is then stored in database (this part works as intended). When stored in the database, it creates different resources due to business rules. So now I don't know how to inform the user what is the location of the newly created resource since I could have more than one. | ||
+ | |||
+ | I read this [[https:// | ||
+ | Should I rethink my POST method? Should I use a different way to acknowledge the user where are the resources? | ||
+ | |||
+ | <WRAP help> | ||
+ | Yes, the '' | ||
+ | |||
+ | You can use the '' | ||
+ | |||
+ | As an alternative, | ||
+ | </ | ||
+ | <WRAP info> | ||
+ | [[https:// | ||
+ | </ | ||