- run a single test
mvn -Dtest=DocumentHandlerTest -DfailIfNoTests=false -P social-api test mvn -Dtest=DocumentHandlerTest#HandleGetPlural -DfailIfNoTests=false -P social-api test
-
compile without tests mvn -Dmaven.test.skip -P graasp
-
debug Eclipse
APIs to create and get assets from graasp with attachments via opensocial. Deployed to graaspdev.epfl.ch server.
CURL examples.
- Create asset in a space with "parentId":707 and attach file "photo_evgeny.jpg" to it.
The security token contains the id of the user st=3:3:3:3:3:3:3 on behalf of which the action is performed, normally this token should be encrypted, but for now it is not.
curl -i -H "Content-Type: multipart/form-data;" -H "Accept: application/json;" -H "Expect:" -X POST -F 'request={"method":"documents.create", "params": { "document": { "displayName": "My File", "parentId": 707, "mimeType":"image/jpeg", "fileName":"test.jpg" } }, "id":"documents.create" }' -F 'file=@photo_evgeny.jpg;' "http://shindigdev.epfl.ch/rpc?method=documents.create&id=documents.create&st=3:3:3:3:3:3:3"
FULL request/response:
- Retrieve asset with id=1500 and full attachment size=-1 curl -i -H "Content-Type: application/json; Accept: application/json" -X GET "http://shindigdev.epfl.ch/rest/documents/1500?st=3:3:3:3:3:3:3&size=-1"
FULL request/response: