V1
The JourneyApps API (V1) → 2. Retrieving All Objects
Retrieving All Objects
This function allows you to retrieve a list of all objects of the given type.
Relative URL | HTTP Request Method |
---|---|
/api/v1/object-type.format | GET |
Note: Replace object-type with the type of object that you wish to retrieve (as defined in your app's Data Model), for example 'person', 'job' or 'asset'. Replace format with the response data format (
json
or xml
), or leave it out.
Parameters
This function does not take any parameters.
Response
The response includes a list of all the objects of the given type. Each item in the list represents a single object. Each item contains:
Object ID: | This is a globally unique UUID that is automatically assigned by JourneyApps to each object. |
Attributes: | The attributes for the object. |
Relationships: | The IDs of related objects that the object belongs to (for your belongs_to relationships) (You can optionally embed the related objects directly — refer to Retrieving Related Objects). |
Photo and Signature Attributes: |
A display_attachments field that includes relative URLs for different sizes of pictures or signatures on the object (refer to the Attribute Representation section for more details).
|
Display Name: | The display name of the object as defined in the Data Model. |
Metadata: |
_updated_at — a timestamp indicating when last the object was updated by any means (e.g. from mobile device, API, data browser, etc.)
|
For the format of all the different attribute types, see the Attribute Representation section.
Also take a look at the the example below.
Example
Tip: 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).
JSON:
XML:
How do I filter these objects?
To filter the objects that you're retrieving, see the Queries section.
How do I count the number of objects?
See the Counting, Limiting and Skipping section.
Next Section:
3. Creating New Objects
Previous Section
Next Section