조회
메시지키를 기준으로 리포트를 조회합니다.
리포트 연동방식(Polling / Webhook)으로 전달되지 못한 개별 리포트 들을 조회하기 위한 API 입니다.
최대 30일 이전의 리포트를 조회 할 수 있습니다.
리포트 조회
curl -X GET https://omni.ibapi.kr/v1/report/inquiry/메시지키\
-H "content-type: application/json" \
-H "Accept: application/json" \
-H "Authorization:Bearer 발급받은 토큰"
import java.io.*;
import okhttp3.*;
public class Main {
public static void main(String []args) throws IOException{
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://omni.ibapi.kr/v1/report/inquiry/msgKey")
.method("GET", body)
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer 발급받은 토큰")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://omni.ibapi.kr/v1/report/inquiry/msgKey"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer 발급받은 토큰")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://omni.ibapi.kr/v1/report/inquiry/msgKey',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Accept: application/json',
'Authorization: Bearer 발급받은 토큰'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://omni.ibapi.kr/v1/report/inquiry/msgKey',
'headers': {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer 발급받은 토큰'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://omni.ibapi.kr/v1/report/inquiry/msgKey");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer 발급받은 토큰");
var content = new StringContent(string.Empty);
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Accept", "application/json");
myHeaders.append("Authorization", "Bearer 발급받은 토큰");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://omni.ibapi.kr/v1/report/inquiry/msgKey", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import http.client
import json
conn = http.client.HTTPSConnection("omni.ibapi.kr")
payload = ''
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer 발급받은 토큰'
}
conn.request("GET", "/v1/report/inquiry/msgKey", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
require "uri"
require "json"
require "net/http"
url = URI("https://omni.ibapi.kr/v1/report/inquiry/msgKey")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
request["Authorization"] = "Bearer 발급받은 토큰"
response = https.request(request)
puts response.read_body
Request
Header
Name | Type | Description |
---|---|---|
Authorization | String | schema + “ “ + token |
Accept | String | application/json |
Path Parameter
Name | Type | Required | Description |
---|---|---|---|
msgKey | String | YES | 메시지 키 |
Response
Header
Name | Type | Description |
---|---|---|
Content-Type | String | application/json |
Body
Schema
data
Name | Type | Description |
---|---|---|
report | Object Array | 리포트 정보 |