Users
List
GET /api/membership.ashx/users/
Returns
Status: 200 OK
<UserList>
<User>
...
</User>
...
</User>
GET /api/membership.ashx/users/{Id}
Returns
Status: 200 OK
<User>
...
</User>
GET /api/membership.ashx/users/{user query parameters}
Returns a list of Users which match the query parameters provided on the querystring.
Status: 200 OK
<UserList>
<User>
...
</User>
...
</User>
Create
POST /api/membership.ashx/users/
Request
<User>
...
</User>
Returns
Status: 201 CREATED
<User>
...
</User>
Update
PUT /api/membership.ashx/users/{Id}
Request
<User>
...
</User>
Returns
Status: 200 OK
<User>
...
</User>
Delete
DELETE /api/membership.ashx/users/{Id}
Returns
Status: 200 OK
User Roles
List
GET /api/membership.ashx/users/{Id}/roles
Returns
Status: 200 OK
<RoleList>
<Role>
...
</Role>
...
</RoleList>
Create
POST /api/membership.ashx/users/{Id}/roles
Request
<Role> ...
</Role>
Returns
Status: 201 CREATED
<Role>
...
</Role>
Delete
DELETE /api/membership.ashx/users/{UserId}/roles/{RoleId}
Returns
Status: 200 OK
User Avatar
List
GET /api/membership.ashx/users/{Id}/avatar
Returns
Status: 302 http://localhost/cs/url/to/avatar
Create
POST /api/membership.ashx/users/{Id}/avatar
Request
[raw file]
Returns
Status: 201 http://localhost/cs/url/to/avatar
Update
PUT /api/membership.ashx/users/{Id}/avatar
Request
[raw file]
Returns
Status: 200 OK
Delete
DELETE /api/membership.ashx/users/{Id}/avatar
Returns
Status: 200 OK
User API Keys
List
GET /api/membership.ashx/users/{Id}/apikeys
Returns
Status: 200 OK
<ApiKeyList>
<ApiKey>
...
</ApiKey>
...
</ApiKeyList>
Friends
List
GET /api/membership.ashx/users/{Id}/friends/
Returns
Status: 200 OK
<FriendshipList>
<Friendship>
...
</Friendship>
...
</FriendshipList>
GET /api/membership.ashx/users/{UserId}/friends/{FriendshipId}
Returns
Status: 200 OK
<Friendship>
...
</Friendship>
Create
POST /api/membership.ashx/friends/
Request
<Friendship>
...
</Friendship>
Returns
Status: 201 CREATED
<Friendship>
...
</Friendship>
Update
PUT /api/membership.ashx/friends/{Id}
Request
<Friendship>
...
</Friendship>
Returns
Status: 200 OK
<Friendship>
...
</Friendship>
Delete
DELETE /api/membership.ashx/friends/{Id}
Returns
Status: 200 OK
Activity Messages
List
GET /api/membership.ashx/users/{Id}/activitymessages/
Returns a list of the particular user's activity messages.
Status: 200 OK
<ActivityMessageList>
<ActivityMessage>
...
</ActivityMessage>
...
</ActivityMessageList>
GET /api/membership.ashx/users/{Id}/friends/activitymessages/
Returns a list of the particular user's friend's activity messages.
Status: 200 OK
<ActivityMessageList>
<ActivityMessage>
...
</ActivityMessage>
...
</ActivityMessageList>
Data Reference
User
<User Id="2100" Endpoint="http://localhost/cs/api/membership.ashx/users/2100">
<Username>admin</Username>
<DisplayName />
<Signature />
<Biography />
<Points>0</Points>
<JoinDate>2008-04-08T08:53:01.707-07:00</JoinDate>
<TotalPosts>13</TotalPosts>
<UserRank />
<RecommendedReading />
<AvatarUrl>http://localhost/cs/api/membership.ashx/users/2100/avatar</AvatarUrl>
<Location />
<Occupation />
<Interests />
<Birthday xsi:nil="true" />
<Gender xsi:nil="true" />
<WebAddress />
<BlogAddress />
<GalleryAddress />
<PublicEmail />
<MsnIM />
<AolIM />
<YahooIM />
<IcqIM />
<Settings>
<Email>notset@localhost.com</Email>
<EnableEmail>true</EnableEmail>
<EnableNotifications>true</EnableNotifications>
<EnableHtmlEmail>true</EnableHtmlEmail>
<EnableAvatar>true</EnableAvatar>
<EnableCollapsingPanels>true</EnableCollapsingPanels>
<EnableDisplayInMemberList>false</EnableDisplayInMemberList>
<EnableDisplayName>true</EnableDisplayName>
<EnablePrivateMessages>false</EnablePrivateMessages>
<EnableUserAvatars>true</EnableUserAvatars>
<EnableUserSignatures>true</EnableUserSignatures>
<PostSortOrder>Ascending</PostSortOrder>
<FontSize>0</FontSize>
<EnablePostMouseOverPopup>false</EnablePostMouseOverPopup>
<EnableEmoticons>true</EnableEmoticons>
<EnableHelpTipsInControlPanel>true</EnableHelpTipsInControlPanel>
<ItemsPerPageInControlPanel>10</ItemsPerPageInControlPanel>
<TimeZone>0</TimeZone>
<DateFormat>ddd, MMM d yyyy</DateFormat>
</Settings>
<Roles>http://localhost/cs/api/membership.ashx/users/2100/roles/</Roles>
<Status>
<AccountStatus>Approved</AccountStatus>
<BannedUntil>2008-04-24T11:37:46.901-07:00</BannedUntil>
<BanReason>Other</BanReason>
<IsBanned>false</IsBanned>
<ForceLogin>false</ForceLogin>
<IsAvatarApproved>true</IsAvatarApproved>
<IsIgnored>false</IsIgnored>
<IsModerated>true</IsModerated>
<LastAction />
<LastActivity>2008-04-24T10:57:07.087</LastActivity>
<LastLogin>2008-04-24T11:35:15.98-07:00</LastLogin>
<MinimumTotalPosts>13</MinimumTotalPosts>
</Status>
<Friends Endpoint="http://localhost/cs/api/membership.ashx/users/2100/friends" />
<Announcements Endpoint="http://localhost/cs/api/membership.ashx/users/2100/announcements/" />
<Comments Endpoint="http://localhost/cs/api/membership.ashx/users/2100/comments/" />
<Conversations Endpoint="http://localhost/cs/api/membership.ashx/users/2100/conversations/" />
<ActivityMessages Endpoint="http://localhost/cs/api/membership.ashx/users/2100/activitymessages/" />
</User>
Role
<Role Id="0d8ee244-eea3-4f80-ae50-88ca05214915" Name="Everyone">
<Description>Do not add users to this role. This role exists only for permission mapping. All anonymous and registered users are automatically part of this role.</Description>
</Role>
ApiKey
<ApiKey>
<Id>1</Id>
<Value>9haubfsm</Value>
<Name>test</Name>
<DateCreated>2008-04-09T08:04:51.793</DateCreated>
<Enabled>true</Enabled>
<UserId>2100</UserId>
</ApiKey>
Friendship
<Friendship xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="1" Endpoint="http://localhost/cs/api/membership.ashx/friends/1">
<FriendshipState>Approved</FriendshipState>
<RequestMessage><p>&nbsp;</p></RequestMessage>
<Requestor Id="2100" Endpoint="http://localhost/cs/api/membership.ashx/users/2100" />
<Requestee Id="2102" Endpoint="http://localhost/cs/api/membership.ashx/users/2102" />
<CreatedDate>2008-04-24T12:08:49.653</CreatedDate>
<LastModifiedDate>2008-04-24T12:13:20.123</LastModifiedDate>
</Friendship>
ActivityMessage
<ActivityMessage>
<Id>480ca9fb-53ce-45b2-bcc8-afa82e3e73e3</Id>
<Author Id="2100" Endpoint="http://localhost/cs/api/membership.ashx/users/2100" />
<Body><a href="/members/admin/default.aspx">admin</a> replied to <a href="/forums/p/4/12.aspx#12">dsfsdfs</a> in <a href="/forums/7.aspx">Sample Group</a>.</Body>
<DateCreated>2008-04-17T09:08:25.967</DateCreated>
<Type>NewForumPost</Type>
</ActivityMessage>
Query Reference
Query properties are key value pairs separated by a semicolon. Arrays should be formatted as comma separated strings.
User Query
| Property | Type | Description |
| Ids |
int[] |
The User Ids you wish to include in your search |
| Usernames |
string[] |
The usernames you wish to include in your search |
| Role |
string |
A particular role name you would like to filter by |
| AccountStatus |
string |
The user account status to filter by. approvalpending, approved, banned, disapproved (defaults to approved) |
| JoinDate |
DateTime |
A date used to filter users by their join date |
| EmailAddress |
string |
An email address to search by |