Get a user key value
get
/km/api/v1/users/{userId}/userKeyValues/{id}
This method returns a UserKeyValue object having the specified user key value ID.
Example URI
The example URI for this method is as follows:
-
http://<IM_REST_API_HOST>/km/api/latest/users/{userId}/userKeyValues/{id}The request returns the UserKeyValue object having the specified ID parameter.
Response Error
The possible error response for this method is as follows:
- OKDOM-GEN0001
The error occurs when a UserKeyValue object does not exist for the specified ID.
Request
Path Parameters
-
id(required): string
The unique identifier of the object to be retrieved.
Response
Supported Media Types
- application/json
- application/xml
200 Response
OK.
Root Schema : UserKeyValue
Type:
objectTitle:
Show Source
UserKeyValue-
dateAdded:
string(date-time)
The date when the UserKeyValue object was created.
-
dateModified:
string(date-time)
The date when the UserKeyValue object was last modified.
-
key:
string
The key associated with the UserKeyValue object. This field is related to the value field for a user. FAVORITES is an example key.
-
links:
array links
-
recordId:
string
The unique identifier that represents a userKeyValue resource.
-
userInformation:
object UserKey
Title:
UserKey -
value:
string
The value associated with the UserKeyValue object. This field is related to the key field for a user. FAQ1, FAQ23, FAQ44 are example values.
Nested Schema : links
Type:
Show Source
array-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
Nested Schema : UserKey
Type:
objectTitle:
Show Source
UserKey-
email:
string
Email of the User object
-
externalId:
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:
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.
-
links:
array links
-
name:
string
User's full name
-
recordId:
string
The unique record ID of the User object.
Nested Schema : instanceLink
Type:
objectMetadata describing link description objects that MAY appear in the JSON instance representation.
Show Source
-
href(required):
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:
string
Media type, as defined by RFC 2046, describing the link target.
-
method:
string
HTTP method for requesting the target of the link.
-
profile:
string
Link to the metadata of the resource, such as JSON-schema, that describes the resource expected when dereferencing the target resource..
-
rel(required):
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:
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.
Nested Schema : links
Type:
Show Source
array-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
Examples
The following example shows how to find a User Key Value object for the specified user ID by submitting a get request on the REST resource using cURL.
curl -X GET "https://<IM_REST_API_HOST>/km/api/latest/users/{userId}/userKeyValues/{id}" -u "<username:password>" -H "Accept: application/json" -H "Content-Type: application/json"
Example of Response Body
The following example shows the contents of the response body in JSON format:
{
"userInformation": {
"recordId": "62AE91CBB23A49668BC7B9A220B696C7",
"name": "User 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"
}
]
},
"recordId": "75F56044C4D94DC181CDA898D0F0B3E2",
"links": [
{
"rel": "canonical",
"href": "http://IM_REST_API_HOST/km/api/latest/users/62AE91CBB23A49668BC7B9A220B696C7/userKeyValues/75F56044C4D94DC181CDA898D0F0B3E2",
"mediaType": "application/json, application/xml",
"method": "GET"
},
{
"rel": "collection",
"href": "http://IM_REST_API_HOST/km/api/latest/users/62AE91CBB23A49668BC7B9A220B696C7/userKeyValues",
"mediaType": "application/json, application/xml",
"method": "GET"
}
],
"dateAdded": "2017-03-28T14:48:21-0500",
"dateModified": "2017-03-28T14:48:21-0500",
"key": "FAVORITES2",
"value": "FAQ1,FAQ23,FAQ44"
}