Creates a new agent and policy

post

/oaa-policy/aggregation/v1/

Creates a new agent, assurance level, and policy with provided actions.

Request

Query Parameters
  • If the flag is true then all artifacts( agent, assurance level, policy, rule etc.) present for this request will be returned.
Supported Media Types
Request Body - application/xml ()
Root Schema : schema
Type: object
Request for creating all artifacts related to policy including agent, assurance level, policy and default rule.
Show Source
Nested Schema : actions
Type: array
List of actions which can be returned when policy with assurance level is executed.
Show Source
Request Body - application/json ()
Root Schema : schema
Type: object
Request for creating all artifacts related to policy including agent, assurance level, policy and default rule.
Show Source
Nested Schema : actions
Type: array
List of actions which can be returned when policy with assurance level is executed.
Show Source
Back to Top

Response

Supported Media Types

201 Response

Agent along with all assurance level and policies are created.
Body ()
Root Schema : AggregationResponse
Type: object
All created artifacts of the policy are present here including agent, assurance level, policy and default rule.
Show Source
Nested Schema : schema
Type: object
Details of the agent
Show Source
Nested Schema : AssuranceLevel
Type: object
Details for a single assurance level.
Show Source
Nested Schema : Group
Type: object
Defines a new group structure
Show Source
Nested Schema : Policy
Type: object
Policy object for creating, modifying and fetching policy.
Show Source
Nested Schema : Rule
Type: object
Defines policy rule in the system
Show Source
Nested Schema : values
Type: array
Values of elements in the group. Values depend on type of group.
Show Source
Nested Schema : items
Type: object
Nested Schema : conditionMap
Type: array
Map of key value pair for reconstruction of UI rule. Required elements for the OAA rules are entityRefId, operation, values (Array of String), expression, mode, isgroup.
Show Source
  • ConditionMap
    Map of key-value pair which is used to reconstruct the rule or any additional parameters that are required by the rule can be passed in the map
Nested Schema : conditions
Type: array
Array of conditions to be evaluated when the rule will be executed. All the condition must be true to return the action associated with the rule.
Show Source
  • Condition
    Conditions to be evaluated. If no parameter is provided then all the conditions will be evaluated with the default values.
Nested Schema : RuleAction
Type: object
Action to be returned when the rule is evaluated true.
Show Source
Nested Schema : ConditionMap
Type: object
Map of key-value pair which is used to reconstruct the rule or any additional parameters that are required by the rule can be passed in the map
Show Source
Nested Schema : value
Type: object
The value can be a json object or a simple string.
Nested Schema : Condition
Type: object
Conditions to be evaluated. If no parameter is provided then all the conditions will be evaluated with the default values.
Show Source
Nested Schema : parameters
Type: array
List of all the overriding parameters.
Show Source
Nested Schema : ConditionParameter
Type: object
Parameter of a condition that is required when the condition is evaluated.
Show Source

401 Response

Unauthorized

405 Response

Invalid input
Body ()
Root Schema : AggregationResponse
Type: object
All created artifacts of the policy are present here including agent, assurance level, policy and default rule.
Show Source
Nested Schema : schema
Type: object
Details of the agent
Show Source
Nested Schema : AssuranceLevel
Type: object
Details for a single assurance level.
Show Source
Nested Schema : Group
Type: object
Defines a new group structure
Show Source
Nested Schema : Policy
Type: object
Policy object for creating, modifying and fetching policy.
Show Source
Nested Schema : Rule
Type: object
Defines policy rule in the system
Show Source
Nested Schema : values
Type: array
Values of elements in the group. Values depend on type of group.
Show Source
Nested Schema : items
Type: object
Nested Schema : conditionMap
Type: array
Map of key value pair for reconstruction of UI rule. Required elements for the OAA rules are entityRefId, operation, values (Array of String), expression, mode, isgroup.
Show Source
  • ConditionMap
    Map of key-value pair which is used to reconstruct the rule or any additional parameters that are required by the rule can be passed in the map
Nested Schema : conditions
Type: array
Array of conditions to be evaluated when the rule will be executed. All the condition must be true to return the action associated with the rule.
Show Source
  • Condition
    Conditions to be evaluated. If no parameter is provided then all the conditions will be evaluated with the default values.
