Skip to content

Commit c4cdf25

Browse files
committed
allow regular expressions everywhere
1 parent 9359d8a commit c4cdf25

File tree

2 files changed

+182
-148
lines changed

2 files changed

+182
-148
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,25 @@ curl -s -u '<username>:<password>' -H "Content-Type: application/json" -X POST -
2727
```
2828
curl -s -u '<username>:<password>' https://example.org/pnp4nagios/index.php/api/hosts
2929
```
30+
3031
#### List services of a host
3132
```
3233
curl -s -u '<username>:<password>' -H "Content-Type: application/json" -X POST -d '
3334
{
3435
"host":"host.example.org"
3536
}' https://example.org/pnp4nagios/index.php/api/services
3637
```
38+
39+
You can use regular expressions for host lists:
40+
41+
```
42+
curl -s -u '<username>:<password>' -H "Content-Type: application/json" -X POST -d '
43+
{
44+
"host":"/^local"
45+
}' https://example.org/pnp4nagios/index.php/api/services
46+
```
47+
48+
3749
#### List labels of a service of specific host
3850
```
3951
curl -s -u '<username>:<password>' -H "Content-Type: application/json" -X POST -d '

0 commit comments

Comments
 (0)