Fix documentation to match REST endpoint
Change-Id: Iac7d464d1d9d8ea102551215a83c4915cdca88f3
diff --git a/src/main/resources/Documentation/rest-api-changes.md b/src/main/resources/Documentation/rest-api-changes.md
index 5cb8662..db5410e 100644
--- a/src/main/resources/Documentation/rest-api-changes.md
+++ b/src/main/resources/Documentation/rest-api-changes.md
@@ -28,7 +28,7 @@
### <a id="get-verifications"> Get Verifications
-__GET__ /changes/{change-id}/revisions/{revision-id}/review
+__GET__ /changes/{change-id}/revisions/{revision-id}/@PLUGIN@~verifications
Gets the [verifications](#verification-info) for a change. Please refer to the
general [changes rest api](../../../Documentation/rest-api-changes.html#get-review)
@@ -37,7 +37,7 @@
#### Request
```
- GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/review HTTP/1.0
+ GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/verifications HTTP/1.0
```
#### Response
@@ -49,106 +49,35 @@
)]}'
{
- "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940",
- "project": "myProject",
- "branch": "master",
- "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940",
- "subject": "Implementing Feature X",
- "status": "NEW",
- "created": "2013-02-01 09:59:32.126000000",
- "updated": "2013-02-21 11:16:36.775000000",
- "mergeable": true,
- "insertions": 34,
- "deletions": 45,
- "_number": 3965,
- "owner": {
- "_account_id": 1000096,
- "name": "John Doe",
- "email": "john.doe@example.com"
+ "gate-horizon-pep8": {
+ "url": "https://ci.host.com/jobs/gate-horizon-pep8/1711",
+ "value": 1,
+ "verifier": "Jenkins",
+ "comment": "Non Voting",
+ "granted": "15 Mar 2016 08:10:41"
},
- "labels": {
- "Verified": {
- "all": [
- {
- "value": 0,
- "_account_id": 1000096,
- "name": "John Doe",
- "email": "john.doe@example.com"
- },
- ],
- "values": {
- "-1": "Fails",
- " 0": "No score",
- "+1": "Verified"
- }
- },
- "Code-Review": {
- "all": [
- {
- "value": 1,
- "_account_id": 1000097,
- "name": "Jane Roe",
- "email": "jane.roe@example.com"
- }
- ]
- "values": {
- "-2": "This shall not be merged",
- "-1": "I would prefer this is not merged as is",
- " 0": "No score",
- "+1": "Looks good to me, but someone else must approve",
- "+2": "Looks good to me, approved"
- }
- }
- },
- "permitted_labels": {
- "Verified": [
- "-1",
- " 0",
- "+1"
- ],
- "Code-Review": [
- "-2",
- "-1",
- " 0",
- "+1",
- "+2"
- ]
- },
- "removable_reviewers": [
- {
- "_account_id": 1000097,
- "name": "Jane Roe",
- "email": "jane.roe@example.com"
- }
- ],
- "current_revision": "674ac754f91e64a0efb8087e59a176484bd534d1",
- "revisions": {
- "674ac754f91e64a0efb8087e59a176484bd534d1": {
- "_number": 2,
- "ref": "refs/changes/65/3965/2",
- "fetch": {
- "http": {
- "url": "http://gerrit/myProject",
- "ref": "refs/changes/65/3965/2"
- }
- },
- "verifications": {
- "gate-horizon-pep8": {
- "comment": "Non Voting",
- "url": "https://ci.host.com/jobs/pep8/4711",
- "value": -1
- "verifier": "Jenkins",
- }
- }
+ "gate-horizon-python27": {
+ "url": "https://ci.host.com/jobs/gate-horizon-python27/1711",
+ "value": 1,
+ "verifier": "Jenkins",
+ "comment": "Passed",
+ "granted": "15 Mar 2016 08:30:16"
+ }
+ "gate-horizon-python34": {
+ "url": "https://ci.host.com/jobs/gate-horizon-python34/1711",
+ "value": -1,
+ "verifier": "Jenkins",
+ "comment": "Failed",
+ "granted": "15 Mar 2016 08:40:23"
}
}
```
### <a id="post-verify"> Post Verify
-__POST__ /changes/{change-id}/revisions/{revision-id}/verify'
+__POST__ /changes/{change-id}/revisions/{revision-id}/@PLUGIN@~verifications
-Posts a verification on a patchset revision.
+Posts a verification result to a patchset.
The verification must be provided in the request body as a
[VerifyInput](#verify-input) entity.
@@ -156,30 +85,36 @@
#### Request
```
- POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/verify HTTP/1.0
+ POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/verify-status~verifications HTTP/1.0
Content-Type: application/json;charset=UTF-8
```
#### Example
-Verified gate-horizon-pep8 test with vote=+1 on the change with commit 14a95001c.
+Post two verification results to patchset revision 14a95001c.
_Notice_ two levels of quoting are required, one for the local shell, and
another for the argument parser inside the Gerrit server.
```
curl -X POST --digest --user joe:secret --data-binary
-@verification_data.txt --header "Content-Type: application/json; charset=UTF-8"
-http://localhost:8080/a/changes/1000/revisions/4d5fda7e653534b1709883d96264910fab03ddbb/verify
+@verification_data.txt --header "Content-Type: application/json; charset=UTF-8"
+http://localhost:8080/a/changes/1000/revisions/14a95001c/verify-status~verifications
$ cat verification_data.txt
{
"verifications": {
- "gate-puma-pep8": {
+ "gate-horizon-python27": {
+ "url": "https://ci.host.com/jobs/gate-horizon-python27/1711",
+ "value": 1,
+ "verifier": "Jenkins",
+ "comment": "Passed"
+ },
+ "gate-horizon-python34": {
+ "url": "https://ci.host.com/jobs/gate-horizon-python34/1711",
"value": -1,
- "url": "https://ci.host.com/jobs/pep8/1711",
- "comment": "Failed",
- "verifier": "Jenkins"
+ "verifier": "Jenkins",
+ "comment": "Failed"
}
}
}