Short Link Statistics v1
Last updated:2021-12-15
Short Link Statistics v1
Overview
The API supports querying short link statistics.
Request Authentication
Add a field (Key/Value pair) to the HTTP Header:
Authorization: Basic base64_auth_string
The generation algorithm for base64_auth_string is: base64(appKey:masterSecret)
That is, concatenate appKey, a colon, and masterSecret into a string, then convert it with Base64.
Request URL
GET https://api.jmlk.co/v1/links/{link_key}/stat
Request Example
curl --insecure -X GET -v https://api.jmlk.co/v1/links/AAAA/stat?start_date=2020-08-01&end_date=2020-08-02&platform=all
-u "7d431e42dfa6a6d693ac2d04:5e987ac6d2e04d95a9d8f0d1"
curl --insecure -X GET -v https://api.jmlk.co/v1/links/AAAA/stat?start_date=2020-08-01&end_date=2020-08-02&platform=all
-u "7d431e42dfa6a6d693ac2d04:5e987ac6d2e04d95a9d8f0d1"
This code block is shown in the floating window
Request Params
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
| link_key | TRUE | String | AAAA | Last four characters of the short link |
| start_date | TRUE | String | 2020-08-01 | Start time, yyyy-MM-dd |
| end_date | TRUE | String | 2020-08-02 | End time, yyyy-MM-dd |
| platform | FALSE | String | all | Platform. Default is all. ios: iOS; android: Android; all: all platforms |
Response Example
HTTP/1.1 200
{
"data":[
{
"iday": "2020-08-01",
"exposure_count": 100000,
"click_count": 100000,
"open_count": 100000,
"install_count": 100000
},
{
"iday": "2020-08-02",
"exposure_count": 200000,
"click_count": 200000,
"open_count": 200000,
"install_count": 200000
}
]
}
HTTP/1.1 200
{
"data":[
{
"iday": "2020-08-01",
"exposure_count": 100000,
"click_count": 100000,
"open_count": 100000,
"install_count": 100000
},
{
"iday": "2020-08-02",
"exposure_count": 200000,
"click_count": 200000,
"open_count": 200000,
"install_count": 200000
}
]
}
This code block is shown in the floating window
Response Params
| Parameter | Type | Example | Description |
|---|---|---|---|
| data | JsonArray | ||
| iday | String | yyyy-MM-dd | Time, format yyyy-MM-dd |
| exposure_count | long | 10000 | Exposure count |
| click_count | long | 10000 | Click count |
| open_count | long | 10000 | Open count |
| install_count | long | 10000 | Install count |
Response Codes
Was this document helpful?