본문으로 건너뛰기

17) 문서 타입 조회

문서 타입 조회

API

MethodURL
POST/api/docs/type

Request Body

NameRequiredTypeDescription
licenseKeyrequiredstringSHIELDRM 관리자 페이지의 연동 앱 관리 메뉴에서 발급 받은 라이선스 입력
srcFilePathrequiredstring조회할 문서 경로

Response

NameTypeDescription
codeint0 : 성공
-36 : 일반 문서
이외의 값 : 에러
typestring보안 문서 타입
- ds
- aip : Azure OpenidTenant 없는 경우 조회 불가
- normal
infojson보안 문서 정보
messagestring실패 시 에러 메시지

Examples

Request

  • Body
{
"licenseKey": "1EC0-3BFA8-7AA2-54423",
"srcFilePath" : "/opt/shieldrm/data/AIP.pptx"
}

Response

  • 성공
[일반 문서]
{
"code": -36,
"type": "normal"
}

[aip 문서]
{
"code": 0,
"type": "aip",
"info": {
"labelId": "03ce0d3a-8336-4a7b-ad45-52c47dd71f57",
"labelName": "자동지정_test"
}
}

[ds - MAC 문서]
{
"code": 0,
"type": "ds",
"encType": "MAC",
"info": {
"MAC": {
"MAC_CATEGORY_NAME": "대외비",
"MAC_CATEGORY": "0000001"
}
}
}

[ds - DAC 문서]
{
"code": 0,
"type": "ds",
"encType": "DAC",
"info": {
"DAC": [
{
"DAC_TYPE_NAME": "SECURITYDOMAIN",
"DAC_TYPE_ID": "securitydomain"
},
{
"DAC_TYPE_NAME": "test",
"DAC_TYPE_ID": "test"
}
]
}
}

[ds - GRADE 문서]
{
"code": 0,
"type": "ds",
"encType": "GRADE",
"info": {
"GRADE": {
"DAC_TYPE_NAME": "등급테스트",
"DAC_TYPE_ID": "0000001"
},
"DAC": [
{
"DAC_TYPE_NAME": "test",
"DAC_TYPE_ID": "test"
}
]
}
}
  • 실패
  • Status code : 401 Unauthorized
[라이선스 검증 실패]
{
"code": 40101,
"message": "{\"code\":40107,\"message\":\"No matching license found\",\"detail\":\"License skms_connector_info information is empty.\"}"
}
  • Status code : 500 INTERNAL_SERVER_ERROR
[Azure OpenidTenant 조회 실패]
{
"code": 50001,
"message": "400 Bad Request: \"{\"code\":40011,\"message\":\"Unable to AzureInfo\",\"detail\":\"OpenidTenant is Empty\"}\""
}