Disable IRI on for created entities on Api-Platform

I have an API managing products. One of my endpoint will fetch data from another API and returns the data to the user (in order to complete it if needed). At this point, data are not saved into my database and I don’t want the user to be able to do anything else than POST the product, then he will retrieve the id and be able to GET, PUT, PATCH, …

Is there a way to disable the IRI generation for a single operation ?


For now I set -1 as ID but I feel it’s a bit dirty.

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *