Was this page helpful?

PUT:users/{userid}

    Overview



    public. Modify an existing user

    Uri Parameters
    Name Type Description
    userid string either an integer user ID, "current", or "=" followed by a double uri-encoded user name
    Query Parameters
    Name Type Description
    authenticate bool? Force authentication for request (default: false)
    authpassword string? Password to use for verification with external authentication service
    authusername string? Username to use for verification with external authentication service
    Return Codes
    Name Value Description
    BadRequest 400 Invalid input parameter or request body
    Conflict 409 Username conflicts with an existing username
    Forbidden 403 Administrator access or account owner is required
    NotFound 404 Requested user could not be found
    Ok 200 The request completed successfully

    Message Format

    Input: 

    <user>
        <username>{text}</username> 
        <email>{text}</email> 
        <fullname>{text}</fullname> 
        <status>{active|inactive}</status> 
        <service.authentication id="{int}" /> 
        <permissions.user> 
            <role>{text}</role> 
        </permissions.user> 
    </user>

    Output: 

    <user id="{int}" href="{uri}">
        <nick>{text}</nick> 
        <username>{text}</username> 
        <email>{text}</email> 
        <page.home id="{int}" href="{int}">
            <title>{text}</title> 
            <path>{text}</path> 
        </page.home>
        <fullname>{text}</fullname> 
        <status>{active|inactive}</status> 
        <date.lastlogin>{date}</date.lastlogin> 
        <service.authentication id="{int}" href="{uri]" /> 
        <permissions.user>
            <operations mask="{int}">{text}</operations> 
            <role id="{int}" href="{uri}">{text}</role> 
        </permissions.user>
        <permissions.effective>
            <operations mask="{int}">{text}</operations> 
        </permissions.effective>
        <groups count="{int}" href="{uri}">  
            <group id="{int}" href="{uri}">  
                <name>{text}</name>   
                <service.authentication id="{int}" href="{uri}" />   
                <users count="{int}" href="{uri}" />   
                <permissions.group>  
                    <operations mask="{int}">{text}</operations>   
                    <role id="{int}" href="{uri}">{text}</role>   
                </permissions.group>  
            </group>  
        ...
        </groups> 
    </user>

    Implementation Notes

    Note that it is not possible to modify an existing user's authentication service. 

    Use PUT:users/{userid}/password to change the user password.

    Code Samples

    C# Samples

     

    Curl Samples

     

    PHP Samples

     

    Other Code Samples

     

    Was this page helpful?
    Tag page
    Viewing 3 of 3 comments: view all
    Since there is a specific api that update user password (http://developer.mindtouch.com/Deki/API_Reference/PUT:users//%7Buserid%7D//password) I think the query parameter accountpassword doesn't work anymore.
    Posted 04:05, 21 Feb 2011
    @intertesto it's still used to create/update and set the password for a user in a single operation
    Posted 11:35, 21 Feb 2011
    Thank you, but I tested again and it doesn't work, I opened a bug http://youtrack.developer.mindtouch.com/issue/MT-9774
    Posted 03:55, 23 Feb 2011
    Viewing 3 of 3 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by