-
Notifications
You must be signed in to change notification settings - Fork 0
Data Feeds
Datapress provides two different Exhibit-style data feeds for you to use: one for People and one for Nodes.
The people data feeds are parameterized by the user role and accessed by the following URL, relative to your Drupal root URL:
/datapress/user/role/ROLE/json
When a role has a space in it, use a double underscore. For example, if I wanted to get a data feed for all people with the role principle investigator
, use the URL
/datapress/user/role/principle__investigator/json
The fields returned for each person by this request are:
Required Exhibit Fields:
-
id
, the User ID -
type
, always equal to User -
label
, the user name
Fields for Display:
-
uid
, the User ID -
name
, the user name -
picture-uri
, the Drupal URI for the user photo. Note: this is a weird data value, e.g.:public://pictures/picture-2322.png
-
picture-filename
, just the filename portion of thepicture-uri
-
roles
, an array of the user's roles in the Drupal site
Custom Fields:
-
custom-FIELD
, for each custom field, a property of this form is added.
The node data feeds are parameterized by the node type and accessed by the following URL, relative to your Drupal root URL:
/datapress/node/type/TYPE/json
When a role has a space in it, use a single underscore. Note that this is different than the case for Users. Blame Drupal. For example, if you wanted to get a data feed for all nodes with the type Research Topic
, you would use the URL
/datapress/node/type/Research_Topic/json
There's an exception, though. If you have configured a machine name for your type, then use that instead. You can find out the machine name for yout types by going to Structure > Content Types in the Drupal administrative interface.
The fields returned for each node by this request are:
Required Exhibit Fields:
-
id
, the node ID -
type
, e.g. Research Project -
label
, the name of the node, e.g. Cold Fusion
Fields for Display:
-
creator_picture
, A photo of the item creator, if there is one -
created
, Unix timestamp of item creation date -
body
, The body (page content) of the node -
summary
, The summary content of the node
Custom Fields:
-
custom-FIELD
, for each custom field, a property of this form is added.