_bool`name:"registerUserKeys" description:"This command allows a user to register for the developer API, returning a secret key and an API key. This request is made through the integration API port, so it is a privileged command and must be made on behalf of a user. It is up to the implementer just how the username and password are entered, and then how that translates to an integration API request. Both secret key and API key should be returned to the user"`
Accountstring`json:"account" doc:"Creates the user under the specified account. If no account is specified, the username will be used as the account name."`
Emailstring`json:"email" doc:"email"`
FirstNamestring`json:"firstname" doc:"firstname"`
LastNamestring`json:"lastname" doc:"lastname"`
Passwordstring`json:"password" doc:"Clear text password (Default hashed to SHA256SALT). If you wish to use any other hashing algorithm, you would need to write a custom authentication adapter See Docs section."`
DomainID*UUID`json:"domainid,omitempty" doc:"Creates the user under the specified domain. Has to be accompanied with the account parameter"`
Timezonestring`json:"timezone,omitempty" doc:"Specifies a timezone for this command. For more information on the timezone parameter, see Time Zone Format."`
UserID*UUID`json:"userid,omitempty" doc:"User UUID, required for adding account from external provisioning system"`
_bool`name:"createUser" description:"Creates a user for an account that already exists"`
Passwordstring`json:"password,omitempty" doc:"Clear text password (default hashed to SHA256SALT). If you wish to use any other hashing algorithm, you would need to write a custom authentication adapter"`
Timezonestring`json:"timezone,omitempty" doc:"Specifies a timezone for this command. For more information on the timezone parameter, see Time Zone Format."`
UserAPIKeystring`json:"userapikey,omitempty" doc:"The API key for the user. Must be specified with userSecretKey"`
UserSecretKeystring`json:"usersecretkey,omitempty" doc:"The secret key for the user. Must be specified with userApiKey"`
_bool`name:"updateUser" description:"Updates a user account"`
}
func(UpdateUser)response()interface{}{
returnnew(User)
}
// ListUsers represents the search for Users
typeListUsersstruct{
Accountstring`json:"account,omitempty" doc:"list resources by account. Must be used with the domainId parameter."`
AccountTypeint64`json:"accounttype,omitempty" doc:"List users by account type. Valid types include admin, domain-admin, read-only-admin, or user."`
DomainID*UUID`json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"`
ID*UUID`json:"id,omitempty" doc:"List user by ID."`
IsRecursivebool`json:"isrecursive,omitempty" doc:"defaults to false, but if true, lists all resources from the parent specified by the domainId till leaves."`
Keywordstring`json:"keyword,omitempty" doc:"List by keyword"`
ListAllbool`json:"listall,omitempty" doc:"If set to false, list only resources belonging to the command's caller; if set to true - list resources that the caller is authorized to see. Default value is false"`
Pageint`json:"page,omitempty"`
PageSizeint`json:"pagesize,omitempty"`
Statestring`json:"state,omitempty" doc:"List users by state of the user account."`
Usernamestring`json:"username,omitempty" doc:"List user by the username"`
_bool`name:"listUsers" description:"Lists user accounts"`
}
// ListUsersResponse represents a list of users
typeListUsersResponsestruct{
Countint`json:"count"`
User[]User`json:"user"`
}
func(ListUsers)response()interface{}{
returnnew(ListUsersResponse)
}
// DeleteUser deletes a user for an account
typeDeleteUserstruct{
ID*UUID`json:"id" doc:"id of the user to be deleted"`
_bool`name:"deleteUser" description:"Deletes a user for an account"`