Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 78 lines (52 sloc) 1.52 kb

Memberships

For linking users and groups together. The authenticated user needs to be an administrator to perform these actions.

For the full XML representation of memberships, check out the data reference.

Get membership

  • GET /memberships/#{id}.xml show an existing membership.

Response:

<membership>
  <id type="integer">1</id>
  <group-id type="integer">1</group-id>
  <user-id type="integer">1</user-id>
  <created-at type="datetime">2007-04-23T20:25:29Z</created-at>
  <updated-at type="datetime">2007-04-23T20:25:29Z</updated-at>
</membership>

Get memberships

  • GET /memberships.xml returns a collection of all the memberships.

Response:

<memberships>
  <membership>
    ...
  </membership>
  <membership>
    ...
  </membership>
</memberships>

Create membership

  • POST /memberships.xml creates a new membership between a user and a group.

Request:

<membership>
  <user_id type="integer">1</user_id>
  <group_id type="integer">2</group_id>
</membership>

Response:

Status: 201 Created
Location: https://example.highrisehq.com/memberships/#{new-membership-id}.xml

<membership>
  ...
</membership>

Destroy membership

  • DELETE /memberships/#{id}.xml removes the membership between the user and the group.

Response:

Status: 200 OK
Something went wrong with that request. Please try again.