Views support for the Services module version 3.x and later.
It has currently two features:
- Create view based resource creating Services display in a view
- Execute any view of the system via views resource call
Demo video http://youtu.be/DZEhJKMeR5w
Create view based resource creating Services display in a view
In any view you can create "Services" display (can only support one display per view). It has only one option setting -- path. That will be the name of your resource. After enabling that resource you would be able to do call to
http://example.com/<endpoint path>/<resource name>
This will execute a view and output results. You can create exposed filters and pass them to your resource. For example if we created exposed filter "tags" call will be:
http://example.com/<endpoint path>/<resource name>?tags=7
You can also use Services field formatter in a view that allows to retrieve full field properties (like body field will come with format, safe_value etc.).
Executing view via views resource
After enabling "views" resource in your services endpoint you can do GET request to:
http://example.com/<endpoint path>/views/<view name>
This will execute a view and pass results.
- display_id: views display
- args: array of view arguments
- filters: array of view filter values
- offset: views offset
- limit: limit views number of results
- format_output: boolean whether we would like to get themed view or data
Example of calls:
- Maintenance status: Actively maintained
- Development status: Under active development
- Reported installs: 9,396 sites currently report using this module. View usage statistics.
- Downloads: 64,396
- Last modified: December 2, 2014
- Stable releases are covered by the security advisory policy.
Look for the shield icon below.