sim.openluat.com 其他接口

接上篇文章,里面是其他接口,注意在请求的时候要带上从登录接口中取到的cookie session.

月每日流量
curl “http://sim.openluat.com/api/customer/data_in_month" -H “Accept-Encoding: gzip, deflate” -H “Accept-Language: zh-CN,zh;q=0.9” -H “User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36” -H “Content-Type: application/json;charset=utf-8” -H “Accept: /“ -H “Referer: http://sim.openluat.com/" -H “Cookie: UM_distinctid=169edacd4c563-0b551a9004e2b5-75442645-15f900-169edacd4c649; Hm_lvt_b73e49f8578cedfcb3cxxe6e8db9d782=1554470721,1554627976; session=265c02fa-982d-4a02-949b-3189abefee42.Z420iEAp0CWipATs5949w2Dl9ig” -H “Connection: keep-alive” –compressed

月每日流量_c语言

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "http://sim.openluat.com/api/customer/data_in_month");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "cache-control: no-cache");
headers = curl_slist_append(headers, "Connection: keep-alive");
headers = curl_slist_append(headers, "Referer: http://sim.openluat.com/");
headers = curl_slist_append(headers, "Accept: */*");
headers = curl_slist_append(headers, "Content-Type: application/json;charset=utf-8");
headers = curl_slist_append(headers, "Accept-Language: zh-CN,zh;q=0.9");
headers = curl_slist_append(headers, "Accept-Encoding: gzip, deflate");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

月每日流量_go

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package main

import (
"fmt"
"net/http"
"io/ioutil"
)

func main() {
url := "http://sim.openluat.com/api/customer/data_in_month"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept-Encoding", "gzip, deflate")
req.Header.Add("Accept-Language", "zh-CN,zh;q=0.9")
req.Header.Add("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36")
req.Header.Add("Content-Type", "application/json;charset=utf-8")
req.Header.Add("Accept", "*/*")
req.Header.Add("Referer", "http://sim.openluat.com/")
req.Header.Add("Connection", "keep-alive")
req.Header.Add("cache-control", "no-cache")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}

月每日流量_java

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
.url("http://sim.openluat.com/api/customer/data_in_month")
.get()
.addHeader("Accept-Encoding", "gzip, deflate")
.addHeader("Accept-Language", "zh-CN,zh;q=0.9")
.addHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36")
.addHeader("Content-Type", "application/json;charset=utf-8")
.addHeader("Accept", "*/*")
.addHeader("Referer", "http://sim.openluat.com/")
.addHeader("Connection", "keep-alive")
.addHeader("cache-control", "no-cache")
.build();

Response response = client.newCall(request).execute();

月每日流量_nodejs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var unirest = require("unirest");

var req = unirest("GET", "http://sim.openluat.com/api/customer/data_in_month");

req.headers({
"Postman-Token": "b69a92ba-86f4-4c09-8605-124b7924b5e7",
"cache-control": "no-cache",
"Connection": "keep-alive",
"Referer": "http://sim.openluat.com/",
"Accept": "*/*",
"Content-Type": "application/json;charset=utf-8",
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36",
"Accept-Language": "zh-CN,zh;q=0.9",
"Accept-Encoding": "gzip, deflate"
});


req.end(function (res) {
if (res.error) throw new Error(res.error);

console.log(res.body);
});

月每日流量_objective-c

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#import <Foundation/Foundation.h>

NSDictionary *headers = @{ @"Accept-Encoding": @"gzip, deflate",
@"Accept-Language": @"zh-CN,zh;q=0.9",
@"User-Agent": @"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36",
@"Content-Type": @"application/json;charset=utf-8",
@"Accept": @"*/*",
@"Referer": @"http://sim.openluat.com/",
@"Connection": @"keep-alive",
@"cache-control": @"no-cache";

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://sim.openluat.com/api/customer/data_in_month"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];

月每日流量_ocaml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "http://sim.openluat.com/api/customer/data_in_month" in
let headers = Header.init ()
|> fun h -> Header.add h "Accept-Encoding" "gzip, deflate"
|> fun h -> Header.add h "Accept-Language" "zh-CN,zh;q=0.9"
|> fun h -> Header.add h "User-Agent" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36"
|> fun h -> Header.add h "Content-Type" "application/json;charset=utf-8"
|> fun h -> Header.add h "Accept" "*/*"
|> fun h -> Header.add h "Referer" "http://sim.openluat.com/"
|> fun h -> Header.add h "Connection" "keep-alive"
|> fun h -> Header.add h "cache-control" "no-cache"
in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)

月每日流量_php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php

$request = new HttpRequest();
$request->setUrl('http://sim.openluat.com/api/customer/data_in_month');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
'cache-control' => 'no-cache',
'Connection' => 'keep-alive',
'Referer' => 'http://sim.openluat.com/',
'Accept' => '*/*',
'Content-Type' => 'application/json;charset=utf-8',
'User-Agent' => 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36',
'Accept-Language' => 'zh-CN,zh;q=0.9',
'Accept-Encoding' => 'gzip, deflate'
));

try {
$response = $request->send();

echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}

月每日流量_ruby

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'uri'
require 'net/http'

url = URI("http://sim.openluat.com/api/customer/data_in_month")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Accept-Encoding"] = 'gzip, deflate'
request["Accept-Language"] = 'zh-CN,zh;q=0.9'
request["User-Agent"] = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36'
request["Content-Type"] = 'application/json;charset=utf-8'
request["Accept"] = '*/*'
request["Referer"] = 'http://sim.openluat.com/'
request["Connection"] = 'keep-alive'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body

