Find by ID
/km/api/v1/users/{id}
This method returns a user object by a unique identifier. Currently, the unique identifiers are record Id or login.
Note: To find other user???s user object, you either must have the VIEW_USER permission or you must be an administrator of the repository. You can get your own user object information with a unique identifier even if you do not have the VIEW_USER permission.
This service does not allow account user to find contact user object using contact's login. To allow account user to find contact user object using contact's login, you have to pass a query parameter externalType with value 'CONTACT'
Example URI
The example URI for this method is as follows:
-
http://<IM_REST_API_HOST>/km/api/users/{id}
This request returns a User BO data object.
Response Errors
The possible error responses for this method are as follows:
- OK-SEC0001
The error occurs when a user does not have USER_VIEW permission but attempts to get a user object of another user.
- OKDOM-GEN0001
The error may occur when users attempts to get a user information using an invalid user id or an internal system id.
Request
-
id: string
The unique identifier of the object to be retrieved.
Response
- application/json
- application/xml
200 Response
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
UserKey-allOf[1]
object
Singular Resource
object
-
email(optional):
string
Email of the User object
-
externalId(optional):
integer
The ExternalId is the Id of the corresponding User from an external system. It, along with ExternalType, can be used to bridge the gap between a User from this system and a User from an external system.
-
externalType(optional):
string
The ExternalType is the type of the corresponding User from an external system. It, along with ExternalId, can be used to bridge the gap between a User from this system and a User from an external system.
-
name(optional):
string
User's full name
-
recordId(optional):
string
The unique record ID of the User object.
object
-
adminUser(optional):
boolean
AdminUser of the User object
-
alias(optional):
string
Alias of the User object
-
banUntilDate(optional):
string(date-time)
BanUntilDate of the User object
-
banUser(optional):
boolean
BanUser of the User object
-
canReceiveEmailNotificationsForAssignedTasks(optional):
boolean
CanReceiveEmailNotificationsForAssignedTasks of the User object
-
canReceiveEmailNotificationsForTasksICanPerform(optional):
boolean
CanReceiveEmailNotificationsForTasksICanPerform of the User object
-
dateAdded(optional):
string(date-time)
The date when the User object was created or added
-
dateModified(optional):
string(date-time)
The date when the User object was last modified.
-
defaultLocale(optional):
LocaleKey
-
firstName(optional):
string
FirstName of the User object
-
isActive(optional):
boolean
Returns whether this user is active or not. If a user is locked or inactive, this will return false * @return boolean true if user is active, false if user is locked or inactive * @since 8.3
-
isDefaultAdministrator(optional):
boolean
IsDefaultAdministrator of the User object
-
isLocked(optional):
boolean
Returns whether this user is locked or not. If a user is active or inactive, this will return false * @return boolean true if user is locked, false if user is active or inactive * @since 8.3
-
lastName(optional):
string
LastName of the User object
-
login(optional):
string
Login of the User object
-
reputationPoints(optional):
integer
ReputationPoints of the User object
-
showEmail(optional):
boolean
ShowEmail of the User object
-
showName(optional):
boolean
ShowName of the User object
-
subscribeOnTopicCreation(optional):
boolean
SubscribeOnTopicCreation of the User object
-
subscribeOnTopicReply(optional):
boolean
SubscribeOnTopicReply of the User object
-
subscriptionSchedule(optional):
integer
SubscriptionSchedule of the User object
-
userImage(optional):
string
UserImage of the User object
object
-
contentLocales(optional):
array contentLocales
To Many Relationship to Locale
-
customKeyValues(optional):
array customKeyValues
To Many Relationship to UserKeyValue
-
dataFormNotifications(optional):
array dataFormNotifications
To Many Relationship to Rating
-
defaultView(optional):
ViewKey
-
extendedProperties(optional):
string
ExtendedProperties of the User object
-
reportingUserGroup(optional):
UserGroupKey
-
securityRoles(optional):
array securityRoles
To Many Relationship to SecurityRole
-
skills(optional):
array skills
To Many Relationship to Category
-
subscriptions(optional):
array subscriptions
To Many Relationship to Subscription
-
userType(optional):
Allowed Values:
[ "CONSOLE_USER", "WEB_USER", "INTEGRATION_USER" ]
Returns the Type for this user. Valid types are WEB_USER and CONSOLE_USER -
views(optional):
array views
To Many Relationship to View
-
workTeams(optional):
array workTeams
To Many Relationship to WorkTeam
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
object
-
href:
string
URI [RFC3986] or URI Template [RFC6570]. If the value is set to URI Template, then the "templated" property must be set to true.
-
mediaType(optional):
string
Media type, as defined by RFC 2046, describing the link target.
-
method(optional):
string
HTTP method for requesting the target of the link.
-
profile(optional):
string
Link to the metadata of the resource, such as JSON-schema, that describes the resource expected when dereferencing the target resource..
-
rel:
string
Name of the link relation that, in addition to the type property, can be used to retrieve link details. For example, href or profile.
-
templated(optional):
boolean
Boolean flag that specifies that "href" property is a URI or URI Template. If the property is a URI template, set this value to true. By default, this value is false.
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
LocaleKey-allOf[1]
object
-
recordId(optional):
string
The unique identifier of the Locale object.
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
ViewKey-allOf[1]
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
UserGroupKey-allOf[1]
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
UserKeyValueKey-allOf[1]
object
-
recordId(optional):
string
The unique identifier that represents a userKeyValue resource.
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
RatingKey-allOf[1]
object
-
name(optional):
string
Localized display name for the Rating
-
recordId(optional):
string
GUID for the Rating
-
referenceKey(optional):
string
The non localized reference key for the Rating
object
-
name(optional):
string
Localized name of the view
-
recordId(optional):
string
GUID of the SITE table containing the view definition
-
referenceKey(optional):
string
Non localized reference key for the view
object
-
externalId(optional):
integer
The unique identifier of the corresponding userGroup from an external system. You can use the External ID with the ExternalType parameter to connect user groups in the internal and the the external systems.
-
externalType(optional):
string
The ExternalType is the type of the corresponding userGroup from an external system.
-
name(optional):
string
The localized name of the user group. The name field can only be used for sorting.
-
recordId(optional):
string
The unique identifier from the TAG table that represent a userGroups resource
-
referenceKey(optional):
string
The non localized name of the user group
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
SecurityRoleKey-allOf[1]
object
-
externalId(optional):
integer
The ExternalId is the Id of the corresponding role from an external system. It, along with ExternalType, can be used to bridge the gap between a security role from this system and a object from an external system. When in RightNow mode, the external Id represents the RightNow profile Id, only when the external type is set to RN_PROFILE. The external Id can also represent the RightNow access Id, only when the external type is set to RN_WEB_ROLE.
-
externalType(optional):
string
The ExternalType is the type of the corresponding role from an external system. It, along with ExternalId, can be used to bridge the gap between a security role from this system and a object from an external system. When in RightNow mode, the only types allowed are RN_PROFILE and RN_WEB_ROLE.
-
recordId(optional):
string
GUID of the SECURITYROLE table
-
referenceKey(optional):
string
Non localized name of the security role
-
roleType(optional):
Allowed Values:
[ "SITE_ADMINISTRATOR_ROLE", "SUPER_ADMIN", "SUPER_SUPPORT", "CONSOLE_ROLE", "WEB_ROLE", "INTEGRATION_ROLE" ]
Returns the Type for this security role. Valid types are web roles and console roles
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
CategoryKey-allOf[1]
object
-
childrenCount(optional):
integer
This field will return number of immediate children a category has.
This field will only be populated if childrenCount query parameter is passed in with value true.
Example URIs for the this parameter are as follows:
- http://<IM_REST_API_HOST>/km/api/categories/{id}?childrenCount=true&mode=KEY
- http://<IM_REST_API_HOST>/km/api/categories?childrenCount=true&mode=KEY
- http://<IM_REST_API_HOST>/km/api/categories?q=contentTypeRefKey eq 'FAQ'&childrenCount=true&mode=KEY
-
description(optional):
string
Description of the Category object
-
externalId(optional):
integer
The unique identifier used while integrating the repository data with the external system.
-
externalType(optional):
string
The type of the category used while integrating the repository data with the external system. Valid options are PRODUCT and CATEGORY.
-
name(optional):
string
The name of the category.
-
objectId(optional):
string
The hierarchichal position of the category
-
parents(optional):
array parents
This field will return all parents of category.
This field will only be populated if withParents query parameter is passed in with value true.
Example URIs for the this parameter are as follows:
- http://<IM_REST_API_HOST>/km/api/categories/{id}?withParents=true&mode=KEY
- http://<IM_REST_API_HOST>/km/api/categories?withParents=true&mode=KEY
- http://<IM_REST_API_HOST>/km/api/categories?q=contentTypeRefKey eq 'FAQ'&withParents=true&mode=KEY
- http://<IM_REST_API_HOST>/km/api/categories/{id}?childrenCount=true&withParents=true&mode=KEY
-
recordId(optional):
string
The unique record ID of the Category object.
-
referenceKey(optional):
string
The reference key for the Category object. Category objects support multiple languages. This field can be used to identify the associated objects for all languages.
-
responseLocale(optional):
string
This is a custom field that will get populated if a name is translated into the default locale when the translated name is not found.
array
This field will return all parents of category.
This field will only be populated if withParents query parameter is passed in with value true.
Example URIs for the this parameter are as follows:
- http://<IM_REST_API_HOST>/km/api/categories/{id}?withParents=true&mode=KEY
- http://<IM_REST_API_HOST>/km/api/categories?withParents=true&mode=KEY
- http://<IM_REST_API_HOST>/km/api/categories?q=contentTypeRefKey eq 'FAQ'&withParents=true&mode=KEY
- http://<IM_REST_API_HOST>/km/api/categories/{id}?childrenCount=true&withParents=true&mode=KEY
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
SubscriptionKey-allOf[1]
object
-
recordId(optional):
string
The unique record ID of the Subscription object.
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
WorkTeamKey-allOf[1]
object
-
recordId(optional):
string
The unique record ID of the WorkTeam object.
-
referenceKey(optional):
string
The reference key for the WorkTeam object. WorkTeam objects support multiple languages. This field can be used to identify the associated objects for all languages.
Examples
The following example shows how to find a User object by a unique identifier by submitting a get request on the REST resource using cURL.
cURL Command
curl -X "GET" "http://<IM_REST_API_HOST>/km/api/latest/users/{id}"
Example of Request Header
The following shows an example of the request header.
-H "kmauthtoken: {\"siteName\":\"ORACLE_KNOWLEDGE\",\"integrationUserToken\":\"\"+eCJYkxKwj5HUaIiJYun0/TpatwT1LmtcsF05W33xnEojifV/AsLDj9RpN0lKuorTMNKeSE1tgC7svVL+BzntqDON4KiM1HFlpxvXEUCB0P2w0Xrs75McygqxdVaDSE9"}" \ -H "Accept: application/json"
Example of Response Body
The following shows an example of the response body in JSON format.
{ "skills" : [ { "referenceKey" : "REFERENCEKEY_VALUE", "name" : "NAME_VALUE", "externalId" : 1428417269025, "externalType" : "EXTERNALTYPE_VALUE", "links" : [ { "rel" : "canonical", "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}", "mediaType" : "application/json, application/xml", "templated" : true, "method" : "GET", "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}" } ] } ], "defaultView" : { "referenceKey" : "REFERENCEKEY_VALUE", "name" : "NAME_VALUE", "links" : [ { "rel" : "canonical", "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}", "mediaType" : "application/json, application/xml", "templated" : true, "method" : "GET", "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}" } ] }, "customKeyValues" : [ { "links" : [ { "rel" : "canonical", "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}", "mediaType" : "application/json, application/xml", "templated" : true, "method" : "GET", "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}" } ] } ], "contentLocales" : [ { "links" : [ { "rel" : "canonical", "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}", "mediaType" : "application/json, application/xml", "templated" : true, "method" : "GET", "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}" } ] } ], "securityRoles" : [ { "referenceKey" : "REFERENCEKEY_VALUE", "externalType" : "EXTERNALTYPE_VALUE", "links" : [ { "rel" : "canonical", "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}", "mediaType" : "application/json, application/xml", "templated" : true, "method" : "GET", "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}" } ] } ], "subscriptions" : [ { "links" : [ { "rel" : "canonical", "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}", "mediaType" : "application/json, application/xml", "templated" : true, "method" : "GET" } ] } ], "dataFormNotifications" : [ { "referenceKey" : "REFERENCEKEY_VALUE", "name" : "NAME_VALUE", "links" : [ { "rel" : "canonical", "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}", "mediaType" : "application/json, application/xml", "templated" : true, "method" : "GET" } ] } ], "views" : [ { "referenceKey" : "REFERENCEKEY_VALUE", "name" : "NAME_VALUE", "links" : [ { "rel" : "canonical", "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}", "mediaType" : "application/json, application/xml", "templated" : true, "method" : "GET", "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}" } ] } ], "workTeams" : [ { "referenceKey" : "REFERENCEKEY_VALUE", "links" : [ { "rel" : "canonical", "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}", "mediaType" : "application/json, application/xml", "templated" : true, "method" : "GET", "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}" } ] } ], "extendedProperties" : "EXTENDEDPROPERTIES_VALUE", "reportingUserGroup" : { "referenceKey" : "REFERENCEKEY_VALUE", "name" : "NAME_VALUE", "externalId" : 1428417269025, "externalType" : "EXTERNALTYPE_VALUE", "links" : [ { "rel" : "canonical", "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}", "mediaType" : "application/json, application/xml", "templated" : true, "method" : "GET", "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}" } ] }, "userType" : "CONSOLE_USER", "name" : "NAME_VALUE", "externalId" : 1428417269025, "externalType" : "EXTERNALTYPE_VALUE", "links" : [ { "rel" : "canonical", "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}", "mediaType" : "application/json, application/xml", "templated" : true, "method" : "GET", "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}" } ], "isActive" : true, "isLocked" : true, "adminUser" : true, "alias" : "ALIAS_VALUE", "banUntilDate" : "2013-04-23T21:06:12EDT", "banUser" : true, "dateAdded" : "2013-04-23T21:06:12EDT", "dateModified" : "2013-04-23T21:06:12EDT", "email" : "EMAIL_VALUE", "firstName" : "FIRSTNAME_VALUE", "isDefaultAdministrator" : true, "lastName" : "LASTNAME_VALUE", "login" : "LOGIN_VALUE", "canReceiveEmailNotificationsForAssignedTasks" : true, "canReceiveEmailNotificationsForTasksICanPerform" : true, "reputationPoints" : -37887106, "showEmail" : true, "showName" : true, "subscribeOnTopicCreation" : true, "subscribeOnTopicReply" : true, "subscriptionSchedule" : 1839761324, "userImage" : "USERIMAGE_VALUE", "defaultLocale" : { "links" : [ { "rel" : "canonical", "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}", "mediaType" : "application/json, application/xml", "templated" : true, "method" : "GET", "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}" } ] } }