News for hackers. Stuff that matters.
Re:Ask HN: What are the not-so obvious things to consider wh... by dehrmann on Saturday November 18, 2017 @07:25PM (#15731511)
> Do they use REST or not

Meh. REST semantics really only works well when you're doing CRUD operations. They get clunky when something's modeled around actions rather than entities. That said, make sure their response codes and methods make sense.

Re:Ask HN: What are the not-so obvious things to consider wh... by majormajor on Saturday November 18, 2017 @10:53PM (#15732157)
Spinning this a slightly different direction: think about what their API operation model is, and how well it lines up with your current and (more importantly) expected future use cases?

If you expect that you might need to significantly change what you're doing in the future, having a more simple, composable model around resources that you can call as you need might save your ass down the line compared to if they model things as specific RPC use cases and you find yourself needing a particular variation they don't support out of the box.

Re:Ask HN: What are the not-so obvious things to consider wh... by zkomp on Sunday November 19, 2017 @01:37AM (#15732611)
I agree in the sense rest is not as imortant as say: is the api XML or JSON? I’ve integrated many B2B APIs which tend to be varying degrees of XML, plain and sane to rabbithole insane or worst of all SOAP which apparently is really still a thing people use and take seriously in B2B api context.

Sigh, xml hard at work solving a problem we never seen, but creates such a bloted horrible mess where json would have been simple and better.

Re:Ask HN: What are the not-so obvious things to consider wh... by dehrmann on Sunday November 19, 2017 @02:24AM (#15732731)
I see both sides. The magic of SOAP is you can give a tool a WSDL and it will generate bindings in a language of your choice.

The downside is it has to be pretty complicated to enable the magic, so building it can be complicated, and debugging it is a nightmare. You could say the same about a lot of modern JS, and that's been somewhat solved by amazing tooling.

Re:Ask HN: What are the not-so obvious things to consider wh... by zkomp on Sunday November 19, 2017 @03:11AM (#15732851)
Yes absolutely: this very magic is precisely what is so horrible and imho a rabbithole of insanity. It is CORBA resurrected with XML.

In my data oriented mind, the primary thing that matters is the data that is sent, the second is other semantics like idempotency.

Neither SOAP nor XML solve or helps: there might be no wsdl bindings in your language, or they are badly implemented (true in my experience).

XML make people nest structures where it could have been flatter, SOAP even more, and annotates everything whithout a need for that.

This cost for no reason but to entertain the CORBA like pipe dream, or should I say nightmare.

We just resorted to pulling out data from xml with xpath. And more or less template the response back, no wsdl and very simple.

But why inflict this pain on your API users?

Re:Ask HN: What are the not-so obvious things to consider wh... by ptman on Sunday November 19, 2017 @03:30AM (#15732897)
Swagger/OpenAPI does that for rest to some extent
Re:Ask HN: What are the not-so obvious things to consider wh... by zkomp on Sunday November 19, 2017 @05:53AM (#15733332)
Just want to add one thing about swagger:

please think through your API if you are to design an API, the tools will not think for you and you can fool yourself instead...

Swagger will not magically solve anything. I have seen and experienced that you can really create nonsensical but pretty and auto documented APIs using swagger in no time.