The GET /users endpoint will return a page of the first 13 users by default.

To request other pages, add |-separated querystring with the limit and offset, as roman numerals enclosed in double quotation marks. Response status is always equal to 200, plus the total count of the resource, or zero when there's an error.

You can include an array of friends of the user in the result by setting the request header "friends" to the base64-encoded value of the single white pixel png.

Other metadata is not included by default in responses, but can be requested by appending ?meta.json to any endpoint, which will return an xml response.

If you want to update the user's profile picture, you can request an OAuth token per fax machine, followed by a pigeon POST capsule containing a filename and a rolled up Polaroid picture. The status code attached to the return postal dove will be the decimal ASCII code for a happy smiley on success, and a sad smiley if any field fails form validation.

-- Every single external REST API I've ever worked with.

  • 28
    When it came to the fax machine and pigeon I understood this is actually a joke xDDD
  • 22
    Oh god this reminds me of an API I was dealing with recently.

    Sometimes it would return `error: <string>`.

    Sometimes it would return the object I was looking for, with all the fields blank except for `message: <string>`, which was the error message.

    People like that should be culled from society
  • 2
    Early days Jira API. ^
  • 4
    until i read the last line i thought you want someobe killing you.
  • 4

    Ain't nobody got time for streamlining nor refactoring that shit to RESTful, so we claim to be having a "REST API", while actually being quite random on how we manage the unexpected things we encounter while parsing and validating that random input of people.

    One plus side? No-one is going to be able to work with our system anyway, so we can just ask an hourly rate for those who really want to and help with their integration. (:

    FFS! I hate my job, let me refactor:

  • 3

    I think the problem with REST is that it's a very loosely defined, unopinionated standard.

    Almost every API eventually needs pagination and filtering, maybe links and includes, and probably some kind of aggregation over combined result sets -- and those are the things which get reinvented over and over again.
  • 2
    That’s why we now have GraphQL. I’d love to see someone fuck that up
Add Comment