メインコンテンツまでスキップ

6) AIPラベル設定

一般文書をAIP文書に変換

API

MethodURL
POST/api/protect

Request Body

NameRequiredTypeDescription
licenseKeyrequiredstringSHIELDRM 管理者ページの連携アプリ管理メニューで発行されたライセンスを入力
labelIdrequired/optionalstring適用するラベルID
labelNamerequired/optionalstring適用するラベル名
- labelIdがない場合はlabelNameを使用して適用
srcFilePathrequiredstring原本一般文書のパス
- 一般文書のみ変換可能
dstFilePathrequiredstring変換されたAIP文書のパス
extraInfooptionaljsonJSON形式の追加情報入力
(以下のextraInfoデータ説明表およびサンプルデータを参照)
setProtectoptionalbooleanプロテクト設定の有無
decisionFactoroptionaljson登録された条件付きポリシーを適用するための追加情報の入力
(以下の decisionFactor データ説明表およびサンプルデータを参照)
extraInfo データ説明表
KeyRequiredTypeDescription
sourcerequiredjson
namerequiredstring呼び出しシステム名
fromrequiredstring呼び出しシステムURL
userjson
idstringユーザーID
namestringユーザー名
departstringユーザー全体部門 (上位グループ/中位グループ/下位グループ)
dutystringユーザー職名
  • サンプルデータ
{
"source": {
"name": "EKMS",
"from": "https://devekms.softcamp.co.kr"
},
"user": {
"id": "ekmsTest@softcamp.co.kr",
"name": "ekmsTest",
"depart": "임직원/연구소/개발실/개발1팀",
"duty": "과장"
}
}
decisionFactor データ説明表
KeyRequiredTypeDescription
userIdrequiredstring条件付きポリシーの構成員に該当する文書変換をリクエストしたユーザーID
ipAddressrequiredstring条件付きポリシーの位置(IP)に該当する文書変換をリクエストしたユーザーIP
  • サンプルデータ
{
"userId": "user1@socam.info",
"ipAddress": "10.10.10.100"
}

Response

NameTypeDescription
codeint0 : 成功
0以外の値 : エラー
messagestring"OK" : 成功
その他の値 エラーメッセージ

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

  • 成功
{
"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"
}