curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/url-redirects \
--header 'api_key: <api-key>'import requests
url = "https://app.base44.com/api/apps/{app_id}/url-redirects"
headers = {"api_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>'}};
fetch('https://app.base44.com/api/apps/{app_id}/url-redirects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/url-redirects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/url-redirects"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api_key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.base44.com/api/apps/{app_id}/url-redirects")
.header("api_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/url-redirects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "68c2d1e5f3b8a4216e9b5583",
"source_path": "/old-pricing",
"target_path": "/pricing",
"match_type": "single"
}
]List URL redirects
Returns every URL redirect on the app’s published site.
Each rule sends visitors from one path to another with a 301, which search engines treat as permanent.
curl --request GET \
--url https://app.base44.com/api/apps/{app_id}/url-redirects \
--header 'api_key: <api-key>'import requests
url = "https://app.base44.com/api/apps/{app_id}/url-redirects"
headers = {"api_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>'}};
fetch('https://app.base44.com/api/apps/{app_id}/url-redirects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/url-redirects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/url-redirects"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api_key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.base44.com/api/apps/{app_id}/url-redirects")
.header("api_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/url-redirects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "68c2d1e5f3b8a4216e9b5583",
"source_path": "/old-pricing",
"target_path": "/pricing",
"match_type": "single"
}
]Authorizations
Personal API key.
Path Parameters
ID of the app whose URL redirects you want to work with.
Response
The app's URL redirects.
ID of the redirect. Pass it as redirect_id to Update URL redirect and Delete URL redirect.
"68c2d1e5f3b8a4216e9b5583"
The path visitors request, normalized with no trailing slash and percent-escapes decoded.
"/old-pricing"
Where the visitor is sent. Either an internal path, normalized the same way as source_path, or an absolute https:// URL on another site, kept exactly as you sent it.
"/pricing"
How the rule matches. A single rule redirects that exact path, and a prefix rule redirects it and everything under it, keeping the remainder of the path.
single, prefix "single"
Was this page helpful?