REST API 404: Bad URI, or Missing Resource?

I’m building a REST API, but I’ve encountered a problem. It seems that accepted practice in designing a REST API is that if the resource requested doesn’t exist, a 404 is returned. However, to me, this adds unnecessary ambiguity. HTTP 404 is more traditionally associated with a bad URI. So in effect we’re saying “Either … Read more

How do I upload a file with metadata using a REST web service?

I have a REST web service that currently exposes this URL: http://server/data/media where users can POST the following JSON: { “Name”: “Test”, “Latitude”: 12.59817, “Longitude”: 52.12873 } in order to create a new Media metadata. Now I need the ability to upload a file at the same time as the media metadata. What’s the best … Read more

What is a web service endpoint?

Let’s say my web service is located at http://localhost:8080/foo/mywebservice and my WSDL is at http://localhost:8080/foo/mywebservice?wsdl. Is http://localhost:8080/foo/mywebservice an endpoint, i.e., is it the same as the URI of my web service or where the SOAP messages received and unmarshalled? Could you please explain to me what it is and what the purpose of it is? … Read more