Rest - Contacts - Volunteers: Difference between revisions
Jump to navigation
Jump to search
(→Schema) |
m (→Purpose) |
||
Line 4: | Line 4: | ||
===Base URL=== | ===Base URL=== | ||
https://app.viewsapp.net/api/restful/contacts/volunteers | |||
===Schema=== | ===Schema=== | ||
<nowiki>https://app. | <nowiki>https://app.viewsapp.net/api/restful/contacts/volunteers/schema(.xml|.json|.xsd)</nowiki> | ||
==Fetching a volunteers record== | ==Fetching a volunteers record== |
Revision as of 13:01, 26 February 2016
Purpose
This is a read-only API for fetching volunteers regardless of whether they are Staff Volunteers or Participant Volunteers
Base URL
https://app.viewsapp.net/api/restful/contacts/volunteers
Schema
https://app.viewsapp.net/api/restful/contacts/volunteers/schema(.xml|.json|.xsd)
Fetching a volunteers record
curl --url <Base URL>/<id> -u<username>:<password> -H Content-Type:text/xml
This will return an xml file similar to this
<?xml version="1.0" encoding="utf-8"?> <volunteers id="100001"> <Nickname></Nickname> <Forename>John</Forename> <Surname>Smith</Surname> ... <Created>2011-05-09 10:26:09</Created> <CreatedBy>a.user</CreatedBy> <Updated>2011-05-09 10:26:09</Updated> <UpdatedBy>a.user</UpdatedBy> <Archived>0000-00-00 00:00:00</Archived> <ArchivedBy></ArchivedBy> <Type>1</Type> <PersonID>100001</PersonID> <TypeName>volunteers</TypeName> </volunteers>
Searching for a volunteer record
curl --url <Base URL>/search?q=<query> -u<username>:<password> -H Content-Type:text/xml
- query - This is a text string to use to search for in the volunteers records
You can search for any field for a specific value by setting the field as a parameter. Please refer to the schema for field names.
There are also a series of fields that you use -from and -to modifiers to express a range:
- DateOfBirth - yyyy-mm-dd
- Age - int (Please note that this is in days)
- Created - yyyy-mm-dd
- Updated - yyyy-mm-dd
- Archived - yyyy-mm-dd