You have two entities: Page and Tags and a Many-to-Many relationship between them.
If you want to add tag with id=1 to page with id=1, call:
PATCH /api/pages/1{"tags":["/api/tags/1"]}
If you want to add tag with id=2 you have to repeat also tag id=1, although it would be removed:
PATCH /api/pages/1{"tags":["/api/tags/1","/api/tags/2"]}
But: What if I have thousands of tags of a page? Is there no any other way do directly call anything to add or remove a single tag without building a request with all tags?
My current versions:
"api-platform/core": "^3.2""doctrine/orm": "^3.1""symfony/*": "7.0.*"