17) 문서 타입 조회
문서 타입 조회
API
| Method | URL |
|---|---|
| POST | /api/internal/docs/type |
Request Header
| Name | Required | Description |
|---|---|---|
| Authorization | required | 사용자 인증 수단, JWT값 Authorization: Bearer {JWT}참고 : JWT값은 인증/인가 서비스를 통해 발급 받는다. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| companyId | required | string | 대상 문서를 사용하는 회사 ID |
| srcFilePath | required | string | 조회할 문서 경로 |
Response
| Name | Type | Description |
|---|---|---|
| code | int | 0 : 성공 -36 : 일반 문서 이외의 값 : 에러 |
| type | string | 보안 문서 타입 - ds - aip : Azure OpenidTenant 없는 경우 조회 불가 - normal |
| info | json | 보안 문서 정보 |
| message | string | 실패 시 에러 메시지 |
- Azure OpenidTenant 없거나 Action 생성에 실패 한 경우 문서를
normal로 간주- aip 문서가
normal로 반환되면 OpenidTenant 확인 필요
Examples
Request
- Body
{
"companyId": "3CJ55MSE-xLO7Sxt4-qUBKzbcs-XP2cgGEq",
"srcFilePath" : "/opt/shieldrm/data/AIP.pptx"
}
Response
- 성공
[일반 문서]
{
"code": -36,
"type": "normal"
}
[Azure OpenidTenant 없는 경우]
{
"code": -36,
"type": "normal",
"message": "{\"code\":40011,\"message\":\"Unable to AzureInfo\",\"detail\":\"OpenidTenant is Empty\"}"
}
[Action 생성 실패한 경우]
{
"code": -36,
"type": "normal",
"message": "com.microsoft.informationprotection.internal.gen.Error: NoAuthTokenError: Client application failed to provide authentication token for HTTP request., CorrelationId=a6e91730-982a-425c-877d-f74ef48c8cb6, CorrelationId.Description=PolicyProfile"
}
[비밀번호 설정된 일반 문서]
{
"code": -36,
"type": "normal",
"message": "The file has been protected using non RMS technologies"
}
[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 : 500 INTERNAL_SERVER_ERROR
[토큰 검증 실패]
{
"code": 50001,
"message": "401 : \"{\"code\":40101,\"message\":\"Invalid token\",\"detail\":\"invalid_token\"}\""
}