According to JSON API V1 specification and its recommendations, I know the URLs for collection of resources should be something like /photos
. And the URL for reading, updating, or deleting a single resource that already exists in the database should be something like GET, PATCH, DELETE
/photos/:id
, for example.
But are there any URL requirements for rendering JSON data for resources to be created (i.e. the resource does not exist in DB yet and therefore it doesn't have id
) yet. I know this is allowed in terms of the response data as section 5.2 says
Exception: The id member is not required when the resource object originates at the client and represents a new resource to be created on the server.
However, can the URL for rendering such a new object be like photos/new
? As I'm using Ruby on Rails on the backend, photos/new
is pretty typical.
Thanks!