Nested Schema : RuleAction
Type: object
Action to be returned when the rule is evaluated true.
Show Source
Nested Schema : ConditionMap
Type: object
Map of key-value pair which is used to reconstruct the rule or any additional parameters that are required by the rule can be passed in the map
Show Source
Nested Schema : value
Type: object
The value can be a json object or a simple string.
Nested Schema : Condition
Type: object
Conditions to be evaluated. If no parameter is provided then all the conditions will be evaluated with the default values.
Show Source
Nested Schema : parameters
Type: array
List of all the overriding parameters.
Show Source
Nested Schema : ConditionParameter
Type: object
Parameter of a condition that is required when the condition is evaluated.
Show Source

500 Response

Internal server error

503 Response

Service Unavailable
Back to Top

Examples

The following example shows a sample request and response for creating a new policy and agent.

cURL Command to Create Policy and Agent in JSON Format

curl --location --request POST '<PolicyUrl>/oaa-policy/aggregation/v1?detailresponse=true' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--header 'Content-Type: application/json' \
--data '{
    "agentname" : "AggregationAPIAgent",
    "assuranceLevelId" : "AggregationAgentAssuranceLevel",
    "type" : "API",
    "actions" : ["ChallengeEmail" , "ChallengeSMS" , "ChallengeOMATOTP", "ChallengeYubicoOTP", "ChallengeFIDO2"]
}'

Sample Response in JSON Format

{
    "agent": {
        "agentName": "AggregationAPIAgent",
        "clientId": "da3b521d-5ec2-4956-a412-046df1c8c9ea",
        "clientSecret": "8cce2702-824b-4377-b1a3-99419cfcec7f",
        "clientType": "api",
        "agentgid": "0463b32d-70a1-4ca8-81e1-58f1a8728690",
        "createTime": {
            "parseFailed": false,
            "dateTime": "2021-04-01T01:49:20.470Z",
            "rawParam": "2021-04-01T01:49:20.470Z"
        },
        "updateTime": {
            "parseFailed": false,
            "dateTime": "2021-04-01T01:49:20.471Z",
            "rawParam": "2021-04-01T01:49:20.471Z"
        }
    },
    "assuranceLevel": {
        "id": "AggregationAgentAssuranceLevel",
        "name": "AggregationAgentAssuranceLevel",
        "description": "Created by Aggregation API for agentAggregationAPIAgent",
        "agentid": "0463b32d-70a1-4ca8-81e1-58f1a8728690"
    },
    "policy": {
        "agentgid": "0463b32d-70a1-4ca8-81e1-58f1a8728690",
        "assuranceLevelId": "AggregationAgentAssuranceLevel",
        "name": "AggregationAPIAgent68d3f589",
        "description": "Created by Aggregation API for agentAggregationAPIAgent",
        "status": "ACTIVE",
        "scoringEngine": "Weighted Average",
        "weight": 100,
        "policygid": "174_128fe9d6967edf9c90283c84e002d18d211cbe082bf168b1376e3e07e4512dcd"
    },
    "rule": {
        "name": "AggregationAPIAgent68d3f589",
        "rulegid": "178_663c4a4fbb4c6ef1bd9c9563c259de2de7baad626921de3255a8b633e32fc1be",
        "policygid": "174_128fe9d6967edf9c90283c84e002d18d211cbe082bf168b1376e3e07e4512dcd",
        "status": "ACTIVE",
        "note": "Created by Aggregation API for agentAggregationAPIAgent",
        "conditions": [
            {
                "conditionKey": "always_on_user.condition0",
                "conditionId": "177_192b8bdc19927812d85ec01c71664b670290596c9d171eeaa82e46a63ffb5688",
                "parameters": [
                    {
                        "paramname": "isTrue",
                        "value": "true"
                    }
                ]
            }
        ],
        "results": {
            "action": "173_db05090771e58ef53d0549c7014a090613b96b6f5a90f2347abe59d1fdc9a292",
            "score": 1000,
            "weight": 100
        }
    },
    "group": {
        "groupid": "173_db05090771e58ef53d0549c7014a090613b96b6f5a90f2347abe59d1fdc9a292",
        "agentid": "0463b32d-70a1-4ca8-81e1-58f1a8728690",
        "grouptype": "Actions",
        "groupname": "AggregationAPIAgent68d3f589",
        "description": "Created by Aggregation API for agentAggregationAPIAgent",
        "values": [
            "ChallengeEmail",
            "ChallengeSMS",
            "ChallengeOMATOTP",
            "ChallengeYubicoOTP",
            "ChallengeFIDO2"
        ]
    }
}

