I have a resource which cannot be updated (events). Hence I am allowing only Post & Get operations. (I haven't chosen PUT because the eventId is generated at server end and returned as part of response).
I already have a combination of three fields in the input which can be used to identify a unique resource.
Given this, if someone posts same request twice, this is what I am expecting to return
- case 1: If unique fields already exists in DB and complete request is exactly same as previous one, then we just ignore this request (since the resource already exists).
- case 2: if unique fields already exists in DB BUT other part of request is different, then send error response saying it's not supported.
What should be the correct response code to return in both case 1 & case 2.
Thanks, Harish