We present some sample wget commands below to demonstrate an alternative way of accessing our engine. Quoting is done as required by Windows, Linux versions will be less picky in this regard.
NOTE:
We highly recommend using curl, wget does not have all the functionality you might need. Using wget is not officially supported, the samples below are provided as is and will not be kept up-to-date (though it is expected that wget will not suddenly change its syntax).
Get all repositories
wget --header="Authorization: Bearer <<TOKEN>>" https://sandbox.xill.io/v2/entities?scope=children
Get the children in a repository
wget --header="Authorization: Bearer <<TOKEN>>" https://sandbox.xill.io/v2/entities/5a184d0207903113023b5aaa?scope=children
Get an entity
wget --header="Authorization: Bearer <<TOKEN>>" https://sandbox.xill.io/v2/entities/5a184d0207903113023b5aaa/SANDBOX.md
Get an entity's content
wget --header="Authorization: Bearer <<TOKEN>>" https://sandbox.xill.io/v2/contents/5a184d0207903113023b5aaa/SANDBOX.md
Create an entity
wget --header="Authorization: Bearer <<TOKEN>>" --header="Content-Type:application/json;charset=UTF-8" --post-data="{ \"kind\" : \"File\", \"original\" : { \"name\" : { \"systemName\" : \"newfile.txt\", \"displayName\" : \"newfile.txt\" } }, \"modified\" : { \"name\" : { \"systemName\" : \"newfile.txt\", \"displayName\" : \"newfile.txt\" } } }" https://sandbox.xill.io/v2/entities/5a184d0207903113023b5aaa?scope=children
Update an entity's contents
wget --header="Authorization: Bearer <<TOKEN>>" --header="Content-Type:application/json;charset=UTF-8" --method="PUT" --body-data="updated file content" https://sandbox.xill.io/v2/contents/5a184d0207903113023b5aaa/newfile.txt
Alternatively you can also upload the contents of a file using "body-file" rather than "body-data":
wget --header="Authorization: Bearer <<TOKEN>>" --header="Content-Type:application/json;charset=UTF-8" --method="PUT" --body-file="<<FILE NAME>>" https://sandbox.xill.io/v2/contents/5a184d0207903113023b5aaa/newfile.txt
Create a folder
wget --header="Authorization: Bearer <<TOKEN>>" --header="Content-Type:application/json;charset=UTF-8" --post-data="{ \"kind\" : \"Folder\", \"original\" : { \"container\" : {\"hasChildren\" : true}, \"name\" : { \"systemName\" : \"myfolder1\", \"displayName\" : \"myfolder1\" } }, \"modified\" : { \"container\" : {\"hasChildren\" : true}, \"name\" : { \"systemName\" : \"myfolder1\", \"displayName\" : \"myfolder1\" } } }" https://sandbox.xill.io/v2/entities/5a184d0207903113023b5aaa?scope=children