User:SignpostMarv Martin/swslr/api

From Second Life Wiki
Jump to navigation Jump to search

It is starting to become obvious that a no-nonsense API is needed to access the Second Life data.

The swslr project marks data up using microformats, so geeky end-users would be free to use xpath queries without worrying about when I shuffle the HTML around a bit, or use a microformat-parsing webservice/library to do similar work.

However, not everyone can be fussed with doing things this way, or in the case of LSL, the necessary tools aren't available.

Feedback

Please leave feedback & questions on the talk page.

Proposed URL Structure

http://{grid}.{world}.api.marvulous.com/{entity}/{property}/{uuid}[.{format}[?callback={callback}]]

All parameters MUST be expressed in lower-case.

Sub-domain

Breaking this down, you have the "grid" (e.g. Agni, Teen, Deep Grid), then the "world" (Second Life or WoW) forming the sub-domain.

Note that World of Warcraft is only given as an example of another World type that could be supported, there are no concrete plans for implementation.
  • agni.sl.marvulous.com
  • teen.sl.marvulous.com
  • deep-grid.sl.marvulous.com
  • alonsus.wow.marvulous.com

Entity types

There are five entities in Second Life:

  1. Residents
  2. Groups
  3. Regions
  4. Parcels
  5. Events
  • agni.sl.marvulous.com/resident/
  • agni.sl.marvulous.com/group/
  • agni.sl.marvulous.com/region/
  • agni.sl.marvulous.com/parcel/
  • agni.sl.marvulous.com/event/

Entity Properties

For a complete list of properties, see /entity properties

In order to access the property of an entity, you need to construct the URL. Most properties are accessed in the form of {subdomain}/{entity}/{property}/{uuid of entity}

Examples

Getting a Resident Rezday:

agni.sl.api.marvulous.com/resident/rezday/83b3987f-9520-4275-8efe-3ac13dd3f635


Exceptions

name2key facilities may be offered- in this case, the following syntax would be used:

  • agni.sl.api.marvulous.com/resident/key/signpostmarv martin
  • agni.sl.api.marvulous.com/region/key/ahern
  • agni.sl.api.marvulous.com/group/key/second life mentor

name2key facilities cannot be offered on events or parcels due to their non-unique nature.

Output Formats

  • Plain text, served with a text/plain MIME type
  • JSON objects, served with an application/json MIME type
  • JSONP callbacks, served with a text/javascript MIME type