User:Nava Muni/dropbox

From Second Life Wiki
Jump to navigation Jump to search
The purpose of this API is to expose my Second Life® 'dropbox' (data exchange) service. The 'dropbox' service is suitable for general data exchange between in-world/in-world objects as well as in-world/out-world elements. As we all know that the amount of data that can pass from an in-world object to an out-world service is limited; this web service and API have been crafted with these limitations in mind.

If you'd like to use this API, please contact Nava Muni for host information.


Ver 2.0

This is the second release of the service API. The back end has undergone efficiency improvements. The API's structure has also been (hopefully not cryptically) reduced to conserve precious URL space. This version brings a new abstract hierarchy of data exchange with the dropping of the KEY component and the introduction of USER and GROUP components.


  • put TAG with VALUE under USER's GROUP

http://HOST/sl-dropbox2.php?c=p&u=USER&g=GROUP&t=TAG&v=VALUE

returns
+
-bad user

If TAG already exists, its contents are silently overwritten.


  • get value for TAG under USER's GROUP

http://HOST/sl-dropbox2.php?c=g&u=USER&g=GROUP&t=TAG

returns
+value
-bad user

If TAG or does not exists, a bare + is returned.


  • get value for TAG under USER's GROUP using DEFAULT if TAG not set

http://HOST/sl-dropbox2.php?c=g&u=USER&g=GROUP&t=TAG&d=DEFAULT

returns
+value
+DEFAULT
-bad user

If TAG or does not exists and DEFAULT is missing or empty, a bare + is returned.


  • get value for TAG under USER's GROUP using DEFAULT if TAG not set; delete TAG

http://HOST/sl-dropbox2.php?c=c&u=USER&g=GROUP&t=TAG&d=DEFAULT

returns
+value
+DEFAULT
-bad user

If TAG or KEY does not exists and DEFAULT is missing or empty, a bare + is returned and nothing is deleted.


  • delete TAG under USER's GROUP

http://HOST/sl-dropbox2.php?c=d&u=USER&g=GROUP&t=TAG

returns
+
-bad user

If TAG or KEY do not exists, no harm is done.


  • list all of USER's, USER's GROUP's or all TAGS under USER's GROUP

http://HOST/sl-dropbox2.php?c=l
http://HOST/sl-dropbox2.php?c=l&u=USER
http://HOST/sl-dropbox2.php?c=l&u=USER&g=GROUP

returns
~(file list)
:
+

or

-bad user
-no file

general request return errors

-locked
-bad user
-bad key/tag
-malformed


Ver 1.0

This is the initial release of the service API.


  • put TAG with VALUE under KEY

http://HOST/sl-dropbox.php?cmd=put&key=KEY&tag=TAG&val=VALUE

returns
+

If TAG already exists, its contents are silently overwritten.


  • get value for TAG under KEY

http://HOST/sl-dropbox.php?cmd=get&key=KEY&tag=TAG

returns
+value

If TAG or does not exists, a bare + is returned.


  • get value for TAG under KEY using DEFAULT if TAG not set

http://HOST/sl-dropbox.php?cmd=get&key=KEY&tag=TAG&def=DEFAULT

returns
+value
+DEFAULT

If TAG or does not exists and DEFAULT is missing or empty, a bare + is returned.


  • get value for TAG under KEY using DEFAULT if TAG not set; delete TAG

http://HOST/sl-dropbox.php?cmd=cut&key=KEY&tag=TAG&def=DEFAULT

returns
+value
+DEFAULT

If TAG or KEY does not exists and DEFAULT is missing or empty, a bare + is returned and nothing is deleted.


  • delete TAG under KEY

http://HOST/sl-dropbox.php?cmd=del&key=KEY&tag=TAG

returns
+

If TAG or KEY do not exists, no harm is done.


  • list all KEYs or all TAGS under KEY

http://HOST/sl-dropbox.php?cmd=.list
http://HOST/sl-dropbox.php?cmd=.list&key=KEY

returns
(file list)
:
+

or

-no key

general request return errors

-locked
-bad key/tag
-malformed


Examples

(coming soon!)