What’s the “?P” register rest api construct, what is for and where to find official docs?
It’s called a path variable: Path variables enable us to add dynamic routes. See below example taken from the REST API handbook: // Here we are registering our route for single products. The (?P<id>[\d]+) is // our path variable for the ID, which, in this example, can only be some form // of positive number. … Read more