Update an existing Template based on the name of the template.
put
/oam/services/rest/ssa/api/v1/template/{name}
Request
Supported Media Types
- application/json
Path Parameters
-
name(required): string
Template that needs to be updated.
Template with the corresponding name will be replaced with this content.
Root Schema : Template
Type:
Show Source
object
-
defaultValue:
string
Default value to be used in case the template processing fails.
-
description:
string
Details describing the intent of this template.
-
dynamicParams:
array dynamicParams
To use dynamic parameters while defining valueTransformation and valueFiltering, they must be added here.
-
transformFirst:
boolean
Default Value:
false
If set to true then valueTransformation will be applied before valueFiltering. -
valueFiltering:
object ValueFiltering
-
valueMapping(required):
string
We can specify the source for value of a template.
-
valueTransformation:
array valueTransformation
Nested Schema : dynamicParams
Type:
array
To use dynamic parameters while defining valueTransformation and valueFiltering, they must be added here.
Show Source
Nested Schema : ValueFiltering
Type:
Show Source
object
-
params:
array params
Parameters for the java method used in populateIf or populateIfNot tag.
-
populateIf:
string
Returns claim value only if the result of this filter java method is true.
-
populateIfNot:
string
Returns claim value only if the result of this filter java method is false.
-
type:
array type
Type of the parameters.
Nested Schema : params
Type:
array
Parameters for the java method used in populateIf or populateIfNot tag.
Show Source
Nested Schema : ValueTransformation
Type:
Show Source
object
-
operation(required):
string
Java method name used as transformation operation.
-
params:
array params
Parameters for the java method used in operation tag.
-
type:
array type
Type of the parameters.
Nested Schema : params
Type:
array
Parameters for the java method used in operation tag.
Show Source
Response
Supported Media Types
- application/json
200 Response
OK.
Root Schema : Template
Type:
Show Source
object
-
defaultValue:
string
Default value to be used in case the template processing fails.
-
description:
string
Details describing the intent of this template.
-
dynamicParams:
array dynamicParams
To use dynamic parameters while defining valueTransformation and valueFiltering, they must be added here.
-
transformFirst:
boolean
Default Value:
false
If set to true then valueTransformation will be applied before valueFiltering. -
valueFiltering:
object ValueFiltering
-
valueMapping(required):
string
We can specify the source for value of a template.
-
valueTransformation:
array valueTransformation
Nested Schema : dynamicParams
Type:
array
To use dynamic parameters while defining valueTransformation and valueFiltering, they must be added here.
Show Source
Nested Schema : ValueFiltering
Type:
Show Source
object
-
params:
array params
Parameters for the java method used in populateIf or populateIfNot tag.
-
populateIf:
string
Returns claim value only if the result of this filter java method is true.
-
populateIfNot:
string
Returns claim value only if the result of this filter java method is false.
-
type:
array type
Type of the parameters.
Nested Schema : params
Type:
array
Parameters for the java method used in populateIf or populateIfNot tag.
Show Source
Nested Schema : ValueTransformation
Type:
Show Source
object
-
operation(required):
string
Java method name used as transformation operation.
-
params:
array params
Parameters for the java method used in operation tag.
-
type:
array type
Type of the parameters.
Nested Schema : params
Type:
array
Parameters for the java method used in operation tag.
Show Source
Examples
cURL Sample Request
curl -X PUT \ https://<admin-host>:<admin-port>/oam/services/rest/ssa/api/v1/template/website \ -H 'Accept: application/json' \ -H 'Authorization: Basic dGVzdDp0ZXN0=' \ -H 'Content-Type: application/json' \ -H 'cache-control: no-cache' \ -d '{ "valueMapping": "$user.attr.website", "valueFiltering": { "populateIf": "startsWith", "params": [ "https" ] }, "valueTransformation": [ { "operation": "toLowerCase" } ] }'