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
-
detailresponse: boolean
If the flag is true then all artifacts( agent, assurance level, policy, rule etc.) present for this request will be returned.
Supported Media Types
- application/xml
- application/json
Root Schema : schema
Type:
objectRequest for creating all artifacts related to policy including agent, assurance level, policy and default rule.
Show Source
-
actions(required): array
actions
List of actions which can be returned when policy with assurance level is executed.
-
agentid(required): string
Unique agent id of a pre existing agent.
-
agentname: string
Name of the agent if agentid is missing it will used to create new agent with this name.
-
assuranceLevelId: string
Id of the assurance level. If not present then it will generated by the system.
-
type: string
Type of the client. it can be one of the values from api, oam or radius.
Nested Schema : actions
Type:
arrayList of actions which can be returned when policy with assurance level is executed.
Show Source
Root Schema : schema
Type:
objectRequest for creating all artifacts related to policy including agent, assurance level, policy and default rule.
Show Source
-
actions(required): array
actions
List of actions which can be returned when policy with assurance level is executed.
-
agentid(required): string
Unique agent id of a pre existing agent.
-
agentname: string
Name of the agent if agentid is missing it will used to create new agent with this name.
-
assuranceLevelId: string
Id of the assurance level. If not present then it will generated by the system.
-
type: string
Type of the client. it can be one of the values from api, oam or radius.
Nested Schema : actions
Type:
arrayList of actions which can be returned when policy with assurance level is executed.
Show Source
Response
Supported Media Types
- application/xml
- application/json
201 Response
Agent along with all assurance level and policies are created.
Root Schema : AggregationResponse
Type:
objectAll created artifacts of the policy are present here including agent, assurance level, policy and default rule.
Show Source
-
agent: object
schema
Details of the agent
-
assuranceLevel: object
AssuranceLevel
Details for a single assurance level.
-
group: object
Group
Defines a new group structure
-
policy: object
Policy
Policy object for creating, modifying and fetching policy.
-
rule: object
Rule
Defines policy rule in the system
Nested Schema : schema
Type:
objectDetails of the agent
Show Source
-
agentgid: string
Unique identifier of the agent.
-
agentName(required): string
Unique name of the agent
-
clientId: string
Client id of the agent used to identify agents
-
clientSecret: string
Client secret used for the authenticating client
-
clientType(required): string
Client type. Possible value for this field is OAM, Radius or API.
-
createTime: string
(date-time)
"Date time string in the format rfc3339 sec 5.6. https://tools.ietf.org/html/rfc3339#section-5.6"
-
description: string
Description of the agent
-
privateKey: string
String representation of the private key of the agent which can be used to encrypt/decrypt the request parameters.
-
privateKeyFile: string
File name of the private key.
-
privateKeyPassword: string
Base64 encoded password of the private key.
-
updateTime: string
(date-time)
"Date time string in the format rfc3339 sec 5.6. https://tools.ietf.org/html/rfc3339#section-5.6"
Nested Schema : AssuranceLevel
Type:
objectDetails for a single assurance level.
Show Source
-
agentid(required): string
Agent identifier to which the assurance level belongs
-
description(required): string
Description of the assurance level
-
id: string
Assurance level identifier
-
name(required): string
Name of the assurance level
Nested Schema : Group
Type:
objectDefines a new group structure
Show Source
-
agentid: string
Identifier of the agent which owns the group.
-
description: string
Description of the group.
-
groupid(required): string
Unique identifier of group.
-
groupname(required): string
Unique name of the group in the system.
-
grouptype(required): string
Type of the group. Can be one of the User ID, Generic Strings, Actions, IP Ranges and IPs
-
values: array
values
Values of elements in the group. Values depend on type of group.
Nested Schema : Policy
Type:
objectPolicy object for creating, modifying and fetching policy.
Show Source
-
agentgid(required): string
Identifier of the agent to which the policy belongs
-
assuranceLevelId(required): string
Identifier of the assurance level which is associated with the policy
-
description(required): string
Policy description.
-
name(required): string
Policy Name.
-
policygid: string
Identifier of the policy
-
scoringEngine: string
Engine used for scoring the policy (Aggregated, Average, Maximum, Minimum, Weighted Average, Weighted Maximum, Weighted Minimum)
-
status(required): string
Status of the policy. It can be one of the following values. Active, Disabled or Deleted.
-
weight: integer
Number between 0 to 100 to define the weight of the policy if there are multiple policies in the assurance level.
Nested Schema : Rule
Type:
objectDefines policy rule in the system
Show Source
-
conditionMap: array
conditionMap
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.
-
conditions: array
conditions
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.
-
name(required): string
Name of the rule.
-
note: string
Note (if any) for the rule
-
policygid(required): string
Global id of the policy. Policy id may not be required when rule definition is part of policy definition result
-
results(required): object
RuleAction
Action to be returned when the rule is evaluated true.
-
rulegid: string
Global unique identifier of the rule.
-
status: string
Active or Disabled
-
transactiongid: string
Unique id of the transaction to be used for the rule evaluation which is then checked using filter conditions
Nested Schema : values
Type:
arrayValues of elements in the group. Values depend on type of group.
Show Source
Nested Schema : items
Type:
objectNested Schema : conditionMap
Type:
arrayMap 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
-
Array of:
object 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:
arrayArray 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
-
Array of:
object 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:
objectAction to be returned when the rule is evaluated true.
Show Source
-
action: string
Action group name
-
alert: string
Alert group name
-
score: integer
Score returned by the rule
-
weight: integer
Weight if the score if there are multiple rules in the context.
Nested Schema : ConditionMap
Type:
objectMap 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
-
key: string
-
value: object
value
The value can be a json object or a simple string.
Nested Schema : value
Type:
objectThe value can be a json object or a simple string.
Nested Schema : Condition
Type:
objectConditions to be evaluated. If no parameter is provided then all the conditions will be evaluated with the default values.
Show Source
-
conditionId: string
The global identifier of the condition which can be used to update the condition inside a rule.
-
conditionKey(required): string
Unique key of the condition. May be repeated for multiple conditions of same type.
-
parameters: array
parameters
List of all the overriding parameters.
-
remove: boolean
Remove the condition from the rule. It is optional.
Nested Schema : parameters
Type:
arrayList of all the overriding parameters.
Show Source
-
Array of:
object ConditionParameter
Parameter of a condition that is required when the condition is evaluated.
Nested Schema : ConditionParameter
Type:
objectParameter of a condition that is required when the condition is evaluated.
Show Source
-
operations: string
Operation performed on the key. The operation may not be required
-
paramname: string
Key to be used for the operation
-
scope: string
Filter condition. One of Value or Current. The scope is not required.
-
value: string
Value to be matched based on the scope.
401 Response
Unauthorized
405 Response
Invalid input
Root Schema : AggregationResponse
Type:
objectAll created artifacts of the policy are present here including agent, assurance level, policy and default rule.
Show Source
-
agent: object
schema
Details of the agent
-
assuranceLevel: object
AssuranceLevel
Details for a single assurance level.
-
group: object
Group
Defines a new group structure
-
policy: object
Policy
Policy object for creating, modifying and fetching policy.
-
rule: object
Rule
Defines policy rule in the system
Nested Schema : schema
Type:
objectDetails of the agent
Show Source
-
agentgid: string
Unique identifier of the agent.
-
agentName(required): string
Unique name of the agent
-
clientId: string
Client id of the agent used to identify agents
-
clientSecret: string
Client secret used for the authenticating client
-
clientType(required): string
Client type. Possible value for this field is OAM, Radius or API.
-
createTime: string
(date-time)
"Date time string in the format rfc3339 sec 5.6. https://tools.ietf.org/html/rfc3339#section-5.6"
-
description: string
Description of the agent
-
privateKey: string
String representation of the private key of the agent which can be used to encrypt/decrypt the request parameters.
-
privateKeyFile: string
File name of the private key.
-
privateKeyPassword: string
Base64 encoded password of the private key.
-
updateTime: string
(date-time)
"Date time string in the format rfc3339 sec 5.6. https://tools.ietf.org/html/rfc3339#section-5.6"
Nested Schema : AssuranceLevel
Type:
objectDetails for a single assurance level.
Show Source
-
agentid(required): string
Agent identifier to which the assurance level belongs
-
description(required): string
Description of the assurance level
-
id: string
Assurance level identifier
-
name(required): string
Name of the assurance level
Nested Schema : Group
Type:
objectDefines a new group structure
Show Source
-
agentid: string
Identifier of the agent which owns the group.
-
description: string
Description of the group.
-
groupid(required): string
Unique identifier of group.
-
groupname(required): string
Unique name of the group in the system.
-
grouptype(required): string
Type of the group. Can be one of the User ID, Generic Strings, Actions, IP Ranges and IPs
-
values: array
values
Values of elements in the group. Values depend on type of group.
Nested Schema : Policy
Type:
objectPolicy object for creating, modifying and fetching policy.
Show Source
-
agentgid(required): string
Identifier of the agent to which the policy belongs
-
assuranceLevelId(required): string
Identifier of the assurance level which is associated with the policy
-
description(required): string
Policy description.
-
name(required): string
Policy Name.
-
policygid: string
Identifier of the policy
-
scoringEngine: string
Engine used for scoring the policy (Aggregated, Average, Maximum, Minimum, Weighted Average, Weighted Maximum, Weighted Minimum)
-
status(required): string
Status of the policy. It can be one of the following values. Active, Disabled or Deleted.
-
weight: integer
Number between 0 to 100 to define the weight of the policy if there are multiple policies in the assurance level.
Nested Schema : Rule
Type:
objectDefines policy rule in the system
Show Source
-
conditionMap: array
conditionMap
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.
-
conditions: array
conditions
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.
-
name(required): string
Name of the rule.
-
note: string
Note (if any) for the rule
-
policygid(required): string
Global id of the policy. Policy id may not be required when rule definition is part of policy definition result
-
results(required): object
RuleAction
Action to be returned when the rule is evaluated true.
-
rulegid: string
Global unique identifier of the rule.
-
status: string
Active or Disabled
-
transactiongid: string
Unique id of the transaction to be used for the rule evaluation which is then checked using filter conditions
Nested Schema : values
Type:
arrayValues of elements in the group. Values depend on type of group.
Show Source
Nested Schema : items
Type:
objectNested Schema : conditionMap
Type:
arrayMap 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
-
Array of:
object 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:
arrayArray 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
-
Array of:
object 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:
objectAction to be returned when the rule is evaluated true.
Show Source
-
action: string
Action group name
-
alert: string
Alert group name
-
score: integer
Score returned by the rule
-
weight: integer
Weight if the score if there are multiple rules in the context.
Nested Schema : ConditionMap
Type:
objectMap 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
-
key: string
-
value: object
value
The value can be a json object or a simple string.
Nested Schema : value
Type:
objectThe value can be a json object or a simple string.
Nested Schema : Condition
Type:
objectConditions to be evaluated. If no parameter is provided then all the conditions will be evaluated with the default values.
Show Source
-
conditionId: string
The global identifier of the condition which can be used to update the condition inside a rule.
-
conditionKey(required): string
Unique key of the condition. May be repeated for multiple conditions of same type.
-
parameters: array
parameters
List of all the overriding parameters.
-
remove: boolean
Remove the condition from the rule. It is optional.
Nested Schema : parameters
Type:
arrayList of all the overriding parameters.
Show Source
-
Array of:
object ConditionParameter
Parameter of a condition that is required when the condition is evaluated.
Nested Schema : ConditionParameter
Type:
objectParameter of a condition that is required when the condition is evaluated.
Show Source
-
operations: string
Operation performed on the key. The operation may not be required
-
paramname: string
Key to be used for the operation
-
scope: string
Filter condition. One of Value or Current. The scope is not required.
-
value: string
Value to be matched based on the scope.
500 Response
Internal server error
503 Response
Service Unavailable
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>