Skip to content

Commit

Permalink
Better documentation for providing the "input" document over http. Fixes
Browse files Browse the repository at this point in the history
 #1293

Signed-off-by: Daniel Popescu <danielpops@gmail.com>
  • Loading branch information
danielpops authored and patrick-east committed Apr 17, 2019
1 parent af55fe4 commit 50e885f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/content/docs/how-does-opa-work.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,20 @@ allow {
}
```

To supply the input document, query OPA using the POST method.

```
POST /v1/data/opa/examples/allow HTTP/1.1
Content-Type: application/json
{
"input": {
"method": "GET",
"path": "/servers/s2",
"user": "alice"
}
}
```

## Putting It All Together

Let’s take a look at some documents representing the state of a hypothetical service and a policy module that uses this data. The following documents describe a set of servers, the protocols they use, the ports they open, and the networks those ports are connected to.
Expand Down

0 comments on commit 50e885f

Please sign in to comment.