.netweb-serviceslanguage-agnostic

Exposing WebService APIs to the outside world for universal access


I would like to implement an API for my web based service. I've been looking around at ways to do this, but all the choices seems slightly overwhelming.

The way I envisage the service to work is that the user calling the api will need to login, and the login function returns some sort of token which needs to be included with each subsequent request.

I would like the service to be easily consumed by any language.

Your thoughts and suggestions would be appreciated.


Solution

  • It really depends on what you're needs are but I'll throw this out... Consider doing a REST-style API http://en.wikipedia.org/wiki/Representational_State_Transfer

    The advantage is simplicity, usually the whole backend call can be described in a simple URL. However you don't want to be pedantic about the "REST way". (ex. strict REST says "GETS are idempotent). It also imposes a strict hierarchy of resources. As long as you're flexible it's still a nice design because you don't need heavy support tools to work with it.