6) AIP Label Configuration
Convert general documents to AIP documents
API
| Method | URL |
|---|---|
| POST | /api/protect |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| licenseKey | required | string | Enter the issued license in the integration app management menu of the SHIELDRM admin page. |
| labelId | required/optional | string | Label ID to apply |
| labelName | required/optional | string | Label name to apply - Apply using labelName if labelId is not available. |
| srcFilePath | required | string | Original general document path - Only general documents can be converted. |
| dstFilePath | required | string | Converted AIP document path |
| extraInfo | optional | json | Input additional information in JSON format (Refer to the extraInfo data description table and sample data below) |
| setProtect | optional | boolean | Protect setting status |
| decisionFactor | optional | json | Additional Information Input for Applying Registered Conditional Policies (Refer to the decisionFactor data description table and sample data below) |
extraInfo Data Description Table
Key Required Type Description source required json name required string Call System Name from required string Call System URL user json id string User ID name string Username depart string All User Departments (Top Group/Middle Group/Lower Group) duty string User Job Title
- Sample Data
{
"source": {
"name": "EKMS",
"from": "https://devekms.softcamp.co.kr"
},
"user": {
"id": "ekmsTest@softcamp.co.kr",
"name": "ekmsTest",
"depart": "임직원/연구소/개발실/개발1팀",
"duty": "과장"
}
}
decisionFactor Data Description Table
Key Required Type Description userId required string User ID of the requester for document conversion that corresponds to the members of the conditional policy ipAddress required string User IP requesting document conversion corresponding to the location (IP) of the conditional policy
- Sample Data
{
"userId": "user1@socam.info",
"ipAddress": "10.10.10.100"
}
Response
| Name | Type | Description |
|---|---|---|
| code | int | 0 : Success Value other than 0: Error |
| message | string | "OK" : Success Other Value Error Message |
Examples
Request
- Body
[labelId 사용]
{
"licenseKey": "FEFF-0C448-B1D8-A1A9A",
"labelId": "070b7e3a-bb66-47e0-8196-7d030d54190d",
"srcFilePath" : "/opt/shieldrm/data/test.xlsx",
"dstFilePath" : "/opt/shieldrm/dataout_test.xlsx" ,
"extraInfo" : "{\"source\":{\"name\":\"EKMS\",\"from\":\"https://devekms.softcamp.co.kr\"},\"user\":{\"id\":\"ekmsTest@softcamp.co.kr\",\"name\":\"ekmsTest\",\"depart\":\"임직원/연구소/개발실/개발1팀\",\"duty\":\"과장\"}}",
"decisionFactor": "{\"userId\":\"user1@socam.info\",\"ipAddress\":\"10.10.10.100\"}"
}
[labelName 사용]
{
"licenseKey": "FEFF-0C448-B1D8-A1A9A",
"labelName": "Protected by SHIELDRM(DEV)",
"srcFilePath" : "/opt/shieldrm/data/test.xlsx",
"dstFilePath" : "/opt/shieldrm/dataout_test.xlsx" ,
"extraInfo" : "{\"source\":{\"name\":\"EKMS\",\"from\":\"https://devekms.softcamp.co.kr\"},\"user\":{\"id\":\"ekmsTest@softcamp.co.kr\",\"name\":\"ekmsTest\",\"depart\":\"임직원/연구소/개발실/개발1팀\",\"duty\":\"과장\"}}",
"decisionFactor": "{\"userId\":\"user1@socam.info\",\"ipAddress\":\"10.10.10.100\"}"
}
Response
- success
{
"code": 0,
"message" : "OK"
}
- failure
- Status code : 400 Bad Request
[필수 파라미터 없음]
{
"code": 40001,
"message": "Missing required input values"
}
[미지원 확장자 문서인 경우]
{
"code": 40010,
"message": "Unsupported file extension."
}
[비밀번호 설정된 일반 문서]
{
"code": 40010,
"message": "The file has been protected using non RMS technologies"
}
[원본 문서가 AIP 문서인 경우]
{
"code": 40010,
"message": "File is already Protected."
}
- Status code : 401 UNAUTHORIZED
{
"code": 40001,
"message": "Invalid token"
}
- Status code : 500 INTERNAL_SERVER_ERROR
[AIP SDK 에러]
{
"code": 60001,
"message": "com.microsoft.informationprotection.internal.gen.Error: NoAuthTokenError: Client application failed to provide authentication token for HTTP request., CorrelationId=a2d2f6b1-4265-482b-bc7d-18c88f8284bd, CorrelationId.Description=PolicyProfile"
}
[내부 서비스 에러]
{
"code": 50001,
"message": "400 : \"{\"code\":40011,\"message\":\"Unable to AzureInfo\",\"detail\":\"OpenidTenant is Empty\"}\""
}
{
"code": 50001,
"message": "No matching labelId found"
}