# drule.iswritable

### Description

`boolean drule.iswritable(array discoveryRuleIds)`

This method checks if the given discovery rules are available for
writing.

### Parameters

`(array)` IDs of the discovery rules to check.

### Return values

`(boolean)` Returns `true` if the given discovery rules are available
for writing.

### Examples

#### Check multiple discovery rules

Check if the two discovery rules are writable.

Request:

``` {.java}
{
    "jsonrpc": "2.0",
    "method": "drule.iswritable",
    "params": [
        "5",
        "8"
    ],
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```

Response:

``` {.java}
{
    "jsonrpc": "2.0",
    "result": true,
    "id": 1
}
```

### See also

-   [drule.isreadable](isreadable)
-   [drule.exists](exists)

### Source

CDRule::isWritable() in *frontends/php/api/classes/CDRule.php*.
