Get a list of smart group rules by sending the GET method to the following URL/group/smart/{group_id}/rules.

Permissions to run the request: Account OwnerAdministratorsDepartment Administrators or users with a role with custom settings.

Request Headers

Parameter

Description

X-Auth-Account-Url (required)The base URL of the account, e.g. http://myaccount.ispringlearn.com.
X-Auth-Email (required)The login of Account OwnerAdministratorsDepartment Administrators or a user with a role with custom settings. 
X-Auth-Password (required)The login of Account OwnerAdministratorsDepartment Administrators or a user with a role with custom settings. 
group_id (required)The ID of a smart group whose rules you would like to get.

After the request has been processed, the system returns the response with the 200 code. The response contains a list of smart group rules.

Response Codes

Code

Text

Description

200Successful operationThe request was successfully processed.
400Bad RequestA request error.
401UnauthorizedAn authorization error.
403Permission DeniedThe user doesn't have enough permissions to get smart group rules.

Sample Request

GET /group/smart/3fa85f64-5717-4562-b3fc-2c963f66afa6/rules HTTP/1.1
Host: api-learn.ispringlearn.com
X-Auth-Account-Url: http://myaccount.ispringlearn.com
X-Auth-Password: password


Sample Response

HTTP/1.1 200 Successful operation
Connection: close
 
<?xml version="1.0" encoding="UTF-8"?>
<response>
    <smartGroupRules>
        <groupId>3fa85f64-5717-4562-b3fc-2c963f66afa6</groupId>
        <rules>
           <and>
            <or>
                <rule>
                    <attributeType>1</attributeType>
                    <attributeId></attributeId>
                    <operator>1</operator>
                    <value>6f774f46-de00-11e9-bb11-0a580af40984</value>
                </rule>
            </or>
            <or>
                 <rule>
                    <attributeType>2</attributeType>
                    <attributeId></attributeId>
                    <operator>1</operator>
                    <value>eb53de1e-dea4-11e9-8de4-0a580af40738</value>
                </rule>
            </or>
            <or>
                <rule>
                     <attributeType>3</attributeType>
                     <attributeId>14072df2-d54f-11e9-a7ce-0a580af40973</attributeId>
                     <operator>1</operator>
                     <value>Sales Manager</value>
                </rule>
            </or>
        </and>
      </rules>
    </smartGroupRules>
</response>