User:Nava Muni/logger

From Second Life Wiki
< User:Nava Muni
Revision as of 20:16, 12 October 2008 by Nava Muni (talk | contribs) (promoted examples section; cleaned out an erroneous <code>)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The purpose of this API is to expose my Second Life® logging service. The logging service is suitable for general event logging or chat logging. 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 logging web service and API have been crafted with these limitations in mind. You must first 'open' a log channel for which you'll receive a 'handle.' You use this fixed-size handle for the remaining service operations.

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. Additionally, the API's structure has been (hopefully not cryptically) reduced to conserve precious URL space.


  • add NAME in GROUP for USER to map - this is essentially an 'open' command

http://HOST/sl-logger2.php?c=n&u=USER&g=GROUP&n=NAME

returns
+UUID
-bad user/group/name
-exists

  • use NAME in GROUP for USER during logging

http://HOST/sl-logger2.php?c=u&u=USER&g=GROUP&n=NAME

returns
+UUID
-bad user/group/name
-no file

  • add TEXT to log ID

http://HOST/sl-logger2.php?c=a&k=ID&t=TEXT

returns
+ok

  • end a logging session -- unimplemented

http://HOST/sl-logger2.php?c=e&k=ID

returns
+ok

  • remove ID from map and delete log file

http://HOST/sl-logger2.php?c=d&k=ID

returns
+ok

  • return list of all mappings

http://HOST/sl-logger2.php?c=l

returns
~UUID=USER/GROUP/NAME ...
+ok
-no data

  • returns maintenance details

http://HOST/sl-logger2.php?c=i

returns
(a lot of ugly-to-parse (human-readable) crap)
+ok

general request return errors

-locked
-bad command
-malformed


Ver 1.0

This is the initial release of the service API.


  • add NAME in GROUP to map - this is essentially an 'open' command

http://HOST/sl-logger.php?cmd=new&grp=GROUP&name=NAME

returns
+UUID
-bad group/name
-exists

  • use NAME in GROUP for logging - this is essentially an 'open-for-append' command

http://HOST/sl-logger.php?cmd=use&grp=GROUP&name=NAME

returns
+UUID
-bad group/name
-no file

  • add TEXT to log ID - this is essentially an 'append data' command

http://HOST/sl-logger.php?cmd=add&id=ID&text=TEXT

returns
+ok

  • end a logging session -- unimplemented

http://HOST/sl-logger.php?cmd=end&id=ID

returns
+ok

  • remove ID from map and delete log file

http://HOST/sl-logger.php?cmd=del&id=ID

returns
+ok

  • return list of all mappings

http://HOST/sl-logger.php?cmd=list

returns
~UUID=GROUP/NAME ...
+ok
-no data

  • returns maintenance details

http://HOST/sl-logger.php?cmd=info

returns
(a lot of ugly-to-parse (human-readable) crap)
+ok

general request return errors

-locked
-bad command
-malformed


Examples

(coming soon!)