13) Adding Hidden Information to Office Documents
Add Hidden Information to Office Documents
Supported Extensions
- Word : doc, docx, docm, dot, dotx, dotm, rtf, odt
- Excel : xls, xlsx, xlsm, xlt, xltx, xltm, xlsb, xlam, ods
- PowerPoint : ppt, pptx, pptm, pot, potx, potm, pps, ppsx, ppsm, odp
API
| Method | URL |
|---|---|
| POST | /api/add/internal/customProperties |
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 |
| jsonObj | required | string | Document Information (String in JSON format) |
jsonObj
Name Required Type Description filePath required string Target document path info required jsonArray List of additional hidden information propertiesKey required string hidden information key propertyValue required string hidden information value
- Stored using base64 encoding
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",
"jsonObj": "{\"filePath\":\"/opt/shieldrm/data/test/none.xlsx\",\"info\":[{\"propertiesKey\":\"newKey\",\"propertyValue\":\"new\"}]}"
}
Response
- success
{
"code": 0
}
- failure
- Status code : 200 OK
[지원하지 않는 확장자]
{
"code": -1,
"message": "Unsupported file type: /opt/shieldrm/data/test/none.txt"
}
[AIP 문서일 경우]
{
"code": -1,
"message": "Permission is required to open this file."
}
{
"code": -1,
"message": "Unknown file format."
}
[DS 문서일 경우]
{
"code": -1,
"message": "zip END header not found"
}
{
"code": -1,
"message": "Unsupported file format: Unknown"
}
- Status code : 401 UNAUTHORIZED
{
"code": 40101,
"message": "Invalid token"
}