Get users

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.

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 Error

The possible error response for this method is as follows:

  • OK-SEC0001

    The error occurs when a user does not have VIEW_USER permission but attempts to get a user object of another user.

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
Type: object
Title: User
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 : LocaleKey
Type: object
Title: LocaleKey
Show Source
Nested Schema : ViewKey
Type: object
Title: ViewKey
Show Source
Nested Schema : UserGroupKey
Type: object
Title: UserGroupKey
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
Type: object
Title: UserKeyValueKey
Show Source
Nested Schema : RatingKey
Type: object
Title: RatingKey
Show Source
Nested Schema : SecurityRoleKey
Type: object
Title: SecurityRoleKey
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.
  • links
  • 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
Type: object
Title: CategoryKey
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 inventory organization id of the specific product.

  • links
  • 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
Type: object
Title: SubscriptionKey
Show Source
Nested Schema : WorkTeamKey
Type: object
Title: WorkTeamKey
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 Example

curl -X GET "https://<IM_REST_API_HOST>/km/api/latest/users/{id}" -u "<username:password>" -H "Accept: application/json" -H "Content-Type: application/json"

Example of Response Body

The following shows an example of the response body in JSON format.

{
  "skills": [],
  "customKeyValues": [],
  "contentLocales": [],
  "securityRoles": [],
  "subscriptions": [],
  "dataFormNotifications": [],
  "views": [],
  "workTeams": [],
  "userType": "CONSOLE_USER",
  "recordId": "62AE91CBB23A49668BC7B9A220B696C7",
  "name": "NAME_VALUE",
  "externalType": "ACCOUNT",
  "links": [
    {
      "rel": "canonical",
      "href": "http://IM_REST_API_HOST/km/api/latest/users/62AE91CBB23A49668BC7B9A220B696C7",
      "mediaType": "application/json, application/xml",
      "method": "GET"
    },
    {
      "rel": "collection",
      "href": "http://IM_REST_API_HOST/km/api/latest/users",
      "mediaType": "application/json, application/xml",
      "method": "GET",
      "profile": "http://IM_REST_API_HOST/km/api/latest/metadata-catalog/users"
    }
  ],
  "isActive": false,
  "isLocked": false,
  "adminUser": true,
  "alias": "ALIAS_VALUE",
  "banUser": false,
  "dateAdded": "2017-03-16T09:11:58-0500",
  "dateModified": "2017-03-16T09:11:58-0500",
  "email": "EMAIL_VALUE",
  "firstName": "FIRSTNAME_VALUE",
  "isDefaultAdministrator": true,
  "lastName": "LASTNAME_VALUE",
  "login": "LOGIN_VALUE",
  "canReceiveEmailNotificationsForAssignedTasks": false,
  "canReceiveEmailNotificationsForTasksICanPerform": false,
  "reputationPoints": 0,
  "showEmail": true,
  "showName": true,
  "subscribeOnTopicCreation": true,
  "subscribeOnTopicReply": true,
  "subscriptionSchedule": -1,
  "defaultLocale": {
    "recordId": "en_US",
    "links": [
      {
        "rel": "canonical",
        "href": "http://IM_REST_API_HOST/km/api/latest/locales/en_US",
        "mediaType": "application/json, application/xml",
        "method": "GET"
      }
    ]
  }
}
Back to Top