title: Getting pages by url using Wordpress REST API
body: <p>I'm attempting to using WP REST API on a site that uses pretty URLs, not ID's (which is typical in a REST scenario). All I have to query with is the requested URL.</p>
  
  <p>Lets say a user lands on <code>example.com/about</code>, I can do the following:</p>
  
  <pre><code>/wp-json/wp/v2/pages/?slug=about
  </code></pre>
  
  <p>No sweat. However, what if a users lands on <code>example.com/about/team</code>? I <em>could</em> query by the slug <code>team</code>, but maybe my site also has <code>example.com/contact/team</code> as a possible URL. It's not reliable.</p>
  
  <p>What I need is a way of achieving the following:</p>
  
  <pre><code>/wp-json/wp/v2/pages/?permalink=about%2team
  </code></pre>
  
  <p>It's unfeasible to have to set up custom routes for each page that gets created. I'm surprised the API doesn't appear to have some kind of permalink handler out of the box.</p>