Retrieve All Objects
Relative URL | HTTP Request Method |
---|---|
| GET |
Replace model
with the type of object that you wish to retrieve (as defined in your app's Data Model), for example person
, job
or asset
Parameters
This function does not take any parameters.
Response
The response includes a list of up to 1000 objects of the given type, as well as pagination data. Each item in the list represents a single object. Each item contains:
Key | Description |
---|---|
| |
| The name of the model for the object. |
| A timestamp indicating when last the object on the server was updated by any means (e.g. from mobile device, API, data browser, etc.). |
| The display label for the object, as defined in the data model. |
| |
|
Pagination data (see the Counting and Limiting and Skipping section for more details):
Key | Description |
---|---|
| The number of objects in the response. |
| The total number of objects matched by the query. |
|
|
By default the total
key is excluded from fetch
calls made from CloudCode or OnlineDB. Specify total=true
as a URL parameter to include it.
Also, take a look at the example below.
Example
BASE-URL
The below examples contain a BASE-URL
placeholder. Please refer to the HTTP Endpoints section to get the base URL relevant to your deployment.
curl is a command-line tool that allows you to make HTTP requests easily, which is useful for playing around with an API. It usually comes standard on Linux and OS X, and for Windows you can download it here from the official website (choose *Win32*). The -u
parameter in the examples below specify the username and password for authentication (refer to the Enabling the API section).
Sample request:
Sample response:
FAQs
How do I filter these objects?
To filter the objects that you are retrieving, see the Querying Objects section.
How do I count the number of objects?
See the Counting, Limiting and Skipping section.
Last updated