There is a JSP that allow to run test on the module-directory-rest. It is accessible through the following link :
jsp/admin/plugins/directory/modules/rest/TestDirectoryRest.jsp
Note : To access to this JSP, one must be authenticated in the Back-Office. The filter tags must also be commented in the file directory-rest.xml so the module won't use the security, otherwise, an HTTP 401 response will be returned.
XML syntax :
http://myhost/mywebapp/rest/directory/{id_directory}/records or http://myhost/mywebapp/rest/directory/{id_directory}/records.xml
http://myhost/mywebapp/rest/directory/{id_directory}/record/{id_directory_record} or http://myhost/mywebapp/rest/directory/{id_directory}/record/{id_directory_record}.xml
JSON syntax :
http://myhost/mywebapp/rest/directory/{id_directory}/records.json
http://myhost/mywebapp/rest/directory/{id_directory}/record/{id_directory_record}.json
To create/complete a record, a form using the method POST and having an entype multipart/form-data and with the following parameters are needed :
Parameter's name | Parameter's type | Description |
---|---|---|
id_directory | text | ID of the directory (mandatory) |
id_directory_record | text | ID record (if not empty string, then is it the operation to complete) |
http://myhost/mywebapps/rest/directory/record