短链接
Get all short urls
授权
Authorizationstring必填
Enter token in format (Bearer )
响应
200
success
application/json
get/link
GET /v1/link HTTP/1.1
Host: api.mfpad.com
Authorization: YOUR_API_KEY
Accept: */*
200
success
{
"data": [
{
"id": "72288a61-034e-4596-80c9-88751cf0a937",
"host": "www.example.com",
"url": "www.example.com",
"alias": "aBD",
"https": true,
"destination": "https://www.google.com",
"destinations": "[]",
"type": "301",
"status": "active",
"forward_query": false,
"created_at": "2023-11-15T15:09:14.000000Z",
"updated_at": "2023-11-15T15:09:14.000000Z"
}
]
}授权
Authorizationstring必填
Enter token in format (Bearer )
请求体
hoststring必填Example:
Hostname
url.comaliasstring可选Example:
Slug
123destinationstring必填Example:
Destination URL
https://www.google.comtypestring可选Example:
Type
301forward_queryboolean可选Example:
whether forwarding query params to destination
false响应
200
success
application/json
dataobject可选
post/link
POST /v1/link HTTP/1.1
Host: api.mfpad.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 106
{
"host": "url.com",
"alias": "123",
"destination": "https://www.google.com",
"type": "301",
"forward_query": false
}200
success
{
"data": null
}授权
Authorizationstring必填
Enter token in format (Bearer )
路径参数
idstring · string必填Example:
short url id
1639562002248499321响应
200
success
application/json
idstring可选Example:
Item id
72288a61-034e-4596-80c9-88751cf0a937hoststring可选Example:
Hostname
www.example.comurlstring可选Example:
URL
www.example.comaliasstring可选Example:
URL Slug
aBDhttpsboolean可选Example:
whether HTTPS support
truedestinationstring可选Example:
Destination URL
https://www.google.comdestinationsarray[string]可选Example:
More Destinations
[]typestring可选Example:
Type
301statusstring可选Example:
Status
activeforward_queryboolean可选Example:
whether forwarding query params to destination
falsecreated_attime可选Example:
created at
2023-11-15T15:09:14.000000Zupdated_attime可选Example:
updated at
2023-11-15T15:09:14.000000Zget/link/{id}
GET /v1/link/{id} HTTP/1.1
Host: api.mfpad.com
Authorization: YOUR_API_KEY
Accept: */*
200
success
{
"id": "72288a61-034e-4596-80c9-88751cf0a937",
"host": "www.example.com",
"url": "www.example.com",
"alias": "aBD",
"https": true,
"destination": "https://www.google.com",
"destinations": "[]",
"type": "301",
"status": "active",
"forward_query": false,
"created_at": "2023-11-15T15:09:14.000000Z",
"updated_at": "2023-11-15T15:09:14.000000Z"
}授权
Authorizationstring必填
Enter token in format (Bearer )
路径参数
idstring · string必填Example:
short url id
1639562002248499321请求体
hoststring必填Example:
Hostname
url.comaliasstring可选Example:
Slug
123destinationstring必填Example:
Destination URL
https://www.google.comtypestring可选Example:
Type
301forward_queryboolean可选Example:
whether forwarding query params to destination
false响应
200
success
application/json
dataobject可选
put/link/{id}
PUT /v1/link/{id} HTTP/1.1
Host: api.mfpad.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 106
{
"host": "url.com",
"alias": "123",
"destination": "https://www.google.com",
"type": "301",
"forward_query": false
}200
success
{
"data": null
}授权
Authorizationstring必填
Enter token in format (Bearer )
路径参数
idstring · string必填Example:
short url id
1639562002248499321响应
200
success
application/json
dataobject可选
delete/link/{id}
DELETE /v1/link/{id} HTTP/1.1
Host: api.mfpad.com
Authorization: YOUR_API_KEY
Accept: */*
200
success
{
"data": null
}