6) AIPラベル設定
一般文書をAIP文書に変換
API
| Method | URL |
|---|---|
| POST | /api/internal/protect |
Request Header
| Name | Required | Description |
|---|---|---|
| Authorization | required | ユーザー認証手段、JWT値 Authorization: Bearer {JWT}参考 : JWT値は認証/認可サービスを通じて発行されます。 |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| companyId | required | string | 対象文書を使用する会社ID(会社別キー データ照会時に使用) |
| labelId | required/optional | string | 適用するラベルID |
| labelName | required/optional | string | 適用するラベル名 - labelIdがない場合はlabelNameを使用して適用 |
| srcFilePath | required | string | 原本一般文書のパス - 一般文書のみ変換可能 |
| dstFilePath | required | string | 変換されたAIP文書のパス |
| extraInfo | optional | string | JSON形式の追加情報入力(下記のextraInfoデータ説明表およびサンプルデータを参照) |
| setProtect | optional | boolean | プロテクト設定の有無 |
extraInfo データ説明表
Key Required Type Description source required json name required string 呼び出しシステム名 from required string 呼び出しシステムURL user json id string ユーザーID name string ユーザー名 depart string ユーザー全体部門 (上位グループ/中位グループ/下位グループ) duty string ユーザー職名
- サンプルデータ
{
"source": {
"name": "EKMS",
"from": "https://devekms.softcamp.co.kr"
},
"user": {
"id": "ekmsTest@softcamp.co.kr",
"name": "ekmsTest",
"depart": "임직원/연구소/개발실/개발1팀",
"duty": "과장"
}
}
Response
| Name | Type | Description |
|---|---|---|
| code | int | 0 : 成功 0以外の値 : エラー |
| message | string | "OK" : 成功 その他の値 エラーメッセージ |
Examples
Request
- Body
[labelId 사용]
{
"companyId": "gNzvLhk8-cVXfQ41A-FSfFVW0m-w4yc4M00",
"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\":\"과장\"}}"
}
[labelName 사용]
{
"companyId": "gNzvLhk8-cVXfQ41A-FSfFVW0m-w4yc4M00",
"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\":\"과장\"}}"
}
Response
- 成功
{
"code": 0,
"message" : "OK"
}
- 失敗
- 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"
}