title: Magento REST API - How to determine the API base URL?
body: <p>I'm running Magento 2.2.5 and was having trouble working out what the URL was for making API requests. For example to GET a list of countries I had seen the following syntax used:</p>
  
  <pre><code>/rest/default/V1/directory/countries
  </code></pre>
  
  <p>which has worked on some stores, but I was getting this error:</p>
  
  <pre><code>{
  "message" : "Specified request cannot be processed.",
  "trace" : null
  }
  </code></pre>
  
  <p>I started playing around with the URL format and removed the "default" and used this instead:</p>
  
  <pre><code>/rest/V1/directory/countries
  </code></pre>
  
  <p>and the requests were then successful. How does one determine what the base URL to use for Magento REST API requests? I haven't been able to find this documented so far.</p>