Update all custom key values

patch

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

This method replaces the UserKeyValue relationship of the User object with the list of UserKeyValue objects.

Request

Supported Media Types
Path Parameters
Body ()
The List of UserKeyValue objects
Root Schema : List UserKeyValueKey
Type: object
Title: List UserKeyValueKey
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : UserKeyValueKey
Type: object
Title: UserKeyValueKey
Show Source
Back to Top

Response

204 Response

No Content.
Back to Top

Examples

The following example shows how to update the User Key Value relationship of the user object with the list of User Key Value objects by submitting a patch request on the REST resource using cURL.

cURL Command Example

curl -X PATCH "https://<IM_REST_API_HOST>/km/api/latest/users/{id}/customKeyValues" -u "<username:password>" -H "Accept: application/json" -H "Content-Type: application/json" -d "@<FilePath/RequestBody.json>"

Example of Request Body

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

{
  "items" : [ {
    "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}"
    } ]
  }, {
    "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}"
    } ]
  }, {
    "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}"
    } ]
  } ]
}

Example of Response Body

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

This request does not return any response body.
Back to Top