Requires any of the roles: | SystemAdministrator, Manager |
PATCH | /users/{userId} |
---|
namespace Voice.Api.Authentication
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
type DashboardPermissions =
| ViewFiles = 0
| ViewNotifications = 1
| ViewSessions = 2
| ViewEndpoints = 3
| ViewReports = 4
| ViewCustomers = 5
| ViewFlows = 6
[<AllowNullLiteral>]
type UserInfo() =
member val Id:String = null with get,set
member val IsAuthenticated:Boolean = new Boolean() with get,set
member val FirstName:String = null with get,set
member val LastName:String = null with get,set
member val Name:String = null with get,set
member val AvatarUrl:String = null with get,set
member val EmailAddress:String = null with get,set
member val Roles:ResizeArray<String> = null with get,set
member val AccountIds:ResizeArray<String> = null with get,set
member val AccountNames:ResizeArray<String> = null with get,set
member val DashboardPermissions:ResizeArray<DashboardPermissions> = null with get,set
///<summary>
///Update the specified login
///</summary>
[<Api(Description="Update the specified login")>]
[<AllowNullLiteral>]
type PatchUser() =
interface IPatch
///<summary>
///The account IDs that this user has access to
///</summary>
[<ApiMember(Description="The account IDs that this user has access to")>]
member val AccountIds:ResizeArray<String> = null with get,set
///<summary>
///The ID of the user
///</summary>
[<ApiMember(Description="The ID of the user")>]
member val UserId:String = null with get,set
///<summary>
///The user's first name
///</summary>
[<ApiMember(Description="The user's first name")>]
member val FirstName:String = null with get,set
///<summary>
///The user's last name
///</summary>
[<ApiMember(Description="The user's last name")>]
member val LastName:String = null with get,set
///<summary>
///The new password for the user (leave null to not change)
///</summary>
[<ApiMember(Description="The new password for the user (leave null to not change)")>]
member val NewPassword:String = null with get,set
///<summary>
///The roles to associate with the login. Can only specify if system admin
///</summary>
[<ApiMember(Description="The roles to associate with the login. Can only specify if system admin")>]
member val Roles:ResizeArray<String> = null with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PATCH /users/{userId} HTTP/1.1
Host: team.evovoice.io
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
accountIds:
[
String
],
userId: String,
firstName: String,
lastName: String,
newPassword: String,
roles:
[
String
]
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { id: String, isAuthenticated: False, firstName: String, lastName: String, name: String, avatarUrl: String, emailAddress: String, roles: [ String ], accountIds: [ String ], accountNames: [ String ], dashboardPermissions: [ ViewFiles ] }