Fetches the correct response action for a given route (redirection, composition, not found).
Fetches the correct response action for a given route (redirection, composition, not found).
In addition to the named parameters below, this endpoint accepts data projection syntax: select.<bucket>[<op>] — documented below.
Data projection (select.*)
Projection returns a subset of the matched composition by pruning fields (parameters), field types, and slots before values are resolved. It only applies when the route resolves to a composition; redirect and notFound responses are returned unchanged. The allowed names are project-specific — they come from the project's component definitions and content types — which is why select.* parameters are pattern-validated rather than declared as named parameters.
Syntax: select.<bucket>[<operator>]=<value>. Values are comma-separated lists of names. * is the only wildcard and matches zero or more characters (e.g. seo_*).
| Parameter | Effect |
|---|---|
| select.fields[only]=a,b | Keep only the named fields/parameters; drop everything else. |
| select.fields[except]=a,b | Drop the named fields/parameters; keep everything else. |
| select.fields[locales]=a,b | For the named fields that survive filtering, return the full per-locale value map instead of only the requested locale's value. |
| select.fields[blockDepth]=N | Limit how many levels of block field children are kept. 0 removes all block fields; preserveAll prevents projection from trimming fields inside block children. |
| select.fieldTypes[only]=a,b | Keep only fields of the named types (type IDs such as text, richText, asset). |
| select.fieldTypes[except]=a,b | Drop fields of the named types. |
| select.slots[only]=a,b | Keep only the named slots. |
| select.slots[except]=a,b | Drop the named slots. |
| select.slots[depth]=N | Limit how many levels of nested components are kept in slots. |
| select.slots.<name>[depth]=N | Depth limit for one specific slot; overrides slots[depth]. |
Behavior:
- Projection applies recursively at every component and block in the returned tree, and is forwarded into entries resolved through reference fields.
- When operators combine, all [only] sets are intersected first, then [except] sets are subtracted — exclusion always wins.
- Unknown field, slot, or type names are silent no-ops (the tree shape is preserved; non-matching content is simply absent). Unknown operators return HTTP 400.
- An empty list (select.fields[only]= or select.slots[only]=) strips every member of that bucket; [except]=* is equivalent.
- [depth] counts nesting within a single fetched tree and resets inside referenced entries.
Examples:
- select.fields[only]=title,slug&select.slots[only]= — title and slug of the resolved page with all slots flattened (e.g. for breadcrumbs).
- select.fieldTypes[except]=richText — everything except rich-text fields.
- select.slots[depth]=2&select.fields[only]=label,url — two levels of nested components, trimmed to label and url.
Request
- Base URL: https://uniform.app
- URL: https://uniform.app/api/v1/route
- Auth: one of:
- API key in header x-api-key
- HTTP bearer
Query parameters
The project the entry/entries are on
The path to resolve. Dynamic project map nodes and redirects can be resolved when a matching path is passed. Query string parameters may be passed with the path. They are ignored for route matching. If the route matches a composition and the project map node allows passed query string parameters, query parameters will be returned as as dynamic inputs to the composition.
Examples:
- route "/company/about-us" would match "/company/about-us" in project map or redirects
- route "/products/123" would match "/products/:productId" in project map or "/products/*" in redirects
- route "/products/123?color=red" would match "/products/:productId" in project map, and provde productId=123 and color=red as dynamic inputs to the composition
Conflict resolution: If a route matches multiple possible project map or redirect nodes, the resulting action will use the following logic:
- If a redirect matches, it wins over project map nodes in all cases
- If multiple redirects or project map nodes match the route, the one with the most specific path wins:
- The route with the most path segments wins
- If several matches have the same number of segments, the one with the fewest dynamic segments wins
- If still ambiguous, the first matching route arbitrarily wins
Invalid paths: The request fails with HTTP 400 when the path, ignoring its query string and trailing slashes:
- contains consecutive slashes (for example "/en//about" or "//en/about")
- has a path segment that is too long to match any route. The limit depends on the characters used, and is generally 150-220 characters per segment.
Probe paths: On uniform.global, paths ending in an archive, backup or database file extension (for example "/site.zip", "/config.php.bak" or "/db.sql") return { "type": "notFound" } without being matched, even where a dynamic project map node or redirect would match them.
Specify a project map ID to fetch route from. If not specified, the default project map for the projectId is used
Publishing state to fetch. 0 = draft, 64 = published
If true the _id unique identifier of blocks will be part of the response data. If false, the _id will not be present in the API response. Note: the default value depends on the format: true for editor or canonical, false for delivery or when no format is specified. Prefer selecting a format rather than using this option.
Has no effect.
One or more locales to filter and localize by. Only entries that enable one of the specified locales or enable no locales will be returned. The response will be localized to include only the first matching locale's data.
This parameter accepts a single value, a comma-delimited list of values, or the Accept-Language header syntax. Examples: en-US fr-CA,fr de-AT;q=0.9,de-DE;q=0.8,en;q=0.7
When this parameter is not passed, all locales' data will be returned
The ID of a release to fetch the content for.
- When unspecified, all release content is excluded from the result(s).
- When specified, all content is returned as it would appear in the release if it was released now. This includes both content copied to the release and changed, as well as content that is not part of the release.
Content copied to a release can be differentiated from base content by the releaseId property on the content. If the content is not copied to the release, this property will be null
Indicates the data variant that was fetched for data resources. undefined: Data resources were resolved using published data from their data source unpublished: Data resources which support unpublished data retrieved unpublished data from their data source. Data resources that did not support unpublished data retrieved published data instead.
When true, redirects are not evaluated for the route matching; the result will be either a composition or not found. Note: this is always true when state=63 (internal RSC editor state) to allow contextual editing of compositions that have redirects configured on their paths.
Response
OK
Changes
No recorded changes to this operation across all 1 revision of this API.