Creates or updates configuration properties that are provided in the input.
put
/config/property/v1
Returns created or updated properties.
Request
There are no request parameters for this operation.
Supported Media Types
- application/xml
- application/json
Root Schema : schema
Type:
arrayThe object is used to create or update Config Properties.
Show Source
-
Array of:
object NameValPair
Name-value pair which can be used generically.
Nested Schema : NameValPair
Type:
objectName-value pair which can be used generically.
Show Source
-
name(required): string
Property name.
-
value(required): string
Property Value String.
Root Schema : schema
Type:
arrayThe object is used to create or update Config Properties.
Show Source
-
Array of:
object NameValPair
Name-value pair which can be used generically.
Nested Schema : NameValPair
Type:
objectName-value pair which can be used generically.
Show Source
-
name(required): string
Property name.
-
value(required): string
Property Value String.
Response
Supported Media Types
- application/xml
- application/json
200 Response
Success
Root Schema : ConfigPropertiesResponse
Type:
arrayContains Congfig Properties that are returned from API.
Show Source
-
Array of:
object NameValSource
Name-value and source of the property.
Nested Schema : NameValSource
Type:
objectName-value and source of the property.
Show Source
-
name(required): string
Property name.
-
source(required): string
Where is property loaded from. This can be file(product files of service implementation), environment(where service is running) or database(persistent store used by the service).
-
value(required): string
Property Value String.
406 Response
Incorrect Data
Examples
The following example shows a sample request and response for creating or updating the configuration properties specified in the input.
cURL Command to Create and Update the Configuration Property in JSON Format
curl --location --request PUT '<OAAService>/policy/config/property/v1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--data '[
{
"name": "bharosa.uio.default.challenge.type.enum.ChallengeEmail.fromAddress",
"value": "security@example.com"
}
]’Sample Response in JSON Format
[
{
"name": "bharosa.uio.default.challenge.type.enum.ChallengeEmail.fromAddress",
"value": "security@example.com",
"source": "database"
}
]cURL Command to Create and Update the Configuration Property in XML Format
curl --location --request PUT '<OAAService>/policy/config/property/v1' \
--header 'Content-Type: application/xml' \
--header 'Accept: application/xml' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--data '<?xml version="1.0" encoding="UTF-8" ?>
<List>
<NameValPair>
<name>bharosa.uio.default.challenge.type.enum.ChallengeEmail.fromAddress</name>
<value>security@example.com</value>
</NameValPair>
</List>'Sample Response in XML Format
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ConfigPropertiesResponse>
<NameValSource>
<name>bharosa.uio.default.challenge.type.enum.ChallengeEmail.fromAddress</name>
<value>security@example.com</value>
<source>database</source>
</NameValSource>
</ConfigPropertiesResponse>