HTTP/1.1201OKContent-Disposition:attachmentContent-Type:application/json;charset=UTF-8)]}'{"id":"myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9941","project":"myProject","branch":"master","topic":"create-change-in-browser","change_id":"I8473b95934b5732ac55d26311a706c9c2bde9941","subject":"Let'ssupport100%Gerritworkflowdirectinbrowser","status":"NEW","created":"2014-05-0507:15:44.639000000","updated":"2014-05-0507:15:44.639000000","mergeable":true,"insertions":0,"deletions":0,"_number":4711,"owner":{"name":"JohnDoe"}}QueryChanges'GET/changes/'
Queryforopenchangesofwatchedprojects:
TheSorstartqueryparametercanbesuppliedtoskipanumberofchangesfromthelist.
Clientsareallowedtospecifymorethanonequerybysettingtheqparametermultipletimes.Inthiscasetheresultisanarrayofarrays,oneperqueryinthesameorderthequeriesweregivenin.
Retrievesachange.
HTTP/1.1200OKContent-Disposition:attachmentContent-Type:application/json;charset=UTF-8)]}'{"id":"myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940","project":"myProject","branch":"master","attention_set":[{"account":{"name":"JohnDoe"},"last_update":"2013-02-2111:16:36.775000000","reason":"reviewerorccreplied"}]"change_id":"I8473b95934b5732ac55d26311a706c9c2bde9940","subject":"ImplementingFeatureX","status":"NEW","created":"2013-02-0109:59:32.126000000","updated":"2013-02-2111:16:36.775000000","mergeable":true,"insertions":34,"deletions":101,"_number":3965,"owner":{"name":"JohnDoe"}}Historicalstateofthechangecanberetrievedbyspecifyingthemeta=SHA-1parameter.ThiswilluseahistoricalNoteDbsnapshottopopulateChangeInfo.IftheSHA-1isnotreachableasaNoteDbstate,statuscode412isreturned.
Retrievesthedifferencebetweentwohistoricalstatesofachangebyspecifyingtheold=SHA-1andthemeta=SHA-1parameters.
Iftheoldparameterisnotprovided,theparentofthemetaSHA-1isused.Ifthemetaparameterisnotprovided,thecurrentstateofthechangeisused.Ifneitherareprovided,thedifferencebetweenthecurrentstateofthechangeanditspreviousstateisreturned.
GerritwillcreateamergecommitbasedontheinformationofMergePatchSetInputandaddanewpatchsettothechangecorrespondingtothenewmergecommit.
Createsanewpatchsetwithanewcommitmessage.
PUT/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/messageHTTP/1.0Content-Type:application/json;charset=UTF-8{"message":"NewCommitmessage\n\nChange-Id:I10394472cbd17dd12454f229e4f6de00b143a444\n"}NotificationsAnemailwillbesentusingthe"newpatchset"template.
Readyforreview
owner,reviewers,CCs,stars,NEW_PATCHSETSwatchers
Workinprogress
owner
Retrievesthetopicofachange.
GET/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/topicHTTP/1.0ResponseHTTP/1.1200OKContent-Disposition:attachmentContent-Type:application/json;charset=UTF-8)]}'"Documentation"Ifthechangedoesnothaveatopicanemptystringisreturned.
Setsthetopicofachange.
PUT/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/topicHTTP/1.0Content-Type:application/json;charset=UTF-8{"topic":"Documentation"}Asresponsethenewtopicisreturned.
Deletesthetopicofachange.
Retrievestheaccountoftheuserassignedtoachange.
Returnsalistofeveryusereverassignedtoachange,intheorderinwhichtheywerefirstassigned.
Setstheassigneeofachange.
Deletestheassigneeofachange.
CheckifthegivenchangeisapurerevertofthechangeitreferencesinrevertOf.Optionally,thequeryparameterocanbepassedintospecifyacommit(SHA-1in40digithexrepresentation)tocheckagainst.IttakesprecedenceoverrevertOf.IfthechangehasnoreferenceinrevertOf,theparameterismandatory.
Abandonsachange.
HTTP/1.1409ConflictContent-Disposition:attachmentContent-Type:text/plain;charset=UTF-8changeismergedNotificationsAnemailwillbesentusingthe"abandon"template.ThenotifyhandlingisALL.NotificationsaresuppressedonWIPchangesthathaveneverstartedreview.
owner,reviewers,CCs,stars,ABANDONED_CHANGESwatchers
notsent
ReviewableWIP
Restoresachange.
Rebasesachange.
Moveachange.
Revertsachange.
Createsopenrevertchangesforallofthechangesofacertainsubmission.
Thechangeswillnotberebasedonontothedestinationbranchsotheusersmaystillhavetomanuallyrebasethemtoresolveconflictsandmakethemsubmittable.
However,thechangesthathavethesameprojectandbranchwillberebasedontopofeachother.E.g,thefirstrevertchangewillhavetheoriginalchangeasaparent,andthesecondrevertchangewillhavethefirstrevertchangeasaparent.
Submitsachange.
Submissionmaysubmitmultiplechanges,butwestillonlyreturnoneChangeInfoobject.Toqueryforallsubmittedchanges,pleaseusethesubmission_idthatispartoftheresponse.
Thelistconsistsof:
Asaspecialcase,thelistisemptyifthischangewouldbesubmittedbyitself(withoutotherchanges).
Deletesachange.
Addsorupdatesthechangeinthesecondaryindex.
Liststhepublishedcommentsofallrevisionsofthechange.
Thecontext-paddingrequestparametercanbeusedtospecifyanextranumberofcontextlinestobeaddedbeforeandafterthecommentrange.Thisparameteronlyworksifenable-contextissettotrue.
Liststherobotcommentsofallrevisionsofthechange.
Liststhedraftcommentsofallrevisionsofthechangethatbelongtothecallinguser.
Dependingonthetypeofproblem,somefieldsnotmarkedoptionalmaybemissingfromtheresult.Atleastid,project,branch,and_numberwillbepresent.
Onlythechangeowner,aprojectowner,oranadministratormayfixchanges.
Marksthechangeasnotreadyforreviewyet.Changesmayonlybemarkednotreadybytheowner,projectownersorsiteadministrators.
Marksthechangeasreadyforreview(setWIPpropertytofalse).Changesmayonlybemarkedreadybytheowner,projectownersorsiteadministrators.
Marksthechangetobeprivate.Onlyopenchangescanbemarkedprivate.Changesmayonlybemarkedprivatebytheownerorsiteadministrators.
Marksthechangetobenon-private.Noteuserscanonlyunmarkownprivatechanges.
Un-marksachangeasignored.
Getsthehashtagsassociatedwithachange.
Addsand/orremoveshashtagsfromachange.
Todeleteachangemessage,sendaDELETErequest:
DELETE/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/messages/aaee04dcb46bafc8be24d8aa70b3b1beb7df5780HTTP/1.0Toprovideareasonforthedeletion,useaPOSTrequest:
Notethatthisendpointdoesnotmodifythechangeresource.
Retrievesachangeeditdetails.
Putcontentofafiletoachangeedit.
PUT/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit/fooHTTP/1.0Touploadafileasbinarydataintherequestbody:
PUT/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit/fooHTTP/1.0Content-Type:application/json;charset=UTF-8{"binary_content":"data:text/plain;base64,SGVsbG8sIFdvcmxkIQ=="}Notethatitmustbebase-64encodeddatauri.
HTTP/1.1204NoContentWhenthechangeeditisano-op,forexamplewhenprovidingthesamefilecontentthatthefilealreadyhas,'409nochangesweremade'isreturned.
POST/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/editHTTP/1.0Content-Type:application/json;charset=UTF-8{"restore_path":"foo"}orforrename:
Deletesafilefromachangeedit.Thisdeletesthefilefromtherepositorycompletely.Thisisnotthesameasrevertingorrestoringafiletoitspreviouscontents.
Retrievescontentofafilefromachangeedit.
GET/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit/fooHTTP/1.0Thecontentofthefileisreturnedastextencodedinsidebase64.TheContent-Typeheaderwillalwaysbetext/plainreflectingtheouterbase64encoding.AGerrit-specificX-FYI-Content-Typeheadercanbeexaminedtofindtheserverdetectedcontenttypeofthefile.
Ifonlythecontenttypeisrequired,callersshoulduseHEADtoavoiddownloadingtheencodedfilecontents.
Ifthebaseparameterissettotrue,thereturnedcontentisfromtherevisionthattheeditisbasedon.
HTTP/1.1200OKContent-Disposition:attachmentContent-Type:text/plain;charset=ISO-8859-1X-FYI-Content-Encoding:base64X-FYI-Content-Type:text/xmlRnJvbSA3ZGFkY2MxNTNmZGVhMTdhYTg0ZmYzMmE2ZTI0NWRiYjY...Alternatively,iftheonlyvalueoftheAcceptrequestheaderisapplication/jsonthecontentisreturnedasJSONstringandX-FYI-Content-Encodingissettojson.
Retrievesmetadataofafilefromachangeedit.Currentlyonlyweblinksarereturned.
Retrievescommitmessagefromchangeedit.
Ifthebaseparameterissettotrue,thereturnedmessageisfromtherevisionthattheeditisbasedon.
GET/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit:messageHTTP/1.0Thecommitmessageisreturnedasbase64encodedstring.
HTTP/1.1200OKVGhpcyBpcyBhIGNvbW1pdCBtZXNzYWdlCgpDaGFuZ2UtSWQ6IElhYzhmZGM1MGRlZjFiYWUzYjAzM2JhNjcxZTk0OTBmNzUxNDU5ZGUzCg==Alternatively,iftheonlyvalueoftheAcceptrequestheaderisapplication/jsonthecommitmessageisreturnedasJSONstring:
Promoteschangeedittoaregularpatchset.
Rebaseschangeeditontopoflatestpatchset.
Deleteschangeedit.
Liststhereviewersofachange.
Suggestthereviewersforagivenqueryqandresultlimitn.Ifresultlimitisnotpassed,thenthedefault10isused.
ThisRESTendpointonlysuggestsaccountsthat
Groupscanbeexcludedfromtheresultsbyspecifyingthe'exclude-groups'requestparameter:
GET/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/suggest_reviewersq=JHTTP/1.0ResponseHTTP/1.1200OKContent-Disposition:attachmentContent-Type:application/json;charset=UTF-8)]}'[{"account":{"_account_id":1000097,"name":"JaneRoe","email":"jane.roe@example.com"},"count":1},{"group":{"id":"4fd581c0657268f2bdcc26699fbf9ddb76e3a279","name":"Joiner"},"count":5}]TosuggestCCsreviewer-state=CCcanbespecifiedasadditionalURLparameter.Thisincludesexistingreviewersintheresult,butexcludesexistingCCs.
Retrievesareviewerofachange.
Addsoneuserorallmembersofonegroupasreviewertothechange.
UserscanbemovedfromreviewertoCCandviceversa.ThismeansifauserisaddedasCCthatisalreadyarevieweronthechange,thereviewerstateofthatuserisupdatedtoCC.IfauserthatisalreadyaCConthechangeisaddedasreviewer,thereviewerstateofthatuserisupdatedtoreviewer.
Addinganewrevieweralsoaddsthatreviewertotheattentionset,unlessthechangeisworkinprogress.Also,movingareviewertoCCremovesthatuserfromtheattentionset.
HTTP/1.1200OKContent-Disposition:attachmentContent-Type:application/json;charset=UTF-8)]}'{"input":"john.doe@example.com","reviewers":[{"_account_id":1000096,"name":"JohnDoe","email":"john.doe@example.com""approvals":{"Verified":"0","Code-Review":"0"},}]}Ifagroupisspecified,addingthegroupmembersasreviewersisanatomicoperation.Thismeansifanerrorisreturned,noneofthemembersareaddedasreviewer.
Ifagroupwithmanymembersisaddedasrevieweraconfirmationmayberequired.
IfagroupisaddedasCCandmembersofthisgrouparealreadyreviewersonthechange,thesemembersstayreviewersonthechange(theyarenotdowngradedtoCC).Howeverifagroupisaddedasreviewer,allgroupmembersbecomereviewerofthechange,eveniftheyhavebeenaddedasCCbefore.
POST/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewersHTTP/1.0Content-Type:application/json;charset=UTF-8{"reviewer":"MyProjectVerifiers"}ResponseHTTP/1.1200OKContent-Disposition:attachmentContent-Type:application/json;charset=UTF-8)]}'{"input":"MyProjectVerifiers","error":"ThegroupMyGrouphas15members.Doyouwanttoaddthemallasreviewers","confirm":true}Toconfirmtheadditionofthereviewers,resendtherequestwiththeconfirmedflagbeingset.
ReviewerswithoutGerritaccountscanonlybeaddedonchangesvisibletoanonymoususers.
POST/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewersHTTP/1.0Content-Type:application/json;charset=UTF-8{"reviewer":"JohnDoe
owner,reviewers,CCs
Deletesareviewerfromachange.Deletingarevieweralsoremovesthatuserfromtheattentionset.
POST/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/John%20Doe/deleteHTTP/1.0Content-Type:application/json;charset=UTF-8{"notify":"NONE"}ResponseHTTP/1.1204NoContentNotificationsAnemailwillbesentusingthe"deleteReviewer"template.Ifdeletingthereviewerresultedinoneormoreapprovalsbeingremoved,thenthedeletedreviewerwillalsoreceiveanotification(unlessnotify=NONE).
notify=ALL:deletedreviewer(ifvoted),owner,reviewers,CCs,stars,ALL_COMMENTSwatchers
notify=NONE:deletedreviewer(ifvoted)
Liststhevotesforaspecificreviewerofthechange.
GET/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/reviewers/John%20Doe/votes/HTTP/1.0Asresultamapisreturnedthatmapsthelabelnametothelabelvalue.Theentriesinthemaparesortedbylabelname.
Deletesasinglevotefromachange.Note,thatevenwhenthelastvoteofareviewerisremovedtherevieweritselfisstilllistedonthechange.
Retrievesaparsedcommitofarevision.
Retrievesthedescriptionofapatchset.
GET/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/descriptionHTTP/1.0ResponseHTTP/1.1200OKContent-Disposition:attachmentContent-Type:application/json;charset=UTF-8)]}'"AddedDocumentation"Ifthepatchsetdoesnothaveadescriptionanemptystringisreturned.
Setsthedescriptionofapatchset.
PUT/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/descriptionHTTP/1.0Content-Type:application/json;charset=UTF-8{"description":"AddedDocumentation"}Asresponsethenewdescriptionisreturned.
Returnsthelistofcommitsthatarebeingintegratedintoatargetbranchbyamergecommit.Bydefaultthefirstparentisassumedtobeuninteresting.Byusingtheparentoptionanotherparentcanbesetasuninteresting(parentsare1-based).
Retrievesareviewofarevision.
Retrievesrelatedchangesofarevision.Relatedchangesarechangesthateitherdependon,oraredependenciesoftherevision.
Setsareviewonarevision,optionallyalsopublishingdraftcomments,settinglabels,addingreviewersorCCs,andmodifyingtheworkinprogressproperty.
Ifthelabelsareset,theusersendingtherequestwillautomaticallybeaddedasareviewer,otherwise(iftheyonlycommented)theyareaddedtotheCClist.
Someupdatestotheattentionsetoccurhere.Ifmorethanoneupdateshouldoccur,onlythefirstupdateintheorderofthebelowdocumentationoccurs:
Ifauserispartofremove_from_attention_set,theuserwillbeexplicitlyremovedfromtheattentionset.
Ifauserispartofadd_to_attention_set,theuserwillbeexplicitlyaddedtotheattentionset.
Ifthebooleanignore_default_attention_set_rulesissettotrue,allotherrulesbelowwillbeignored:
Theuserwhocreatedthereviewisremovedfromtheattentionset.
Ifthechangeisreadyforreview,thefollowingalsoapply:
Whentheuploaderreplies,theownerisaddedtotheattentionset.
Whentheowneroruploaderreplies,allthereviewersareaddedtotheattentionset.
Whenneithertheownernortheuploaderreplies,addtheownerandtheuploadertotheattentionset.
Then,newreviewersareaddedtotheattentionset,andremovedreviewers(bybecomingCC)areremovedfromtheattentionset.
Areviewcannotbesetonachangeedit.Tryingtopostareviewforachangeeditfailswith409Conflict.
Hereisanexampleofusingthismethodtosetlabels:
HTTP/1.1200OKContent-Disposition:attachmentContent-Type:application/json;charset=UTF-8)]}'{"labels":{"Code-Review":-1}}ItisalsopossibletoaddoneormorereviewersorCCstoachangesimultaneouslywithareview:
HTTP/1.1400BadRequestContent-Disposition:attachmentContent-Type:application/json;charset=UTF-8)]}'{"reviewers":{"jane.roe@example.com":{"input":"jane.roe@example.com","error":"Accountofjane.roe@example.comisinactive."},"john.doe@example.com":{"input":"john.doe@example.com"},"MyProjectVerifiers":{"input":"MyProjectVerifiers","error":"ThegroupMyGrouphas15members.Doyouwanttoaddthemallasreviewers","confirm":true}}}NotificationsAnemailwillbesentusingthe"comment"template.
Ifthetop-levelnotifypropertyisnullornotset,thennotificationbehaviordependsonwhetherthechangeisWIP,whetherithasstartedreview,andwhetherthetagpropertyisnull.
Forthepurposesofthistable,everyonemeansowner,reviewers,CCs,stars,andALL_COMMENTSwatchers.
N/A
everyone
no
yes
Rebasesarevision.
Getstheformattedpatchforonerevision.
GET/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/current/patchHTTP/1.0Theformattedpatchisreturnedastextencodedinsidebase64:
Getsafilecontainingthinbundlesofallmodifiedprojectsifthischangewassubmitted.Thebundlesarenamed${ProjectName}.git.Eachthinbundlecontainsenoughtoconstructthestateinwhichaprojectwouldbeinifthischangeweresubmitted.Thebaseofthethinbundlesarethecurrenttargetbranches,sotomakeuseofthiscallinanon-racyway,firstgetthebundlesandthenfetchallprojectscontainedinthebundle.(Thisassumesnonon-fastforwardpushes).
Youneedtogiveaparameter'format=zip'or'format=tar'tospecifytheformatfortheoutercontainer.Itisalwayspossibletousetgz,eveniftgzisnotinthelistofallowedarchiveformats.
Tomakegooduseofthiscall,youwouldroughlyneedcodeasfoundat:
Getsthemethodtheserverwillusetosubmit(merge)thechangeandanindicatorifthechangeiscurrentlymergeable.
GET/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/current/mergeableother-branchesHTTP/1.0Theresponsewillthencontainalistofallotherbrancheswherethischangescouldmergecleanly.
Getsthemethodtheserverwillusetosubmit(merge)thechange.
Teststhesubmit_typePrologruleintheproject,ortheonegiven.
Teststhesubmit_rulePrologruleintheproject,ortheonegiven.
HTTP/1.1200OKContent-Disposition:attachmentContent-Type:application/json;charset=UTF-8)]}'{"status":"NOT_READY","reject":{"Any-Label-Name":{}}}Whentestingwiththecurlcommandlineclientthe--data-binary@rules.plflagshouldbeusedtoensureallLFsareincludedinthePrologcode:
Liststhedraftcommentsofarevisionthatbelongtothecallinguser.
Createsadraftcommentonarevision.
Retrievesadraftcommentofarevisionthatbelongstothecallinguser.
Updatesadraftcommentonarevision.
Deletesadraftcommentfromarevision.
Liststhepublishedcommentsofarevision.
Retrievesapublishedcommentofarevision.
Portscommentsofotherrevisionstotherequestedrevision.
Repeatedcallsofthisendpointmightproducedifferentresults.Internalerrorsduringthepositioncomputationaremappedtofallbacklocationsforaffectedcomments.Thoseerrorsmighthavevanishedonlatercalls,uponwhichthisendpointreturnstheactuallymappedposition.Inaddition,commentscanbedeletedanddraftcommentscanbepublished,uponwhichthesetofportedcommentsmaychange.
Portsdraftcommentsofotherrevisionstotherequestedrevision.
Thisendpointrequiresauthentication.
Appliesasuggestedfixbycreatingachangeeditwhichincludesthemodificationsindicatedbythefixsuggestion.Ifachangeeditalreadyexists,itwillbeupdatedaccordingly.Afixcanonlybeappliedifnochangeeditexistsandthefixreferstothecurrentpatchset,orthefixreferstothepatchsetonwhichthechangeeditisbased.
Liststhefilesthatweremodified,addedordeletedinarevision.
HTTP/1.1200OKContent-Disposition:attachmentContent-Type:application/json;charset=UTF-8)]}'{"/COMMIT_MSG":{"status":"A","lines_inserted":7,"size_delta":551,"size":551},"gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java":{"lines_inserted":5,"lines_deleted":3,"size_delta":98,"size":23348}}Therequestparameterreviewedchangestheresponsetoreturnalistofthepathsthecallerhasmarkedasreviewed.ClientsthatalsoneedtheFileInfoshouldmaketworequests.
Therequestparameterqchangestheresponsetoreturnalistofallfiles(modifiedorunmodified)thatcontainthatsubstringinthepathname.Thisisusefultoimplementsuggestionservicesfindingafilebypartialname.ClientsthatalsoneedtheFileInfoshouldmaketworequests.
Therequestparameterbasechangestheresponsetoreturnamapofthefileswhicharedifferentinthiscommitcomparedtothegivenrevision.Therevisionmustcorrespondtoapatchsetinthechange.
Thereviewed,q,parent,andbaseoptionsaremutuallyexclusive.Thatis,onlyoneofthemmaybeusedatatime.
Getsthecontentofafilefromacertainrevision.
GET/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/contentHTTP/1.0Thecontentisreturnedasbase64encodedstring.TheHTTPresponseContent-Typeisalwaystext/plain,reflectingthebase64wrapping.AGerrit-specificX-FYI-Content-Typeheaderisreturneddescribingtheserverdetectedcontenttypeofthefile.
HTTP/1.1200OKContent-Disposition:attachmentContent-Type:text/plain;charset=ISO-8859-1X-FYI-Content-Encoding:base64X-FYI-Content-Type:text/xmlLy8gQ29weXJpZ2h0IChDKSAyMDEwIFRoZSBBbmRyb2lkIE9wZW4gU291cmNlIFByb2plY...Alternatively,iftheonlyvalueoftheAcceptrequestheaderisapplication/jsonthecontentisreturnedasJSONstringandX-FYI-Content-Encodingissettojson.
Downloadsthecontentofafilefromacertainrevision,inasafeformatthatposesnoriskforinadvertentexecutionofuntrustedcode.
Ifthecontenttypeisdefinedassafe,thebinaryfilecontentisreturnedverbatim.Ifthecontenttypeisnotsafe,thefileisstoredinsideaZIPfile,containingasingleentrywitharandom,unpredictablenamehavingthesamebaseandsuffixasthetruefilename.TheZIPfileisreturnedinverbatimbinaryform.
TheHTTPresourceContent-Typeisdependentonthefiletype:theapplicabletypeforsafefiles,or"application/zip"forunsafefiles.
Filenamesaredecoratedwithasuffixof_newforthecurrentpatch,_oldfortheonlyparent,or_oldNfortheNthparentofmany.
Getsthediffofafilefromacertainrevision.
GET/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/b6b9c10649b9041884046119ab794374470a1b45/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/diffbase=2HTTP/1.0ResponseHTTP/1.1200OKContent-Disposition:attachmentContent-Type:application/json;charset=UTF-8)]{"meta_a":{"name":"gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java","content_type":"text/x-java-source","lines":578},"meta_b":{"name":"gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java","content_type":"text/x-java-source","lines":578},"change_type":"MODIFIED","content":[{"skip":578}]}Thewhitespaceparametercanbespecifiedtocontrolhowwhitespacedifferencesarereportedintheresult.ValidvaluesareIGNORE_NONE,IGNORE_TRAILING,IGNORE_LEADING_AND_TRAILINGorIGNORE_ALL.
Getstheblameofafilefromacertainrevision.
HTTP/1.1200OKContent-Disposition:attachmentContent-Type:application/json;charset=UTF-8)]{[{"author":"JoeDaw","id":"64e140b4de5883a4dd74d06c2b62ccd7ffd224a7","time":1421441349,"commit_msg":"RSTtest\n\nChange-Id:I11e9e24bd122253f4bb10c36dce825ac2410d646\n","ranges":[{"start":1,"end":10},{"start":16,"end":296}]},{"author":"JaneDaw","id":"8d52621a0e2ac6adec73bd3a49f2371cd53137a7","time":1421825421,"commit_msg":"addbanner\n\nChange-Id:I2eced9b2691015ae3c5138f4d0c4ca2b8fb15be9\n","ranges":[{"start":13,"end":13}]}]}Thebaseparametercanbespecifiedtocontrolthebasepatchsetfromwhichtheblameshouldbegenerated.
Marksafileofarevisionasreviewedbythecallinguser.
Deletesthereviewedflagofthecallinguserfromafileofarevision.
Cherrypicksarevisiontoadestinationbranch.
Liststhereviewersofarevision.
Pleasenotethatonlythecurrentrevisionissupported.
Liststhevotesforaspecificrevieweroftherevision.
GET/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/reviewers/John%20Doe/votes/HTTP/1.0Asresultamapisreturnedthatmapsthelabelnametothelabelvalue.Theentriesinthemaparesortedbylabelname.
Deletesasinglevotefromarevision.Thedeletionwillbepossibleonlyiftherevisionisthecurrentrevision.Byusingthisendpointyoucanpreventdeletingthevote(withsamelabel)fromanewerpatchsetbymistake.
Note,thatevenwhenthelastvoteofareviewerisremovedtherevieweritselfisstilllistedonthechange.
Addsasingleusertotheattentionsetofachange.
Ausercanonlybeaddediftheyarenotintheattentionset.Ifauserisaddedwhilealreadyintheattentionset,therequestissilentlyignored.
Theusermustbeareviewer,cc,uploader,orowneronthechange.
Deletesasingleuserfromtheattentionsetofachange.
Ausercanonlyberemovedfromtheattentionsetiftheyarecurrentlyintheattentionset.Otherwise,therequestissilentlyignored.
Usermustbeleftempty,ortheusermustbeexactlythesameuserasintherequestheader.
POST/changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/attention/John%20Doe/deleteHTTP/1.0Content-Type:application/json;charset=UTF-8{"reason":"reason"}ResponseHTTP/1.1204NoContentAttentionSetAttentionSetisthesetofusersthatshouldperformsomeactiononthechange.E.g,reviewersshouldreviewthechange,owner/uploadershouldaddanewpatchsetorrespondtocomments.
Usersareaddedtotheattentionsetifonethefollowingapply:
Usersareremovedfromtheattentionsetifonethefollowingapply:
Identifierthatuniquelyidentifiesonechange.ItcontainstheURL-encodedprojectnameaswellasthechangenumber:"'
Gerritalsosupportsanarrayofotherchangeidentifiers.
UUIDofapublishedcomment.
UUIDofadraftcomment.
Thenameofthelabel.
Thepathofthefile.
Thefollowingmagicpathsaresupported:
UUIDofasuggestedfix.
Identifierthatuniquelyidentifiesonerevisionofachange.
Thiscanbe:
TheAbandonInputentitycontainsinformationforabandoningachange.
message
optional
Messagetobeaddedasreviewcommenttothechangewhenabandoningthechange.
notify
Notifyhandlingthatdefinestowhomemailnotificationsshouldbesentafterthechangeisabandoned.AllowedvaluesareNONE,OWNER,OWNER_REVIEWERSandALL.Ifnotset,thedefaultisALL.
notify_details
TheActionInfoentitydescribesaRESTAPIcalltheclientcanmaketomanipulatearesource.Thesearefrequentlyimplementedbypluginsandmaybediscoveredatruntime.
method
HTTPmethodtousewiththeaction.MostactionsusePOST,PUTorDELETEtocausestatechanges.
label
Shorttitletodisplaytoauserdescribingtheaction.IntheGerritwebinterfacethelabelisusedasthetextonthebuttonpresentedintheUI.
title
Longertexttodisplaydescribingtheaction.InawebUIthisshouldbethetitleattributeoftheelement,displayingwhentheuserhoversthemouse.
enabled
Iftruetheactionispermittedatthistimeandthecallerislikelyallowedtoexecuteit.Thismaychangeifstateisupdatedattheserverorpermissionsaremodified.Notpresentiffalse.
TheApprovalInfoentitycontainsinformationaboutanapprovalfromauserforalabelonachange.
value
Thevotethattheuserhasgivenforthelabel.Ifpresentandzero,theuserispermittedtovoteonthelabel.Ifabsent,theuserisnotpermittedtovoteonthatlabel.
permitted_voting_range
date
Thetimeanddatedescribingwhentheapprovalwasmade.
tag
post_submit
notsetiffalse
Iftrue,thisvotewasmadeafterthechangewassubmitted.
TheAssigneeInputentitycontainstheidentityoftheusertobesetasassignee.
assignee
account
last_update
reason
reason_account
user
Thereasonofforaddingorremovingtheuser.
Notifyhandlingthatdefinestowhomemailnotificationsshouldbesentafterthechangeiscreated.AllowedvaluesareNONE,OWNER,OWNER_REVIEWERSandALL.Ifnotset,thedefaultisOWNER.
TheBlameInfoentitystoresthecommitmetadatawiththerowcoordinateswhereitapplies.
author
Theauthorofthecommit.
id
Theidofthecommit.
time
Committime.
commit_msg
Thecommitmessage.
ranges
TheChangeEditInputentitycontainsinformationforrestoringapathwithinchangeedit.
restore_path
Pathtofiletorestore.
old_path
Oldpathtofiletorename.
new_path
Newpathtofiletorename.
TheChangeEditMessageInputentitycontainsinformationforchangingthecommitmessagewithinachangeedit.
Newcommitmessage.
TheChangeInfoentitycontainsinformationaboutachange.
TheIDofthechangeintheformat"'
project
Thenameoftheproject.
branch
Thenameofthetargetbranch.Therefs/heads/prefixisomitted.
topic
Thetopictowhichthischangebelongs.
attention_set
hashtags
Listofhashtagsthataresetonthechange.
change_id
TheChange-Idofthechange.
subject
Thesubjectofthechange(headerlineofthecommitmessage).
status
Thestatusofthechange(NEW,MERGED,ABANDONED).
created
updated
submitted
onlysetformergedchanges
submitter
starred
Whetherthecallinguserhasstarredthischangewiththedefaultlabel.
stars
Alistofstarlabelsthatareappliedbythecallingusertothischange.Thelabelsarelexicographicallysorted.
reviewed
submit_type
mergeable
submittable
insertions
Numberofinsertedlines.
deletions
Numberofdeletedlines.
total_comment_count
unresolved_comment_count
_number
Thechangenumber.(Theunderscoreisjustarelictofapriorattempttodeprecatethechangenumber.)
actions
submit_records
requirements
submit_requirements
labels
permitted_labels
removable_reviewers
reviewers
pending_reviewers
reviewer_updates
messages
current_revision
revisions
meta_rev_id
TheSHA-1oftheNoteDbmetaref.
tracking_ids
_more_changes
optional,notsetiffalse
Whetherthequerywoulddelivermoreresultsifnotlimited.Onlysetonthelastchangethatisreturned.
problems
is_private
Whenpresent,changeismarkedasprivate.
work_in_progress
Whenpresent,changeismarkedasWorkInProgress.
has_review_started
Whenpresent,changehasbeenmarkedReadyatsomepointintime.
revert_of
Thechangenumberofthechangethatthischangereverts.
submission_id
IDofthesubmissionofthischange.OnlysetifthestatusisMERGED.ThisIDisequaltothechangenumberofthechangethattriggeredthesubmission.Ifthechangethattriggeredthesubmissionalsohasatopic,itwillbe"
cherry_pick_of_change
Thechangenumberofthechangethatthischangewascherry-pickedfrom.Onlysetifthecherry-pickhasbeendonethroughtheGerritRESTAPI(andnotifacherry-pickedcommitwaspushed).
cherry_pick_of_patch_set
Thepatchsetnumberofthechangethatthischangewascherry-pickedfrom.Onlysetifthecherry-pickhasbeendonethroughtheGerritRESTAPI(andnotifacherry-pickedcommitwaspushed).
contains_git_conflicts
TheChangeInputentitycontainsinformationaboutcreatinganewchange.
optional,defaulttoNEW
Thestatusofthechange(onlyNEWacceptedhere).
optional,defaulttofalse
Whetherthenewchangeshouldbemarkedasprivate.
Whetherthenewchangeshouldbesettoworkinprogress.
base_change
base_commit
A40-digithexSHA-1ofthecommitwhichwillbetheparentcommitofthenewlycreatedchange.Ifset,itmustbeamergedcommitonthedestinationbranch.Mutuallyexclusivewithbase_change.
new_branch
Allowcreatinganewbranchwhensettotrue.Usingthisoptionisonlypossiblefornon-mergecommits(ifthemergefieldisnotset).
validation_options
merge
Notifyhandlingthatdefinestowhomemailnotificationsshouldbesentafterthechangeiscreated.AllowedvaluesareNONE,OWNER,OWNER_REVIEWERSandALL.Ifnotset,thedefaultisALL.
TheChangeMessageInfoentitycontainsinformationaboutamessageattachedtoachange.
TheIDofthemessage.
real_author
ThetextleftbytheuserorGerritsystem.AccountsareservedasaccountIDsinlinedinthetextas
accountsInMessage
Accounts,usedinmessage.
_revision_number
Whichpatchset(ifany)generatedthismessage.
TheCherryPickInputentitycontainsinformationforcherry-pickingachangetoanewbranch.
Commitmessageforthecherry-pickchange.Ifnotset,thecommitmessageofthecherry-pickedcommitisused.
destination
Destinationbranch
base
40-hexdigitSHA-1ofthecommitwhichwillbetheparentcommitofthenewlycreatedchange.Ifset,itmustbeamergedcommitorachangerevisiononthedestinationbranch.
parent
optional,defaultsto1
Numberoftheparentrelativetowhichthecherry-pickshouldbeconsidered.
Notifyhandlingthatdefinestowhomemailnotificationsshouldbesentafterthecherry-pick.AllowedvaluesareNONE,OWNER,OWNER_REVIEWERSandALL.Ifnotset,thedefaultisALL.
keep_reviewers
optional,defaultstofalse
Iftrue,carriesreviewersandccsoverfromoriginalchangetonewlycreatedone.
allow_conflicts
Thetopicofthecreatedcherry-pickedchange.Ifnotset,thedefaultdependsonthesource.Ifthesourceisachangewithatopic,theresultingtopicofthecherry-pickedchangewillbe{source_change_topic}-{destination_branch}.Otherwise,ifthesourcechangehasnotopic,orthesourceisacommit,thecreatedchangewillhavenotopic.Ifthechangealreadyexists,thetopicwillnotchangeifnotset.Ifset,thetopicwillbeoverridden.
allow_empty
Iftrue,thecherry-picksucceedsalsoifthecreatedcommitwillbeempty.Iffalse,acherry-pickthatwouldcreateanemptycommitfailswithoutcreatingthecommit.
TheCommentInfoentitycontainsinformationaboutaninlinecomment.
patch_set
Thepatchsetnumberforthecomment;onlysetincontextswherecommentsmaybereturnedformultiplepatchsets.
TheURLencodedUUIDofthecomment.
path
side
Thesideonwhichthecommentwasadded.AllowedvaluesareREVISIONandPARENT.Ifnotset,thedefaultisREVISION.
The1-basedparentnumber.Usedonlyformergecommitswhenside==PARENT.Whennotsetthecommentisfortheauto-mergetree.
line
range
in_reply_to
TheURLencodedUUIDofthecommenttowhichthiscommentisareply.
Thecommentmessage.
unresolved
Whetherornotthecommentmustbeaddressedbytheuser.Thestateofresolutionofacommentthreadisstoredinthelastcommentinthatthreadchronologically.
change_message_id
commit_id
HexcommitSHA-1(40charactersstring)ofthecommitofthepatchsettowhichthiscommentapplies.
context_lines
source_content_type
TheCommentInputentitycontainsinformationforcreatinganinlinecomment.
TheURLencodedUUIDofthecommentifanexistingdraftcommentshouldbeupdated.
Thesideonwhichthecommentshouldbeadded.AllowedvaluesareREVISIONandPARENT.Ifnotset,thedefaultisREVISION.
Thenumberofthelineforwhichthecommentshouldbeadded.0ifitisafilecomment.Ifneitherlinenorrangeisset,afilecommentisadded.Ifrangeisset,thisvalueisignoredinfavoroftheend_lineoftherange.
Thecommentmessage.Ifnotsetandanexistingdraftcommentisupdated,theexistingdraftcommentisdeleted.
optional,draftsonly
Whetherornotthecommentmustbeaddressedbytheuser.Thisvaluewilldefaulttofalseifthecommentisanorphan,orthevalueofthein_reply_tocommentifitissupplied.
TheCommentRangeentitydescribestherangeofaninlinecomment.
Thecommentrangeisarangefromthestartposition,specifiedbystart_lineandstart_character,totheendposition,specifiedbyend_lineandend_character.Thestartpositionisinclusiveandtheendpositionisexclusive.
So,arangeoverpartofalinewillhavestart_lineequaltoend_line;howeverarangewithend_linesetto5andend_characterequalto0willnotincludeanycharactersonline5,
start_line
Thestartlinenumberoftherange.(1-based)
start_character
Thecharacterpositioninthestartline.(0-based)
end_line
Theendlinenumberoftherange.(1-based)
end_character
Thecharacterpositionintheendline.(0-based)
TheContextLineentitycontainsthelinenumberandlinetextofasinglelineofthesourcefilecontent.
line_number
Thelinenumberofthesourceline.
context_line
Stringcontainingthelinetext.
TheCommitInfoentitycontainsinformationaboutacommit.
commit
Optional
parents
committer
Thesubjectofthecommit(headerlineofthecommitmessage).
web_links
resolve_conflicts_web_links
TheCommitMessageInputentitycontainsinformationforchangingthecommitmessageofachange.
Notifyhandlingthatdefinestowhomemailnotificationsshouldbesentafterthecommitmessagewasupdated.AllowedvaluesareNONE,OWNER,OWNER_REVIEWERSandALL.Ifnotset,thedefaultisOWNERforWIPchangesandALLotherwise.
TheDeleteChangeMessageInputentitycontainstheoptionsfordeletingachangemessage.
Thereasonwhythechangemessageshouldbedeleted.Ifset,thechangemessagewillbereplacedwith"Changemessageremovedby:name\nReason:reason`",orjust"Changemessageremovedby:`name."ifnotset.
TheDeleteCommentInputentitycontainstheoptionfordeletingacomment.
TheDeleteReviewerInputentitycontainsoptionsforthedeletionofareviewer.
Notifyhandlingthatdefinestowhomemailnotificationsshouldbesentafterthereviewerisdeleted.AllowedvaluesareNONE,OWNER,OWNER_REVIEWERSandALL.Ifnotset,thedefaultisALL.
TheDeleteVoteInputentitycontainsoptionsforthedeletionofavote.
Thelabelforwhichthevoteshouldbedeleted.Ifset,mustmatchthelabelintheURL.
Notifyhandlingthatdefinestowhomemailnotificationsshouldbesentafterthevoteisdeleted.AllowedvaluesareNONE,OWNER,OWNER_REVIEWERSandALL.Ifnotset,thedefaultisALL.
TheDescriptionInputentitycontainsinformationforsettingadescription.
description
Thedescriptiontext.
TheDiffContententitycontainsinformationaboutthecontentdifferencesinafile.
a
ContentonlyinthefileonsideA(deletedinB).
b
ContentonlyinthefileonsideB(addedinB).
ab
Contentinthefileonbothsides(unchanged).
edit_a
onlypresentwhentheintralineparameterissetandtheDiffContentisareplace,i.e.bothaandbarepresent
edit_b
due_to_rebase
Indicateswhetherthisentrywasintroducedbyarebase.
due_to_move
Indicateswhetherthisentrywasintroducedbyamoveoperation.
skip
countoflinesskippedonbothsideswhenthefileistoolargetoincludeallcommonlines.
common
Settotrueiftheregioniscommonaccordingtotherequestedignore-whitespaceparameter,butaandbcontaindifferingamountsofwhitespace.Whenpresentandtrueaandbareusedinsteadofab.
TheDiffFileMetaInfoentitycontainsmetainformationaboutafilediff.
name
Thenameofthefile.
content_type
Thecontenttypeofthefile.
lines
Thetotalnumberoflinesinthefile.
TheDiffInfoentitycontainsinformationaboutthediffofafileinarevision.
meta_a
notpresentwhenthefileisadded
meta_b
notpresentwhenthefileisdeleted
change_type
Thetypeofchange(ADDED,MODIFIED,DELETED,RENAMEDCOPIED,REWRITE).
intraline_status
onlysetwhentheintralineparameterwasspecifiedintherequest
Intralinestatus(OK,ERROR,TIMEOUT).
diff_header
Alistofstringsrepresentingthepatchsetdiffheader.
content
edit_web_links
binary
Whetherthefileisbinary.
TheDiffIntralineInfoentitycontainsinformationaboutintralineeditsinafile.
Theinformationconsistsofalistof
Notethattheimpliednewlinecharacterattheendofeachlineisincludedinthelengthcalculation,andthusitispossiblefortheeditstospannewlines.
TheDiffWebLinkInfoentitydescribesalinkonadiffscreentoanexternalsite.
Thelinkname.
url
ThelinkURL.
image_url
URLtotheiconofthelink.
show_on_side_by_side_diff_view
Whethertheweblinkshouldbeshownontheside-by-sidediffscreen.
show_on_unified_diff_view
Whethertheweblinkshouldbeshownontheunifieddiffscreen.
TheEditFileInfoentitycontainsadditionalinformationofafilewithinachangeedit.
TheEditInfoentitycontainsinformationaboutachangeedit.
base_patch_set_number
Thepatchsetnumberofthepatchsetthechangeeditisbasedon.
base_revision
Therevisionofthepatchsetthechangeeditisbasedon.
ref
Therefofthechangeedit.
fetch
files
TheFetchInfoentitycontainsinformationabouthowtofetchapatchsetviaacertainprotocol.
TheURLoftheproject.
Therefofthepatchset.
commands
TheFileInfoentitycontainsinformationaboutafileinapatchset.
Theoldfilepath.Onlysetifthefilewasrenamedorcopied.
lines_inserted
lines_deleted
size_delta
Numberofbytesbywhichthefilesizeincreased/decreased.
size
Filesizeinbytes.
delete_patch_set_if_commit_missing
Iftrue,deletepatchsetsfromthedatabaseiftheyrefertomissingcommitoptions.
expect_merged_as
Ifset,checkthatthechangeismergedintothedestinationbranchasthisexactSHA-1.Ifnot,insertanewpatchsetreferringtothiscommit.
TheFixSuggestionInfoentityrepresentsasuggestedfix.
fix_id
Adescriptionofthesuggestedfix.
replacements
TheFixReplacementInfoentitydescribeshowthecontentofafileshouldbereplacedbyanothercontent.
Thepathofthefilewhichshouldbemodified.Anyfileintherepositorymaybemodified.Thecommitmessagecanbemodifiedviathemagicfile/COMMIT_MSGthoughonlythepartbelowthegeneratedheaderofthatmagicfilecanbemodified.Referencestotheheaderlineswillresultinerrorswhenthefixisapplied.
replacement
Thecontentwhichshouldbeusedinsteadofthecurrentone.
TheGitPersonInfoentitycontainsinformationabouttheauthor/committerofacommit.
Thenameoftheauthor/committer.
Theemailaddressoftheauthor/committer.
tz
ThetimezoneoffsetfromUTCofwhenthisidentitywasconstructed.
TheGroupBaseInfoentitycontainsbaseinformationaboutthegroup.
TheUUIDofthegroup.
Thenameofthegroup.
TheHashtagsInputentitycontainsinformationabouthashtagstoaddto,and/orremovefrom,achange.
add
Thelistofhashtagstobeaddedtothechange.
remove
Thelistofhashtagstoberemovedfromthechange.
TheIncludedInInfoentitycontainsinformationaboutthebranchesachangewasmergedintoandtagsitwastaggedwith.Thebranchortagmusthave'refs/head/'or'refs/tags/'prefixrespectively.
branches
Thelistofbranchesthischangewasmergedinto.Eachbranchislistedwithoutthe'refs/head/'prefix.
tags
Thelistoftagsthischangewastaggedwith.Eachtagislistedwithoutthe'refs/tags/'prefix.
external
Amapthatmapsanametoalistofexternalsystemsthatincludethischange,e.g.alistofserversonwhichthischangeisdeployed.
TheLabelInfoentitycontainsinformationaboutalabelonachange,alwayscorrespondingtothecurrentpatchset.
approved
rejected
recommended
disliked
blocking
Iftrue,thelabelblockssubmitoperation.Ifnotset,thedefaultisfalse.
default_value
Thedefaultvotingvalueforthelabel.Thisvaluemaybeoutsidetherangespecifiedinpermitted_labels.
all
values
TheMergeableInfoentitycontainsinformationaboutthemergeabilityofachange.
Submittypeusedforthischange,canbeMERGE_IF_NECESSARY,FAST_FORWARD_ONLY,REBASE_IF_NECESSARY,REBASE_ALWAYS,MERGE_ALWAYSorCHERRY_PICK.
strategy
Thestrategyofthemerge,canberecursive,resolve,simple-two-way-in-core,oursortheirs.
trueifthischangeiscleanlymergeable,falseotherwise
commit_merged
trueifthischangeisalreadymerged,falseotherwise
content_merged
trueifthecontentofthischangeisalreadymerged,falseotherwise
conflicts
Alistofpathswithconflicts
mergeable_into
Alistofotherbranchnameswherethischangecouldmergecleanly
TheMergeInputentitycontainsinformationaboutthemerge
source
Thesourcetomergefrom,e.g.acompleteorabbreviatedcommitSHA-1,acompletereferencename,ashortreferencenameunderrefs/heads,refs/tags,orrefs/remotesnamespace,etc.
source_branch
Abranchfromwhichsourceisreachable.Ifspecified,sourceischeckedforvisibilityandreachabilityagainstonlythisbranch.Thisspeedsuptheoperation,especiallyforlargereposwithmanybranches.
Thestrategyofthemerge,canberecursive,resolve,simple-two-way-in-core,oursortheirs,defaultwilluseprojectsettings.
TheMergePatchSetInputentitycontainsinformationaboutupdatinganewchangebycreatinganewmergecommit.
inherit_parent
TheMoveInputentitycontainsinformationformovingachangetoanewbranch.
destination_branch
keep_all_votes
Bydefault,onlyvetovotesthatareblockingthechangefromsubmissionaremovedtothedestinationbranch.Usingthisoptionisonlyallowedforadministrators,becauseitcanaffectthesubmissionbehaviourofthechange(dependingonthelabelaccessconfigurationandsubmissionsrules).
accounts
ThePrivateInputentitycontainsinformationforchangingtheprivateflagonachange.
Messagedescribingwhytheprivateflagwaschanged.
Plaintextmessagedescribingtheproblemwiththechange.
Thestatusoffixingtheproblem(FIXED,FIX_FAILED).Onlysetifafixwasattempted.
outcome
Ifstatusisset,anadditionalplaintextmessagedescribingtheoutcomeofthefix.
ThePublishChangeEditInputentitycontainsoptionsforthepublishingofchangeedit.
Notifyhandlingthatdefinestowhomemailnotificationsshouldbesentafterthechangeeditispublished.AllowedvaluesareNONEandALL.Ifnotset,thedefaultisALL.
ThePureRevertInfoentitydescribestheresultofapurerevertcheck.
is_pure_revert
Outcomeofthecheckasboolean.
certificate
SignedcertificatepayloadandGPGsignatureblock.
key
TheRangeInfoentitystoresthecoordinatesofarange.
start
Firstindex.
end
Lastindex.
TheRebaseInputentitycontainsinformationforchangingparentwhenrebasing.
Thenewparentrevision.ThiscanbeareforaSHA-1toaconcretepatchset.Alternatively,achangenumbercanbespecified,inwhichcasethecurrentpatchsetisinferred.Emptystringisusedforrebasingdirectlyontopofthetargetbranch,whicheffectivelybreaksdependencytowardsaparentchange.
TheRelatedChangeAndCommitInfoentitycontainsinformationaboutarelatedchangeandcommit.
Theprojectofthechangeorcommit.
_change_number
Thechangenumber.
Therevisionnumber.
_current_revision_number
Thecurrentrevisionnumber.
Thestatusofthechange.Thestatusofthechangeisoneof(NEW,MERGED,ABANDONED).
TheRelatedChangesInfoentitycontainsinformationaboutrelatedchanges.
changes
TheRequiremententitycontainsinformationaboutarequirementrelativetoachange.
Statusoftherequirement.CanbeeitherOK,NOT_READYorRULE_ERROR.
fallback_text
Ahumanreadablereason
type
Alphanumerical(plushyphensorunderscores)stringtoidentifywhattherequirementisandwhyitwastriggered.Canbeseenasaclass:requirementssharingthesametypewerecreatedforasimilarreason,andthedatastructurewillfollowonesetofrules.
TheRestoreInputentitycontainsinformationforrestoringachange.
Messagetobeaddedasreviewcommenttothechangewhenrestoringthechange.
TheRevertInputentitycontainsinformationforrevertingachange.
Messagetobeaddedasreviewcommenttothechangewhenrevertingthechange.
Notifyhandlingthatdefinestowhomemailnotificationsshouldbesentforrevertingthechange.AllowedvaluesareNONE,OWNER,OWNER_REVIEWERSandALL.Ifnotset,thedefaultisALL.
TheRevertSubmissionInfoentitydescribestherevertchanges.
revert_changes
TheReviewInfoentitycontainsinformationaboutareview.
Thelabelsofthereviewasamapthatmapsthelabelnamestothevotingvalues.
Timestampoftheupdate.
updated_by
reviewer
state
Thereviewerstate,oneofREVIEWER,CCorREMOVED.
TheReviewInputentitycontainsinformationforaddingareviewtoarevision.
Themessagetobeaddedasreviewcomment.
Applythistagtothereviewcommentmessage,votes,andinlinecomments.Tagswithan'autogenerated:'prefixmaybeusedbyCIorotherautomatedsystemstodistinguishthemfromhumanreviews.Ifanothermessagewaspostedonanewerpatchset,butwiththesametag,thentheoldermessagewillbehiddenintheUI.Suffixesstartingwith~arenotconsidered,soautogenerated:my-ci-system~triggerandautogenerated:my-ci-system~resultwillbeconsideredbeingthesametagwithregardstothehidingrule.
Thevotesthatshouldbeaddedtotherevisionasamapthatmapsthelabelnamestothevotingvalues.
comments
robot_comments
drafts
Drafthandlingthatdefineshowdraftcommentsarehandledthatarealreadyinthedatabasebutthatwerenotalsodescribedinthisinput.AllowedvaluesarePUBLISH,PUBLISH_ALL_REVISIONSandKEEP.AllvaluesexceptPUBLISH_ALL_REVISIONSoperateonlyondraftsforasinglerevision.OnlyKEEPisallowedwhenusedinconjunctionwithon_behalf_of.Ifnotset,thedefaultisKEEP.Ifon_behalf_ofisset,thennoothervaluebesidesKEEPisallowed.
draft_ids_to_publish
ListofdraftIDstobepublished.ThedraftIDsshouldbelongtothecurrentuserandbevalid.IfdraftsissettoPUBLISH,thendraftIDsshouldcontaindraftsforthesamerevisionthatisrequestedforreview.IfdraftsissettoKEEP,thendraft_ids_to_publishwillbeignoredandnodraftcommentswillbepublished.Ifnotset,thedefaultistopublishalldraftsaccordingtothedraftsfield.
Notifyhandlingthatdefinestowhomemailnotificationsshouldbesentafterthereviewisstored.AllowedvaluesareNONE,OWNER,OWNER_REVIEWERSandALL.Ifnotset,thedefaultisALL.
omit_duplicate_comments
Iftrue,commentswiththesamecontentatthesameplacewillbeomitted.
on_behalf_of
ready
Iftrue,andifthechangeisworkinprogress,thenstartreview.Itisanerrorforbothreadyandwork_in_progresstobetrue.
Iftrue,markthechangeasworkinprogress.Itisanerrorforbothreadyandwork_in_progresstobetrue.
add_to_attention_set
remove_from_attention_set
ignore_automatic_attention_set_rules
TheReviewResultentitycontainsinformationregardingtheupdatesthatweremadetoareview.
Mapoflabelstovaluesafterthereviewwasposted.Nullifanyrevieweradditionswererejected.
Iftrue,thechangewasmovedfromWIPtoreadyforreviewasaresultofthisaction.Notsetiffalse.
TheReviewerInfoentitycontainsinformationaboutarevieweranditsvotesonachange.
approvals
_account_id
TheReviewerInputentitycontainsinformationforaddingorremovingreviewersto/fromthechange.
Addreviewerinthisstate.PossiblereviewerstatesareREVIEWER,CCandREMOVED.Ifnotgiven,defaultstoREVIEWER.
confirmed
Notifyhandlingthatdefinestowhomemailnotificationsshouldbesentafterthereviewerisadded.AllowedvaluesareNONE,OWNER,OWNER_REVIEWERSandALL.Ifnotset,thedefaultisALL.
TheReviewerResultentitydescribestheresultofmodifyingreviewersofachange.
input
ccs
removed
error
Errormessageexplainingwhythereviewercouldnotbeadded.Ifagroupwasspecifiedintheinputandanerrorisreturned,itmeansthatnoneofthememberswereaddedasreviewer.
confirm
falseifnotset
Whetheraddingthereviewerrequiresconfirmation.
kind
Thechangekind.ValidvaluesareREWORK,TRIVIAL_REBASE,MERGE_FIRST_PARENT_UPDATE,NO_CODE_CHANGE,andNO_CHANGE.
Thepatchsetnumber,oreditifthepatchsetisanedit.
uploader
TheGitreferenceforthepatchset.
commit_with_footers
push_certificate
Thedescriptionofthispatchset,asdisplayedinthepatchsetselectormenu.Maybenullifnodescriptionisset.
TheRobotCommentInfoentitycontainsinformationaboutarobotinlinecomment.
robot_id
TheIDoftherobotthatgeneratedthiscomment.
robot_run_id
AnIDoftherunoftherobot.
URLtomoreinformation.
properties
Robotspecificpropertiesasmapthatmapsarbitrarykeystovalues.
fix_suggestions
TheRobotCommentInputentitycontainsinformationforcreatinganinlinerobotcomment.
TheRuleInputentitycontainsinformationtotestaPrologrule.
rule
Prologcodetoexecuteinsteadofthecodeinrefs/meta/config.
filters
RUNifnotset
WhenRUNfilterrulesintheparentprojectsarecalledtopost-processtheresultsoftheprojectspecificrule.Thisbehaviormatcheshowtherulewillexecuteifinstalled.IfSKIPtheparentfiltersarenotcalled,allowingthetesttoreturnresultsfromtheinputrule.
TheSubmitInputentitycontainsinformationforsubmittingachange.
Notifyhandlingthatdefinestowhomemailnotificationsshouldbesentafterthechangeissubmitted.AllowedvaluesareNONE,OWNER,OWNER_REVIEWERSandALL.Ifnotset,thedefaultisALL.
OK,thechangecanbesubmitted.NOT_READY,additionallabelsarerequiredbeforesubmit.CLOSED,closedchangescannotbesubmitted.RULE_ERROR,rulecodefailedwithanerror.
ok
reject
need
Mapoflabelsthatneedtobegiventosubmit.Thevalueiscurrentlyanemptyobject.
may
impossible
Mapoflabelsthatshouldhavebeeninneedbutcannotbeusedbyanyuserbecauseofaccessrestrictions.Thevalueiscurrentlyanemptyobject.
error_message
WhenstatusisRULE_ERRORthismessageprovidessometextdescribingthefailureoftherulepredicate.
TheSubmitRecordInfoentitydescribesresultsfromasubmit_rule.
rule_name
Thenameofthesubmitrulethatcreatedthissubmitrecord.Thesubmitruleisspecifiedintheformof"$plugin~$rule"where$pluginisthepluginnameand$ruleisthenameoftheclassthatimplementedthesubmitrule.
OK,thechangecanbesubmitted.NOT_READY,additionallabelsarerequiredbeforesubmit.CLOSED,closedchangescannotbesubmitted.FORCED,thechangewassubmittedbypassingthesubmitrule.RULE_ERROR,rulecodefailedwithanerror.
TheSubmitRequirementExpressionInfodescribestheresultofevaluatingasinglesubmitrequirementexpression,forexamplelabel:code-review=+2.
expression
Thesubmitrequirementexpressionasastring,forexamplebranch:refs/heads/fooandlabel:verified=+1.
fulfilled
Trueifthesubmitrequirementisfulfilledforthechange.
passing_atoms
Alistofpassingatomsasstrings.Fortheaboveexpression,passing_atomscancontain["branch:refs/heads/foo"]ifthebranchpredicateisfulfilledforthechange.
failing_atoms
Alistoffailingatoms.Thisissimilartopassing_atomsexceptthatitcontainsthelistofpredicatesthatarenotfulfilledforthechange.
TheSubmitRequirementInputentitydescribesasubmitrequirement.
Thesubmitrequirementname.
Descriptionofthesubmitrequirement.
applicability_expression
Queryexpressionthatcanbeevaluatedonanychange.Ifevaluatedtotrueonachange,thesubmitrequirementisthenapplicableforthischange.Ifnotspecified,thesubmitrequirementisapplicableforallchanges.
submittability_expression
Queryexpressionthatcanbeevaluatedonanychange.Ifevaluatedtotrueonachange,thesubmitrequirementisfulfilledandnotblockingchangesubmission.
override_expression
Queryexpressionthatcanbeevaluatedonanychange.Ifevaluatedtotrueonachange,thesubmitrequirementisoverriddenandnotblockingchangesubmission.
allow_override_in_child_projects
Whetherthissubmitrequirementcanbeoverriddeninchildprojects.Defaultistrue.
TheSubmitRequirementResultInfodescribestheresultofevaluatingasubmitrequirementonachange.
Statusdescribingtheresultofevaluatingthesubmitrequirement.Thestatusisoneof(SATISFIED,UNSATISFIED,OVERRIDDEN,NOT_APPLICABLE,ERROR).
is_legacy
applicability_expression_result
submittability_expression_result
override_expression_result
TheSubmittedTogetherInfoentitycontainsinformationaboutacollectionofchangesthatwouldbesubmittedtogether.
AlistofChangeInfoentitiesrepresentingthechangestobesubmittedtogether.
non_visible_changes
Thenumberofchangestobesubmittedtogetherthatthecurrentusercannotsee.(Thiscountincludeschangesthatarevisibletothecurrentuserwhentheirreasonforbeingsubmittedtogetherinvolveschangestheusercannotsee.)
TheSuggestedReviewerInfoentitycontainsinformationaboutareviewerthatcanbeaddedtoachange(anaccountoragroup).
group
count
Thetotalnumberofaccountsinthesuggestion.Thisis1ifaccountispresent.Ifgroupispresent,thetotalnumberofaccountsthataremembersofthegroupisreturned(thiscountincludesmembersofnestedgroups).
Trueifgroupispresentandcountisabovethethresholdwheretheconfirmedflagmustbepassedtoaddthegroupasareviewer.
TheTopicInputentitycontainsinformationforsettingatopic.
TheTrackingIdInfoentitydescribesareferencetoanexternaltrackingsystem.
system
Thenameoftheexternaltrackingsystem.
Thetrackingid.
TheVotingRangeInfoentitydescribesthecontinuousvotingrangefrommintomaxvalues.
min
Theminimumvotingvalue.
max
Themaximumvotingvalue.
TheWebLinkInfoentitydescribesalinktoanexternalsite.
target
Thetargetwindowinwhichtheweblinkshouldbeopened.
TheWorkInProgressInputentitycontainsadditionalinformationforachangesettoWorkInProgress/ReadyForReview.
MessagetobeaddedasareviewcommenttothechangebeingsetWorkInProgress/ReadyForReview.