Trendsic Platform Service

<back to all web services

GetUsersByRoleId

Requires Authentication
The following routes are available for this service:
GET/v1/roles/{RoleId}/users
import Foundation
import ServiceStack

public class GetUsersByRoleId : Codable
{
    public var roleId:Int

    required public init(){}
}

public class GetUsersByRoleIdResponse : Codable
{
    public var users:[UserSummary] = []
    public var responseStatus:ResponseStatus

    required public init(){}
}

public class UserSummary : Codable
{
    public var userId:String
    public var userName:String
    public var email:String
    public var createdUtc:Date?
    public var lastActivityUtc:Date?
    public var firstName:String
    public var lastName:String
    public var displayName:String

    required public init(){}
}


Swift GetUsersByRoleId DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/roles/{RoleId}/users HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Users: 
	[
		{
			UserId: 00000000000000000000000000000000,
			UserName: String,
			Email: String,
			CreatedUtc: 0001-01-01,
			LastActivityUtc: 0001-01-01,
			FirstName: String,
			LastName: String,
			DisplayName: String String
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}