RestConsole: Difference between revisions
imported>Phrearch initial docs on rest console. Needs improvement |
imported>Phrearch added console param thing |
||
| Line 3: | Line 3: | ||
==Syntax== | ==Syntax== | ||
We take the user service(http://foo.bar:8002) as example here. First start a new session by sending a POST. | We take the user service(http://foo.bar:8002) as example here. Startup the user service with: | ||
Params: USER, | mono OpenSim.Grid.UserServer.exe -console rest | ||
First start a new session by sending a POST. | |||
Params: USER, PASSfile:///usr/share/applications/kde4/konsole.desktop | |||
http://foo.bar:8002/StartSession/ | http://foo.bar:8002/StartSession/ | ||
Return: (XML) <ConsoleSession><SessionID></SessionID><Prompt></Prompt></ConsoleSession> | Return: (XML) <ConsoleSession><SessionID></SessionID><Prompt></Prompt></ConsoleSession> | ||
Revision as of 10:39, 6 September 2009
About
The REST console makes remote administration of the various OpenSim services possible.
Syntax
We take the user service(http://foo.bar:8002) as example here. Startup the user service with:
mono OpenSim.Grid.UserServer.exe -console rest
First start a new session by sending a POST. Params: USER, PASSfile:///usr/share/applications/kde4/konsole.desktop
http://foo.bar:8002/StartSession/
Return: (XML) <ConsoleSession><SessionID></SessionID><Prompt></Prompt></ConsoleSession>
Now we got the SessionID, which can be used to send a command. Use the SessionID as ID param, and send a POST again. Params: ID, COMMAND
http://foo.bar:8002/SessionCommand/
Return: (XML) <ConsoleSession><Result></Result></ConsoleSession> If everything went well, the command should have been executed. Try another command.
When you want to close down the connection, send a POST again. PARAMS: ID
http://foo.bar:8002/CloseSession/
Return: (XML) <ConsoleSession><Result></Result></ConsoleSession> The session is closed, and you have to login again, when you want to send a command again.
Examples
In python: