Key Attribute Update REST Service
Use Key Attribute Update REST Service to update the key metadata that are Key Management Interoperability Protocol attributes in the database.
- Operation
PUT
- URL
- https://<host>:<port>/SKLM/rest/v1/keyAttributes
By default, Guardium Key Lifecycle Manager server listens to the secure port 9443 (HTTPS) for communication. During IBM Security Guardium Key Lifecycle Manager installation, you can modify this default port.
Request
Request Parameters
Parameter | Description |
---|---|
host | Specify the IP address or hostname of the IBM Security Guardium Key Lifecycle Manager server. |
port | Specify the port number on which the IBM Security Guardium Key Lifecycle Manager server listens for requests. |
Request Headers
Header name | Value |
---|---|
Content-Type | application/json |
Accept | application/json |
Authorization | SKLMAuth userAuthId=<authIdValue> |
Accept-Language | Any valid locale that is supported by IBM Security Guardium Key Lifecycle Manager. For example, en or de. |
Request body
JSON object with the following specification:
JSON property name | Description |
---|---|
attrName | Required. Specify the name that you can use to identify or locate the
attribute pair as an object. Note: Do not use an asterisk (
You can specify the following attributes:* ) or question mark
(? ) as a character in a Key Management Interoperability Protocol attribute. These
wildcard characters are reserved for future use.
|
attrValue | Conditional. Specify one or more of these key value pairs to add or update:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
index | Conditional. Specify the index to update or delete an attribute value. |
operation | Required. Specify one of these valid operations to run on an attribute value:
add , update , or delete |
uuid | Required. Specify the universal unique identifier of the key. |
Response
Response Headers
Header name | Value and description |
---|---|
Status Code |
|
Content-Type | application/json |
Content-Language | Locale for the response message. |
Success response body
JSON object with the following specification:
JSON property name | Description |
---|---|
code | Returns the code that is specified by the status property. |
status | Returns the status to indicate whether the key attribute update task is successful. |
Error Response Body
JSON object with the following specification.
JSON property name | Description |
---|---|
code | Returns the application error code. |
message | Returns a message that describes the error. |
Examples
- Service request to add an attribute to a key
-
PUT https://localhost:<port>/SKLM/rest/v1/keyAttributes {"uuid":"KEY-d3ee4491-f96e-495d-bb37-fc03748924ba","operation": "add","attrName":"cryptoParams","attrValue":"MODE CBC, PAD NONE,HASH SHA256,ROLE BDK"}
- Service request to add an attribute for a key name
-
PUT https://localhost:port/SKLM/rest/v1/keyAttributes {"uuid":"KEY-d3ee4491-f96e-495d-bb37-fc03748924ba","operation": "add","attrName":"name","attrValue":"TYPE TEXT,VALUE key name for xyz"
- Service request to update an attribute
-
PUT https://localhost:port/SKLM/rest/v1/keyAttributes {"uuid":"KEY-d3ee4491-f96e-495d-bb37-fc03748924ba","operation":"update", "index":"0","attrName":"name","attrValue":"TYPE TEXT,VALUE updated key name for xyz"}
- Service request to delete an attribute
-
PUT https://localhost:<port>/SKLM/rest/v1/keyAttributes Content-Type: application/json Accept : application/json Authorization: SKLMAuth userAuthId=139aeh34567m {"uuid":"KEY-d3ee4491-f96e-495d-bb37-fc03748924ba","operation":"delete", "index":"0","attrName":"name"}
- Service request to update an attribute when an invalid parameter is specified
-
PUT https://localhost:<port>/SKLM/rest/v1/keyAttributes Content-Type: application/json Accept : application/json Authorization: SKLMAuth userAuthId=139aeh34567m {"UUID":"KEY-d3ee4491-f96e-495d-bb37-fc03748924ba","operation": "add","attrName":"cryptoParams","attrValue":"MODE CBC, PAD NONE,HASH SHA256,ROLE BDK"}
- Error response
-
Status Code : 400 Bad Request {"code":"CTGKM0630E","message":"CTGKM0630E Validation error: \"Invalid name \" for parameter \"UUID\"."}