Rest - Work - Session Groups - Session Staff
Jump to navigation
Jump to search
Purpose
Used for administering participation by staff at sessions in the Views system.
Base URL
https://app.viewsapp.net/api/restful/work/sessiongroups/sessions/<sid>/staff
- sid - This is the id of the session group
Getting the list of staff
curl --url <Base URL> -u<username>:<password> -H Content-Type:text/xml
This will return a list of staff that are associated with a session, similar to the following:
<session id="7"> <staff> <staff id="123"> <SessionID>25</SessionID> <SessionGroupID>7</SessionGroupID> <ContactType>Staff</ContactType> <ContactID>123</ContactID> <Name>Jane Smith</Name> <Role>Lead</Role> <Attended>0</Attended> <Volunteering></Volunteering> </staff> <staff id="102"> <SessionID>25</SessionID> <SessionGroupID>7</SessionGroupID> <ContactType>Staff</ContactType> <ContactID>102</ContactID> <Name>John Smith</Name> <Role>Assistant</Role> <Attended>1</Attended> <Volunteering>Volunteered|Made Coffee</Volunteering> </staff> <staff> </sessiongroup>
Adding Staff to a session
Adding a single staff to a session
You can add a single staff record via the following:
curl --url <Base URL> -u<username>:<password> -H Content-Type:text/xml -X PUT
<staff> <ContactID>101457</ContactID> <Attended>0</Attended> <Role>Assistant</Role> <Volunteering>Volunteered|Made Coffee</Volunteering> </staff>
- 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.
- Role - This is optional, but can contain a value of Lead or Assistant
- Volunteering - Values should be pipe(|) delimited. This is optional, but will clear volunteering for the member of staff for that session.
Adding multiple staff to a session
You can also upload a a list of staff 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 staff.
<staff> <staff> <ContactID>101457</ContactID> <Attended>0</Attended> <Role>Lead</Role> </staff> <staff> <ContactID>457</ContactID> <Attended>1</Attended> <Role>Assistant</Role> <Volunteering>Volunteered|Made Coffee</Volunteering> </staff> <staff> <ContactID>57</ContactID> <Attended>1</Attended> <Role></Role> <Volunteering>Cleaned up</Volunteering> </staff> </staff>
Please note: This will replace all existing participant data for the session
Removing staff from a session
You can remove a single staff record 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 staff to add
You can also upload a a list of staff to remove from the session via the following URL
curl --url <Base URL> -u<username>:<password> -H Content-Type:text/xml -X DELETE
<staff> <staff>101162</staff> <staff>103124</staff> <staff>103413</staff> </staff>