GET /api/v1/properties/[property_id]/elements.json

Returns a collection of elements, filtered and/or sorted as specified.

See Element for details on an element's response.


        "body": "Welcome to Sapwood's documentation! ...",
        "created_at": "2016-12-09T14:44:39.990Z",
        "description": "Welcome to Sapwood! ...",
        "id": 1,
        "name": "Overview",
        "position": "1",
        "slug": "overview",
        "template_name": "Documentation:Guide",
        "title": "Overview",
        "updated_at": "2016-12-10T16:57:37.807Z"
        "body": "We know, we know, we know ...",
        "created_at": "2016-12-10T16:56:53.210Z",
        "description": "We created Sapwood because ...",
        "id": 2,
        "name": "Philosophy",
        "position": "2",
        "slug": "philosophy",
        "template_name": "Documentation:Guide",
        "title": "Philosophy",
        "updated_at": "2016-12-10T18:35:12.220Z"

Required Parameters:


The property's API key.

Optional Parameters:

includes (Default: nil)

Include associations in the response. Note that direct associations will be returned automatically, but indirect associations must be specified.

If you wish to include more than one association they should be comma-separated.

Note: The template option must be specified for this to work.

sort_by (Default: title)

An attribute by which to sort the responses. It's highly recommended that you include the template option with sort_by to ensure that all elements returned respond to the attribute you use.

If left blank, the elements are sorted by title, which is set by their template's primary field.

sort_in (Default: asc)

The direction in which to sort the collection, as either asc or desc. Because asc is the default, you really only need to use this option if you wish to sort in descending order.

template (Default: nil)

Filter the collection to elements of a specific template or set of templates. This should be set to the title of the template. If using multiple templates, they should be comma-separated.