Open API v2 / CMS & Content / Url Redirect
Url Redirect
→
Every request needs a bearer token: Authorization: Bearer <token>. Base URL https://your-site.webinone.com. New to field types? See the type reference.
Retrieves a list of url redirects by using a "where" filtering
Parameters
Wherestring · query
JSON filter expression. Combine operators ($eq, $contains, $gt, $in, …) with $and / $or.
Order_Bystring · query
Sort field. Prefix with - for descending; comma-separate for tie-breakers.
Semantic_Querystring · query
Natural-language search, ranked by relevance.
Min_Scorenumber · query
Lowest relevance score to include when using Semantic_Query.
Offsetinteger · query
Number of items to skip before returning results. Defaults to 0.
Limitinteger · query
Maximum number of items to return. Defaults to 100.
Response
Idstring · nullable
Unique identifier. Technical record number in the database. Read-only.
Sourcestring
The starting address (path) from which the user should be redirected (for example, /old-product-page).
Destinationstring
The destination address where the user should go (e.g. /new-category/product-name). This can be either a relative path or a full link.
Enabledboolean
Redirect status. True — redirection is working, false — redirection is disabled (the rule is saved in the system, but not executed).
CaseInSensitiveboolean
Case sensitivity.
curl "https://your-site.webinone.com/api/v2/admin/url-redirects" \ -H "Authorization: Bearer <token>"
await fetch("https://your-site.webinone.com/api/v2/admin/url-redirects", { method: "GET", headers: { "Authorization": "Bearer <token>" } });
import requests requests.get( "https://your-site.webinone.com/api/v2/admin/url-redirects", headers={"Authorization": "Bearer <token>"} )
$client = new GuzzleHttp\Client(); $response = $client->request('GET', 'https://your-site.webinone.com/api/v2/admin/url-redirects', [ 'headers' => [ 'Authorization' => 'Bearer <token>' ] ]);
using var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://your-site.webinone.com/api/v2/admin/url-redirects"); request.Headers.Add("Authorization", "Bearer <token>"); var response = await client.SendAsync(request);
Response · 200
{
"Items": [
{
"Id": "string",
"Source": "string",
"Destination": "string",
"Enabled": false,
"CaseInSensitive": false
}
],
"TotalItemsCount": 0
}Creates a new url redirect
Body parameters
Sourcestringrequired
The starting address (path) from which the user should be redirected (for example, /old-product-page).
Destinationstringrequired
The destination address where the user should go (e.g. /new-category/product-name). This can be either a relative path or a full link.
Enabledboolean
Redirect status. True — redirection is working, false — redirection is disabled (the rule is saved in the system, but not executed).
CaseInSensitiveboolean
Case sensitivity. If true, then the queries /PROMO and /promo will work the same. If false, the redirect will only work if the uppercase and lowercase letters match exactly.
Response
Idstring · nullable
Unique identifier. Technical record number in the database. Read-only.
Sourcestring
The starting address (path) from which the user should be redirected (for example, /old-product-page).
Destinationstring
The destination address where the user should go (e.g. /new-category/product-name). This can be either a relative path or a full link.
Enabledboolean
Redirect status. True — redirection is working, false — redirection is disabled (the rule is saved in the system, but not executed).
CaseInSensitiveboolean
Case sensitivity.
curl -X POST "https://your-site.webinone.com/api/v2/admin/url-redirects" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"Source":"string","Destination":"string","Enabled":false,"CaseInSensitive":false}'
await fetch("https://your-site.webinone.com/api/v2/admin/url-redirects", { method: "POST", headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" }, body: JSON.stringify({ "Source": "string", "Destination": "string", "Enabled": false, "CaseInSensitive": false }) });
import requests requests.post( "https://your-site.webinone.com/api/v2/admin/url-redirects", headers={"Authorization": "Bearer <token>"}, json={ "Source": "string", "Destination": "string", "Enabled": False, "CaseInSensitive": False } )
$client = new GuzzleHttp\Client(); $response = $client->request('POST', 'https://your-site.webinone.com/api/v2/admin/url-redirects', [ 'headers' => [ 'Authorization' => 'Bearer <token>', 'Content-Type' => 'application/json' ], 'json' => [ 'Source' => 'string', 'Destination' => 'string', 'Enabled' => false, 'CaseInSensitive' => false ] ]);
using var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://your-site.webinone.com/api/v2/admin/url-redirects"); request.Headers.Add("Authorization", "Bearer <token>"); request.Content = new StringContent( "{\"Source\":\"string\",\"Destination\":\"string\",\"Enabled\":false,\"CaseInSensitive\":false}", Encoding.UTF8, "application/json"); var response = await client.SendAsync(request);
Response · 200
{
"Id": "string",
"Source": "string",
"Destination": "string",
"Enabled": false,
"CaseInSensitive": false
}Retrieves a single url redirect
Parameters
idinteger · pathrequired
Url redirect id.
Response
Idstring · nullable
Unique identifier. Technical record number in the database. Read-only.
Sourcestring
The starting address (path) from which the user should be redirected (for example, /old-product-page).
Destinationstring
The destination address where the user should go (e.g. /new-category/product-name). This can be either a relative path or a full link.
Enabledboolean
Redirect status. True — redirection is working, false — redirection is disabled (the rule is saved in the system, but not executed).
CaseInSensitiveboolean
Case sensitivity.
curl "https://your-site.webinone.com/api/v2/admin/url-redirects/1" \ -H "Authorization: Bearer <token>"
await fetch("https://your-site.webinone.com/api/v2/admin/url-redirects/1", { method: "GET", headers: { "Authorization": "Bearer <token>" } });
import requests requests.get( "https://your-site.webinone.com/api/v2/admin/url-redirects/1", headers={"Authorization": "Bearer <token>"} )
$client = new GuzzleHttp\Client(); $response = $client->request('GET', 'https://your-site.webinone.com/api/v2/admin/url-redirects/1', [ 'headers' => [ 'Authorization' => 'Bearer <token>' ] ]);
using var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://your-site.webinone.com/api/v2/admin/url-redirects/1"); request.Headers.Add("Authorization", "Bearer <token>"); var response = await client.SendAsync(request);
Response · 200
{
"Id": "string",
"Source": "string",
"Destination": "string",
"Enabled": false,
"CaseInSensitive": false
}Updates an existing url redirect
Parameters
idinteger · pathrequired
Existent url redirect id.
Body parameters
Sourcestringrequired
The starting address (path) from which the user should be redirected (for example, /old-product-page).
Destinationstringrequired
The destination address where the user should go (e.g. /new-category/product-name). This can be either a relative path or a full link.
Enabledboolean
Redirect status. True — redirection is working, false — redirection is disabled (the rule is saved in the system, but not executed).
CaseInSensitiveboolean
Case sensitivity. If true, then the queries /PROMO and /promo will work the same. If false, the redirect will only work if the uppercase and lowercase letters match exactly.
Response
Idstring · nullable
Unique identifier. Technical record number in the database. Read-only.
Sourcestring
The starting address (path) from which the user should be redirected (for example, /old-product-page).
Destinationstring
The destination address where the user should go (e.g. /new-category/product-name). This can be either a relative path or a full link.
Enabledboolean
Redirect status. True — redirection is working, false — redirection is disabled (the rule is saved in the system, but not executed).
CaseInSensitiveboolean
Case sensitivity.
curl -X PUT "https://your-site.webinone.com/api/v2/admin/url-redirects/1" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"Source":"string","Destination":"string","Enabled":false,"CaseInSensitive":false}'
await fetch("https://your-site.webinone.com/api/v2/admin/url-redirects/1", { method: "PUT", headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" }, body: JSON.stringify({ "Source": "string", "Destination": "string", "Enabled": false, "CaseInSensitive": false }) });
import requests requests.put( "https://your-site.webinone.com/api/v2/admin/url-redirects/1", headers={"Authorization": "Bearer <token>"}, json={ "Source": "string", "Destination": "string", "Enabled": False, "CaseInSensitive": False } )
$client = new GuzzleHttp\Client(); $response = $client->request('PUT', 'https://your-site.webinone.com/api/v2/admin/url-redirects/1', [ 'headers' => [ 'Authorization' => 'Bearer <token>', 'Content-Type' => 'application/json' ], 'json' => [ 'Source' => 'string', 'Destination' => 'string', 'Enabled' => false, 'CaseInSensitive' => false ] ]);
using var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Put, "https://your-site.webinone.com/api/v2/admin/url-redirects/1"); request.Headers.Add("Authorization", "Bearer <token>"); request.Content = new StringContent( "{\"Source\":\"string\",\"Destination\":\"string\",\"Enabled\":false,\"CaseInSensitive\":false}", Encoding.UTF8, "application/json"); var response = await client.SendAsync(request);
Response · 200
{
"Id": "string",
"Source": "string",
"Destination": "string",
"Enabled": false,
"CaseInSensitive": false
}Deletes an existing url redirect
Parameters
idinteger · pathrequired
Existent url redirect id.
curl -X DELETE "https://your-site.webinone.com/api/v2/admin/url-redirects/1" \ -H "Authorization: Bearer <token>"
await fetch("https://your-site.webinone.com/api/v2/admin/url-redirects/1", { method: "DELETE", headers: { "Authorization": "Bearer <token>" } });
import requests requests.delete( "https://your-site.webinone.com/api/v2/admin/url-redirects/1", headers={"Authorization": "Bearer <token>"} )
$client = new GuzzleHttp\Client(); $response = $client->request('DELETE', 'https://your-site.webinone.com/api/v2/admin/url-redirects/1', [ 'headers' => [ 'Authorization' => 'Bearer <token>' ] ]);
using var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Delete, "https://your-site.webinone.com/api/v2/admin/url-redirects/1"); request.Headers.Add("Authorization", "Bearer <token>"); var response = await client.SendAsync(request);