SOLAPI
Search…
통계 조회

Request

1
GET https://api.solapi.com/messages/v4/statistics
Copied!
통계를 조회합니다.

Authorization 인증 필요 [?]

계정 권한
회원 권한
계정 상태
회원 상태
계정 인증
message:read
role-message:read
ACTIVE
ACTIVE

Query Params

Name
Type
Required
Allowed Operator [?]
Description
startDate
date
eq
검색 시작 날짜
endDate
date
eq
검색 끝 날짜
masterAccountId
string
eq
설명 없음

Samples

getStatistics.spec.js

Sample Request
1
http://api.solapi.com/messages/v4/statistics
Copied!
Sample Response
1
{
2
"balance": 1,
3
"point": 1,
4
"monthlyBalanceAvg": 1,
5
"monthlyPointAvg": 1,
6
"monthPeriod": [
7
{
8
"date": "2021/11",
9
"balance": 1,
10
"balanceAvg": 1,
11
"point": 1,
12
"pointAvg": 1,
13
"dayPeriod": [
14
{
15
"_id": "2021-11-16T05:09:47.222Z",
16
"month": "2021/11",
17
"date": "2021/11/16",
18
"balance": 1,
19
"point": 1,
20
"statusCode": {
21
"4000": {
22
"sms": 1,
23
"lms": 1,
24
"mms": 1,
25
"ata": 1,
26
"cta": 1,
27
"rcs_sms": 1,
28
"rcs_lms": 1,
29
"rcs_mms": 1,
30
"rcs_tpl": 1
31
}
32
},
33
"refund": {
34
"balance": 100,
35
"point": 10
36
},
37
"total": {
38
"total": 9,
39
"sms": 1,
40
"lms": 1,
41
"mms": 1,
42
"ata": 1,
43
"cta": 1,
44
"cti": 0,
45
"nsa": 0,
46
"rcs_sms": 1,
47
"rcs_lms": 1,
48
"rcs_mms": 1,
49
"rcs_tpl": 1
50
},
51
"successed": {
52
"total": 9,
53
"sms": 1,
54
"lms": 1,
55
"mms": 1,
56
"ata": 1,
57
"cta": 1,
58
"cti": 0,
59
"nsa": 0,
60
"rcs_sms": 1,
61
"rcs_lms": 1,
62
"rcs_mms": 1,
63
"rcs_tpl": 1
64
},
65
"failed": {
66
"total": 0,
67
"sms": 0,
68
"lms": 0,
69
"mms": 0,
70
"ata": 0,
71
"cta": 0,
72
"cti": 0,
73
"nsa": 0,
74
"rcs_sms": 0,
75
"rcs_lms": 0,
76
"rcs_mms": 0,
77
"rcs_tpl": 0
78
}
79
}
80
],
81
"refund": {
82
"balance": 100,
83
"balanceAvg": 100,
84
"point": 10,
85
"pointAvg": 10
86
},
87
"total": {
88
"total": 9,
89
"sms": 1,
90
"lms": 1,
91
"mms": 1,
92
"ata": 1,
93
"cta": 1,
94
"cti": 0,
95
"nsa": 0,
96
"rcs_sms": 1,
97
"rcs_lms": 1,
98
"rcs_mms": 1,
99
"rcs_tpl": 1
100
},
101
"successed": {
102
"total": 9,
103
"sms": 1,
104
"lms": 1,
105
"mms": 1,
106
"ata": 1,
107
"cta": 1,
108
"cti": 0,
109
"nsa": 0,
110
"rcs_sms": 1,
111
"rcs_lms": 1,
112
"rcs_mms": 1,
113
"rcs_tpl": 1
114
},
115
"failed": {
116
"total": 0,
117
"sms": 0,
118
"lms": 0,
119
"mms": 0,
120
"ata": 0,
121
"cta": 0,
122
"cti": 0,
123
"nsa": 0,
124
"rcs_sms": 0,
125
"rcs_lms": 0,
126
"rcs_mms": 0,
127
"rcs_tpl": 0
128
}
129
}
130
],
131
"refund": {
132
"balance": 100,
133
"balanceAvg": 100,
134
"point": 10,
135
"pointAvg": 10
136
},
137
"dayPeriod": [
138
{
139
"_id": "2021-11-16T05:09:47.222Z",
140
"month": "2021/11",
141
"date": "2021/11/16",
142
"balance": 1,
143
"point": 1,
144
"statusCode": {
145
"4000": {
146
"sms": 1,
147
"lms": 1,
148
"mms": 1,
149
"ata": 1,
150
"cta": 1,
151
"rcs_sms": 1,
152
"rcs_lms": 1,
153
"rcs_mms": 1,
154
"rcs_tpl": 1
155
}
156
},
157
"refund": {
158
"balance": 100,
159
"point": 10
160
},
161
"total": {
162
"total": 9,
163
"sms": 1,
164
"lms": 1,
165
"mms": 1,
166
"ata": 1,
167
"cta": 1,
168
"cti": 0,
169
"nsa": 0,
170
"rcs_sms": 1,
171
"rcs_lms": 1,
172
"rcs_mms": 1,
173
"rcs_tpl": 1
174
},
175
"successed": {
176
"total": 9,
177
"sms": 1,
178
"lms": 1,
179
"mms": 1,
180
"ata": 1,
181
"cta": 1,
182
"cti": 0,
183
"nsa": 0,
184
"rcs_sms": 1,
185
"rcs_lms": 1,
186
"rcs_mms": 1,
187
"rcs_tpl": 1
188
},
189
"failed": {
190
"total": 0,
191
"sms": 0,
192
"lms": 0,
193
"mms": 0,
194
"ata": 0,
195
"cta": 0,
196
"cti": 0,
197
"nsa": 0,
198
"rcs_sms": 0,
199
"rcs_lms": 0,
200
"rcs_mms": 0,
201
"rcs_tpl": 0
202
}
203
}
204
],
205
"total": {
206
"total": 9,
207
"sms": 1,
208
"lms": 1,
209
"mms": 1,
210
"ata": 1,
211
"cta": 1,
212
"cti": 0,
213
"nsa": 0,
214
"rcs_sms": 1,
215
"rcs_lms": 1,
216
"rcs_mms": 1,
217
"rcs_tpl": 1
218
},
219
"successed": {
220
"total": 9,
221
"sms": 1,
222
"lms": 1,
223
"mms": 1,
224
"ata": 1,
225
"cta": 1,
226
"cti": 0,
227
"nsa": 0,
228
"rcs_sms": 1,
229
"rcs_lms": 1,
230
"rcs_mms": 1,
231
"rcs_tpl": 1
232
},
233
"failed": {
234
"total": 0,
235
"sms": 0,
236
"lms": 0,
237
"mms": 0,
238
"ata": 0,
239
"cta": 0,
240
"cti": 0,
241
"nsa": 0,
242
"rcs_sms": 0,
243
"rcs_lms": 0,
244
"rcs_mms": 0,
245
"rcs_tpl": 0
246
},
247
"dailyBalanceAvg": 1,
248
"dailyPointAvg": 1,
249
"dailyTotalCountAvg": 9,
250
"dailyFailedCountAvg": 0,
251
"dailySuccessedCountAvg": 9
252
}
Copied!
Sample Code
NODE
PHP
PYTHON
CURL
RUBY
GO
JAVA
1
var request = require('request');
2
3
var options = {
4
headers: {
5
Authorization:
6
'HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4'
7
},
8
method: 'GET',
9
json: true,
10
url: 'http://api.solapi.com/messages/v4/statistics'
11
};
12
13
request(options, function(error, response, body) {
14
if (error) throw error;
15
console.log('result :', body);
16
});
Copied!
1
<?php
2
$url = "http://api.solapi.com/messages/v4/statistics";
3
4
$options = array(
5
'http' => array(
6
'header' => "Authorization: HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4\r\n",
7
'method' => 'GET'
8
)
9
);
10
11
$context = stream_context_create($options);
12
$result = file_get_contents($url, false, $context);
13
14
var_dump($result);
Copied!
1
import requests
2
3
url = "http://api.solapi.com/messages/v4/statistics"
4
headers = {
5
"Authorization": "HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4"
6
}
7
8
response = requests.get(url, headers=headers)
9
print(response.status_code)
10
print(response.text)
Copied!
1
#!/bin/bash
2
curl -X GET \
3
-H 'Authorization: HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4' \
4
http://api.solapi.com/messages/v4/statistics
Copied!
1
require 'net/http'
2
require 'uri'
3
require 'json'
4
5
uri = URI.parse("http://api.solapi.com/messages/v4/statistics")
6
7
headers = {
8
"Authorization": "HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4"
9
}
10
http = Net::HTTP.new(uri.host, uri.port)
11
request = Net::HTTP::Get.new(uri.request_uri, headers)
12
13
response = http.request(request)
14
puts response.code
15
puts response.body
Copied!
1
package main
2
3
import (
4
"fmt"
5
"io/ioutil"
6
"net/http"
7
"strings"
8
)
9
10
func main() {
11
uri := "http://api.solapi.com/messages/v4/statistics"
12
13
req, err := http.NewRequest("GET", uri, nil)
14
if err != nil { panic(err) }
15
16
req.Header.Set("Authorization", "HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4")
17
18
client := &http.Client{}
19
resp, err := client.Do(req)
20
if err != nil { panic(err) }
21
defer resp.Body.Close()
22
23
bytes, _ := ioutil.ReadAll(resp.Body)
24
str := string(bytes)
25
fmt.Println(str)
26
}
Copied!
1
package solapi;
2
3
import java.io.BufferedReader;
4
import java.io.DataOutputStream;
5
import java.io.InputStreamReader;
6
import java.net.HttpURLConnection;
7
import java.net.URL;
8
9
public class Request {
10
public static void main(String[] args) throws Exception {
11
String targetUrl = "http://api.solapi.com/messages/v4/statistics";
12
13
URL url = new URL(targetUrl);
14
HttpURLConnection con = (HttpURLConnection) url.openConnection();
15
16
con.setRequestMethod("GET");
17
18
con.setRequestProperty("Authorization", "HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4");
19
20
con.setDoOutput(true);
21
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
22
wr.writeBytes(parameters);
23
wr.flush();
24
wr.close();
25
26
int responseCode = con.getResponseCode();
27
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
28
String line;
29
StringBuffer response = new StringBuffer();
30
while ((line = in.readLine()) != null) {
31
response.append(line);
32
}
33
in.close();
34
35
System.out.println("HTTP response code : " + responseCode);
36
System.out.println("HTTP body : " + response.toString());
37
}
38
}
Copied!
문서 생성일 : 2021-11-16