Smart Rules

Quick Navigation

GET SmartRules

Returns a list of Smart Rules to which the current user has at least Read access.

type: (optional, default: all) Type of Smart Rules to return (all, ManagedAccount, ManagedSystem, and Asset).

None

Content-Type: application/json

[
    {
        SmartRuleID: int,
        OrganizationID : string, // can be null
        Title: string,
        Description: string,
        Category: string,
        Status: int,
        LastProcessedDate: datetime,
        IsReadOnly: bool,
        RuleType: string
    },
    …
]

200 – Request successful. Smart Rule in the response body.

For more information, please see Common Response Codes.

GET SmartRules/{id}

Returns a Smart Rule by ID.

Read access to the Smart Rule referenced by ID

id: ID of the Smart Rule.

None

Content-Type: application/json

{
    SmartRuleID: int,
    OrganizationID : string, // can be null
    Title: string,
    Description: string,
    Category: string,
    Status: int,
    LastProcessedDate: datetime,
    IsReadOnly: bool,
    RuleType: string
}

200 – Request successful. Smart Rule in the response body.

For more information, please see Common Response Codes.

GET UserGroups/{id}/SmartRules/

Returns a list of Smart Rules to which the given User Group ID has at least Read access.

User Accounts Management (Read)

`id`: ID of the UserGroup

`accessLevel`: (optional, default: `1,3`) UserGroup SmartRule Access Level - A single value or comma-delimited list of values:

  • 0 - None
  • 1 - Read
  • 3 - Read//Write

None

Content-Type: application/json

[{
    SmartRuleID: int,
    OrganizationID : string, // can be null
    Title: string,
    Description: string,
    Category: string,
    Status: int,
    LastProcessedDate: datetime,
    IsReadOnly: bool,
    RuleType: string,
    AccessLevelID: int,
}
,...
]

200 – Request successful. Smart Rules with User Group Access Level in the response body.

GET SmartRules?title={title}

Returns a Smart Rule by title.

In a multi-tenant environment, assumes Global Organization.

Read access to the Smart Rule referenced by title.

title: Title of the Smart Rule.

None

Content-Type: application/json

{
    SmartRuleID: int,
    OrganizationID : string, // can be null
    Title: string,
    Description: string,
    Category: string,
    Status: int,
    LastProcessedDate: datetime,
    IsReadOnly: bool,
    RuleType: string
}

200 – Request successful. Smart Rule in the response body.

For more information, please see Common Response Codes.

GET Organizations/{orgID}/SmartRules?title={title}

Returns a Smart Rule by Organization ID and title. This is only valid in a multi-tenant environment.

Read access to the Smart Rule referenced by Organization and title

orgID: ID of the Organization.

title: Title of the Smart Rule

None

Content-Type: application/json

{
    SmartRuleID: int,
    OrganizationID : string, // can be null
    Title: string,
    Description: string,
    Category: string,
    Status: int,
    LastProcessedDate: datetime,
    IsReadOnly: bool,
    RuleType: string
}

200 – Request successful. Smart Rule in the response body.

For more information, please see Common Response Codes.

POST SmartRules/FilterAssetAttribute

Specialized action for creating an Asset-type Smart Rule for filtering Assets by Attributes.

Asset Management (Read/Write)

Content-Type: application/json

{
    AttributeIDs: [ int, …],
    Title: string,
    Category: string,
    Description: string,
    ProcessImmediately: bool
}
  • AttributeIDs: (required) A list of Attribute IDs to filter by. All the Attributes must be of the same Attribute Type.
  • Title: (required) The title/name of the new Smart Rule. Must be unique across all Smart Rules. Max string length is 75.
  • Category: (required) The category in which to place the Smart Rule. Max string length is 50.
  • Description: (optional, default: <value of Title>) The Smart Rule description.
  • ProcessImmediately: (optional, default: true) True to process the Smart Rule immediately, otherwise false to defer processing to the background Smart Rule processor.

Content-Type: application/json

{
    SmartRuleID: int,
    OrganizationID : string, // can be null
    Title: string,
    Description: string,
    Category: string,
    Status: int,
    LastProcessedDate: datetime,
    IsReadOnly: bool
}

Response Codes

201 - Request successful. Smart Rule in response body.

For more information, please see Common Response Codes.

POST SmartRules/{id}/Process

Immediately process a Smart Rule by ID.

Read/Write access to the Smart Rule

ID: ID of the Smart Rule

None

Content-Type: application/json

{
    SmartRuleID: int,
    OrganizationID : string, // can be null
    Title: string,
    Description: string,
    Category: string,
    Status: int,
    LastProcessedDate: datetime,
    IsReadOnly: bool,
    RuleType: string
}
  • 200 – Request successful. Smart Rule in the response body.
  • 409 – Conflict: the Smart Rule is currently processing.

For more information, please see Common Response Codes.

DELETE SmartRules/{id}

Deletes a Smart Rule by ID.

Read/Write access to the Smart Rule referenced by ID

ID: ID of the Smart Rule.

None

None

200 – Request successful.

For more information, please see Common Response Codes.

DELETE SmartRules?title={title}

Deletes a Smart Rule by title.

In a mult-tenant environment, assumes Global Organization.

Read/Write access to the Smart Rule referenced by title

title: Title of the Smart Rule.

None

None

200 – Request successful.

For more information, please see Common Response Codes.

DELETE Organizations/{orgID}/SmartRules?title={title}

Deletes a Smart Rule by Organization ID and title.

Only valid in a multi-tenant environment.

Read/Write access to the Smart Rule referenced by Organization and title

orgID: ID of the Organization.

title: Title of the Smart Rule.

None

None

200 – Request successful.

For more information, please see Common Response Codes.