月每日流量_swift

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import Foundation

let headers = [
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "zh-CN,zh;q=0.9",
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36",
"Content-Type": "application/json;charset=utf-8",
"Accept": "*/*",
"Referer": "http://sim.openluat.com/",
"Connection": "keep-alive",
"cache-control": "no-cache"
]

let request = NSMutableURLRequest(url: NSURL(string: "http://sim.openluat.com/api/customer/data_in_month")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})

dataTask.resume()

返回数据

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"code": 0,
"data": {
"data_in_month": [
0,
0,
0,
0,
0,
0,
0,
0,
0.46484375,
0.189453125,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
},
"msg": ""
}

本月流量消耗TOP5
curl “http://sim.openluat.com/api/customer/data_top5_in_month" -H “Accept-Encoding: gzip, deflate” -H “Accept-Language: zh-CN,zh;q=0.9” -H “User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36” -H “Content-Type: application/json;charset=utf-8” -H “Accept: /“ -H “Referer: http://sim.openluat.com/" -H “Cookie: UM_distinctid=169edacd4c563-0b551a9004e2b5-75442645-15f900-169edacd4c649; Hm_lvt_b73e49f8578cedfcb3c3xxxdb9d782=1554470721,1554627976; session=265c02fa-982d-4a02-949b-3189abefee42.Z420iEAp0CWipATs5949w2Dl9ig” -H “Connection: keep-alive” –compressed

顶部数据
curl “http://sim.openluat.com/api/customer/header_data" -H “Accept-Encoding: gzip, deflate” -H “Accept-Language: zh-CN,zh;q=0.9” -H “User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36” -H “Content-Type: application/json;charset=utf-8” -H “Accept: /“ -H “Referer: http://sim.openluat.com/" -H “Cookie: UM_distinctid=169edacd4c563-0b551a9004e2b5-75442645-15f900-169edacd4c649; Hm_lvt_b73e49f8578cedfcb3c3xxxxxdb9d782=1554470721,1554627976; session=265c02fa-982d-4a02-949b-3189abefee42.Z420iEAp0CWipATs5949w2Dl9ig” -H “Connection: keep-alive” –compressed

卡信息
curl “http://sim.openluat.com/api/customer/datapools/fetch?page=1^&psize=9999" -H “Accept-Encoding: gzip, deflate” -H “Accept-Language: zh-CN,zh;q=0.9” -H “User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36” -H “Content-Type: application/json;charset=utf-8” -H “Accept: /“ -H “Referer: http://sim.openluat.com/cardinformation" -H “Cookie: UM_distinctid=169edacd4c563-0b551a9004e2b5-75442645-15f900-169edacd4c649; Hm_lvt_b73e49f8578cedfcb3xxxxxdb9d782=1554470721,1554627976; session=265c02fa-982d-4a02-949b-3189abefee42.Z420iEAp0CWipATs5949w2Dl9ig” -H “Connection: keep-alive” –compressed

预警管理
curl “http://sim.openluat.com/api/customer/datapool_warning/fetch?datapool_id=7345" -H “Accept-Encoding: gzip, deflate” -H “Accept-Language: zh-CN,zh;q=0.9” -H “User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36” -H “Content-Type: application/json;charset=utf-8” -H “Accept: /“ -H “Referer: http://sim.openluat.com/billinggroup" -H “Cookie: UM_distinctid=169edacd4c563-0b551a9004e2b5-75442645-15f900-169edacd4c649; Hm_lvt_b73e49f8578cedfcb3c39e6exxxx2=1554470721,1554627976; session=265c02fa-982d-4a02-949b-3189abefee42.Z420iEAp0CWipATs5949w2Dl9ig” -H “Connection: keep-alive” –compressed

年报表
curl “http://sim.openluat.com/api/customer/data_in_year?year=2019" -H “Accept-Encoding: gzip, deflate” -H “Accept-Language: zh-CN,zh;q=0.9” -H “User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36” -H “Content-Type: application/json;charset=utf-8” -H “Accept: /“ -H “Referer: http://sim.openluat.com/reportdata" -H “Cookie: UM_distinctid=169edacd4c563-0b551a9004e2b5-75442645-15f900-169edacd4c649; Hm_lvt_b73e49f8578cedfcb3c39e6e8db9d782=1554470721,1554627976; session=265c02fa-982d-4a02-949b-3189abefee42.Z420iEAp0CWipATs5949w2Dl9ig” -H “Connection: keep-alive” –compressed

短信记录
curl “http://sim.openluat.com/api/customer/sms/fetch?page=1^&psize=10" -H “Accept-Encoding: gzip, deflate” -H “Accept-Language: zh-CN,zh;q=0.9” -H “User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36” -H “Content-Type: application/json;charset=utf-8” -H “Accept: /“ -H “Referer: http://sim.openluat.com/shortmessage" -H “Cookie: UM_distinctid=169edacd4c563-0b551a9004e2b5-75442645-15f900-169edacd4c649; Hm_lvt_b73e49f8578cedfcb3c39e6e8db9d782=1554470721,1554627976; session=265c02fa-982d-4a02-949b-3189abefee42.Z420iEAp0CWipATs5949w2Dl9ig” -H “Connection: keep-alive” –compressed

待续….

上次更新 2021-01-28