Overview

public. Add or modify a user

Uri Parameters

None

Query Parameters
NameTypeDescription
accountpasswordstring?Account password to set (default: do not set/change password)
authenticatebool?Force authentication for request (default: false)
authpasswordstring?Password to use for verification with external authentication service
authusernamestring?Username to use for verification with external authentication service
Return Codes
NameValueDescription
BadRequest400Invalid input parameter or request body
Conflict409Username conflicts with an existing username
Forbidden403Administrator access, apikey, or account owner is required
NotFound404Requested user could not be found
Ok200The request completed successfully

Message Format

Input: 

<user id="{int}">
    <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

If no user ID is specified, a new user is created.  Otherwise, the existing user is updated. 

Note that is not possible to create two users having the same username. It is also not possible to modify a username to one that already exists.
 

Code Samples

C# Samples

 

Curl Samples

 

PHP Samples

 

Other Code Samples

 

Tag page (Edit tags)
    You must login to post a comment.