API:ShortURL/Info - 版本信息
概覽
Shorturl/info
是 短網(wǎng)址 版本信息 API。
使用 shorturl/info
API 可以獲取您的短網(wǎng)址當前的版本信息、短網(wǎng)址/群組用量、和總訪問量信息。
URL
<主> https://service.mysubmail.com/shorturl/info
支持格式
格式 | URL |
---|---|
json | https://service.mysubmail.com/shorturl/info.json (默認) |
xml | https://service.mysubmail.com/shorturl/info.xml |
http 請求方式
請求方式 | content-type 設(shè)置 |
---|---|
http post | multipart/form-data 、x-www-form-urlencoded 、application/json |
是否需要授權(quán)
是
參閱 API 授權(quán)和驗證機制
shorturl/info 請求參數(shù)
參數(shù) | 類型 | 必需/可選 | 默認 | 描述 |
---|---|---|---|---|
appid | string | 必需 | 無 | 在 SUBMAIL 應(yīng)用集成中創(chuàng)建的短網(wǎng)址應(yīng)用ID |
sign_type | string | 可選 | normal | API 授權(quán)模式( md5 or sha1 or normal )參閱 API 授權(quán)與驗證機制 > 授權(quán)和驗證方式 |
signature | string | 必需 | 無 | 應(yīng)用密匙 或 數(shù)字簽名 參閱 API 授權(quán)與驗證機制 > 授權(quán)和驗證方式 |
代碼示例
使用 CURL
方法獲取版本信息
發(fā)送 CURL
curl -d 'appid=your_app_id&signature=your_app_key' https://service.mysubmail.com/shorturl/info.json
返回
{
"status": "success",
"info": {
"level": "1", // 當前版本,0:免費版 ;1:基礎(chǔ)版;2:高級版;3:企業(yè)版;4:旗艦版
"max_shorturl": "500", //當前版本最大短網(wǎng)址數(shù)量
"max_shorturl_group": "100", //當前版本最大群組數(shù)量
"max_shorturl_customize_domain": "0", //當前版本最大自定義域名數(shù)量
"start_at": "2020-12-03 00:00:00", //版本開始日期
"expride_at": "2024-06-01 23:59:59", //版本到期時間
"current_used_shorturl_count": "31", // 已使用的短網(wǎng)址數(shù)量
"visit_at_this_month": "241", //本月訪量
"visit_count": "11462", // 全部訪量
"created_shorturl_count": "471", //已創(chuàng)建的短網(wǎng)址總數(shù)
"expired_shorturl_count": "399", // 已過期的短網(wǎng)址總數(shù)
"current_used_group_shorturl_count": 0, // 已使用的群組短網(wǎng)址數(shù)量
"created_group_shorturl_count": 0, //已創(chuàng)建的群組短網(wǎng)址總數(shù)
"expired_group_shorturl_count": 0, // 已過期的群組短網(wǎng)址總數(shù)
"current_used_group_count": 0 // 已使用的群組
}
}
Info level 短網(wǎng)址版本信息描述
level : 0 | 免費版 |
---|---|
level : 1 | 基礎(chǔ)版 |
level : 2 | 高級版 |
level : 3 | 企業(yè)版 |
level : 4 | 旗艦版 |
返回值
請求成功
{
"status":"success",
"info": {...}
}
請求失敗
{
"status":"error",
"code":"1xx",
"msg":"error message"
}