15) Creating SOM Files
Creating SOM File
API
| Method | URL |
|---|---|
| POST | /api/som/internal/createFile |
Request Header
| Name | Required | Description |
|---|---|---|
| Authorization | required | User authentication method, JWT value Authorization: Bearer {JWT}Note: The JWT value is issued through the authentication/authorization service. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| companyId | required | string | Company ID using the target document |
| srcFilePath | required | string | Absolute path of the original file - DS security documents do not support the creation of som files. - If the document is already a som file, return success after copying the file. |
| dstFilePath | required | string | Absolute path of the external transfer security file to be generated - The file extension must be indicated as exe. |
| somSetRights | required | arrayString | Permissions set by the SLSomFileLinker.DSSOMSetRights() function |
| properties | required | jsonString | Options set in dssom.properties |
somSetRights
| index | Type | Description |
|---|---|---|
| 0 | string | Password string - Passwords can only consist of English letters and numbers. |
| 1 | int | Save As Permission |
| 2 | int | Print Permission |
| 3 | int | Read Count |
| 4 | int | Print count |
| 5 | int | Destruction Permission |
| 6 | int | Expiration Date |
| 7 | int | OLESOM Viewer Support |
| 8 | int | Image Viewer Support |
| 9 | int | Text Viewer Support |
| 10 | int | Use UI Version(1, 2(Defaule;DS4.0)) |
| 11 | boolean | Use Unicode(true(Default), False) |
| 12 | string | Only PCs with the same MAC address can be opened. |
properties (refer to dssom.properties)
| Name | Type | Description |
|---|---|---|
| DSKEYENCRYPT_KEY | string | Fixed Key Input for SOM Generation (EKDATA2) |
| ... |
Response
| Name | Type | Description |
|---|---|---|
| code | int | 0 : Success Other values: Error |
| message | string | Error message on failure |
Examples
Request
- Body
{
"companyId": "7FDKQsEK-QVGKyXA2-fx1LxIzy-SNIre0s9",
"srcFilePath": "D:\\opt\\shieldrm\\data\\test\\test.pptx",
"dstFilePath": "D:\\opt\\shieldrm\\data\\test\\test.exe",
"somSetRights": "[\"1111\",1,1,2,0,1,1,1,0,0,2,true,\"10-FF-E0-7F-06-C6\"]",
"properties": "{\"SiteInfo\":\"\",\"DocUIDWithoutMAC\":0,\"DSKEYENCRYPT_KEY\":\"EhH9NMxViK0XFXho/DEZZg==\",\"useDSvFive\":0,\"useAutoGenDocUID\":1,\"useHashDispersed\":1,\"LimitPwdFail\":0}"
}
Response
- success
{
"code": 0,
"message": "OK"
}
- failure
- Status code : 500 INTERNAL_SERVER_ERROR
[SDF 컨테이너 모듈(SCSL) 에러]
{
"code": -61,
"message": "EXCEPTION error"
}