cURL Command to Create Policy and Agent in XML Format

curl --location --request POST '<PolicyUrl>/oaa-policy/aggregation/v1?detailresponse=true' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--header 'Content-Type: application/json' \
--data '<?xml version="1.0" encoding="UTF-8" ?>
 <AggregationRequest>
     <agentname>AggregationAPIAgent</agentname>
     <assuranceLevelId>AggregationAgentAssuranceLevel</assuranceLevelId>
     <type>API</type>
     <actions>ChallengeEmail</actions>
     <actions>ChallengeSMS</actions>
     <actions>ChallengeOMATOTP</actions>
     <actions>ChallengeYubicoOTP</actions>
     <actions>ChallengeFIDO2</actions>
 </AggregationRequest>'

Sample Response in XML Format

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <AggregationResponse>
     <agent>
         <agentName>AggregationAPIAgent</agentName>
         <clientId>da3b521d-5ec2-4956-a412-046df1c8c9ea</clientId>
         <clientSecret>8cce2702-824b-4377-b1a3-99419cfcec7f</clientSecret>
         <clientType>api</clientType>
         <agentgid>0463b32d-70a1-4ca8-81e1-58f1a8728690</agentgid>
         <createTime>
             <parseFailed>false</parseFailed>
             <dateTime>2021-04-01T01:49:20.470Z</dateTime>
             <rawParam>2021-04-01T01:49:20.470Z</rawParam>
         </createTime>
         <updateTime>
             <parseFailed>false</parseFailed>
             <dateTime>2021-04-01T01:49:20.471Z</dateTime>
             <rawParam>2021-04-01T01:49:20.471Z</rawParam>
         </updateTime>
     </agent>
     <assuranceLevel>
         <id>AggregationAgentAssuranceLevel</id>
         <name>AggregationAgentAssuranceLevel</name>
         <description>Created by Aggregation API for agentAggregationAPIAgent</description>
         <agentid>0463b32d-70a1-4ca8-81e1-58f1a8728690</agentid>
     </assuranceLevel>
     <policy>
         <agentgid>0463b32d-70a1-4ca8-81e1-58f1a8728690</agentgid>
         <assuranceLevelId>AggregationAgentAssuranceLevel</assuranceLevelId>
         <name>AggregationAPIAgent68d3f589</name>
         <description>Created by Aggregation API for agentAggregationAPIAgent</description>
         <status>ACTIVE</status>
         <scoringEngine>Weighted Average</scoringEngine>
         <weight>100</weight>
         <policygid>174_128fe9d6967edf9c90283c84e002d18d211cbe082bf168b1376e3e07e4512dcd</policygid>
     </policy>
     <rule>
         <name>AggregationAPIAgent68d3f589</name>
         <rulegid>178_663c4a4fbb4c6ef1bd9c9563c259de2de7baad626921de3255a8b633e32fc1be</rulegid>
         <policygid>174_128fe9d6967edf9c90283c84e002d18d211cbe082bf168b1376e3e07e4512dcd</policygid>
         <status>ACTIVE</status>
         <note>Created by Aggregation API for agentAggregationAPIAgent</note>
         <conditions>
             <conditionKey>always_on_user.condition0</conditionKey>
             <conditionId>177_192b8bdc19927812d85ec01c71664b670290596c9d171eeaa82e46a63ffb5688</conditionId>
             <parameters>
                 <paramname>isTrue</paramname>
                 <value>true</value>
             </parameters>
         </conditions>
         <results>
             <action>173_db05090771e58ef53d0549c7014a090613b96b6f5a90f2347abe59d1fdc9a292</action>
             <score>1000</score>
             <weight>100</weight>
         </results>
     </rule>
     <group>
         <groupid>173_db05090771e58ef53d0549c7014a090613b96b6f5a90f2347abe59d1fdc9a292</groupid>
         <agentid>0463b32d-70a1-4ca8-81e1-58f1a8728690</agentid>
         <grouptype>Actions</grouptype>
         <groupname>AggregationAPIAgent68d3f589</groupname>
         <description>Created by Aggregation API for agentAggregationAPIAgent</description>
         <values>ChallengeEmail</values>
         <values>ChallengeSMS</values>
         <values>ChallengeOMATOTP</values>
         <values>ChallengeYubicoOTP</values>
         <values>ChallengeFIDO2</values>
     </group>
 </AggregationResponse>
Back to Top