Sorting records

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsSorting records
(Created page with "On the other hand, has more plumbing minneapolis caffeine in its content compared to tea. While we were talking, Diana the new midwife on call, came in to check Christine's di...")
 
(Created page with "### Tutorial Sort records in a SQL or NoSQL query. Try these examples in the 'API Docs' tab of the DreamFactory Admin Console or from the command line with cURL. ### API End...")
Line 1: Line 1:
On the other hand, has more plumbing minneapolis caffeine in its content compared to tea. While we were talking, Diana the new midwife on call, came in to check Christine's dilation and assess her progress.<br><br>My homepage :: [https://www.youtube.com/watch?v=QSUjSLVIwT4 emergency plumbers london]
+
### Tutorial
 +
 
 +
Sort records in a SQL or NoSQL query. Try these examples in the 'API Docs' tab of the DreamFactory Admin Console or from the command line with cURL.
 +
 
 +
### API Endpoint
 +
 
 +
<pre>GET https://{url}/api/v2/{api_name}/_table/{table_name}?order={sort_order}</pre>
 +
 
 +
### API Docs Screenshot
 +
 
 +
[[File:Swagger-order.png|1000px]]
 +
 
 +
### Example - Sort contact records by last name ascending
 +
 
 +
* Table name: contact
 +
* Order parameter in API call: <pre>last_name ASC</pre>
 +
* Request URL: <pre>https://foo.com/api/v2/db/_table/contact?order=last_name%20ASC</pre>
 +
 
 +
### Example - Sort contact records by last name descending
 +
 
 +
* Table name: contact
 +
* Order parameter in API call: <pre>last_name DESC</pre>
 +
* Request URL: <pre>https://foo.com/api/v2/db/_table/contact?order=last_name%20DESC</pre>
 +
 
 +
### Example - Sort contact records by last name ascending, then by first name ascending (nested sort)
 +
 
 +
* Table name: contact
 +
* Order parameter in API call: <pre>last_name ASC, first_name ASC</pre>
 +
* Request URL: <pre>https://foo.com/api/v2/db/_table/contact?order=last_name%20ASC%2C%20first_name%20ASC</pre>

Revision as of 18:02, 9 October 2015

      1. Tutorial

Sort records in a SQL or NoSQL query. Try these examples in the 'API Docs' tab of the DreamFactory Admin Console or from the command line with cURL.

      1. API Endpoint
GET https://{url}/api/v2/{api_name}/_table/{table_name}?order={sort_order}
      1. API Docs Screenshot

Swagger-order.png

      1. Example - Sort contact records by last name ascending
  • Table name: contact
  • Order parameter in API call:
    last_name ASC
  • Request URL:
    https://foo.com/api/v2/db/_table/contact?order=last_name%20ASC
      1. Example - Sort contact records by last name descending
  • Table name: contact
  • Order parameter in API call:
    last_name DESC
  • Request URL:
    https://foo.com/api/v2/db/_table/contact?order=last_name%20DESC
      1. Example - Sort contact records by last name ascending, then by first name ascending (nested sort)
  • Table name: contact
  • Order parameter in API call:
    last_name ASC, first_name ASC
  • Request URL:
    https://foo.com/api/v2/db/_table/contact?order=last_name%20ASC%2C%20first_name%20ASC