8) AIPドキュメントのラベルIDの照会
AIPドキュメントのラベル情報の取得
API
| Method | URL |
|---|---|
| POST | /api/getLabel |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| licenseKey | required | string | SHIELDRM 管理者ページの連携アプリ管理メニューで発行されたライセンスを入力 |
| srcFilePath | required | string | 元のAIP文書のパス |
Response
| Name | Type | Description |
|---|---|---|
| code | int | 0 : 成功 1 : 一般文書 それ以外の値 : エラー |
| labelId | string | 文書の labelId |
| labelName | string | ドキュメントの labelName |
Examples
Request
- Body
{
"licenseKey": "FEFF-0C448-B1D8-A1A9A",
"srcFilePath" : "/opt/shieldrm/data/encFile.xlsx"
}
Response
- 成功
[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"
}
- 失敗
- 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.\"}"
}