API Documentation

back to documentation (up a level)

General RESTful API URL Scheme

http://livedirectory.org/api/[api_name]/[api_version]/[api_operation]/[data_identifier_path]/?[operation specific arguments]

Specific API Documentation



The Profile Data Path

The 'Profile Data Path' is an important concept and is one of the reasons why LiveDirectory and it's API's are so amazingly powerful.

The beauty behind LiveDirectory is that any single piece of profile data can be accessed with a single, unique URL. And because both profile data and URL's share a common 'hierarchical' nature, any part of a profile data hierarchy can be referenced with a URL.

Examples

The 'Profile Data Path' "tom-carnell" will reference the entire 'tom-carnell' profile. This means that subscribers to the path 'tom-carnell' will be notified of changes to profile data anywhere within the entire profile.

Now let's consider the Profile Data Path "tom-carnell/skills". This will reference the 'skills' data item and all data items contained within (a 'sub-hierarchy' of the entire profile). This means that all subscribers to 'tom-carnell/skills' will be notified of changes to this section, but would not be notified of changes to 'tom-carnell/education' (as this data item has a different root data path).

We can also reference indexed array items with a Profile Data Path, for example "/tom-carnell/hobbies/0" would reference the first item in the hobbies array ("/tom-carnell/hobbies/1" would reference the second element, "/tom-carnell/hobbies/2" would reference the third etc).

Furthermore, we can also reference multi-dimensional data arrays with a similiar syntax: "/tom-carnell/hobbies/0/2/1". However, as you can see, structuring profile data with multi-dimensional, numerically indexed arrays may result in 'semantically unclear' data URL's. For this reason it is generally a good idea to use arrays keyed with meaningful names, for example: "/tom-carnell/hobbies/music/composing/guitar".