Creates new template with given details for the entire system.

post

/oam/services/rest/ssa/api/v1/template/{name}

Creates a new template.

Request

Supported Media Types
Path Parameters
Body ()
Template that needs to be created
Root Schema : Template
Type: object
Show Source
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: object
Show Source
Nested Schema : valueTransformation
Type: array
Show Source
Nested Schema : params
Type: array
Parameters for the java method used in populateIf or populateIfNot tag.
Show Source
Nested Schema : type
Type: array
Type of the parameters.
Show Source
Nested Schema : ValueTransformation
Type: object
Show Source
Nested Schema : params
Type: array
Parameters for the java method used in operation tag.
Show Source
Nested Schema : type
Type: array
Type of the parameters.
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : Template
Type: object
Show Source
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: object
Show Source
Nested Schema : valueTransformation
Type: array
Show Source
Nested Schema : params
Type: array
Parameters for the java method used in populateIf or populateIfNot tag.
Show Source
Nested Schema : type
Type: array
Type of the parameters.
Show Source
Nested Schema : ValueTransformation
Type: object
Show Source
Nested Schema : params
Type: array
Parameters for the java method used in operation tag.
Show Source
Nested Schema : type
Type: array
Type of the parameters.
Show Source

422 Response

Template : already exists.
Body ()
Root Schema : Error
Type: object
Show Source
Back to Top

Examples

cURL Sample Request 1

curl -X POST 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"
        }
    ]
}'

cURL Sample Request 2

curl -X POST https://<admin-host>:<admin-port>/oam/services/rest/ssa/api/v1/template/customemail \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic dGVzdDp0ZXN0=' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
    "dynamicParams": [
        "$user.attr.familyName",
        "$user.attr.custom2"
    ],
    "valueMapping": "$user.attr.givenName",
    "valueTransformation": [
        {
            "operation": "join",
            "params": [
                ".",
                "$user.attr.givenName",
                "$user.attr.familyName"
            ],
            "type": [
                "CharSequence",
                "CharSequence[]"
            ]
        },
        {
            "operation": "concat",
            "params": [
                "@"
            ]
        },
        {
            "operation": "concat",
            "params": [
                "$user.attr.custom2"
            ]
        },
        {
            "operation": "concat",
            "params": [
                ".com"
            ]
        }
    ]
}'
Back to Top