Get all user key values assigned

get

/km/api/v1/users/{id}/customKeyValues

This method returns a list of UserKeyValue objects associated with the User object having the specified ID parameter.

This resource supports the orderBy request parameter. You can use this parameter along with the HTTP service request to sort the returned list.

The following values can be used with the orderBy parameter:

  • dateAdded
  • dateModified
  • key
  • recordId
  • value

Example URIs:

The example URIs for this method are as follows:

  • http://<IM_REST_API_HOST>/km/api/latest/users/{id}/customKeyValues

    The method returns a list of UserKeyValue objects associated with the User object having the specified ID parameter sorted by date added in ascending order.

  • http://<IM_REST_API_HOST>/km/api/latest/users/{id}/customKeyValues?orderBy=dateAdded:desc

    The method returns a list of UserKeyValue objects associated with the User object having the specified ID parameter sorted by date added in descending order.

Request

Path Parameters
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : ResultList UserKeyValueKey
Type: object
Title: ResultList UserKeyValueKey
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : UserKeyValueKey
Type: object
Title: UserKeyValueKey
Show Source
Back to Top

Examples

The following example shows how to find all User Key Value objects associated with the User object having the specified ID parameter 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}/customKeyValues" -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.

{
  "items": [
    {
      "recordId": "5E9251D2AE454BE88BB7534A5256B067",
      "links": [
        {
          "rel": "canonical",
          "href": "http://IM_REST_API_HOST/km/api/latest/users/62AE91CBB23A49668BC7B9A220B696C7/userKeyValues/5E9251D2AE454BE88BB7534A5256B067",
          "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"
        }
      ]
    },
    {
      "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"
        }
      ]
    }
  ],
  "hasMore": false,
  "limit": 20,
  "offset": 0,
  "links": [
    {
      "rel": "canonical",
      "href": "http://IM_REST_API_HOST/km/api/latest/users/62AE91CBB23A49668BC7B9A220B696C7/customKeyValues/?limit=20&offset=0",
      "mediaType": "application/json, application/xml",
      "method": "GET"
    }
  ],
  "count": 2
}
Back to Top