Updates the group

put

/oaa-policy/group/v1/{groupid}

Updates Group API

Request

Path Parameters
Supported Media Types
Request Body - application/xml ()
Root Schema : schema
Type: object
Request object to update group structure
Show Source
Nested Schema : addvalues
Type: array
Values to be added to the group. It can be of type long, string, integer. For IP range it needs to be long.
Show Source
Nested Schema : removevalues
Type: array
Values to be removed from the group. Values which are not present will be ignored.
Show Source
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Request Body - application/json ()
Root Schema : schema
Type: object
Request object to update group structure
Show Source
Nested Schema : addvalues
Type: array
Values to be added to the group. It can be of type long, string, integer. For IP range it needs to be long.
Show Source
Nested Schema : removevalues
Type: array
Values to be removed from the group. Values which are not present will be ignored.
Show Source
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Back to Top

Response

Supported Media Types

200 Response

Group is updated
Body ()
Root Schema : GroupResponse
Type: object
Group response object
Show Source
Nested Schema : schema
Type: object
Defines a new group structure
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

401 Response

Unauthorized

405 Response

Invalid input
Body ()
Root Schema : GroupResponse
Type: object
Group response object
Show Source
Nested Schema : schema
Type: object
Defines a new group structure
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

500 Response

Internal server error

503 Response

Service Unavailable
Back to Top

Examples

The following example shows a sample request and response for updating the group.

cURL Command to Update a Group in JSON Format

curl --location --request PUT '<PolicyUrl>/oaa-policy/group/v1/111_4141dd92a40fa2ff8d09153e62c658c67f3c7ac014ce89c0c103896230457718' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--data '{
    "groupname": "FactorRuleGrp1",
    "description": "Group to set factors",
    "addvalues": [
        "ChallengeOMATOTP",
        "ChallengeYubicoOTP"
    ],
    "removevalues": [
        "ChallengeSMS"
    ]
}'

Sample Response in JSON Format

{
    "status": "200",
    "message": "Group updated",
    "groupid": "111_4141dd92a40fa2ff8d09153e62c658c67f3c7ac014ce89c0c103896230457718",
    "group": {
        "groupid": "111_4141dd92a40fa2ff8d09153e62c658c67f3c7ac014ce89c0c103896230457718",
        "agentid": "dede64d3-1d6a-42e9-89e1-714e88f8967c",
        "grouptype": "Actions",
        "groupname": "FactorRuleGrp1",
        "description": "Group to set factors",
        "values": [
            "ChallengeEmail",
            "ChallengeOMATOTP",
            "ChallengeYubicoOTP"
        ]
    }
}

cURL Command to Update a Group in XML Format

curl --location --request PUT '<PolicyUrl>/oaa-policy/group/v1/111_4141dd92a40fa2ff8d09153e62c658c67f3c7ac014ce89c0c103896230457718' \
--header 'Content-Type: application/xml' \
--header 'Accept: application/xml' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--data '<?xml version="1.0" encoding="UTF-8" ?>
 <UpdateGroupRequest>
     <groupname>FactorRuleGrp1</groupname>
     <description>Group to set factors</description>
     <addvalues>ChallengeOMATOTP</addvalues>
     <addvalues>ChallengeYubicoOTP</addvalues>
     <removevalues>ChallengeSMS</removevalues>
 </UpdateGroupRequest>
'

Sample Response in XML Format

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <GroupResponse>
     <status>200</status>
     <message>Group updated</message>
     <groupid>111_4141dd92a40fa2ff8d09153e62c658c67f3c7ac014ce89c0c103896230457718</groupid>
     <group>
         <groupid>111_4141dd92a40fa2ff8d09153e62c658c67f3c7ac014ce89c0c103896230457718</groupid>
         <agentid>dede64d3-1d6a-42e9-89e1-714e88f8967c</agentid>
         <grouptype>Actions</grouptype>
         <groupname>FactorRuleGrp1</groupname>
         <description>Group to set factors</description>
         <values>ChallengeEmail</values>
         <values>ChallengeOMATOTP</values>
         <values>ChallengeYubicoOTP</values>
     </group>
 </GroupResponse>
Back to Top