title: How do I design a REST interface that allows for updating the sort order of a list of related items?
body: <p>Assuming I want to develop a client application that manages playlists of songs and has the following objects stored on the server:</p>
  
  <ul>
  <li>Playlist { title:unique }</li>
  <li>PlaylistSong { PlaylistId, SongId, sortOrder }</li>
  <li>Song { title:unique }</li>
  </ul>
  
  <p>How could I design a REST interface so that the order of a playlist can be changed from the client, and that a new song could be entered into an existing playlist at a specific position.<br>
  In other words, I do not know what the REST interface would look like in order to implement the following two actions:</p>
  
  <ul>
  <li>Add song to playlist in   specific location</li>
  <li>Update the order of the   playlist</li>
  </ul>
  
  <p>The basic set of actions I want to implement, I understand should look like this:</p>
  
  <pre><code>User action:           Rest Resource
  
  Create playlist:       POST /playlist
  Get Playlist:          GET /playlist/{id}
  Get Playlist Songs:    GET /playlist/{id}/songs
  Create song:           POST /song
  Update song:           PUT /song
  Get song:              GET /song/{id}
  </code></pre>