Difference between revisions of "User:Dzonatas Sol/SNOW-375 WGET"
Dzonatas Sol (talk | contribs) |
Dzonatas Sol (talk | contribs) |
||
Line 34: | Line 34: | ||
* $ wget -nv -O- http://localhost:50140/Inventory/Category/88199409-7050-4484-bda7-b9f7f890c379 | * $ wget -nv -O- http://localhost:50140/Inventory/Category/88199409-7050-4484-bda7-b9f7f890c379 | ||
<llsd><map><key>Categories</key><array> | <llsd><map><key>Categories</key><array /><key>Items</key><array><uuid>111ec416-0888-7c64-013e-2d84d64205c2</uuid></array> | ||
<key>Name</key><string>LaserTech Pylon (Packaged)</string><key>Type</key><string /></map></llsd> | |||
The example shows an empty array for sub-categories and an item named "LaserTech Pylon (Packaged)" in the same folder. |
Revision as of 19:57, 20 March 2010
Please feel free to update this page as needed.
This page demonstrates a few methods to access the viewer data via the SNOW-375 patch. This is how client-side scripts can access the data, too. We use wget as a unix shell script example.
Use WGET to access viewer data with SNOW-375
Once you have the viewer compiled and started, go ahead and login.
- Access the "Advanced" menu
- Select "Debug Settings"
- Type in "InterfaceVerifySessionCookie"
- Make sure the settings is "false"
- Close the popup.
Once you do the above, you have disabled the session cookie. The session cookie acted as a basic security means to control connections to only allow a single session between the viewer and the script. We disabled it to make this demonstration easier.
At the shell script, you can now type:
- $ wget -nv -O- http://localhost:50140/ControlGroup
And the response should give you an LLSD output of the available variable control groups:
<llsd><array><string>SavedSettings</string><string>SavedPerAccountSettings</string></array></llsd>
Here's example to get the your root folder UUID:
- $ wget -nv -O- http://localhost:50140/Inventory/Root
<llsd><map><key>ID</key><uuid>88199409-7050-4484-bda7-b9f7f890c379</uuid></map></llsd>
We can see the LLSD format that represents ID=88199409-7050-4484-bda7-b9f7f890c379. Let's use that to get the contents of that inventory folder:
<llsd><map><key>Categories</key><array /><key>Items</key><array><uuid>111ec416-0888-7c64-013e-2d84d64205c2</uuid></array> <key>Name</key><string>LaserTech Pylon (Packaged)</string><key>Type</key><string /></map></llsd>
The example shows an empty array for sub-categories and an item named "LaserTech Pylon (Packaged)" in the same folder.