Find by ID

get

/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

Path Parameters
  • The unique identifier of the object to be retrieved.
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : User
Match All
Show Source
Nested Schema : UserData
Match All
Show Source
Nested Schema : UserKey
Match All
Show Source
Nested Schema : Singular Resource
Type: object
Title: Singular Resource
Oracle base singular resource schema definition.
Show Source
Nested Schema : UserKey-allOf[1]
Type: object
Show Source
Nested Schema : UserData-allOf[1]
Type: object
Show Source
Nested Schema : User-allOf[1]
Type: object
Show Source
Nested Schema : LocaleKey
Match All
Show Source
Nested Schema : LocaleKey-allOf[1]
Type: object
Show Source
Nested Schema : contentLocales
Type: array
To Many Relationship to Locale
Show Source
Nested Schema : customKeyValues
Type: array
To Many Relationship to UserKeyValue
Show Source
Nested Schema : dataFormNotifications
Type: array
To Many Relationship to Rating
Show Source
Nested Schema : ViewKey
Match All
Show Source
Nested Schema : UserGroupKey
Match All
Show Source
Nested Schema : securityRoles
Type: array
To Many Relationship to SecurityRole
Show Source
Nested Schema : skills
Type: array
To Many Relationship to Category
Show Source
Nested Schema : subscriptions
Type: array
To Many Relationship to Subscription
Show Source
Nested Schema : views
Type: array
To Many Relationship to View
Show Source
Nested Schema : workTeams
Type: array
To Many Relationship to WorkTeam
Show Source
Nested Schema : UserKeyValueKey
Match All
Show Source
Nested Schema : UserKeyValueKey-allOf[1]
Type: object
Show Source
Nested Schema : RatingKey
Match All
Show Source
Nested Schema : RatingKey-allOf[1]
Type: object
Show Source
Nested Schema : ViewKey-allOf[1]
Type: object
Show Source
Nested Schema : UserGroupKey-allOf[1]
Type: object
Show Source
Nested Schema : SecurityRoleKey
Match All
Show Source
Nested Schema : SecurityRoleKey-allOf[1]
Type: object
Show Source
  • 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.
  • 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.
  • GUID of the SECURITYROLE table
  • Non localized name of the security role
  • 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
Nested Schema : CategoryKey
Match All
Show Source
Nested Schema : CategoryKey-allOf[1]
Type: object
Show Source
  • 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 of the Category object
  • The unique identifier used while integrating the repository data with the external system.

  • The type of the category used while integrating the repository data with the external system. Valid options are PRODUCT and CATEGORY.

  • The name of the category.

  • The hierarchichal position of the category
  • 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
  • The unique record ID of the Category object.

  • 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.

  • 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.

Nested Schema : parents
Type: 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
Show Source
Nested Schema : SubscriptionKey
Match All
Show Source
Nested Schema : SubscriptionKey-allOf[1]
Type: object
Show Source
Nested Schema : WorkTeamKey
Match All
Show Source
Nested Schema : WorkTeamKey-allOf[1]
Type: object
Show Source
Back to Top

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}"
    } ]
  }
}
Back to Top