The repository contains the LodLive lib as a git submodule which should be checked out:
git submodule init
git submodule update
Afterwards, to deploy into the J2EE Container:
mvn clean install wildfly:deploy
http://localhost:8080/native/gui/admin
To View the visualisation
- point your browser to "http://localhost:8080/native/gui/lodlive"
- select "find recources"
- select class "http://open-multinet.info/ontology/resource/motorgarage#MotorGarage"
- enter "Moto" in search field and press "search >>"
- The "MotorGarage-1" should have been found -> press "start >>" button
The 'api' module must be available
The 'aaa' core module must be available
curl -H "Accept: text/turtle" http://localhost:8080/native/api/resources
curl -H "Accept: application/ld+json" http://localhost:8080/native/api/resources
curl -H "Accept: text/turtle" http://localhost:8080/native/api/resources/MotorGarage-1
curl -H "Accept: application/ld+json" http://localhost:8080/native/api/resources/MotorGarage-1
curl -H "Accept: text/turtle" http://localhost:8080/native/api/resources/MotorGarage-1/instances
curl -H "Accept: application/ld+json" http://localhost:8080/native/api/resources/MotorGarage-1/instances
curl -k -v --request PUT --data @instancesDescription.ttl https://localhost:8443/native/api/resources/
curl -k -v --request POST --data @instancesConfigureDescription.ttl https://localhost:8443/native/api/resources/
curl -k -v --request DELETE --data @instancesToDelete.ttl https://localhost:8443/native/api/resources/
The 'api', 'aaa' and 'config' modules must be available.
The 'usermanagement' module must be deployed.
When this module is being deployed for the first time, a new node is being created (name: TU Berlin) and a new admin user is being created (username: admin, password: admin).
Most of the following example calls are made to a user with the username 'test' and the password 'test'.
Request:
curl -v -k --request PUT "https://localhost:8443/native/api/user/test" --data @exampleUser.json -H "Content-type: application/json"
Data:
{"firstName":"test","lastName":"testlastname","password":"test","email":"[email protected]","affiliation":"exampleAffiliation","node":{"id":"1"}}}
If no node is specified, the user will be added to a default node.
Request:
curl -v -k --request GET "https://localhost:8443/native/api/user/test" --user test:test
Request:
curl -v -k --request GET "https://localhost:8443/native/api/user/test/classes" --user test:test
Request:
curl -v -k --request GET "https://localhost:8443/native/api/user/test/ownedclasses" --user test:test
Request:
curl -v -k --request GET "https://localhost:8443/native/api/user" --user admin:admin
Request:
curl -v -k --request POST "https://localhost:8443/native/api/user/test" --data @exampleUserUpdate.json -H "Content-type: application/json" --user test:test
Data:
{"firstName":"hans","email":"[email protected]"}
Possible attributes: firstName, lastName, email, affiliation, password, publicKeys (this will delete all old keys, if you want to add more keys, use the 'add publickey' method instead)
Request:
curl -k -v --request POST "https://localhost:8443/native/api/user/test/role/FEDERATION_ADMIN" --user admin:admin
This will change the role of user 'test' to FEDERATION_ADMIN (can only be done by authenticating as an admin).
Request:
curl -k -v --request PUT "https://localhost:8443/native/api/class" --user classowner:classowner --data @exampleClass.json -H "Content-type: application/json"
Data:
{"name":"Test Class","description":"a class for testing purposes","owner":{"username":"classowner"},"nodes":[{"id":"1"}]}
As a result you will get the ID of the created class. If no node is specified, the class will be added to the node of the classowner.
Request:
curl -v -k --request GET "https://localhost:8443/native/api/class/1" --user test:test
Request:
curl -v -k --request GET "https://localhost:8443/native/api/class" --user test:test
Request:
curl -v -k --request DELETE "https://localhost:8443/native/api/class/1" --user classowner:classowner
Request:
curl -k -v --request POST "https://localhost:8443/native/api/user/test/class/1" --user test:test
This will sign up the user 'test' for the class with the id '1'.
Request:
curl -k -v --request DELETE "https://localhost:8443/native/api/user/test/class/1" --user test:test
This will make the user 'test' leave the class with the id '1'.
Request:
curl -v -k --request DELETE "https://localhost:8443/native/api/user/test" --user test:test
Request:
curl -v -k --request POST "https://localhost:8443/native/api/user/test/pubkey" --data @anotherKey.json -H "Content-type: application/json" --user test:test
Data:
{"publicKeyString":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCLq3fDWATRF8tNlz79sE4Ug5z2r5CLDG353SFneBL5z9Mwoub2wnLey8iqVJxIAE4nJsjtN0fUXC548VedJVGDK0chwcQGVinADbsIAUwpxlc2FGo3sBoGOkGBlMxLc/+5LT1gMH+XD6LljxrekF4xG6ddHTgcNO26VtqQw/VeGw== RSA-1024","description":"key1"}
Request:
curl -v -k --request DELETE "https://localhost:8443/native/api/user/test/pubkey/key1" --user test:test
Request:
curl -v -k --request POST "https://localhost:8443/native/api/user/test/pubkey/key1/description" --data "my new description" -H "Content-type: text/plain" --user test:test
Request:
curl -v -k --request POST "https://localhost:8443/native/api/user/test/certificate" --data "mypassphrase" -H "Content-type: text/plain" --user test:test
(if the passphrase is left empty, the private key won't be encrypted)
Request:
curl -v -k --request GET "https://localhost:8443/native/api/user/test/pubkey/key1/certificate" --user test:test
Request:
curl -v -k --request DELETE "https://localhost:8443/native/api/user/test/cookie" --user test:test
On the first GET-Request the Server always sends a JSESSIONID which can be used to authenticate further requests Additionally, if the Queryparameter setCookie is set to true, the server sends a "fiteagle_user_cookie" which can be used for a "remember me" functionality (it is valid for 1 year). The request should then look like this:
curl -v -k --request GET "https://localhost:8443/native/api/user/test?setCookie=true" --user test:test