重定向
Get all redirects
授权
响应
200
success
application/json
get
/redirectGET /v1/redirect 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",
      "file": "www.example.com/*",
      "https": true,
      "destination": "https://www.google.com",
      "destinations": "[]",
      "type": "301",
      "status": "active",
      "forward_path": false,
      "forward_query": false,
      "created_at": "2023-11-15T15:09:14.000000Z",
      "updated_at": "2023-11-15T15:09:14.000000Z"
    }
  ]
}授权
请求体
urlstring可选Example: 
URL
www.example.comdestinationstring可选Example: 
Destination URL
https://www.google.comdestinationsarray[string]可选Example: 
More Destinations
[]typestring可选Example: 
Type
301forward_pathboolean可选Example: 
whether forwarding slug to destination
falseforward_queryboolean可选Example: 
whether forwarding query params to destination
false响应
200
success
application/json
post
/redirectPOST /v1/redirect HTTP/1.1
Host: api.mfpad.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 140
{
  "url": "www.example.com",
  "destination": "https://www.google.com",
  "destinations": "[]",
  "type": "301",
  "forward_path": false,
  "forward_query": false
}200
success
{
  "data": null
}授权
路径参数
idstring · string必填Example: 
redirect id
1639562002248499321响应
200
success
application/json
get
/redirect/{id}GET /v1/redirect/{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",
  "file": "www.example.com/*",
  "https": true,
  "destination": "https://www.google.com",
  "destinations": "[]",
  "type": "301",
  "status": "active",
  "forward_path": false,
  "forward_query": false,
  "created_at": "2023-11-15T15:09:14.000000Z",
  "updated_at": "2023-11-15T15:09:14.000000Z"
}授权
路径参数
idstring · string必填Example: 
redirect id
1639562002248499321请求体
urlstring可选Example: 
URL
www.example.comdestinationstring可选Example: 
Destination URL
https://www.google.comdestinationsarray[string]可选Example: 
More Destinations
[]typestring可选Example: 
Type
301forward_pathboolean可选Example: 
whether forwarding slug to destination
falseforward_queryboolean可选Example: 
whether forwarding query params to destination
false响应
200
success
application/json
put
/redirect/{id}PUT /v1/redirect/{id} HTTP/1.1
Host: api.mfpad.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 140
{
  "url": "www.example.com",
  "destination": "https://www.google.com",
  "destinations": "[]",
  "type": "301",
  "forward_path": false,
  "forward_query": false
}200
success
{
  "data": null
}这有帮助吗?