I have an API with some specific resource say "cars" which have the following actions:
- Get all Cars
- Get one car
- Add one car
for Get all cars and Get one Car, I have a REST api resouce with GET
/cars and GET
However adding a new
car requires two steps:
- Get a presigned-URL to upload the car to S3 from the client
- The client should upload the data to S3 directly.
What would be the best approach to add to the existing API? should I use a separate resource endpoint? like GET
/presigned-url or should I have a special sub-resource like
/cars/presigned-url . Any other ideas?