---
title: Catalog.Rule
slug: ps/help/en_us/vtm/controlapi/catalogrule
docTags: 
createdAt: 2026-08-02T08:52:21.825Z
---

URI: http\://soap.zeus.com/zxtm/1.0/Catalog/Rule/

The Catalog.Rule interface allows management of TrafficScript Rules. Using this interface, you can create, delete and rename rules, and manage their configuration. You can also syntax-check rule fragments.

### Methods

### addRule( names, texts ) throws InvalidObjectName, ObjectAlreadyExists, DeploymentError

Add new rules to the catalog.

```bash
void addRule(
String[] names
String[] texts
)
```

### checkSyntax( rule\_text )

Check the syntax of each of the supplied TrafficScript rule texts. This method does not modify any configuration.

```bash
Catalog.Rule.SyntaxCheck[] checkSyntax(
String[] rule_text
)
```

### copyRule( names, new\_names ) throws InvalidObjectName, ObjectAlreadyExists, ObjectDoesNotExist, DeploymentError

Copy the named rules in the catalog.

```bash
void copyRule(
String[] names
String[] new_names
)
```

### deleteRule( names ) throws ObjectInUse, ObjectDoesNotExist, DeploymentError, InvalidOperation

Delete the named rules from the catalog.

```bash
void deleteRule(
String[] names
)
```

### getRuleDetails( names ) throws ObjectDoesNotExist, DeploymentError

Get the rule text and notes (if any), for each of the named rules.

```bash
Catalog.Rule.RuleInfo[] getRuleDetails(
String[] names
)
```

### getRuleNames()

Get the names of all rules in the catalog.

```bash
String[] getRuleNames()
```

### renameRule( names, new\_names ) throws InvalidObjectName, ObjectAlreadyExists, ObjectDoesNotExist, DeploymentError, InvalidOperation

Rename the named rules in the catalog.

```bash
void renameRule(
String[] names
String[] new_names
)
```

### setRuleNotes( names, notes ) throws ObjectDoesNotExist, DeploymentError

Sets the descriptive notes for each of the named rules in the catalog.

```bash
void setRuleNotes(
String[] names
String[] notes
)
```

### setRuleText( names, text ) throws ObjectDoesNotExist, DeploymentError

Set the TrafficScript text for each of the named rules in the catalog.

```bash
void setRuleText(
String[] names
String[] text
)
```

### Structures

### Catalog.Rule.RuleInfo

This structure contains basic information for a rule in the catalog.

```bash
struct Catalog.Rule.RuleInfo {
# The rule text
String rule_text;
# The descriptive notes for the rule.
String rule_notes;
}
```

### Catalog.Rule.SyntaxCheck

This structure contains the results of a rule syntax check against a rule in the catalog.

```bash
struct Catalog.Rule.SyntaxCheck {
# Whether the rule text is valid or not.
Boolean valid;
# Any warnings (such as deprecated functions) associated with the rule text.
String warnings;
# Any errors (such as syntax errors) associated with the rule text.
String errors;
}
```
