API请求地址:
POST https://api.webmasterapi.com/v1/short-url
请求参数:
apiKey |
[必需] |
您的apiKey。 |
longUrl |
[必需] |
长网址。 |
title |
[可选] |
给短网址设置一个标题。 |
{
"apiKey": "test-apiKey",
"longUrl": "https://www.google.com",
"title": "Google"
}
API返回结果:
{
"code": 1,
"results": {
"shortUrlId": "RHWWTEh",
"shortUrl": "https://page.pe/RHWWTEh",
"longUrl": "https://www.google.com",
"title": "Google",
"QRCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACA......"
}
}
API请求地址:
PUT https://api.webmasterapi.com/v1/short-url
请求参数:
apiKey |
[必需] |
您的apiKey。 |
shortUrl_id |
[必需] |
短网址ID。 |
longUrl |
[可选] |
长网址。 |
title |
[可选] |
给短网址设置一个标题。 |
{
"apiKey": "test-apiKey",
"shortUrl_id": "RHWWTEh",
"title": "google",
"longUrl": "https://www.google.com"
}
API返回结果:
{
"code": 1,
"results": {
"shortUrlId": "RHWWTEh",
"shortUrl": "https://page.pe/RHWWTEh",
"longUrl": "https://www.google.com",
"title": "google",
"QRCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg......",
"time": 1588843898034
}
}
API请求地址:
GET https://api.webmasterapi.com/v1/short-url/[apiKey]/[shortUrl_id]
请求参数:
apiKey |
[必需] |
您的apiKey。 |
shortUrl_id |
[必需] |
短网址ID。 |
https://api.webmasterapi.com/v1/short-url/test-apiKey/RHWWTEh
API返回结果:
{
"code": 1,
"results": {
"shortUrlId": "RHWWTEh",
"shortUrl": "https://page.pe/RHWWTEh",
"longUrl": "https://www.google.com",
"title": "google",
"time": 1588843898034,
"hits": 0
}
}