Members

The Members service is used for managing Umbraco Members. All requests to the Members service must be authenticated with a user account with permissions to modify the Umbraco Members section.

GET /rest/members?username={username}&role={role}&membertypealias={membertypealias}

Get's a list of members, filtered by the optional Username, Role and/or Member Type Alias.

Response
Returns a '200 OK' status code.

Content Type: application/json

[
    {
        "Id" : 1234,
        "Name" : "Member Name",
        "MemberTypeAlias" : "Member Type Alias",
        ...
    },
    {
        "Id" : 1235,
        "Name" : "Member Name",
        "MemberTypeAlias" : "Member Type Alias",
        ...
    }
]

GET /rest/members/{id}

Gets a single member identified by its integer ID.

Response
Returns a '200 OK' status code.

Content Type: application/json

{
    "Id" : 1234,
    "Name" : "Member Name",
    "MemberTypeAlias" : "Member Type Alias",
    ...
}

GET /rest/members/{username}

Gets a single member identified by its string Username.

Response
Returns a '200 OK' status code.

Content Type: application/json

{
    "Id" : 1234,
    "Name" : "Member Name",
    "MemberTypeAlias" : "Member Type Alias",
    ...
}

POST /rest/members

Creates a new member.

Request

Content Type: application/json

{
    "Name" : "Member Name",
    "MemberTypeAlias" : "Member Type Alias",
    ...
}
Response
Returns a '201 Created' status code.

Content Type: application/json

{
    "Id" : 1234,
    "Name" : "Member Name",
    "MemberTypeAlias" : "Member Type Alias",
    ...
}

PUT /rest/members/{id}

Updates an existing member identified by its integer ID.

Request

Content Type: application/json

{
    "Name" : "Member Name",
    "MemberTypeAlias" : "Member Type Alias",
    ...
}
Response
Returns a '201 Created' status code.

Content Type: application/json

{
    "Id" : 1234,
    "Name" : "Member Name",
    "MemberTypeAlias" : "Member Type Alias",
    ...
}

PUT /rest/members/{username}

Updates an existing member identified by its string Username.

Request

Content Type: application/json

{
    "Name" : "Member Name",
    "MemberTypeAlias" : "Member Type Alias",
    ...
}
Response
Returns a '201 Created' status code.

Content Type: application/json

{
    "Id" : 1234,
    "Name" : "Member Name",
    "MemberTypeAlias" : "Member Type Alias",
    ...
}

DELETE /rest/members/{id}

Deletes a member identified by its integer ID.

Response
Returns a '204 No Content' status code.

DELETE /rest/members/{username}

Deletes a member identified by its string Username.

Response
Returns a '204 No Content' status code.

Resources

Member

{
    "Id" : 1234,
    "Href" : "http://www.yoursite.com/rest/member/1234",
    "DisplayName" : "Member Display Name",
    "Username" : "Member Username",
    "Password" : "Members Password",
    "Token" : "Members Token",
    "Email" : "Members Email Address",
    "MemberTypeAlias" : "Member Type Alias",
    "Roles" : [
        "Role Name",
        ...
    ],
    "Properties" : [
        {
            "Key" : "Property Key",
            "Value" : "Property Value"   
        },
        ...
    ]
}

Last edited Dec 20, 2010 at 9:17 AM by mattbrailsford, version 14

Comments

No comments yet.