Skip to Content

resourceByPath

Resolve a URL path to its resource type and ID. Enables headless clients to build dynamic URL-to-resource mappings.

Authentication

Public Access: Accessible with the public API key

Query Structure

{ resourceByPath(path: String!) { type id alternates { # Alternate fields } } }

Arguments

ArgumentTypeRequiredDescription
pathStringYesThe URL path to resolve (e.g., “/products/my-product” or “/login”)

Return Type

Returns a Resource object containing the resolved URL path resource with the type, optional ID, and alternate language URLs.

Example

{ resourceByPath(path: "/products/summer-collection") { type id alternates { hreflang url } } }