ModifyCustomAttributes
This API modifies the attributes of a key.
URL
<http/https>://<host-name>:<Port>/protectappws/services/rest/key/modifyCustomAttributes
Input Parameters
Parameters | Description |
---|---|
username | Use name. |
password | Password associate with the user. |
keyName | Name of the key for which attributes are to be modified. |
Attribute | List of attribute names and values. The type parameter lets you optionally specify the type for attribute. The default attribute type is String. The supported attribute types are: — Date/Time — Byte String — Integer — Long Integer — Big Integer — String — Interval — Enumeration — Boolean |
Sample REST call
request
{
"ModifyCustomAttributes": {
"username": "username",
"password": "password",
"KeyName": "TestKey",
"Attributes": {
"Attribute": [
{
"name": "custom32",
"value": "12334",
"type": "Integer"
}
]
}
}
}
response
{
"ModifyCustomAttributesResponse": {
"result": "Attributes added successfully."
}
}
Sample SOAP Parameters
<prot:ModifyCustomAttributes>
<username>username</username>
<password>password</password>
<KeyName>testaeskey</KeyName>
<!--1 or more repetitions:-->
<Attribute>
<name>k1</name>
<value>123467</value>
<!--Optional:-->
<type>Integer</type>
</Attribute>
<Attribute>
<name>k2</name>
<value>7468616c657367656d616c746f</value>
<!--Optional:-->
<type>Byte String</type>
</Attribute>
</prot:ModifyCustomAttributes>
Output
<ns2:Session_ModifyCustomAttributesResponse xmlns:ns2="http://dsws.org/protectappws/">Attributes added successfully.</ns2:Session_ModifyCustomAttributesResponse>
Note
The list of attributes that we get in response is comma separated so any attribute (name and value) having special characters (particularly , and {} and “” and =) will be displayed as it is and will make the attribute difficult to read. So, it is recommended NOT to use special characters (particularly , and {} and “” and =) in the input.