S3 REST API and POST method

Yes, you are wrong in mapping CRUD to HTTP methods. Despite the popular usage and widespread misconception, including high-rated answers here on Stack Overflow, POST is not the “correct method for creating resource”. The semantics of other methods are determined by the HTTP protocol, but the semantics of POST are determined by the target media … Read more

API pagination best practices

I’m not completely sure how your data is handled, so this may or may not work, but have you considered paginating with a timestamp field? When you query /foos you get 100 results. Your API should then return something like this (assuming JSON, but if it needs XML the same principles can be followed): { … Read more

RESTful Services – WSDL Equivalent

The Web Application Description Language (WADL) is basically the equivalent to WSDL for RESTful services but there’s been an ongoing controversy whether something like this is needed at all. Joe Gregorio has written a nice article about that topic which is worth a read.

powershell invoke-restmethod multipart/form-data

@Bacon-Bits answer didn’t seem to work for me. My server rejected it with a potentially malformed form-data body 🙁 I found this gist, and trimmed it up a bit for my purposes. Here’s my end result: $FilePath=”c:\temp\temp.txt”; $URL = ‘http://your.url.here’; $fileBytes = [System.IO.File]::ReadAllBytes($FilePath); $fileEnc = [System.Text.Encoding]::GetEncoding(‘UTF-8’).GetString($fileBytes); $boundary = [System.Guid]::NewGuid().ToString(); $LF = “`r`n”; $bodyLines = ( … Read more

What is REST? Slightly confused [closed]

REST is not a specific web service but a design concept (architecture) for managing state information. The seminal paper on this was Roy Thomas Fielding’s dissertation (2000), “Architectural Styles and the Design of Network-based Software Architectures” (available online from the University of California, Irvine). First read Ryan Tomayko’s post How I explained REST to my … Read more