Update a user group
/km/api/v1/userGroups/{id}
Updates the user group with the specified ID.
Request
- application/json
- application/xml
-
id: string
The unique identifier of the object to be updated.
object
UserGroup
-
dateAdded(optional):
string(date-time)
The date when the UserGroup object was created
-
dateModified(optional):
string(date-time)
The date when the UserGroup object was last modified
-
description(optional):
string
The localized description of the user group
-
externalId(optional):
integer
The unique identifier of the corresponding userGroup from an external system. You can use the External ID with the ExternalType parameter to connect user groups in the internal and the the external systems.
-
externalType(optional):
string
The ExternalType is the type of the corresponding userGroup from an external system.
-
links(optional):
array links
-
localizedAttributes(optional):
array localizedAttributes
List of LocalizedAttributes of this UserGroup in various Locales
-
name(optional):
string
The localized name of the user group. The name field can only be used for sorting.
-
objectId(optional):
string
The string representing the hierarchy of the user groups. All user groups are stored in the TAG table but they are currently not hierarchical
-
recordId(optional):
string
The unique identifier from the TAG table that represent a userGroups resource
-
referenceKey(optional):
string
The non localized name of the user group
-
stripeCD(optional):
string
Stripe for UserGroup
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
array
-
Array of:
object LocalizedAttributes
Title:
LocalizedAttributes
object
-
href:
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(optional):
string
Media type, as defined by RFC 2046, describing the link target.
-
method(optional):
string
HTTP method for requesting the target of the link.
-
profile(optional):
string
Link to the metadata of the resource, such as JSON-schema, that describes the resource expected when dereferencing the target resource..
-
rel:
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(optional):
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.
object
LocalizedAttributes
-
description(optional):
string
Localized description in the above Locale
-
localeId(optional):
string
RecordId of the Locale - generally this is the localeCode (like en_US) and NOT a real GUID.
-
name(optional):
string
Localized Name in the above Locale
Response
- application/json
- application/xml
200 Response
object
UserGroup
-
dateAdded(optional):
string(date-time)
The date when the UserGroup object was created
-
dateModified(optional):
string(date-time)
The date when the UserGroup object was last modified
-
description(optional):
string
The localized description of the user group
-
externalId(optional):
integer
The unique identifier of the corresponding userGroup from an external system. You can use the External ID with the ExternalType parameter to connect user groups in the internal and the the external systems.
-
externalType(optional):
string
The ExternalType is the type of the corresponding userGroup from an external system.
-
links(optional):
array links
-
localizedAttributes(optional):
array localizedAttributes
List of LocalizedAttributes of this UserGroup in various Locales
-
name(optional):
string
The localized name of the user group. The name field can only be used for sorting.
-
objectId(optional):
string
The string representing the hierarchy of the user groups. All user groups are stored in the TAG table but they are currently not hierarchical
-
recordId(optional):
string
The unique identifier from the TAG table that represent a userGroups resource
-
referenceKey(optional):
string
The non localized name of the user group
-
stripeCD(optional):
string
Stripe for UserGroup
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
array
-
Array of:
object LocalizedAttributes
Title:
LocalizedAttributes
object
-
href:
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(optional):
string
Media type, as defined by RFC 2046, describing the link target.
-
method(optional):
string
HTTP method for requesting the target of the link.
-
profile(optional):
string
Link to the metadata of the resource, such as JSON-schema, that describes the resource expected when dereferencing the target resource..
-
rel:
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(optional):
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.
object
LocalizedAttributes
-
description(optional):
string
Localized description in the above Locale
-
localeId(optional):
string
RecordId of the Locale - generally this is the localeCode (like en_US) and NOT a real GUID.
-
name(optional):
string
Localized Name in the above Locale
Examples
The following example shows how to update an User Group object for the specified user ID by submitting a post request on the REST resource using cURL.
curl -X PUT "https://<IM_REST_API_HOST>/km/api/latest/userGroups/{id}" -u "<username:password>" -H "Accept: application/json" -H "Content-Type: application/json" -d "@<FilePath/RequestBody.json>"
Example of Request Body
The following example shows the contents of the request body in JSON format:
{ "recordId": "5D08D6C6E47E4B309D4651EAB11A5224", "referenceKey": "PAYROLL", "name": "Payroll Agents", "dateAdded": "2019-09-23T20:32:19+0000", "dateModified": "2019-09-23T20:32:19+0000", "objectId": "030", "stripeCd": "ORA_SVC_HCM", "description": "Payroll Agent User Group updated using the REST API", "localizedAttributes": [ { "localeId": "en_US", "name": "Payroll Agents" }, { "localeId": "ar_AE", "name": "<name in Arabic>" }, { "localeId": "de_DE", "name": "Gehaltsabrechnungsagenten" }, { "localeId": "es_ES", "name": "<name in Spanish>" }, { "localeId": "fr_FR", "name": "agents de paie" }, { "localeId": "ja_JP", "name": "<name in Japanese>" }, { "localeId": "ko_KR", "name": "<name in Korean>" }, { "localeId": "sv_SE", "name": "<name in Swedish>" }, { "localeId": "zh_CN", "name": "<name in Chinese>" } ] }
Example of Response Body
The following example shows the contents of the response body in JSON format:
{ "recordId": "7E664B42F8F14A90AB68EF55C1A3AEB9", "referenceKey": "PAYROLL", "name": "Payroll Agents", "links": [ { "rel": "canonical", "href": "https://<IM_REST_API_HOST>/km/api/latest/userGroups/7E664B42F8F14A90AB68EF55C1A3AEB9", "mediaType": "application/json, application/xml", "method": "GET" }, { "rel": "collection", "href": "https://<IM_REST_API_HOST>/km/api/latest/userGroups", "mediaType": "application/json, application/xml", "method": "GET", "profile": "https://<IM_REST_API_HOST>/km/api/latest/metadata-catalog/userGroups" } ], "dateAdded": "2019-09-23T19:47:09+0000", "dateModified": "2019-09-23T19:47:09+0000", "objectId": "030", "description": "Payroll Agent User Group created using the REST API", "localizedAttributes": [ { "localeId": "en_US", "name": "Payroll Agents", "description": "Payroll Agent User Group updated using the REST API" }, { "localeId": "ar_AE", "name": "<name in Arabic>" }, { "localeId": "de_DE", "name": "Gehaltsabrechnungsagenten" }, { "localeId": "es_ES", "name": "<name in Spanish>" }, { "localeId": "fr_FR", "name": "agents de paie" }, { "localeId": "ja_JP", "name": "<name in Japanese>" }, { "localeId": "ko_KR", "name": "<name in Korean>" }, { "localeId": "sv_SE", "name": "<name in Swedish>" }, { "localeId": "zh_CN", "name": "<name in Chinese>" } ], "stripeCd": "ORA_SVC_HCM" }