title: How to use externally provided IDs in Rails REST API?
body: <p><strong>What are the best practices to working with external IDs in REST API in general, and specifically in Rails?</strong></p>
  
  <hr>
  
  <p><strong>Some Background:</strong></p>
  
  <p>I created an API for my application, which uses standard resource based JSON REST API.</p>
  
  <p>I have a Flight model, by which users to create model objects by POSTing to /api/flights. This assigns a unique id to the new Flight objects the way ActiveRecord always does.</p>
  
  <p>So far pretty standard.</p>
  
  <p>However, my customer wants me to provide an option to assign an id by himself as part of the creation of the Flight object in the API, and later use the id he assigned in order to show/update/delete (etc.) the object by API.</p>
  
  <p>I figure I can simply add an external_id parameter and add routes to update/delete/index by external_id. However, this seems to clutter the elegant resource based rails approach.</p>
  
  <p>So, what's the best practice?</p>