I am building an API with Apigility. I want to allow POST to a Collection (for creating a new unnamed entity) and also to an Entity (for creating a new named entity).
Apigility's Resource class, 'create' method is invoked on POST to either the Collection or an Entity, and receives only a 'data' parameter which is the POSTed payload. There is no 'id' parameter because the method is usually invoked only for Collections.
If invoked on an Entity - i.e. if an 'id' value was provided in the URI - how can I know the ID value that was provided?
Thanks