In the following it is assumed that:
admin:password
are the credentials for accessing Syncope core- Syncope core runs on http://localhost:9080/syncope
Apache Syncope >= 2.0.X
Apache Syncope 2.0.0 is yet to be released and only available as SNAPSHOT.
With Apache Syncope 2.0.0, besides using curl as with earlier versions, a brand new CLI tool is available.
For more details please refer to the REST API reference, which is also available in your own deployment at http://localhost:9080/syncope/.
If selected for deployment, the Swagger extension is also available in your deployment at http://localhost:9080/syncope/swagger/.
Apache Syncope 1.2.X
For more details please refer to the REST API reference, which is also available in your own deployment at http://localhost:9080/syncope/rest/doc/.
Create user
Update user
Delete user
Export database content
Change configuration parameter value
Apache Syncope <= 1.1.X
Create user
To create a user with the REST-interface using curl on the command line:
curl -u admin:password -H "Content-Type: application/json" --data @/tmp/newuser.json http://localhost:9080/syncope/rest/user/create.json
The file /tmp/newuser.json
could look like this:
{ "id": "0", "username": "myusername", "password": "test123", "attributes": [ { "schema": "userId", "values": [ "example1@example.com" ] }, { "schema": "surname", "values": [ "My Surname" ] } ] }
To link the user to an existing resource, include this in the root json hash:
"resources": [ "ws-target-resource-1" ]
Export database content
curl -u admin:password -o content.xml -H "Content-Type: application/xml" -X GET http://localhost:9080/syncope/cxf/configurations/stream
Change configuration parameter value
curl -u admin:password -H "Content-Type: application/json" \
-d '{"key":"smtp.host","value":"smtp.ngi.it"}' http://localhost:9080/syncope/rest/configuration/update.json