<p>Adds two new parameters to the notes search API to be able to</p>
<ul>
<li>specify the value the notes should be sorted by (either <code>created_at</code> or <code>updated_at</code>, <code>updated_at</code> remains the default value)</li>
<li>specify the order of the returned notes (either <code>ASC</code> or <code>DESC</code>, <code>DESC</code> remains the default)</li>
</ul>
<p>A new call to the notes search API may look like this:<br>
<a href="https://api.openstreetmap.org/api/0.6/notes/search?sort_by=created_at&order_by=ASC" rel="nofollow">/api/0.6/notes/search?<strong>sort_by=created_at&order_by=ASC</strong></a></p>
<p>See also <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="501731116" data-permission-text="Issue title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2380" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/2380/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/2380">#2380</a> for the reason of this pull request.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/2381'>https://github.com/openstreetmap/openstreetmap-website/pull/2381</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Sort and order notes by different values and ascending or descending order</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2381/files#diff-0">app/controllers/api/notes_controller.rb</a>
    (7)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2381.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/2381.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2381.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/2381.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2381?email_source=notifications&email_token=AAK2OLPG44I2MBDR4KHQZ23QMXUFFA5CNFSM4I5CYR2KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HPMWKNQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLOS3ORF2Q7K5MTUMLLQMXUFFANCNFSM4I5CYR2A">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAK2OLJXRZHHYDULOY5N4P3QMXUFFA5CNFSM4I5CYR2KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HPMWKNQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2381?email_source=notifications\u0026email_token=AAK2OLPG44I2MBDR4KHQZ23QMXUFFA5CNFSM4I5CYR2KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HPMWKNQ",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2381?email_source=notifications\u0026email_token=AAK2OLPG44I2MBDR4KHQZ23QMXUFFA5CNFSM4I5CYR2KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HPMWKNQ",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>