Open API v2 / CMS & Content / Url Rewrite

Url Rewrite

Every request needs a bearer token: Authorization: Bearer <token>. Base URL https://your-site.webinone.com. New to field types? See the type reference.

GET/api/v2/admin/url-rewrites#

Retrieves a list of url rewrites 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.
RewrittenUrlstring
"Mask" or visible address. What the user sees in the browser or types into the search bar (for example, /contacts).
RewriteTostring
The actual technical path to the file or handler on the server that should execute the request (for example, /pages/static.aspx?id=12).
Enabledboolean
Rule status. True — the rule is active and requests are being processed, false — the server ignores this rule.
curl "https://your-site.webinone.com/api/v2/admin/url-rewrites" \
  -H "Authorization: Bearer <token>"
Response · 200
{
  "Items": [
    {
      "Id": "string",
      "RewrittenUrl": "https://example.com",
      "RewriteTo": "string",
      "Enabled": false
    }
  ],
  "TotalItemsCount": 0
}
POST/api/v2/admin/url-rewrites#

Creates a new url rewrite

Body parameters
RewrittenUrlstringrequired
"Mask" or visible address. What the user sees in the browser or types into the search bar (for example, /contacts).
RewriteTostringrequired
The actual technical path to the file or handler on the server that should execute the request (for example, /pages/static.aspx?id=12).
Enabledboolean
Rule status. True — the rule is active and requests are being processed, false — the server ignores this rule.
Response
Idstring · nullable
Unique identifier. Technical record number in the database. Read-only.
RewrittenUrlstring
"Mask" or visible address. What the user sees in the browser or types into the search bar (for example, /contacts).
RewriteTostring
The actual technical path to the file or handler on the server that should execute the request (for example, /pages/static.aspx?id=12).
Enabledboolean
Rule status. True — the rule is active and requests are being processed, false — the server ignores this rule.
curl -X POST "https://your-site.webinone.com/api/v2/admin/url-rewrites" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"RewrittenUrl":"https://example.com","RewriteTo":"string","Enabled":false}'
Response · 200
{
  "Id": "string",
  "RewrittenUrl": "https://example.com",
  "RewriteTo": "string",
  "Enabled": false
}
GET/api/v2/admin/url-rewrites/{id}#

Retrieves a single url rewrite

Parameters
idinteger · pathrequired
Url rewrite id.
Response
Idstring · nullable
Unique identifier. Technical record number in the database. Read-only.
RewrittenUrlstring
"Mask" or visible address. What the user sees in the browser or types into the search bar (for example, /contacts).
RewriteTostring
The actual technical path to the file or handler on the server that should execute the request (for example, /pages/static.aspx?id=12).
Enabledboolean
Rule status. True — the rule is active and requests are being processed, false — the server ignores this rule.
curl "https://your-site.webinone.com/api/v2/admin/url-rewrites/1" \
  -H "Authorization: Bearer <token>"
Response · 200
{
  "Id": "string",
  "RewrittenUrl": "https://example.com",
  "RewriteTo": "string",
  "Enabled": false
}
PUT/api/v2/admin/url-rewrites/{id}#

Updates an existing url rewrite

Parameters
idinteger · pathrequired
Existent url rewrite id.
Body parameters
RewrittenUrlstringrequired
"Mask" or visible address. What the user sees in the browser or types into the search bar (for example, /contacts).
RewriteTostringrequired
The actual technical path to the file or handler on the server that should execute the request (for example, /pages/static.aspx?id=12).
Enabledboolean
Rule status. True — the rule is active and requests are being processed, false — the server ignores this rule.
Response
Idstring · nullable
Unique identifier. Technical record number in the database. Read-only.
RewrittenUrlstring
"Mask" or visible address. What the user sees in the browser or types into the search bar (for example, /contacts).
RewriteTostring
The actual technical path to the file or handler on the server that should execute the request (for example, /pages/static.aspx?id=12).
Enabledboolean
Rule status. True — the rule is active and requests are being processed, false — the server ignores this rule.
curl -X PUT "https://your-site.webinone.com/api/v2/admin/url-rewrites/1" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"RewrittenUrl":"https://example.com","RewriteTo":"string","Enabled":false}'
Response · 200
{
  "Id": "string",
  "RewrittenUrl": "https://example.com",
  "RewriteTo": "string",
  "Enabled": false
}
DELETE/api/v2/admin/url-rewrites/{id}#

Deletes an existing url rewrite

Parameters
idinteger · pathrequired
Existent url rewrite id.
curl -X DELETE "https://your-site.webinone.com/api/v2/admin/url-rewrites/1" \
  -H "Authorization: Bearer <token>"