Foundry API

<back to all web services

SearchAllUsersRequest

Requires Authentication
The following routes are available for this service:
GET/users/all

export class GetOperationUnTenanted<TResponse> implements IHasGetOptions, IGet
{
    public embed?: string;

    public constructor(init?: Partial<GetOperationUnTenanted<TResponse>>) { (Object as any).assign(this, init); }
}

export class SearchOperationUnTenanted<TResponse> extends GetOperationUnTenanted<TResponse> implements IHasSearchOptions
{
    public distinct?: string;
    public limit?: number;
    public offset?: number;
    public sort?: string;
    public filter?: string;

    public constructor(init?: Partial<SearchOperationUnTenanted<TResponse>>) { super(init); (Object as any).assign(this, init); }
}

export class SearchOperationTenanted<TResponse> extends SearchOperationUnTenanted<TResponse> implements ITenantedRequest
{
    public organisationId?: string;

    public constructor(init?: Partial<SearchOperationTenanted<TResponse>>) { super(init); (Object as any).assign(this, init); }
}

export enum AccountStatus
{
    Shadowed = 'Shadowed',
    Registered = 'Registered',
}

export enum AccountType
{
    Person = 'Person',
    Machine = 'Machine',
}

export class UserAccountMembership implements IIdentifiableResource
{
    public userId?: string;
    public userEmailAddress?: string;
    public status: AccountStatus;
    public type: AccountType;
    public roles?: string[];
    public id?: string;
    public organisationId?: string;

    public constructor(init?: Partial<UserAccountMembership>) { (Object as any).assign(this, init); }
}

export class UserDetails extends UserAccountMembership
{
    public lastLoginDate?: string;
    public twoFactorEnabled: boolean;
    public name?: string;

    public constructor(init?: Partial<UserDetails>) { super(init); (Object as any).assign(this, init); }
}

export class SearchAllUsersResponse
{
    public responseStatus?: ResponseStatus;
    public userDetails?: UserDetails[];

    public constructor(init?: Partial<SearchAllUsersResponse>) { (Object as any).assign(this, init); }
}

export class SearchAllUsersRequest extends SearchOperationTenanted<SearchAllUsersResponse>
{

    public constructor(init?: Partial<SearchAllUsersRequest>) { super(init); (Object as any).assign(this, init); }
}

TypeScript SearchAllUsersRequest 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 /users/all HTTP/1.1 
Host: foundrystage-api-app.azurewebsites.net 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	},
	userDetails: 
	[
		{
			lastLoginDate: ,
			twoFactorEnabled: False,
			name: String,
			userId: String,
			userEmailAddress: String,
			status: Shadowed,
			type: Person,
			roles: 
			[
				String
			],
			id: String,
			organisationId: String
		}
	]
}