Current User REST Reference

/currentUser

Methods

GET

Gets the Current User.

Fields Parameter
Expand

The fields parameter should be specified along the query string, and it takes the syntax

    ?fields=<field>,...

NOTE: The 'userPrefs' field duplicates the 'preferences' field.

Allowed Fields

*id
**username
**firstname
**lastname
**status
role
title
email
address
city
state
country
phone
fax
createdTime
modifiedTime
lastLogin
lastLoginIP
mustChangePassword
locked
failedLogins
authType
fingerprint
password
description
managedUsersGroups
managedObjectsGroups
userPrefs
preferences
orgName
ldapUsername
ldap

Session user is not role "1" (Administrator)

responsibleAsset
group

Legend

* = always comes back

** = comes back if fields list not specified on GET all
Request User Parameters

None

Example Response
Administrator
Expand
{
	"type" : "regular",
	"response" : {
		"id" : "1",
		"status" : "0",
		"username" : "admin",
		"ldapUsername" : "",
		"firstname" : "Admin",
		"lastname" : "User",
		"title" : "Application Administrator",
		"email" : "",
		"address" : "",
		"city" : "",
		"state" : "",
		"country" : "",
		"phone" : "",
		"fax" : "",
		"createdTime" : "1432921843",
		"modifiedTime" : "1453473716",
		"lastLogin" : "1454350174",
		"lastLoginIP" : "172.20.0.0",
		"mustChangePassword" : "false",
		"locked" : "false",
		"failedLogins" : "0",
		"authType" : "tns",
		"fingerprint" : null,
		"password" : "SET",
		"managedUsersGroups" : [],
		"managedObjectsGroups" : [],
		"preferences" : [
			{
				"name" : "timezone",
				"value" : "America/New_York",
				"tag" : ""
			}
		],
		"orgName" : "SecurityCenter Administration",
		"userPrefs" : [
			{
				"name" : "timezone",
				"value" : "America/New_York",
				"tag" : ""
			}
		],
		"role" : {
			"id" : "1",
			"name" : "Administrator",
			"description" : "Role defining an administrator of the application"
		},
		"group" : {
			"id" : -1,
			"name" : "",
			"description" : ""
		},
		"ldap" : {
			"id" : -1,
			"name" : "",
			"description" : ""
		}
	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1454350604
}	
Organization User
Expand
{
	"type" : "regular",
	"response" : {
		"id" : "1",
		"status" : "0",
		"username" : "head",
		"firstname" : "",
		"lastname" : "",
		"title" : "",
		"email" : "",
		"address" : "",
		"city" : "",
		"state" : "",
		"country" : "",
		"phone" : "",
		"fax" : "",
		"createdTime" : "1433519288",
		"modifiedTime" : "1453477493",
		"lastLogin" : "1454349916",
		"lastLoginIP" : "172.20.0.0",
		"mustChangePassword" : "false",
		"locked" : "false",
		"failedLogins" : "0",
		"authType" : "tns",
		"fingerprint" : null,
		"password" : "SET",
		"managedUsersGroups" : [
			{
				"id" : "-1",
				"name" : "All Groups",
				"description" : "All Groups"
			}
		],
		"managedObjectsGroups" : [
			{
				"id" : "-1",
				"name" : "All Groups",
				"description" : "All Groups"
			}
		],
		"preferences" : [
			{
				"name" : "timezone",
				"value" : "America/Nome",
				"tag" : "system"
			}
		],
		"orgName" : "org2",
		"userPrefs" : [
			{
				"name" : "timezone",
				"value" : "America/Nome",
				"tag" : "system"
			}
		],
		"role" : {
			"id" : "2",
			"name" : "Security Manager",
			"description" : "The Security Manager role has full access to all actions at the organization level. A Security Manager has the ability to create new groups and manage existing ones. A Security Manager can also define how users interact with other groups.\n\nThe ability to manage other users and their objects can be configured using group permissions on the Access tab of User add/edit. This includes viewing and stopping running scans and reports."
		},
		"responsibleAsset" : {
			"id" : "19",
			"name" : "Windows Hosts",
			"description" : "The operating system detected has Windows installed.\n\nThis will be helpful for those getting started with SecurityCenter."
		},
		"group" : {
			"id" : "0",
			"name" : "Full Access",
			"description" : "Full Access group"
		}
	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1454350550
}