News Board

Message Details

Web API

By Tristan on 24/01/2010 11:26:10

I have added authentication to the mud's built in web-server. On top of this I have built a basic API for interacting with the file system. All of the authenticated pages are located inside http://www.antikaria.com/dynamic/secure/. There seems to be a minor issue with the authentication, where it sometimes will not connect properly after you authenticate. Subsequent requests are fine, though. The API (so far) consists of: /secure/test /secure/api/ls?path= /secure/api/cp?path=&path2= /secure/api/mv?path=&path2= /secure/api/rm?path= /secure/api/rmdir?path= /secure/api/mvdir?path=&path2= /secure/api/file?path= (POST: data=) /secure/api/schema All commands that need a path use the name path. If they need a second one, it is called path2. The file function returns the contents of a file on http GET and will set the contents of the file when using http POST. The post data variable must be called "data". The ls and schema functions return application/json data. If you are not allowed to access a particular resource, you get 403 forbidden. If something goes wrong, 500 Error. If something is wrong with the request (missing argument, etc.) the response is 400 Bad Request. Let me know about all the bugs! Tristan

Back to board index.