ITEM | VALUE |
URL | http://<URL>/api/api/v1/login/ |
METHOD | PUT |
HEADER | accept=application/xml |
BODY |
<user> <username>myUsernameHere</username> <password>myPasswordHere</password> </user> |
EXPECTED RESPONSE |
<?xml version=”1.0″ encoding=”UTF-8″?> <userToken> <expires>1404462835243</expires> <token>c38ac2af28060e1865c38c06c39c68c389c2bc27c2ac6858c38a1f0de280b0c396476fe280a03741485133e280b9c2a8</token> <userId>user_id_here</userId> <valid>true</valid> </userToken> |
ITEM |
VALUE |
URL |
http://<URL>/api/api/v1/login/token_here |
METHOD |
GET |
HEADER |
accept=application/xml |
BODY |
N/A |
EXPECTED RESPONSE |
<?xml version=”1.0″ encoding=”UTF-8″?> <userToken> <expires>1404466320000</expires> <token> token_here </token> <userId>user_id_here</userId> <valid>true</valid> </userToken> |
ITEM |
VALUE |
URL |
http://<URL>/api/api/v1/file/token_here/link_by_id/file_id_here |
METHOD |
GET |
HEADER |
accept=application/xml |
BODY |
N/A |
EXPECTED RESPONSE |
<?xml version=”1.0″ encoding=”UTF-8″?> <fileLink> <id>file_id_here</id> <downloadLink>documenta-dms.com/ws_download_file?token=c38bc3a9c2a9c2b60143c38e22c3b7c3afe280981402c3bfc390e280a17fc399c3b8c5b859c399efbfbde280a13c2715c2adc5bd4e345a</downloadLink> </fileLink> |
Acest pas deschide un fisier din Documenta pe baza locatiei unde este salvat, fara a mai fi nevoie de logare.
Calea trebuie scrisa in BODY altfel nu ar putea fi interpretat datorita caracterelor ‘/’.
ITEM |
VALUE |
|
URL |
http://<URL>/api/api/v1/file/token_here/link_by_path |
|
METHOD |
GET |
|
HEADER |
accept=application/xml |
|
BODY |
<fileLink> <path>SITE\folder1\folder2\my_file.docx</path> </fileLink> |
|
EXPECTED RESPONSE |
|
ITEM |
VALUE |
URL |
http://<URL>/api/api/v1/dir/token_here/link_by_id/dir_id_here |
METHOD |
GET |
HEADER |
accept=application/xml |
BODY |
N/A |
EXPECTED RESPONSE |
<?xml version=”1.0″ encoding=”UTF-8″?> <dirLink> <id>dir_id_here</id> <fileLinks> <id>file_1_id_here</id> <downloadLink>documenta-dms.com /ws_download_file?token=efbfbde2809c5dc2b6164052c2bb72c2a002c387c5b8e280a01875c3b5c5b8657c0724c2ac63397623763de2809969c385</downloadLink> </fileLinks> <fileLinks> <id>file_2_id_here</id> <downloadLink>new.documenta.ro/ws_download_file?token=5d3577c2ab795bc2a9175561c3b856e280a23fe280a02ec3a53fc2b6c2bec5a1460477c2b2c3a80725721fc388c2b1</downloadLink> </fileLinks> </dirLink> |
ITEM |
VALUE |
URL |
http://<URL>/api/api/v1/dir/token_here/link_by_path |
METHOD |
POST |
HEADER |
accept=application/xml |
BODY |
<dirLink> <path>SITE\folder1\folder2\</path> </dirLink > |
EXPECTED RESPONSE |
<?xml version=”1.0″ encoding=”UTF-8″?> <dirLink> <id>dir_id_here</id> <fileLinks> <id>file_1_id_here</id> <downloadLink>documenta-dms.com /ws_download_file?token=efbfbde2809c5dc2b6164052c2bb72c2a002c387c5b8e280a01875c3b5c5b8657c0724c2ac63397623763de2809969c385</downloadLink> </fileLinks> <fileLinks> <id>file_2_id_here</id> <downloadLink>new.documenta.ro/ws_download_file?token=5d3577c2ab795bc2a9175561c3b856e280a23fe280a02ec3a53fc2b6c2bec5a1460477c2b2c3a80725721fc388c2b1</downloadLink> </fileLinks> </dirLink> |
http://<URL>/api/v1/dir/{token}/get_dirid_by_path/{dirPath}
Parameter example: ‘SITE\ERP\4.Development\src\SQL\ERP UPD 1.1\PTM\’
This web service is using also “[“character as path delimiter.
Example: ‘SITE[ERP[4.Development[src[SQL[ERP UPD 1.1[PTM]
http://<URL>/ api/v1/file/{token}/category_by_id/{fileId}
http://<URL>/api/api/v1/file/{token}/meta_by_id/{fileId}
http://<URL>/ api /api/v1/file/upload/
method = RequestMethod.POST, consumes = „multipart/form-data”, produces = {„application/xml”, „application/json”}
http://<URL>/ api /api/v1/file/checkIn/
@RequestMapping(value = „/api/v1/file/checkIn/”, method = RequestMethod.POST, consumes = „multipart/form-data”, produces = {„application/xml”, „application/json”})
http://<URL>/api/ api/v1/attribute/{token}/set_attr_list/{fileId}
@RequestMapping(value = „/set_attr_list/{fileId}”, method = RequestMethod.PUT, consumes = {„application/xml”, „application/json”}, produces = {„application/xml”, „application/json”})
Parametrii sunt:
Unde AttLinkList contine o lista XML de:
http://<URL>/api/v1/attribute/{token}/list_all_document_types/
http://<URL>/api/api/v1/file/token_here/pdf_by_id/file_id_here
For PDF and images – JPEG, Gif, Tiff, JPG – this web service call is not needed – the client will display directly the image/PDF.
http://<URL>/api/api/v1/flow/{token}/get/{flowStatus}/{stepStatus}/{stepType}
Parameters:
http://<URL> /api/v1/dir/{token}/create_dir/{ParentDirId}/{FolderName}
RETURNS:
If error: ID=-1; Name wil contain ERROR CODE (error messages should be displayed from win.properties to the user) :
http://<URL>/api/v1/file/check_in_force/
Parameters (byte[] uploadData, HttpServletRequest request):
@RequestParam(„forceIfOtherUser”) Integer forceIfOtherUser,
@RequestParam(„fileId”) Integer fileId,
@RequestParam(„token”) String token, @RequestParam(„userId”) Integer userId, @RequestParam(„comment”) String comment,
@RequestParam(„fileData”) MultipartFile fileData) – similar cu /api/v1/file/checkIn/ sau upload
http://<URL>/api/v1/attribute/{token}/add_new_master_attribute/{p_name}/{p_description}/{p_date_type}/{p_length}/{p_precision}/{p_mandatory}/{p_default_value}/{p_selection_type}
/{p_lov_id}/{p_position}/{p_formula_calcul}/{p_read_only}/{p_hidden}/{p_multiple_selection}/
All parameters with no value will be replaced with “+”