Rest - Work - Session Groups - Participants: Difference between revisions

From Views API Documentation
Jump to navigation Jump to search
(Created page with "==Purpose== Used for administering participant registrations on session groups in the Views system. ===Base URL=== <nowiki>http://app.views.coop/api/restful/work/sessiongrou...")
 
No edit summary
Line 9: Line 9:
'''Note:''' If the Session Group has been archived, this API becomes read only.''
'''Note:''' If the Session Group has been archived, this API becomes read only.''


===Getting the list of participants===
==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 43: Line 43:
  </sessiongroup>
  </sessiongroup>


===Adding participants to a session group===
==Adding participants to a session group==
You can add a single participant via the following:
You can add a single participant via the following:
  curl --url <Base URL>/<pid> -u<username>:<password> -H Content-Type:text/xml -X PUT
  curl --url <Base URL>/<pid> -u<username>:<password> -H Content-Type:text/xml -X PUT
Line 57: Line 57:
  </participants>
  </participants>


===Removing participants from a session group===
==Removing participants from a session group==
You can remove a single participant from a session group via the following:
You can remove a single participant from a session group 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:23, 19 June 2012

Purpose

Used for administering participant registrations on session groups in the Views system.

Base URL

http://app.views.coop/api/restful/work/sessiongroups/<sid>/participants

  • sid - This is the id of the session group

Note: If the Session Group has been archived, this API becomes read only.

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 wit the session group, similar to the following:

<sessiongroup id="7">
    <participants>
        <participant id="123">
            <Name>Jane Smith</Name>
            <Type>1</Type>
            <Attended/>
            <FirstAttended/>
            <Nickname/>
            <Forename>Jane</Forename>
            <Surname>Smith</Surname>
            ...
            <EngagmentLevel>0</EngagmentLevel>
            <EngagmentLevelName>Not Set</EngagmentLevelName>
        </participant>
        <participant id="102">
            <Name>John Smith</Name>
            <Type>1</Type>
            <Attended/>
            <FirstAttended/>
            <Nickname/>
            <Forename>john</Forename>
            <Surname>Smith</Surname>
            ...
            <EngagmentLevel>0</EngagmentLevel>
            <EngagmentLevelName>Not Set
            </EngagmentLevelName>
        </participant>
    <participants>
</sessiongroup>

Adding participants to a session group

You can add a single participant via the following:

curl --url <Base URL>/<pid> -u<username>:<password> -H Content-Type:text/xml -X PUT
  • pid - The ID of the participant to add

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
<participants>
    <participant>101162</participant>
    <participant>103124</participant>
    <participant>103413</participant>
</participants>

Removing participants from a session group

You can remove a single participant from a session group 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 group 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>