mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Add an explicit example of constraining "transaction.search" to the webhook documentation
Summary: Depends on D19509. Ref T13151. See PHI725. `transaction.search` supports "constraints" and the documentation mentions it in passing, but doesn't really show how to do it, and the method is not automatically self-documenting because it isn't a "real" `*.search` method. Add an example of how to use the `contraints` parameter to retrieve information about only the relevant transactions. Also remove a refernece to `requestb.in`, which is now defunct. Test Plan: Called `transaction.search` with similar parameters. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13151 Differential Revision: https://secure.phabricator.com/D19510
This commit is contained in:
parent
a94528ee4a
commit
ca1349ab45
1 changed files with 14 additions and 3 deletions
|
@ -38,9 +38,6 @@ options:
|
|||
phabricator/ $ ./bin/webhook call --id 42 --object D123
|
||||
```
|
||||
|
||||
You can use a tool like [[ https://requestb.in | RequestBin ]] to inspect
|
||||
the headers and payload for calls to hooks.
|
||||
|
||||
|
||||
Verifying Requests
|
||||
==================
|
||||
|
@ -157,6 +154,20 @@ Hooks that are interested in changes should generally make a call to
|
|||
`transaction.search`, passing the transaction PHIDs as a constraint to retrieve
|
||||
details about the transactions.
|
||||
|
||||
For example, your call to `transaction.search` may look something like this:
|
||||
|
||||
```lang=json
|
||||
{
|
||||
"objectIdentifier": "PHID-XXXX-abcdef",
|
||||
"constraints": {
|
||||
"phids": [
|
||||
"PHID-XACT-XXXX-11111111",
|
||||
"PHID-XACT-XXXX-22222222"
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The `phid.query` method can also be used to retrieve generic information about
|
||||
a list of objects.
|
||||
|
||||
|
|
Loading…
Reference in a new issue