Rest - Work - Session Groups - Session Participants: Difference between revisions
(Created page with "==Purpose== Used for administering participation by participants at sessions in the Views system. ===Base URL=== <nowiki>http://app.views.coop/api/restful/work/sessiongroups...") |
No edit summary |
||
Line 7: | Line 7: | ||
* '''sid''' - This is the id of the session group | * '''sid''' - This is the id of the session group | ||
==Getting the list of participants== | |||
curl --url <Base URL> -u<username>:<password> -H Content-Type:text/xml | curl --url <Base URL> -u<username>:<password> -H Content-Type:text/xml | ||
Line 26: | Line 26: | ||
</sessiongroup> | </sessiongroup> | ||
==Adding a single participant to a session== | |||
You can add a single participant via the following: | You can add a single participant via the following: | ||
curl --url <Base URL> -u<username>:<password> -H Content-Type:text/xml -X PUT | curl --url <Base URL> -u<username>:<password> -H Content-Type:text/xml -X PUT | ||
Line 37: | Line 37: | ||
The value for Attended is either 1 or 0, 1 = Attended. This is optional and will default to 0, unless the session has started, in which case the default is 1. | The value for Attended is either 1 or 0, 1 = Attended. This is optional and will default to 0, unless the session has started, in which case the default is 1. | ||
==Adding multiple participants to a session== | |||
You can also upload a a list of participants to add to the session register via the following URL | You can also upload a a list of participants to add to the session register via the following URL | ||
curl --url <Base URL> -u<username>:<password> -H Content-Type:text/xml -X PUT | curl --url <Base URL> -u<username>:<password> -H Content-Type:text/xml -X PUT | ||
Line 58: | Line 58: | ||
</participants> | </participants> | ||
==Removing participants from a session== | |||
You can remove a single participant from a session via the following: | You can remove a single participant from a session via the following: | ||
curl --url <Base URL>/<pid> -u<username>:<password> -H Content-Type:text/xml -X DELETE | curl --url <Base URL>/<pid> -u<username>:<password> -H Content-Type:text/xml -X DELETE |
Revision as of 14:20, 19 June 2012
Purpose
Used for administering participation by participants at sessions in the Views system.
Base URL
http://app.views.coop/api/restful/work/sessiongroups/sessions/<sid>/participants
- sid - This is the id of the session group
Getting the list of participants
curl --url <Base URL> -u<username>:<password> -H Content-Type:text/xml
This will return a list of participants that are associated with a session, similar to the following:
<session id="7"> <participants> <participant id="123"> <Name>Jane Smith</Name> <ContactType>Individual</ContactType> <Attended>0</Attended> </participant> <participant id="102"> <Name>John Smith</Name> <ContactType>Individual</ContactType> <Attended>1</Attended> </participant> <participants> </sessiongroup>
Adding a single participant to a session
You can add a single participant via the following:
curl --url <Base URL> -u<username>:<password> -H Content-Type:text/xml -X PUT
<participant> <ContactID>101457</ContactID> <Attended>0</Attended> </participant>
The value for Attended is either 1 or 0, 1 = Attended. This is optional and will default to 0, unless the session has started, in which case the default is 1.
Adding multiple participants to a session
You can also upload a a list of participants to add to the session register via the following URL
curl --url <Base URL> -u<username>:<password> -H Content-Type:text/xml -X PUT
This can be useful for setting a register of attending participants.
<participants> <participant> <ContactID>101457</ContactID> <Attended>0</Attended> </participant> <participant> <ContactID>457</ContactID> <Attended>1</Attended> </participant> <participant> <ContactID>57</ContactID> <Attended>1</Attended> </participant> </participants>
Removing participants from a session
You can remove a single participant from a session via the following:
curl --url <Base URL>/<pid> -u<username>:<password> -H Content-Type:text/xml -X DELETE
- pid - The ID of the participant to add
You can also upload a a list of participants to remove from the session via the following URL
curl --url <Base URL> -u<username>:<password> -H Content-Type:text/xml -X DELETE
<participants> <participant>101162</participant> <participant>103124</participant> <participant>103413</participant> </participants>