Get login audit report

This endpoint is used to retrieve the login history details of users.

Leave Feedback

URL

GET https://{api-url}/api/v2/tenants/{tenantId}/users/loginHistory/search

Sample URLs

https://{api-url}/api/v2/tenants/client_93/users/loginHistory/search?pageSize=2&queryString=userId:USR0000000029+startLoginDate:2014-12-12T01:13:12 0000+endLoginDate:2015-12-12T01:13:12 0000
https://{api-url}/api/v2/tenants/msp_92/users/loginHistory/search?pageSize=2&queryString=userId:USR0000000055+startLoginDate:2014-12-12T01:13:12 0000+endLoginDate:2015-12-12T01:13:12 0000

Parameters

All of the parameters are optional:

FieldDefault Value
pageNo={pageNo}1
pageSize={pageSize}100
isDescendingOrder={true/false}true
sortName={field}id
queryString={queryString}NA

NA indicates that the value is not applicable.

Query variables

Query VariablesDescription
idUser ID.
loginNameUser login name.
startLoginDateSearch for the users who logged in within a specific duration.startLoginDate denotes the from date.
endLoginDateSearch for the users who logged in within a specific duration.endLoginDate denotes the to date.
startLogoutDateSearch for the users who logged out within a specific duration.startLogoutDate denotes the from date.
endLogoutDateSearch for the users who logged out within a specific duration.endLogoutDate denotes the to date.

Sample response

{
	"results" : [
		{
			"id" : 12716,
			"partner" : {
				"id" : 92,
				"uniqueId" : "msp_92",
				"name" : "Brocade Inc",
				"activated" : true
			},
			"client" : {
				"id" : 93,
				"uniqueId" : "client_93",
				"name" : "Brocade Lab",
				"activated" : true
			},
			"user" : {
				"id" : "USR0000002114",
				"loginName" : "John.Smith",
				"lastName" : "Smith",
				"firstName" : "John",
				"email" : "John.Smith@organization.com",
				"changePassword" : false
			},
			"sourceIp" : "127.0.0.1",
			"sourceHost" : "127.0.0.1",
			"sessionId" : "DD8288A5906A694C67C982ADF0E54750",
			"status" : "Logged Out",
			"loginType" : "Success",
			"logoutType" : "Normal",
			"loginTime" : "2016-01-28T07:58:54+0000",
			"logoutTime" : "2016-01-28T09:59:57+0000"
		},
		{
			"id" : 12709,
			"partner" : {
				"id" : 92,
				"uniqueId" : "msp_92",
				"name" : "Brocade Inc",
				"activated" : true
			},
			"client" : {
				"id" : 93,
				"uniqueId" : "client_93",
				"name" : "Brocade Lab",
				"activated" : true
			},
			"user" : {
				"id" : "USR0000002114",
				"loginName" : "James.Scott",
				"lastName" : "Scott",
				"firstName" : "James",
				"email" : "james.scott@organization.com",
				"changePassword" : false
			},
			"sourceIp" : "127.0.0.1",
			"sourceHost" : "127.0.0.1",
			"sessionId" : "1BC85D994F8B2919A24BCE82D61D8AEB",
			"status" : "Logged Out",
			"loginType" : "Success",
			"logoutType" : "Normal",
			"loginTime" : "2016-01-25T07:01:11+0000",
			"logoutTime" : "2016-01-25T07:01:31+0000"
		}
	],
	"totalResults" : 94,
	"orderBy" : "id",
	"pageNo" : 1,
	"pageSize" : 2,
	"totalPages" : 47,
	"nextPage" : true,
	"nextPageNo" : 2,
	"previousPageNo" : 0,
	"descendingOrder" : true
}