8) Retrieving the Label ID of the AIP Document
Retrieving Label Information of AIP Document
API
| Method | URL |
|---|---|
| POST | /api/getLabel |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| licenseKey | required | string | Enter the issued license in the integration app management menu of the SHIELDRM admin page. |
| srcFilePath | required | string | Original AIP document path |
Response
| Name | Type | Description |
|---|---|---|
| code | int | 0 : Success 1 : General Document Other values: Error |
| labelId | string | labelId of the document |
| labelName | string | labelName of the document |
Examples
Request
- Body
{
"licenseKey": "FEFF-0C448-B1D8-A1A9A",
"srcFilePath" : "/opt/shieldrm/data/encFile.xlsx"
}
Response
- success
[label 조회 성공]
{
"code": 0,
"labelId": "070b7e3a-bb66-47e0-8196-7d030d54190d",
"labelName": "Protected by SHIELDRM(DEV)"
}
[일반 문서인 경우]
{
"code": 1,
"message": "This document is not Protected."
}
[미지원 확장자 문서인 경우]
{
"code": 1,
"message": "This document is not Protected.",
"detail": "Unsupported file extension."
}
[Azure OpenidTenant 없는 경우]
{
"code": 1,
"message": "This document is not Protected.",
"detail": "{\"code\":40011,\"message\":\"Unable to AzureInfo\",\"detail\":\"OpenidTenant is Empty\"}"
}
[Action 생성 실패한 경우]
{
"code": 1,
"message": "This document is not Protected.",
"detail": "com.microsoft.informationprotection.internal.gen.Error: NoAuthTokenError: Client application failed to provide authentication token for HTTP request., CorrelationId=bebd7b01-766a-4f99-977c-dbfbd6c947b1, CorrelationId.Description=PolicyProfile"
}
- failure
- 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": 40101,
"message": "{\"code\":40107,\"message\":\"No matching license found\",\"detail\":\"License skms_connector_info information is empty.\"}"
}