This page describes the ‘/changes/’ REST endpoints that are added by the @PLUGIN@ plugin.
Please also take note of the general information on the REST API.
GET /changes/{change-id}/revisions/{revision-id}/@PLUGIN@~verifications
Gets the verifications for a change. Please refer to the general changes rest api for additional info on this request.
GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/verifications HTTP/1.0
HTTP/1.1 200 OK Content-Disposition: attachment Content-Type: application/json; charset=UTF-8 )]}' { "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" }, "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" } }
POST /changes/{change-id}/revisions/{revision-id}/@PLUGIN@~verifications
Posts a verification result to a patchset.
The verification must be provided in the request body as a VerifyInput entity.
POST /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/verify-status~verifications HTTP/1.0 Content-Type: application/json;charset=UTF-8
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/14a95001c/verify-status~verifications $ cat verification_data.txt { "verifications": { "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, "verifier": "Jenkins", "comment": "Failed" } } }
The VerifyInput
entity contains information for adding a verification to a revision.
Field Name | Description | |
---|---|---|
category | required | The name of the category to be added as a verification |
value | required | The value associated with the category |
comment | optional | The comment associated with the category |
url | optional | The url associated with the category |
verifier | optional | The user that verified the revision |
The RevisionInfo
entity contains information about a patch set. Not all fields are returned by default. Additional fields can be obtained by adding o
parameters as described in Query Changes
Field Name | Description | |
---|---|---|
verifications | optional | The verifications on the patchset as a list of VerificationInfo entities |
The VerificationInfo
entity describes a verification on a patch set.
Field Name | Description |
---|---|
comment | A short comment about about this verification |
url | The URL for this verification |
value | The value for this verification |
verifier | The user that reported this verification |
Part of Gerrit Code Review