Polling

리포트를 Polling방식으로 수신합니다.

Polling 방식이란? 클라이언트(사용자)에서 서버(OMNI API)로 주기적으로 요청하여 변경사항을 확인하는 방식입니다.

  • 리포트 가져오기로 발급 받은 reportId는 반드시 리포트 수신 확인 처리를 해야 다음 리포트를 수신 받을 수 있습니다.

  • 1회 호출 시 최대 1,000개의 리포트를 가져올 수 있습니다.

  • 전달되지 않고 3일이 지난 리포트는 삭제 됩니다.

  • 전달할 리포트가 없는 경우 reportId와 report는 빈값("", null)으로 전달 됩니다.

리포트 가져오기

GET /v1/report/polling

Request

Header

curl -X GET https://omni.ibapi.kr/v1/report/polling \
-H "content-type: application/json" \
-H "Accept: application/json" \
-H "Authorization:Bearer 발급받은 토큰" 

Response

Header

Body

{
    "code": "A000",
    "result": "Success",    
    "data": {
         "reportId": "발급된 리포트ID",
         "report":[
             {
               "msgKey": "메시지 키",
               "serviceType": "서비스 타입",
               "msgType": "메시지 타입",
               "sendTime": "2024-00-00T00:00:00+09:00",
               "reportTime": "2024-00-00T00:00:00+09:00",
               "reportType": "0",
               "reportCode": "10000",
               "reportText": "Success",
               "carrier": "10001",
               "ref": "요청시 입력한 데이터"
             }
         ]
    }     
}

Schema

data

리포트 수신 확인

DELETE /v1/report/polling/{reportId}

Request

Header

Path Parameter

curl -X DELETE https://omni.ibapi.kr/v1/report/polling/리포트ID \
-H "content-type: application/json" \
-H "Accept: application/json" \
-H "Authorization:Bearer 발급받은 토큰" 

Response

Header

Body

{
    "code": "A000",
    "result": "Success" 
}

Last updated

Copyright Infobank Corp. ALL right reserverd