redirx

v0.3.0
dev.redirx/redirx Checked 3 days ago Published 1 month ago

Map old site URLs to new ones during a migration, review proposals and export approved redirects.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

plan_migration Plan a migration

Create an owned old-site/new-site plan. Next call import_inventory for the old and new URL lists; planning does not crawl or run the model.

ParameterTypeDescription
idempotency_key *stringUnique per intended change; retry an uncertain call with the identical input and key.
new_site *stringOrigin of available destination pages, e.g. https://new.example; no path, query, fragment or credentials.
old_site *stringOrigin of existing source pages, e.g. https://old.example; no path, query, fragment or credentials.
namestring
site_aliasesobjectAdditional explicitly allowed origins per side (www or staging). Aliases are never inferred.

import_inventory Import a URL inventory

Import explicit HTTP(S) URL strings into an owned, immutable old or new inventory. No crawl or page fetch. Use data.inventory.id with run_migration only when data.inventory.status is complete; a partial import lists its exclusions and needs corrected input and a new key. Up to 15,000 old / 20,000 new URLs and 16 MiB of URL text. Importing never authorizes a charge.

ParameterTypeDescription
idempotency_key *stringUnique per intended change; retry an uncertain call with the identical input and key.
migration_id *string
side *stringold = existing source pages; new = available destination pages.
urls *arrayAbsolute page URLs, not a sitemap URL. Path case, escapes and query strings are kept exactly.

run_migration Run a migration

Match old URLs to new ones from two complete inventories. Migrations up to 500 old URLs run free (one free run a day, five in total per account). Otherwise the answer is payment_required with the one-time price ($1 per 50 old URLs, $10 minimum) and a checkout link that only a person can complete; after paying, retry with the same input and key. A queued run finishes in minutes: poll get_migration after retry_after_seconds. confirmed_pairs must be pairs a person confirmed, never guesses.

ParameterTypeDescription
idempotency_key *stringUnique per intended change; retry an uncertain call with the identical input and key.
migration_id *string
new_inventory_id *string
old_inventory_id *string
confirmed_pairsarray

get_migration Get migration status

Read an owned migration, its latest inventories, runs (with progress), exports and verifications, and the next recoverable action. Keep migration_id across reconnects; poll only after retry_after_seconds. A finished run still needs review before export.

ParameterTypeDescription
migration_id *string

group_matches Group migration matches

Start review here. Groups a run's mappings by the URL rewrite they apply (from → to, e.g. /product/{slug}/ → /products/{slug}), groups with the most undecided rows first. kind is moved, kept_tail, same_path, unchanged (no redirect needed) or unmatched; renamed counts rows whose last segment also changed. Each group has counts by state, the confidence range of its undecided proposals and up to three examples, lowest confidence first. Show the person each group as a rule with its examples and let them decide per group (resolve_group), opening a group with list_matches group_id when they want…

ParameterTypeDescription
migration_id *string
run_id *string
filterstringGroup only rows in this state.
limitinteger
offsetintegerGroups to skip; use data.next_offset until it is null.

list_matches List migration matches

Read a run's mappings in stable URL order: the latest proposal, the current decision and its revision. Pass group_id (from group_matches) to read one group's rows. Follow data.next_cursor until null with the same run, filter and group; one page is not the whole run. data.counts are for the whole run. Keep each revision and data.selection_revision for resolve_matches and export_redirects. Confidence is an uncalibrated model estimate. Decisions with actor_kind "engine" came from the previous RedirX engine and can be changed like any other.

ParameterTypeDescription
migration_id *string
run_id *string
cursorstring
filterstring
group_idstringOnly this group's rows (a group_id from group_matches).
limitinteger

resolve_group Resolve a group of matches

After the person decides on a whole group from group_matches: record one decision (approve confirms each row's latest proposal; reject, defer or intentional_removal) for every row in the group that has no decision yet. Rows already decided are never changed, and rows in except_mapping_ids are left for resolve_matches. expected_selection_revision is the data.selection_revision you showed the person; a revision_conflict means read group_matches again and re-confirm. A data.remaining above 0 means call again with the new selection_revision and a new key.

ParameterTypeDescription
action *string
expected_selection_revision *integer
group_id *string
idempotency_key *stringUnique per intended change; retry an uncertain call with the identical input and key.
migration_id *string
run_id *string
except_mapping_idsarrayRows of the group the person wants to decide separately.
rationalestring

resolve_matches Resolve matches

Record audited decisions on individual rows with optimistic concurrency, after the user agrees (for a whole group, use resolve_group): approve (confirms the proposed target, or target_url if given), set_target (an exact URL from the new inventory), reject, defer or intentional_removal. Each needs mapping_id and the expected_revision you read. Inspect every outcome: a batch can partly fail; on revision_conflict reread list_matches and reassess.

ParameterTypeDescription
decisions *array
idempotency_key *stringUnique per intended change; retry an uncertain call with the identical input and key.
migration_id *string
run_id *string

refine_matches Refine matches

Resume a run that stopped part-way (same pass, kept proposals), or start its next pass, which learns from the targets people confirmed and the most confident proposals. Up to three passes per run; no new charge. Read the run's seed_revision from get_migration or list_matches first.

ParameterTypeDescription
expected_seed_revision *integer
idempotency_key *stringUnique per intended change; retry an uncertain call with the identical input and key.
migration_id *string
run_id *string

export_redirects Export redirects

Create an immutable redirect file at exactly the selection revision you showed the person (data.selection_revision). Before exporting, ask the person what to include: every proposal is the default, or only those at or above a confidence; say how many fall below RedirX's recommended review threshold (data.review from group_matches). Pass their answer as accept_proposals_above (0 for every proposal): each undecided proposal at or above it becomes their decision. Rejected rows are left out without asking; any other exclusion (held for review, no destination, unsafe for the format) needs allow_par…

ParameterTypeDescription
format *stringwordpress is Redirection plugin CSV; cloudflare is Pages _redirects, not Bulk Redirects CSV. csv and json are generic review mappings that need adaptation before installation.
idempotency_key *stringUnique per intended change; retry an uncertain call with the identical input and key.
migration_id *string
revision *integer
run_id *string
accept_proposals_abovenumberOnly with the person's answer: accept every undecided proposal at or above this confidence as their decision (0 = all). Omit to export decisions only.
allow_partialboolean
slash_variantsbooleanAlso redirect each old URL's other trailing-slash spelling (/about-us and /about-us/).

verify_redirects Verify redirects

Only after the user confirms an export is installed: check each of its redirects on the live site (status, hops, final destination). Give live_origin (where the old URLs are served) and origin_rewrites mapping export destination origins to live ones ({} keeps them). Poll get_migration for results. This does not install rules or establish Google indexing, canonicals, robots or sitemaps; inspect unchecked results before claiming success.

ParameterTypeDescription
artifact_id *stringThe export id (data.export.id).
deployment_confirmation *boolean
idempotency_key *stringUnique per intended change; retry an uncertain call with the identical input and key.
live_origin *string
migration_id *string
origin_rewritesobject

ping Ping

Connection check. Returns "pong". Has no side effects.