v1.29.yaml 272 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261
  1. # A Swagger 2.0 (a.k.a. OpenAPI) definition of the Engine API.
  2. #
  3. # This is used for generating API documentation and the types used by the
  4. # client/server. See api/README.md for more information.
  5. #
  6. # Some style notes:
  7. # - This file is used by ReDoc, which allows GitHub Flavored Markdown in
  8. # descriptions.
  9. # - There is no maximum line length, for ease of editing and pretty diffs.
  10. # - operationIds are in the format "NounVerb", with a singular noun.
  11. swagger: "2.0"
  12. schemes:
  13. - "http"
  14. - "https"
  15. produces:
  16. - "application/json"
  17. - "text/plain"
  18. consumes:
  19. - "application/json"
  20. - "text/plain"
  21. basePath: "/v1.29"
  22. info:
  23. title: "Docker Engine API"
  24. version: "1.29"
  25. x-logo:
  26. url: "https://docs.docker.com/assets/images/logo-docker-main.png"
  27. description: |
  28. The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API.
  29. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls.
  30. # Errors
  31. The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format:
  32. ```
  33. {
  34. "message": "page not found"
  35. }
  36. ```
  37. # Versioning
  38. The API is usually changed in each release of Docker, so API calls are versioned to ensure that clients don't break.
  39. For Docker Engine 17.05, the API version is 1.29. To lock to this version, you prefix the URL with `/v1.29`. For example, calling `/info` is the same as calling `/v1.29/info`.
  40. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine.
  41. In previous versions of Docker, it was possible to access the API without providing a version. This behaviour is now deprecated will be removed in a future version of Docker.
  42. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer Docker daemons.
  43. # Authentication
  44. Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a Base64 encoded (JSON) string with the following structure:
  45. ```
  46. {
  47. "username": "string",
  48. "password": "string",
  49. "email": "string",
  50. "serveraddress": "string"
  51. }
  52. ```
  53. The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required.
  54. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials:
  55. ```
  56. {
  57. "identitytoken": "9cbaf023786cd7..."
  58. }
  59. ```
  60. # The tags on paths define the menu sections in the ReDoc documentation, so
  61. # the usage of tags must make sense for that:
  62. # - They should be singular, not plural.
  63. # - There should not be too many tags, or the menu becomes unwieldy. For
  64. # example, it is preferable to add a path to the "System" tag instead of
  65. # creating a tag with a single path in it.
  66. # - The order of tags in this list defines the order in the menu.
  67. tags:
  68. # Primary objects
  69. - name: "Container"
  70. x-displayName: "Containers"
  71. description: |
  72. Create and manage containers.
  73. - name: "Image"
  74. x-displayName: "Images"
  75. - name: "Network"
  76. x-displayName: "Networks"
  77. description: |
  78. Networks are user-defined networks that containers can be attached to. See the [networking documentation](https://docs.docker.com/network/) for more information.
  79. - name: "Volume"
  80. x-displayName: "Volumes"
  81. description: |
  82. Create and manage persistent storage that can be attached to containers.
  83. - name: "Exec"
  84. x-displayName: "Exec"
  85. description: |
  86. Run new commands inside running containers. See the [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/) for more information.
  87. To exec a command in a container, you first need to create an exec instance, then start it. These two API endpoints are wrapped up in a single command-line command, `docker exec`.
  88. # Swarm things
  89. - name: "Swarm"
  90. x-displayName: "Swarm"
  91. description: |
  92. Engines can be clustered together in a swarm. See [the swarm mode documentation](https://docs.docker.com/engine/swarm/) for more information.
  93. - name: "Node"
  94. x-displayName: "Nodes"
  95. description: |
  96. Nodes are instances of the Engine participating in a swarm. Swarm mode must be enabled for these endpoints to work.
  97. - name: "Service"
  98. x-displayName: "Services"
  99. description: |
  100. Services are the definitions of tasks to run on a swarm. Swarm mode must be enabled for these endpoints to work.
  101. - name: "Task"
  102. x-displayName: "Tasks"
  103. description: |
  104. A task is a container running on a swarm. It is the atomic scheduling unit of swarm. Swarm mode must be enabled for these endpoints to work.
  105. - name: "Secret"
  106. x-displayName: "Secrets"
  107. description: |
  108. Secrets are sensitive data that can be used by services. Swarm mode must be enabled for these endpoints to work.
  109. # System things
  110. - name: "Plugin"
  111. x-displayName: "Plugins"
  112. - name: "System"
  113. x-displayName: "System"
  114. definitions:
  115. Port:
  116. type: "object"
  117. description: "An open port on a container"
  118. required: [PrivatePort, Type]
  119. properties:
  120. IP:
  121. type: "string"
  122. format: "ip-address"
  123. PrivatePort:
  124. type: "integer"
  125. format: "uint16"
  126. x-nullable: false
  127. description: "Port on the container"
  128. PublicPort:
  129. type: "integer"
  130. format: "uint16"
  131. description: "Port exposed on the host"
  132. Type:
  133. type: "string"
  134. x-nullable: false
  135. enum: ["tcp", "udp"]
  136. example:
  137. PrivatePort: 8080
  138. PublicPort: 80
  139. Type: "tcp"
  140. MountPoint:
  141. type: "object"
  142. description: |
  143. MountPoint represents a mount point configuration inside the container.
  144. This is used for reporting the mountpoints in use by a container.
  145. properties:
  146. Type:
  147. description: |
  148. The mount type:
  149. - `bind` a mount of a file or directory from the host into the container.
  150. - `volume` a docker volume with the given `Name`.
  151. - `tmpfs` a `tmpfs`.
  152. type: "string"
  153. enum:
  154. - "bind"
  155. - "volume"
  156. - "tmpfs"
  157. example: "volume"
  158. Name:
  159. description: |
  160. Name is the name reference to the underlying data defined by `Source`
  161. e.g., the volume name.
  162. type: "string"
  163. example: "myvolume"
  164. Source:
  165. description: |
  166. Source location of the mount.
  167. For volumes, this contains the storage location of the volume (within
  168. `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains
  169. the source (host) part of the bind-mount. For `tmpfs` mount points, this
  170. field is empty.
  171. type: "string"
  172. example: "/var/lib/docker/volumes/myvolume/_data"
  173. Destination:
  174. description: |
  175. Destination is the path relative to the container root (`/`) where
  176. the `Source` is mounted inside the container.
  177. type: "string"
  178. example: "/usr/share/nginx/html/"
  179. Driver:
  180. description: |
  181. Driver is the volume driver used to create the volume (if it is a volume).
  182. type: "string"
  183. example: "local"
  184. Mode:
  185. description: |
  186. Mode is a comma separated list of options supplied by the user when
  187. creating the bind/volume mount.
  188. The default is platform-specific (`"z"` on Linux, empty on Windows).
  189. type: "string"
  190. example: "z"
  191. RW:
  192. description: |
  193. Whether the mount is mounted writable (read-write).
  194. type: "boolean"
  195. example: true
  196. Propagation:
  197. description: |
  198. Propagation describes how mounts are propagated from the host into the
  199. mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)
  200. for details. This field is not used on Windows.
  201. type: "string"
  202. example: ""
  203. DeviceMapping:
  204. type: "object"
  205. description: "A device mapping between the host and container"
  206. properties:
  207. PathOnHost:
  208. type: "string"
  209. PathInContainer:
  210. type: "string"
  211. CgroupPermissions:
  212. type: "string"
  213. example:
  214. PathOnHost: "/dev/deviceName"
  215. PathInContainer: "/dev/deviceName"
  216. CgroupPermissions: "mrw"
  217. ThrottleDevice:
  218. type: "object"
  219. properties:
  220. Path:
  221. description: "Device path"
  222. type: "string"
  223. Rate:
  224. description: "Rate"
  225. type: "integer"
  226. format: "int64"
  227. minimum: 0
  228. Mount:
  229. type: "object"
  230. properties:
  231. Target:
  232. description: "Container path."
  233. type: "string"
  234. Source:
  235. description: "Mount source (e.g. a volume name, a host path)."
  236. Type:
  237. description: |
  238. The mount type. Available types:
  239. - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container.
  240. - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed.
  241. - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs.
  242. type: "string"
  243. enum:
  244. - "bind"
  245. - "volume"
  246. - "tmpfs"
  247. ReadOnly:
  248. description: "Whether the mount should be read-only."
  249. type: "boolean"
  250. Consistency:
  251. description: "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`."
  252. type: "string"
  253. BindOptions:
  254. description: "Optional configuration for the `bind` type."
  255. type: "object"
  256. properties:
  257. Propagation:
  258. description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`."
  259. enum:
  260. - "private"
  261. - "rprivate"
  262. - "shared"
  263. - "rshared"
  264. - "slave"
  265. - "rslave"
  266. VolumeOptions:
  267. description: "Optional configuration for the `volume` type."
  268. type: "object"
  269. properties:
  270. NoCopy:
  271. description: "Populate volume with data from the target."
  272. type: "boolean"
  273. default: false
  274. Labels:
  275. description: "User-defined key/value metadata."
  276. type: "object"
  277. additionalProperties:
  278. type: "string"
  279. DriverConfig:
  280. description: "Map of driver specific options"
  281. type: "object"
  282. properties:
  283. Name:
  284. description: "Name of the driver to use to create the volume."
  285. type: "string"
  286. Options:
  287. description: "key/value map of driver specific options."
  288. type: "object"
  289. additionalProperties:
  290. type: "string"
  291. TmpfsOptions:
  292. description: "Optional configuration for the `tmpfs` type."
  293. type: "object"
  294. properties:
  295. SizeBytes:
  296. description: "The size for the tmpfs mount in bytes."
  297. type: "integer"
  298. format: "int64"
  299. Mode:
  300. description: "The permission mode for the tmpfs mount in an integer."
  301. type: "integer"
  302. RestartPolicy:
  303. description: |
  304. The behavior to apply when the container exits. The default is not to restart.
  305. An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server.
  306. type: "object"
  307. properties:
  308. Name:
  309. type: "string"
  310. description: |
  311. - `always` Always restart
  312. - `unless-stopped` Restart always except when the user has manually stopped the container
  313. - `on-failure` Restart only when the container exit code is non-zero
  314. enum:
  315. - "always"
  316. - "unless-stopped"
  317. - "on-failure"
  318. MaximumRetryCount:
  319. type: "integer"
  320. description: "If `on-failure` is used, the number of times to retry before giving up"
  321. default: {}
  322. Resources:
  323. description: "A container's resources (cgroups config, ulimits, etc)"
  324. type: "object"
  325. properties:
  326. # Applicable to all platforms
  327. CpuShares:
  328. description: "An integer value representing this container's relative CPU weight versus other containers."
  329. type: "integer"
  330. Memory:
  331. description: "Memory limit in bytes."
  332. type: "integer"
  333. default: 0
  334. # Applicable to UNIX platforms
  335. CgroupParent:
  336. description: "Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist."
  337. type: "string"
  338. BlkioWeight:
  339. description: "Block IO weight (relative weight)."
  340. type: "integer"
  341. minimum: 0
  342. maximum: 1000
  343. BlkioWeightDevice:
  344. description: |
  345. Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`.
  346. type: "array"
  347. items:
  348. type: "object"
  349. properties:
  350. Path:
  351. type: "string"
  352. Weight:
  353. type: "integer"
  354. minimum: 0
  355. BlkioDeviceReadBps:
  356. description: |
  357. Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
  358. type: "array"
  359. items:
  360. $ref: "#/definitions/ThrottleDevice"
  361. BlkioDeviceWriteBps:
  362. description: |
  363. Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
  364. type: "array"
  365. items:
  366. $ref: "#/definitions/ThrottleDevice"
  367. BlkioDeviceReadIOps:
  368. description: |
  369. Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
  370. type: "array"
  371. items:
  372. $ref: "#/definitions/ThrottleDevice"
  373. BlkioDeviceWriteIOps:
  374. description: |
  375. Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
  376. type: "array"
  377. items:
  378. $ref: "#/definitions/ThrottleDevice"
  379. CpuPeriod:
  380. description: "The length of a CPU period in microseconds."
  381. type: "integer"
  382. format: "int64"
  383. CpuQuota:
  384. description: "Microseconds of CPU time that the container can get in a CPU period."
  385. type: "integer"
  386. format: "int64"
  387. CpuRealtimePeriod:
  388. description: "The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks."
  389. type: "integer"
  390. format: "int64"
  391. CpuRealtimeRuntime:
  392. description: "The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks."
  393. type: "integer"
  394. format: "int64"
  395. CpusetCpus:
  396. description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)"
  397. type: "string"
  398. CpusetMems:
  399. description: "Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems."
  400. type: "string"
  401. Devices:
  402. description: "A list of devices to add to the container."
  403. type: "array"
  404. items:
  405. $ref: "#/definitions/DeviceMapping"
  406. DeviceCgroupRules:
  407. description: "a list of cgroup rules to apply to the container"
  408. type: "array"
  409. items:
  410. type: "string"
  411. example: "c 13:* rwm"
  412. DiskQuota:
  413. description: "Disk limit (in bytes)."
  414. type: "integer"
  415. format: "int64"
  416. KernelMemory:
  417. description: "Kernel memory limit in bytes."
  418. type: "integer"
  419. format: "int64"
  420. MemoryReservation:
  421. description: "Memory soft limit in bytes."
  422. type: "integer"
  423. format: "int64"
  424. MemorySwap:
  425. description: "Total memory limit (memory + swap). Set as `-1` to enable unlimited swap."
  426. type: "integer"
  427. format: "int64"
  428. MemorySwappiness:
  429. description: "Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100."
  430. type: "integer"
  431. format: "int64"
  432. minimum: 0
  433. maximum: 100
  434. NanoCpus:
  435. description: "CPU quota in units of 10<sup>-9</sup> CPUs."
  436. type: "integer"
  437. format: "int64"
  438. OomKillDisable:
  439. description: "Disable OOM Killer for the container."
  440. type: "boolean"
  441. PidsLimit:
  442. description: "Tune a container's pids limit. Set -1 for unlimited."
  443. type: "integer"
  444. format: "int64"
  445. Ulimits:
  446. description: |
  447. A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`"
  448. type: "array"
  449. items:
  450. type: "object"
  451. properties:
  452. Name:
  453. description: "Name of ulimit"
  454. type: "string"
  455. Soft:
  456. description: "Soft limit"
  457. type: "integer"
  458. Hard:
  459. description: "Hard limit"
  460. type: "integer"
  461. # Applicable to Windows
  462. CpuCount:
  463. description: |
  464. The number of usable CPUs (Windows only).
  465. On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last.
  466. type: "integer"
  467. format: "int64"
  468. CpuPercent:
  469. description: |
  470. The usable percentage of the available CPUs (Windows only).
  471. On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last.
  472. type: "integer"
  473. format: "int64"
  474. IOMaximumIOps:
  475. description: "Maximum IOps for the container system drive (Windows only)"
  476. type: "integer"
  477. format: "int64"
  478. IOMaximumBandwidth:
  479. description: "Maximum IO in bytes per second for the container system drive (Windows only)"
  480. type: "integer"
  481. format: "int64"
  482. HealthConfig:
  483. description: "A test to perform to check that the container is healthy."
  484. type: "object"
  485. properties:
  486. Test:
  487. description: |
  488. The test to perform. Possible values are:
  489. - `[]` inherit healthcheck from image or parent image
  490. - `["NONE"]` disable healthcheck
  491. - `["CMD", args...]` exec arguments directly
  492. - `["CMD-SHELL", command]` run command with system's default shell
  493. type: "array"
  494. items:
  495. type: "string"
  496. Interval:
  497. description: "The time to wait between checks in nanoseconds. It should be 0 or not less than 1000000000(1s). 0 means inherit."
  498. type: "integer"
  499. Timeout:
  500. description: "The time to wait before considering the check to have hung. It should be 0 or not less than 1000000000(1s). 0 means inherit."
  501. type: "integer"
  502. Retries:
  503. description: "The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit."
  504. type: "integer"
  505. StartPeriod:
  506. description: "Start period for the container to initialize before starting health-retries countdown in nanoseconds. 0 means inherit."
  507. type: "integer"
  508. HostConfig:
  509. description: "Container configuration that depends on the host we are running on"
  510. allOf:
  511. - $ref: "#/definitions/Resources"
  512. - type: "object"
  513. properties:
  514. # Applicable to all platforms
  515. Binds:
  516. type: "array"
  517. description: |
  518. A list of volume bindings for this container. Each volume binding is a string in one of these forms:
  519. - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path.
  520. - `host-src:container-dest:ro` to make the bind-mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path.
  521. - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path.
  522. - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path.
  523. items:
  524. type: "string"
  525. ContainerIDFile:
  526. type: "string"
  527. description: "Path to a file where the container ID is written"
  528. LogConfig:
  529. type: "object"
  530. description: "The logging configuration for this container"
  531. properties:
  532. Type:
  533. type: "string"
  534. enum:
  535. - "json-file"
  536. - "syslog"
  537. - "journald"
  538. - "gelf"
  539. - "fluentd"
  540. - "awslogs"
  541. - "splunk"
  542. - "etwlogs"
  543. - "none"
  544. Config:
  545. type: "object"
  546. additionalProperties:
  547. type: "string"
  548. NetworkMode:
  549. type: "string"
  550. description: "Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. Any other value is taken
  551. as a custom network's name to which this container should connect to."
  552. PortBindings:
  553. type: "object"
  554. description: "A map of exposed container ports and the host port they should map to."
  555. additionalProperties:
  556. type: "object"
  557. properties:
  558. HostIp:
  559. type: "string"
  560. description: "The host IP address"
  561. HostPort:
  562. type: "string"
  563. description: "The host port number, as a string"
  564. RestartPolicy:
  565. $ref: "#/definitions/RestartPolicy"
  566. AutoRemove:
  567. type: "boolean"
  568. description: "Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set."
  569. VolumeDriver:
  570. type: "string"
  571. description: "Driver that this container uses to mount volumes."
  572. VolumesFrom:
  573. type: "array"
  574. description: "A list of volumes to inherit from another container, specified in the form `<container name>[:<ro|rw>]`."
  575. items:
  576. type: "string"
  577. Mounts:
  578. description: "Specification for mounts to be added to the container."
  579. type: "array"
  580. items:
  581. $ref: "#/definitions/Mount"
  582. # Applicable to UNIX platforms
  583. CapAdd:
  584. type: "array"
  585. description: "A list of kernel capabilities to add to the container."
  586. items:
  587. type: "string"
  588. CapDrop:
  589. type: "array"
  590. description: "A list of kernel capabilities to drop from the container."
  591. items:
  592. type: "string"
  593. Dns:
  594. type: "array"
  595. description: "A list of DNS servers for the container to use."
  596. items:
  597. type: "string"
  598. DnsOptions:
  599. type: "array"
  600. description: "A list of DNS options."
  601. items:
  602. type: "string"
  603. DnsSearch:
  604. type: "array"
  605. description: "A list of DNS search domains."
  606. items:
  607. type: "string"
  608. ExtraHosts:
  609. type: "array"
  610. description: |
  611. A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`.
  612. items:
  613. type: "string"
  614. GroupAdd:
  615. type: "array"
  616. description: "A list of additional groups that the container process will run as."
  617. items:
  618. type: "string"
  619. IpcMode:
  620. type: "string"
  621. description: "IPC namespace to use for the container."
  622. Cgroup:
  623. type: "string"
  624. description: "Cgroup to use for the container."
  625. Links:
  626. type: "array"
  627. description: "A list of links for the container in the form `container_name:alias`."
  628. items:
  629. type: "string"
  630. OomScoreAdj:
  631. type: "integer"
  632. description: "An integer value containing the score given to the container in order to tune OOM killer preferences."
  633. PidMode:
  634. type: "string"
  635. description: |
  636. Set the PID (Process) Namespace mode for the container. It can be either:
  637. - `"container:<name|id>"`: joins another container's PID namespace
  638. - `"host"`: use the host's PID namespace inside the container
  639. Privileged:
  640. type: "boolean"
  641. description: "Gives the container full access to the host."
  642. PublishAllPorts:
  643. type: "boolean"
  644. description: "Allocates a random host port for all of a container's exposed ports."
  645. ReadonlyRootfs:
  646. type: "boolean"
  647. description: "Mount the container's root filesystem as read only."
  648. SecurityOpt:
  649. type: "array"
  650. description: "A list of string values to customize labels for MLS
  651. systems, such as SELinux."
  652. items:
  653. type: "string"
  654. StorageOpt:
  655. type: "object"
  656. description: |
  657. Storage driver options for this container, in the form `{"size": "120G"}`.
  658. additionalProperties:
  659. type: "string"
  660. Tmpfs:
  661. type: "object"
  662. description: |
  663. A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: `{ "/run": "rw,noexec,nosuid,size=65536k" }`.
  664. additionalProperties:
  665. type: "string"
  666. UTSMode:
  667. type: "string"
  668. description: "UTS namespace to use for the container."
  669. UsernsMode:
  670. type: "string"
  671. description: "Sets the usernamespace mode for the container when usernamespace remapping option is enabled."
  672. ShmSize:
  673. type: "integer"
  674. description: "Size of `/dev/shm` in bytes. If omitted, the system uses 64MB."
  675. minimum: 0
  676. Sysctls:
  677. type: "object"
  678. description: |
  679. A list of kernel parameters (sysctls) to set in the container. For example: `{"net.ipv4.ip_forward": "1"}`
  680. additionalProperties:
  681. type: "string"
  682. Runtime:
  683. type: "string"
  684. description: "Runtime to use with this container."
  685. # Applicable to Windows
  686. ConsoleSize:
  687. type: "array"
  688. description: "Initial console size, as an `[height, width]` array. (Windows only)"
  689. minItems: 2
  690. maxItems: 2
  691. items:
  692. type: "integer"
  693. minimum: 0
  694. Isolation:
  695. type: "string"
  696. description: "Isolation technology of the container. (Windows only)"
  697. enum:
  698. - "default"
  699. - "process"
  700. - "hyperv"
  701. Config:
  702. description: "Configuration for a container that is portable between hosts"
  703. type: "object"
  704. properties:
  705. Hostname:
  706. description: "The hostname to use for the container, as a valid RFC 1123 hostname."
  707. type: "string"
  708. Domainname:
  709. description: "The domain name to use for the container."
  710. type: "string"
  711. User:
  712. description: "The user that commands are run as inside the container."
  713. type: "string"
  714. AttachStdin:
  715. description: "Whether to attach to `stdin`."
  716. type: "boolean"
  717. default: false
  718. AttachStdout:
  719. description: "Whether to attach to `stdout`."
  720. type: "boolean"
  721. default: true
  722. AttachStderr:
  723. description: "Whether to attach to `stderr`."
  724. type: "boolean"
  725. default: true
  726. ExposedPorts:
  727. description: |
  728. An object mapping ports to an empty object in the form:
  729. `{"<port>/<tcp|udp>": {}}`
  730. type: "object"
  731. additionalProperties:
  732. type: "object"
  733. enum:
  734. - {}
  735. default: {}
  736. Tty:
  737. description: "Attach standard streams to a TTY, including `stdin` if it is not closed."
  738. type: "boolean"
  739. default: false
  740. OpenStdin:
  741. description: "Open `stdin`"
  742. type: "boolean"
  743. default: false
  744. StdinOnce:
  745. description: "Close `stdin` after one attached client disconnects"
  746. type: "boolean"
  747. default: false
  748. Env:
  749. description: |
  750. A list of environment variables to set inside the container in the form `["VAR=value", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value.
  751. type: "array"
  752. items:
  753. type: "string"
  754. Cmd:
  755. description: "Command to run specified as a string or an array of strings."
  756. type:
  757. - "array"
  758. - "string"
  759. items:
  760. type: "string"
  761. Healthcheck:
  762. $ref: "#/definitions/HealthConfig"
  763. ArgsEscaped:
  764. description: "Command is already escaped (Windows only)"
  765. type: "boolean"
  766. Image:
  767. description: "The name of the image to use when creating the container"
  768. type: "string"
  769. Volumes:
  770. description: "An object mapping mount point paths inside the container to empty objects."
  771. type: "object"
  772. properties:
  773. additionalProperties:
  774. type: "object"
  775. enum:
  776. - {}
  777. default: {}
  778. WorkingDir:
  779. description: "The working directory for commands to run in."
  780. type: "string"
  781. Entrypoint:
  782. description: |
  783. The entry point for the container as a string or an array of strings.
  784. If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`).
  785. type:
  786. - "array"
  787. - "string"
  788. items:
  789. type: "string"
  790. NetworkDisabled:
  791. description: "Disable networking for the container."
  792. type: "boolean"
  793. MacAddress:
  794. description: "MAC address of the container."
  795. type: "string"
  796. OnBuild:
  797. description: "`ONBUILD` metadata that were defined in the image's `Dockerfile`."
  798. type: "array"
  799. items:
  800. type: "string"
  801. Labels:
  802. description: "User-defined key/value metadata."
  803. type: "object"
  804. additionalProperties:
  805. type: "string"
  806. StopSignal:
  807. description: "Signal to stop a container as a string or unsigned integer."
  808. type: "string"
  809. default: "SIGTERM"
  810. StopTimeout:
  811. description: "Timeout to stop a container in seconds."
  812. type: "integer"
  813. default: 10
  814. Shell:
  815. description: "Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell."
  816. type: "array"
  817. items:
  818. type: "string"
  819. NetworkConfig:
  820. description: "TODO: check is correct"
  821. type: "object"
  822. properties:
  823. Bridge:
  824. type: "string"
  825. Gateway:
  826. type: "string"
  827. Address:
  828. type: "string"
  829. IPPrefixLen:
  830. type: "integer"
  831. MacAddress:
  832. type: "string"
  833. PortMapping:
  834. type: "string"
  835. Ports:
  836. type: "array"
  837. items:
  838. $ref: "#/definitions/Port"
  839. GraphDriverData:
  840. description: "Information about a container's graph driver."
  841. type: "object"
  842. required: [Name, Data]
  843. properties:
  844. Name:
  845. type: "string"
  846. x-nullable: false
  847. Data:
  848. type: "object"
  849. x-nullable: false
  850. additionalProperties:
  851. type: "string"
  852. Image:
  853. type: "object"
  854. required:
  855. - Id
  856. - Parent
  857. - Comment
  858. - Created
  859. - Container
  860. - DockerVersion
  861. - Author
  862. - Architecture
  863. - Os
  864. - Size
  865. - VirtualSize
  866. - GraphDriver
  867. - RootFS
  868. properties:
  869. Id:
  870. type: "string"
  871. x-nullable: false
  872. RepoTags:
  873. type: "array"
  874. items:
  875. type: "string"
  876. RepoDigests:
  877. type: "array"
  878. items:
  879. type: "string"
  880. Parent:
  881. type: "string"
  882. x-nullable: false
  883. Comment:
  884. type: "string"
  885. x-nullable: false
  886. Created:
  887. type: "string"
  888. x-nullable: false
  889. Container:
  890. type: "string"
  891. x-nullable: false
  892. ContainerConfig:
  893. $ref: "#/definitions/Config"
  894. DockerVersion:
  895. type: "string"
  896. x-nullable: false
  897. Author:
  898. type: "string"
  899. x-nullable: false
  900. Config:
  901. $ref: "#/definitions/Config"
  902. Architecture:
  903. type: "string"
  904. x-nullable: false
  905. Os:
  906. type: "string"
  907. x-nullable: false
  908. OsVersion:
  909. type: "string"
  910. Size:
  911. type: "integer"
  912. format: "int64"
  913. x-nullable: false
  914. VirtualSize:
  915. type: "integer"
  916. format: "int64"
  917. x-nullable: false
  918. GraphDriver:
  919. $ref: "#/definitions/GraphDriverData"
  920. RootFS:
  921. type: "object"
  922. required: [Type]
  923. properties:
  924. Type:
  925. type: "string"
  926. x-nullable: false
  927. Layers:
  928. type: "array"
  929. items:
  930. type: "string"
  931. ImageSummary:
  932. type: "object"
  933. required:
  934. - Id
  935. - ParentId
  936. - RepoTags
  937. - RepoDigests
  938. - Created
  939. - Size
  940. - SharedSize
  941. - VirtualSize
  942. - Labels
  943. - Containers
  944. properties:
  945. Id:
  946. type: "string"
  947. x-nullable: false
  948. ParentId:
  949. type: "string"
  950. x-nullable: false
  951. RepoTags:
  952. type: "array"
  953. x-nullable: false
  954. items:
  955. type: "string"
  956. RepoDigests:
  957. type: "array"
  958. x-nullable: false
  959. items:
  960. type: "string"
  961. Created:
  962. type: "integer"
  963. x-nullable: false
  964. Size:
  965. type: "integer"
  966. x-nullable: false
  967. SharedSize:
  968. type: "integer"
  969. x-nullable: false
  970. VirtualSize:
  971. type: "integer"
  972. x-nullable: false
  973. Labels:
  974. type: "object"
  975. x-nullable: false
  976. additionalProperties:
  977. type: "string"
  978. Containers:
  979. x-nullable: false
  980. type: "integer"
  981. AuthConfig:
  982. type: "object"
  983. properties:
  984. username:
  985. type: "string"
  986. password:
  987. type: "string"
  988. email:
  989. type: "string"
  990. serveraddress:
  991. type: "string"
  992. example:
  993. username: "hannibal"
  994. password: "xxxx"
  995. serveraddress: "https://index.docker.io/v1/"
  996. ProcessConfig:
  997. type: "object"
  998. properties:
  999. privileged:
  1000. type: "boolean"
  1001. user:
  1002. type: "string"
  1003. tty:
  1004. type: "boolean"
  1005. entrypoint:
  1006. type: "string"
  1007. arguments:
  1008. type: "array"
  1009. items:
  1010. type: "string"
  1011. Volume:
  1012. type: "object"
  1013. required: [Name, Driver, Mountpoint, Labels, Scope, Options]
  1014. properties:
  1015. Name:
  1016. type: "string"
  1017. description: "Name of the volume."
  1018. x-nullable: false
  1019. Driver:
  1020. type: "string"
  1021. description: "Name of the volume driver used by the volume."
  1022. x-nullable: false
  1023. Mountpoint:
  1024. type: "string"
  1025. description: "Mount path of the volume on the host."
  1026. x-nullable: false
  1027. Status:
  1028. type: "object"
  1029. description: |
  1030. Low-level details about the volume, provided by the volume driver.
  1031. Details are returned as a map with key/value pairs:
  1032. `{"key":"value","key2":"value2"}`.
  1033. The `Status` field is optional, and is omitted if the volume driver
  1034. does not support this feature.
  1035. additionalProperties:
  1036. type: "object"
  1037. Labels:
  1038. type: "object"
  1039. description: "User-defined key/value metadata."
  1040. x-nullable: false
  1041. additionalProperties:
  1042. type: "string"
  1043. Scope:
  1044. type: "string"
  1045. description: "The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level."
  1046. default: "local"
  1047. x-nullable: false
  1048. enum: ["local", "global"]
  1049. Options:
  1050. type: "object"
  1051. description: "The driver specific options used when creating the volume."
  1052. additionalProperties:
  1053. type: "string"
  1054. UsageData:
  1055. type: "object"
  1056. required: [Size, RefCount]
  1057. properties:
  1058. Size:
  1059. type: "integer"
  1060. description: "The disk space used by the volume (local driver only)"
  1061. default: -1
  1062. x-nullable: false
  1063. RefCount:
  1064. type: "integer"
  1065. default: -1
  1066. description: "The number of containers referencing this volume."
  1067. x-nullable: false
  1068. example:
  1069. Name: "tardis"
  1070. Driver: "custom"
  1071. Mountpoint: "/var/lib/docker/volumes/tardis"
  1072. Status:
  1073. hello: "world"
  1074. Labels:
  1075. com.example.some-label: "some-value"
  1076. com.example.some-other-label: "some-other-value"
  1077. Scope: "local"
  1078. Network:
  1079. type: "object"
  1080. properties:
  1081. Name:
  1082. type: "string"
  1083. Id:
  1084. type: "string"
  1085. Created:
  1086. type: "string"
  1087. format: "dateTime"
  1088. Scope:
  1089. type: "string"
  1090. Driver:
  1091. type: "string"
  1092. EnableIPv6:
  1093. type: "boolean"
  1094. IPAM:
  1095. $ref: "#/definitions/IPAM"
  1096. Internal:
  1097. type: "boolean"
  1098. Attachable:
  1099. type: "boolean"
  1100. Ingress:
  1101. type: "boolean"
  1102. Containers:
  1103. type: "object"
  1104. additionalProperties:
  1105. $ref: "#/definitions/NetworkContainer"
  1106. Options:
  1107. type: "object"
  1108. additionalProperties:
  1109. type: "string"
  1110. Labels:
  1111. type: "object"
  1112. additionalProperties:
  1113. type: "string"
  1114. example:
  1115. Name: "net01"
  1116. Id: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99"
  1117. Created: "2016-10-19T04:33:30.360899459Z"
  1118. Scope: "local"
  1119. Driver: "bridge"
  1120. EnableIPv6: false
  1121. IPAM:
  1122. Driver: "default"
  1123. Config:
  1124. - Subnet: "172.19.0.0/16"
  1125. Gateway: "172.19.0.1"
  1126. Options:
  1127. foo: "bar"
  1128. Internal: false
  1129. Attachable: false
  1130. Ingress: false
  1131. Containers:
  1132. 19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c:
  1133. Name: "test"
  1134. EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a"
  1135. MacAddress: "02:42:ac:13:00:02"
  1136. IPv4Address: "172.19.0.2/16"
  1137. IPv6Address: ""
  1138. Options:
  1139. com.docker.network.bridge.default_bridge: "true"
  1140. com.docker.network.bridge.enable_icc: "true"
  1141. com.docker.network.bridge.enable_ip_masquerade: "true"
  1142. com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  1143. com.docker.network.bridge.name: "docker0"
  1144. com.docker.network.driver.mtu: "1500"
  1145. Labels:
  1146. com.example.some-label: "some-value"
  1147. com.example.some-other-label: "some-other-value"
  1148. IPAM:
  1149. type: "object"
  1150. properties:
  1151. Driver:
  1152. description: "Name of the IPAM driver to use."
  1153. type: "string"
  1154. default: "default"
  1155. Config:
  1156. description: "List of IPAM configuration options, specified as a map: `{\"Subnet\": <CIDR>, \"IPRange\": <CIDR>, \"Gateway\": <IP address>, \"AuxAddress\": <device_name:IP address>}`"
  1157. type: "array"
  1158. items:
  1159. type: "object"
  1160. additionalProperties:
  1161. type: "string"
  1162. Options:
  1163. description: "Driver-specific options, specified as a map."
  1164. type: "array"
  1165. items:
  1166. type: "object"
  1167. additionalProperties:
  1168. type: "string"
  1169. NetworkContainer:
  1170. type: "object"
  1171. properties:
  1172. EndpointID:
  1173. type: "string"
  1174. MacAddress:
  1175. type: "string"
  1176. IPv4Address:
  1177. type: "string"
  1178. IPv6Address:
  1179. type: "string"
  1180. BuildInfo:
  1181. type: "object"
  1182. properties:
  1183. id:
  1184. type: "string"
  1185. stream:
  1186. type: "string"
  1187. error:
  1188. type: "string"
  1189. errorDetail:
  1190. $ref: "#/definitions/ErrorDetail"
  1191. status:
  1192. type: "string"
  1193. progress:
  1194. type: "string"
  1195. progressDetail:
  1196. $ref: "#/definitions/ProgressDetail"
  1197. CreateImageInfo:
  1198. type: "object"
  1199. properties:
  1200. error:
  1201. type: "string"
  1202. status:
  1203. type: "string"
  1204. progress:
  1205. type: "string"
  1206. progressDetail:
  1207. $ref: "#/definitions/ProgressDetail"
  1208. PushImageInfo:
  1209. type: "object"
  1210. properties:
  1211. error:
  1212. type: "string"
  1213. status:
  1214. type: "string"
  1215. progress:
  1216. type: "string"
  1217. progressDetail:
  1218. $ref: "#/definitions/ProgressDetail"
  1219. ErrorDetail:
  1220. type: "object"
  1221. properties:
  1222. code:
  1223. type: "integer"
  1224. message:
  1225. type: "string"
  1226. ProgressDetail:
  1227. type: "object"
  1228. properties:
  1229. code:
  1230. type: "integer"
  1231. message:
  1232. type: "integer"
  1233. ErrorResponse:
  1234. description: "Represents an error."
  1235. type: "object"
  1236. required: ["message"]
  1237. properties:
  1238. message:
  1239. description: "The error message."
  1240. type: "string"
  1241. x-nullable: false
  1242. example:
  1243. message: "Something went wrong."
  1244. IdResponse:
  1245. description: "Response to an API call that returns just an Id"
  1246. type: "object"
  1247. required: ["Id"]
  1248. properties:
  1249. Id:
  1250. description: "The id of the newly created object."
  1251. type: "string"
  1252. x-nullable: false
  1253. EndpointSettings:
  1254. description: "Configuration for a network endpoint."
  1255. type: "object"
  1256. properties:
  1257. IPAMConfig:
  1258. description: "IPAM configurations for the endpoint"
  1259. type: "object"
  1260. properties:
  1261. IPv4Address:
  1262. type: "string"
  1263. IPv6Address:
  1264. type: "string"
  1265. LinkLocalIPs:
  1266. type: "array"
  1267. items:
  1268. type: "string"
  1269. Links:
  1270. type: "array"
  1271. items:
  1272. type: "string"
  1273. Aliases:
  1274. type: "array"
  1275. items:
  1276. type: "string"
  1277. NetworkID:
  1278. type: "string"
  1279. EndpointID:
  1280. type: "string"
  1281. Gateway:
  1282. type: "string"
  1283. IPAddress:
  1284. type: "string"
  1285. IPPrefixLen:
  1286. type: "integer"
  1287. IPv6Gateway:
  1288. type: "string"
  1289. GlobalIPv6Address:
  1290. type: "string"
  1291. GlobalIPv6PrefixLen:
  1292. type: "integer"
  1293. format: "int64"
  1294. MacAddress:
  1295. type: "string"
  1296. PluginMount:
  1297. type: "object"
  1298. x-nullable: false
  1299. required: [Name, Description, Settable, Source, Destination, Type, Options]
  1300. properties:
  1301. Name:
  1302. type: "string"
  1303. x-nullable: false
  1304. Description:
  1305. type: "string"
  1306. x-nullable: false
  1307. Settable:
  1308. type: "array"
  1309. items:
  1310. type: "string"
  1311. Source:
  1312. type: "string"
  1313. Destination:
  1314. type: "string"
  1315. x-nullable: false
  1316. Type:
  1317. type: "string"
  1318. x-nullable: false
  1319. Options:
  1320. type: "array"
  1321. items:
  1322. type: "string"
  1323. PluginDevice:
  1324. type: "object"
  1325. required: [Name, Description, Settable, Path]
  1326. x-nullable: false
  1327. properties:
  1328. Name:
  1329. type: "string"
  1330. x-nullable: false
  1331. Description:
  1332. type: "string"
  1333. x-nullable: false
  1334. Settable:
  1335. type: "array"
  1336. items:
  1337. type: "string"
  1338. Path:
  1339. type: "string"
  1340. PluginEnv:
  1341. type: "object"
  1342. x-nullable: false
  1343. required: [Name, Description, Settable, Value]
  1344. properties:
  1345. Name:
  1346. x-nullable: false
  1347. type: "string"
  1348. Description:
  1349. x-nullable: false
  1350. type: "string"
  1351. Settable:
  1352. type: "array"
  1353. items:
  1354. type: "string"
  1355. Value:
  1356. type: "string"
  1357. PluginInterfaceType:
  1358. type: "object"
  1359. x-nullable: false
  1360. required: [Prefix, Capability, Version]
  1361. properties:
  1362. Prefix:
  1363. type: "string"
  1364. x-nullable: false
  1365. Capability:
  1366. type: "string"
  1367. x-nullable: false
  1368. Version:
  1369. type: "string"
  1370. x-nullable: false
  1371. Plugin:
  1372. description: "A plugin for the Engine API"
  1373. type: "object"
  1374. required: [Settings, Enabled, Config, Name]
  1375. properties:
  1376. Id:
  1377. type: "string"
  1378. Name:
  1379. type: "string"
  1380. x-nullable: false
  1381. Enabled:
  1382. description: "True when the plugin is running. False when the plugin is not running, only installed."
  1383. type: "boolean"
  1384. x-nullable: false
  1385. Settings:
  1386. description: "Settings that can be modified by users."
  1387. type: "object"
  1388. x-nullable: false
  1389. required: [Args, Devices, Env, Mounts]
  1390. properties:
  1391. Mounts:
  1392. type: "array"
  1393. items:
  1394. $ref: "#/definitions/PluginMount"
  1395. Env:
  1396. type: "array"
  1397. items:
  1398. type: "string"
  1399. Args:
  1400. type: "array"
  1401. items:
  1402. type: "string"
  1403. Devices:
  1404. type: "array"
  1405. items:
  1406. $ref: "#/definitions/PluginDevice"
  1407. PluginReference:
  1408. description: "plugin remote reference used to push/pull the plugin"
  1409. type: "string"
  1410. x-nullable: false
  1411. Config:
  1412. description: "The config of a plugin."
  1413. type: "object"
  1414. x-nullable: false
  1415. required:
  1416. - Description
  1417. - Documentation
  1418. - Interface
  1419. - Entrypoint
  1420. - WorkDir
  1421. - Network
  1422. - Linux
  1423. - PidHost
  1424. - PropagatedMount
  1425. - IpcHost
  1426. - Mounts
  1427. - Env
  1428. - Args
  1429. properties:
  1430. DockerVersion:
  1431. description: "Docker Version used to create the plugin"
  1432. type: "string"
  1433. x-nullable: false
  1434. Description:
  1435. type: "string"
  1436. x-nullable: false
  1437. Documentation:
  1438. type: "string"
  1439. x-nullable: false
  1440. Interface:
  1441. description: "The interface between Docker and the plugin"
  1442. x-nullable: false
  1443. type: "object"
  1444. required: [Types, Socket]
  1445. properties:
  1446. Types:
  1447. type: "array"
  1448. items:
  1449. $ref: "#/definitions/PluginInterfaceType"
  1450. Socket:
  1451. type: "string"
  1452. x-nullable: false
  1453. Entrypoint:
  1454. type: "array"
  1455. items:
  1456. type: "string"
  1457. WorkDir:
  1458. type: "string"
  1459. x-nullable: false
  1460. User:
  1461. type: "object"
  1462. x-nullable: false
  1463. properties:
  1464. UID:
  1465. type: "integer"
  1466. format: "uint32"
  1467. GID:
  1468. type: "integer"
  1469. format: "uint32"
  1470. Network:
  1471. type: "object"
  1472. x-nullable: false
  1473. required: [Type]
  1474. properties:
  1475. Type:
  1476. x-nullable: false
  1477. type: "string"
  1478. Linux:
  1479. type: "object"
  1480. x-nullable: false
  1481. required: [Capabilities, AllowAllDevices, Devices]
  1482. properties:
  1483. Capabilities:
  1484. type: "array"
  1485. items:
  1486. type: "string"
  1487. AllowAllDevices:
  1488. type: "boolean"
  1489. x-nullable: false
  1490. Devices:
  1491. type: "array"
  1492. items:
  1493. $ref: "#/definitions/PluginDevice"
  1494. PropagatedMount:
  1495. type: "string"
  1496. x-nullable: false
  1497. IpcHost:
  1498. type: "boolean"
  1499. x-nullable: false
  1500. PidHost:
  1501. type: "boolean"
  1502. x-nullable: false
  1503. Mounts:
  1504. type: "array"
  1505. items:
  1506. $ref: "#/definitions/PluginMount"
  1507. Env:
  1508. type: "array"
  1509. items:
  1510. $ref: "#/definitions/PluginEnv"
  1511. Args:
  1512. type: "object"
  1513. x-nullable: false
  1514. required: [Name, Description, Settable, Value]
  1515. properties:
  1516. Name:
  1517. x-nullable: false
  1518. type: "string"
  1519. Description:
  1520. x-nullable: false
  1521. type: "string"
  1522. Settable:
  1523. type: "array"
  1524. items:
  1525. type: "string"
  1526. Value:
  1527. type: "array"
  1528. items:
  1529. type: "string"
  1530. rootfs:
  1531. type: "object"
  1532. properties:
  1533. type:
  1534. type: "string"
  1535. diff_ids:
  1536. type: "array"
  1537. items:
  1538. type: "string"
  1539. example:
  1540. Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078"
  1541. Name: "tiborvass/sample-volume-plugin"
  1542. Tag: "latest"
  1543. Active: true
  1544. Settings:
  1545. Env:
  1546. - "DEBUG=0"
  1547. Args: null
  1548. Devices: null
  1549. Config:
  1550. Description: "A sample volume plugin for Docker"
  1551. Documentation: "https://docs.docker.com/engine/extend/plugins/"
  1552. Interface:
  1553. Types:
  1554. - "docker.volumedriver/1.0"
  1555. Socket: "plugins.sock"
  1556. Entrypoint:
  1557. - "/usr/bin/sample-volume-plugin"
  1558. - "/data"
  1559. WorkDir: ""
  1560. User: {}
  1561. Network:
  1562. Type: ""
  1563. Linux:
  1564. Capabilities: null
  1565. AllowAllDevices: false
  1566. Devices: null
  1567. Mounts: null
  1568. PropagatedMount: "/data"
  1569. Env:
  1570. - Name: "DEBUG"
  1571. Description: "If set, prints debug messages"
  1572. Settable: null
  1573. Value: "0"
  1574. Args:
  1575. Name: "args"
  1576. Description: "command line arguments"
  1577. Settable: null
  1578. Value: []
  1579. ObjectVersion:
  1580. description: |
  1581. The version number of the object such as node, service, etc. This is needed to avoid conflicting writes.
  1582. The client must send the version number along with the modified specification when updating these objects.
  1583. This approach ensures safe concurrency and determinism in that the change on the object
  1584. may not be applied if the version number has changed from the last read. In other words,
  1585. if two update requests specify the same base version, only one of the requests can succeed.
  1586. As a result, two separate update requests that happen at the same time will not
  1587. unintentially overwrite each other.
  1588. type: "object"
  1589. properties:
  1590. Index:
  1591. type: "integer"
  1592. format: "int64"
  1593. NodeSpec:
  1594. type: "object"
  1595. properties:
  1596. Name:
  1597. description: "Name for the node."
  1598. type: "string"
  1599. Labels:
  1600. description: "User-defined key/value metadata."
  1601. type: "object"
  1602. additionalProperties:
  1603. type: "string"
  1604. Role:
  1605. description: "Role of the node."
  1606. type: "string"
  1607. enum:
  1608. - "worker"
  1609. - "manager"
  1610. Availability:
  1611. description: "Availability of the node."
  1612. type: "string"
  1613. enum:
  1614. - "active"
  1615. - "pause"
  1616. - "drain"
  1617. example:
  1618. Availability: "active"
  1619. Name: "node-name"
  1620. Role: "manager"
  1621. Labels:
  1622. foo: "bar"
  1623. Node:
  1624. type: "object"
  1625. properties:
  1626. ID:
  1627. type: "string"
  1628. Version:
  1629. $ref: "#/definitions/ObjectVersion"
  1630. CreatedAt:
  1631. type: "string"
  1632. format: "dateTime"
  1633. UpdatedAt:
  1634. type: "string"
  1635. format: "dateTime"
  1636. Spec:
  1637. $ref: "#/definitions/NodeSpec"
  1638. Description:
  1639. type: "object"
  1640. properties:
  1641. Hostname:
  1642. type: "string"
  1643. Platform:
  1644. type: "object"
  1645. properties:
  1646. Architecture:
  1647. type: "string"
  1648. OS:
  1649. type: "string"
  1650. Resources:
  1651. type: "object"
  1652. properties:
  1653. NanoCPUs:
  1654. type: "integer"
  1655. format: "int64"
  1656. MemoryBytes:
  1657. type: "integer"
  1658. format: "int64"
  1659. Engine:
  1660. type: "object"
  1661. properties:
  1662. EngineVersion:
  1663. type: "string"
  1664. Labels:
  1665. type: "object"
  1666. additionalProperties:
  1667. type: "string"
  1668. Plugins:
  1669. type: "array"
  1670. items:
  1671. type: "object"
  1672. properties:
  1673. Type:
  1674. type: "string"
  1675. Name:
  1676. type: "string"
  1677. example:
  1678. ID: "24ifsmvkjbyhk"
  1679. Version:
  1680. Index: 8
  1681. CreatedAt: "2016-06-07T20:31:11.853781916Z"
  1682. UpdatedAt: "2016-06-07T20:31:11.999868824Z"
  1683. Spec:
  1684. Name: "my-node"
  1685. Role: "manager"
  1686. Availability: "active"
  1687. Labels:
  1688. foo: "bar"
  1689. Description:
  1690. Hostname: "bf3067039e47"
  1691. Platform:
  1692. Architecture: "x86_64"
  1693. OS: "linux"
  1694. Resources:
  1695. NanoCPUs: 4000000000
  1696. MemoryBytes: 8272408576
  1697. Engine:
  1698. EngineVersion: "17.04.0"
  1699. Labels:
  1700. foo: "bar"
  1701. Plugins:
  1702. - Type: "Volume"
  1703. Name: "local"
  1704. - Type: "Network"
  1705. Name: "bridge"
  1706. - Type: "Network"
  1707. Name: "null"
  1708. - Type: "Network"
  1709. Name: "overlay"
  1710. Status:
  1711. State: "ready"
  1712. Addr: "172.17.0.2"
  1713. ManagerStatus:
  1714. Leader: true
  1715. Reachability: "reachable"
  1716. Addr: "172.17.0.2:2377"
  1717. SwarmSpec:
  1718. description: "User modifiable swarm configuration."
  1719. type: "object"
  1720. properties:
  1721. Name:
  1722. description: "Name of the swarm."
  1723. type: "string"
  1724. Labels:
  1725. description: "User-defined key/value metadata."
  1726. type: "object"
  1727. additionalProperties:
  1728. type: "string"
  1729. Orchestration:
  1730. description: "Orchestration configuration."
  1731. type: "object"
  1732. properties:
  1733. TaskHistoryRetentionLimit:
  1734. description: "The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks."
  1735. type: "integer"
  1736. format: "int64"
  1737. Raft:
  1738. description: "Raft configuration."
  1739. type: "object"
  1740. properties:
  1741. SnapshotInterval:
  1742. description: "The number of log entries between snapshots."
  1743. type: "integer"
  1744. format: "int64"
  1745. KeepOldSnapshots:
  1746. description: "The number of snapshots to keep beyond the current snapshot."
  1747. type: "integer"
  1748. format: "int64"
  1749. LogEntriesForSlowFollowers:
  1750. description: "The number of log entries to keep around to sync up slow followers after a snapshot is created."
  1751. type: "integer"
  1752. format: "int64"
  1753. ElectionTick:
  1754. description: |
  1755. The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`.
  1756. A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed.
  1757. type: "integer"
  1758. HeartbeatTick:
  1759. description: |
  1760. The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers.
  1761. A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed.
  1762. type: "integer"
  1763. Dispatcher:
  1764. description: "Dispatcher configuration."
  1765. type: "object"
  1766. properties:
  1767. HeartbeatPeriod:
  1768. description: "The delay for an agent to send a heartbeat to the dispatcher."
  1769. type: "integer"
  1770. format: "int64"
  1771. CAConfig:
  1772. description: "CA configuration."
  1773. type: "object"
  1774. properties:
  1775. NodeCertExpiry:
  1776. description: "The duration node certificates are issued for."
  1777. type: "integer"
  1778. format: "int64"
  1779. ExternalCAs:
  1780. description: "Configuration for forwarding signing requests to an external certificate authority."
  1781. type: "array"
  1782. items:
  1783. type: "object"
  1784. properties:
  1785. Protocol:
  1786. description: "Protocol for communication with the external CA (currently only `cfssl` is supported)."
  1787. type: "string"
  1788. enum:
  1789. - "cfssl"
  1790. default: "cfssl"
  1791. URL:
  1792. description: "URL where certificate signing requests should be sent."
  1793. type: "string"
  1794. Options:
  1795. description: "An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver."
  1796. type: "object"
  1797. additionalProperties:
  1798. type: "string"
  1799. EncryptionConfig:
  1800. description: "Parameters related to encryption-at-rest."
  1801. type: "object"
  1802. properties:
  1803. AutoLockManagers:
  1804. description: "If set, generate a key and use it to lock data stored on the managers."
  1805. type: "boolean"
  1806. TaskDefaults:
  1807. description: "Defaults for creating tasks in this cluster."
  1808. type: "object"
  1809. properties:
  1810. LogDriver:
  1811. description: |
  1812. The log driver to use for tasks created in the orchestrator if unspecified by a service.
  1813. Updating this value will only have an affect on new tasks. Old tasks will continue use their previously configured log driver until recreated.
  1814. type: "object"
  1815. properties:
  1816. Name:
  1817. type: "string"
  1818. Options:
  1819. type: "object"
  1820. additionalProperties:
  1821. type: "string"
  1822. example:
  1823. Name: "default"
  1824. Orchestration:
  1825. TaskHistoryRetentionLimit: 10
  1826. Raft:
  1827. SnapshotInterval: 10000
  1828. LogEntriesForSlowFollowers: 500
  1829. HeartbeatTick: 1
  1830. ElectionTick: 3
  1831. Dispatcher:
  1832. HeartbeatPeriod: 5000000000
  1833. CAConfig:
  1834. NodeCertExpiry: 7776000000000000
  1835. JoinTokens:
  1836. Worker: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx"
  1837. Manager: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2"
  1838. EncryptionConfig:
  1839. AutoLockManagers: false
  1840. # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but
  1841. # without `JoinTokens`.
  1842. ClusterInfo:
  1843. type: "object"
  1844. properties:
  1845. ID:
  1846. description: "The ID of the swarm."
  1847. type: "string"
  1848. Version:
  1849. $ref: "#/definitions/ObjectVersion"
  1850. CreatedAt:
  1851. type: "string"
  1852. format: "dateTime"
  1853. UpdatedAt:
  1854. type: "string"
  1855. format: "dateTime"
  1856. Spec:
  1857. $ref: "#/definitions/SwarmSpec"
  1858. TaskSpec:
  1859. description: "User modifiable task configuration."
  1860. type: "object"
  1861. properties:
  1862. ContainerSpec:
  1863. type: "object"
  1864. properties:
  1865. Image:
  1866. description: "The image name to use for the container."
  1867. type: "string"
  1868. Labels:
  1869. description: "User-defined key/value data."
  1870. type: "object"
  1871. additionalProperties:
  1872. type: "string"
  1873. Command:
  1874. description: "The command to be run in the image."
  1875. type: "array"
  1876. items:
  1877. type: "string"
  1878. Args:
  1879. description: "Arguments to the command."
  1880. type: "array"
  1881. items:
  1882. type: "string"
  1883. Hostname:
  1884. description: "The hostname to use for the container, as a valid RFC 1123 hostname."
  1885. type: "string"
  1886. Env:
  1887. description: "A list of environment variables in the form `VAR=value`."
  1888. type: "array"
  1889. items:
  1890. type: "string"
  1891. Dir:
  1892. description: "The working directory for commands to run in."
  1893. type: "string"
  1894. User:
  1895. description: "The user inside the container."
  1896. type: "string"
  1897. Groups:
  1898. type: "array"
  1899. description: "A list of additional groups that the container process will run as."
  1900. items:
  1901. type: "string"
  1902. TTY:
  1903. description: "Whether a pseudo-TTY should be allocated."
  1904. type: "boolean"
  1905. OpenStdin:
  1906. description: "Open `stdin`"
  1907. type: "boolean"
  1908. ReadOnly:
  1909. description: "Mount the container's root filesystem as read only."
  1910. type: "boolean"
  1911. Mounts:
  1912. description: "Specification for mounts to be added to containers created as part of the service."
  1913. type: "array"
  1914. items:
  1915. $ref: "#/definitions/Mount"
  1916. StopSignal:
  1917. description: "Signal to stop the container."
  1918. type: "string"
  1919. StopGracePeriod:
  1920. description: "Amount of time to wait for the container to terminate before forcefully killing it."
  1921. type: "integer"
  1922. format: "int64"
  1923. HealthCheck:
  1924. $ref: "#/definitions/HealthConfig"
  1925. Hosts:
  1926. type: "array"
  1927. description: |
  1928. A list of hostnames/IP mappings to add to the container's `/etc/hosts` file.
  1929. The format of extra hosts on swarmkit is specified in:
  1930. http://man7.org/linux/man-pages/man5/hosts.5.html
  1931. IP_address canonical_hostname [aliases...]
  1932. items:
  1933. type: "string"
  1934. DNSConfig:
  1935. description: "Specification for DNS related configurations in resolver configuration file (`resolv.conf`)."
  1936. type: "object"
  1937. properties:
  1938. Nameservers:
  1939. description: "The IP addresses of the name servers."
  1940. type: "array"
  1941. items:
  1942. type: "string"
  1943. Search:
  1944. description: "A search list for host-name lookup."
  1945. type: "array"
  1946. items:
  1947. type: "string"
  1948. Options:
  1949. description: "A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.)."
  1950. type: "array"
  1951. items:
  1952. type: "string"
  1953. Secrets:
  1954. description: "Secrets contains references to zero or more secrets that will be exposed to the service."
  1955. type: "array"
  1956. items:
  1957. type: "object"
  1958. properties:
  1959. File:
  1960. description: "File represents a specific target that is backed by a file."
  1961. type: "object"
  1962. properties:
  1963. Name:
  1964. description: "Name represents the final filename in the filesystem."
  1965. type: "string"
  1966. UID:
  1967. description: "UID represents the file UID."
  1968. type: "string"
  1969. GID:
  1970. description: "GID represents the file GID."
  1971. type: "string"
  1972. Mode:
  1973. description: "Mode represents the FileMode of the file."
  1974. type: "integer"
  1975. format: "uint32"
  1976. SecretID:
  1977. description: "SecretID represents the ID of the specific secret that we're referencing."
  1978. type: "string"
  1979. SecretName:
  1980. description: |
  1981. SecretName is the name of the secret that this references, but this is just provided for
  1982. lookup/display purposes. The secret in the reference will be identified by its ID.
  1983. type: "string"
  1984. Resources:
  1985. description: "Resource requirements which apply to each individual container created as part of the service."
  1986. type: "object"
  1987. properties:
  1988. Limits:
  1989. description: "Define resources limits."
  1990. type: "object"
  1991. properties:
  1992. NanoCPUs:
  1993. description: "CPU limit in units of 10<sup>-9</sup> CPU shares."
  1994. type: "integer"
  1995. format: "int64"
  1996. MemoryBytes:
  1997. description: "Memory limit in Bytes."
  1998. type: "integer"
  1999. format: "int64"
  2000. Reservations:
  2001. description: "Define resources reservation."
  2002. properties:
  2003. NanoCPUs:
  2004. description: "CPU reservation in units of 10<sup>-9</sup> CPU shares."
  2005. type: "integer"
  2006. format: "int64"
  2007. MemoryBytes:
  2008. description: "Memory reservation in Bytes."
  2009. type: "integer"
  2010. format: "int64"
  2011. RestartPolicy:
  2012. description: "Specification for the restart policy which applies to containers created as part of this service."
  2013. type: "object"
  2014. properties:
  2015. Condition:
  2016. description: "Condition for restart."
  2017. type: "string"
  2018. enum:
  2019. - "none"
  2020. - "on-failure"
  2021. - "any"
  2022. Delay:
  2023. description: "Delay between restart attempts."
  2024. type: "integer"
  2025. format: "int64"
  2026. MaxAttempts:
  2027. description: "Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)."
  2028. type: "integer"
  2029. format: "int64"
  2030. default: 0
  2031. Window:
  2032. description: "Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded)."
  2033. type: "integer"
  2034. format: "int64"
  2035. default: 0
  2036. Placement:
  2037. type: "object"
  2038. properties:
  2039. Constraints:
  2040. description: "An array of constraints."
  2041. type: "array"
  2042. items:
  2043. type: "string"
  2044. Preferences:
  2045. description: "Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence."
  2046. type: "array"
  2047. items:
  2048. type: "object"
  2049. properties:
  2050. Spread:
  2051. type: "object"
  2052. properties:
  2053. SpreadDescriptor:
  2054. description: "label descriptor, such as engine.labels.az"
  2055. type: "string"
  2056. ForceUpdate:
  2057. description: "A counter that triggers an update even if no relevant parameters have been changed."
  2058. type: "integer"
  2059. Networks:
  2060. type: "array"
  2061. items:
  2062. type: "object"
  2063. properties:
  2064. Target:
  2065. type: "string"
  2066. Aliases:
  2067. type: "array"
  2068. items:
  2069. type: "string"
  2070. LogDriver:
  2071. description: "Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified."
  2072. type: "object"
  2073. properties:
  2074. Name:
  2075. type: "string"
  2076. Options:
  2077. type: "object"
  2078. additionalProperties:
  2079. type: "string"
  2080. TaskState:
  2081. type: "string"
  2082. enum:
  2083. - "new"
  2084. - "allocated"
  2085. - "pending"
  2086. - "assigned"
  2087. - "accepted"
  2088. - "preparing"
  2089. - "ready"
  2090. - "starting"
  2091. - "running"
  2092. - "complete"
  2093. - "shutdown"
  2094. - "failed"
  2095. - "rejected"
  2096. Task:
  2097. type: "object"
  2098. properties:
  2099. ID:
  2100. description: "The ID of the task."
  2101. type: "string"
  2102. Version:
  2103. $ref: "#/definitions/ObjectVersion"
  2104. CreatedAt:
  2105. type: "string"
  2106. format: "dateTime"
  2107. UpdatedAt:
  2108. type: "string"
  2109. format: "dateTime"
  2110. Name:
  2111. description: "Name of the task."
  2112. type: "string"
  2113. Labels:
  2114. description: "User-defined key/value metadata."
  2115. type: "object"
  2116. additionalProperties:
  2117. type: "string"
  2118. Spec:
  2119. $ref: "#/definitions/TaskSpec"
  2120. ServiceID:
  2121. description: "The ID of the service this task is part of."
  2122. type: "string"
  2123. Slot:
  2124. type: "integer"
  2125. NodeID:
  2126. description: "The ID of the node that this task is on."
  2127. type: "string"
  2128. Status:
  2129. type: "object"
  2130. properties:
  2131. Timestamp:
  2132. type: "string"
  2133. format: "dateTime"
  2134. State:
  2135. $ref: "#/definitions/TaskState"
  2136. Message:
  2137. type: "string"
  2138. Err:
  2139. type: "string"
  2140. ContainerStatus:
  2141. type: "object"
  2142. properties:
  2143. ContainerID:
  2144. type: "string"
  2145. PID:
  2146. type: "integer"
  2147. ExitCode:
  2148. type: "integer"
  2149. DesiredState:
  2150. $ref: "#/definitions/TaskState"
  2151. example:
  2152. ID: "0kzzo1i0y4jz6027t0k7aezc7"
  2153. Version:
  2154. Index: 71
  2155. CreatedAt: "2016-06-07T21:07:31.171892745Z"
  2156. UpdatedAt: "2016-06-07T21:07:31.376370513Z"
  2157. Spec:
  2158. ContainerSpec:
  2159. Image: "redis"
  2160. Resources:
  2161. Limits: {}
  2162. Reservations: {}
  2163. RestartPolicy:
  2164. Condition: "any"
  2165. MaxAttempts: 0
  2166. Placement: {}
  2167. ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  2168. Slot: 1
  2169. NodeID: "60gvrl6tm78dmak4yl7srz94v"
  2170. Status:
  2171. Timestamp: "2016-06-07T21:07:31.290032978Z"
  2172. State: "running"
  2173. Message: "started"
  2174. ContainerStatus:
  2175. ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
  2176. PID: 677
  2177. DesiredState: "running"
  2178. NetworksAttachments:
  2179. - Network:
  2180. ID: "4qvuz4ko70xaltuqbt8956gd1"
  2181. Version:
  2182. Index: 18
  2183. CreatedAt: "2016-06-07T20:31:11.912919752Z"
  2184. UpdatedAt: "2016-06-07T21:07:29.955277358Z"
  2185. Spec:
  2186. Name: "ingress"
  2187. Labels:
  2188. com.docker.swarm.internal: "true"
  2189. DriverConfiguration: {}
  2190. IPAMOptions:
  2191. Driver: {}
  2192. Configs:
  2193. - Subnet: "10.255.0.0/16"
  2194. Gateway: "10.255.0.1"
  2195. DriverState:
  2196. Name: "overlay"
  2197. Options:
  2198. com.docker.network.driver.overlay.vxlanid_list: "256"
  2199. IPAMOptions:
  2200. Driver:
  2201. Name: "default"
  2202. Configs:
  2203. - Subnet: "10.255.0.0/16"
  2204. Gateway: "10.255.0.1"
  2205. Addresses:
  2206. - "10.255.0.10/16"
  2207. ServiceSpec:
  2208. description: "User modifiable configuration for a service."
  2209. type: object
  2210. properties:
  2211. Name:
  2212. description: "Name of the service."
  2213. type: "string"
  2214. Labels:
  2215. description: "User-defined key/value metadata."
  2216. type: "object"
  2217. additionalProperties:
  2218. type: "string"
  2219. TaskTemplate:
  2220. $ref: "#/definitions/TaskSpec"
  2221. Mode:
  2222. description: "Scheduling mode for the service."
  2223. type: "object"
  2224. properties:
  2225. Replicated:
  2226. type: "object"
  2227. properties:
  2228. Replicas:
  2229. type: "integer"
  2230. format: "int64"
  2231. Global:
  2232. type: "object"
  2233. UpdateConfig:
  2234. description: "Specification for the update strategy of the service."
  2235. type: "object"
  2236. properties:
  2237. Parallelism:
  2238. description: "Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism)."
  2239. type: "integer"
  2240. format: "int64"
  2241. Delay:
  2242. description: "Amount of time between updates, in nanoseconds."
  2243. type: "integer"
  2244. format: "int64"
  2245. FailureAction:
  2246. description: "Action to take if an updated task fails to run, or stops running during the update."
  2247. type: "string"
  2248. enum:
  2249. - "continue"
  2250. - "pause"
  2251. - "rollback"
  2252. Monitor:
  2253. description: "Amount of time to monitor each updated task for failures, in nanoseconds."
  2254. type: "integer"
  2255. format: "int64"
  2256. MaxFailureRatio:
  2257. description: "The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1."
  2258. type: "number"
  2259. default: 0
  2260. Order:
  2261. description: "The order of operations when rolling out an updated task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down."
  2262. type: "string"
  2263. enum:
  2264. - "stop-first"
  2265. - "start-first"
  2266. RollbackConfig:
  2267. description: "Specification for the rollback strategy of the service."
  2268. type: "object"
  2269. properties:
  2270. Parallelism:
  2271. description: "Maximum number of tasks to be rolled back in one iteration (0 means unlimited parallelism)."
  2272. type: "integer"
  2273. format: "int64"
  2274. Delay:
  2275. description: "Amount of time between rollback iterations, in nanoseconds."
  2276. type: "integer"
  2277. format: "int64"
  2278. FailureAction:
  2279. description: "Action to take if an rolled back task fails to run, or stops running during the rollback."
  2280. type: "string"
  2281. enum:
  2282. - "continue"
  2283. - "pause"
  2284. Monitor:
  2285. description: "Amount of time to monitor each rolled back task for failures, in nanoseconds."
  2286. type: "integer"
  2287. format: "int64"
  2288. MaxFailureRatio:
  2289. description: "The fraction of tasks that may fail during a rollback before the failure action is invoked, specified as a floating point number between 0 and 1."
  2290. type: "number"
  2291. default: 0
  2292. Order:
  2293. description: "The order of operations when rolling back a task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down."
  2294. type: "string"
  2295. enum:
  2296. - "stop-first"
  2297. - "start-first"
  2298. Networks:
  2299. description: "Array of network names or IDs to attach the service to."
  2300. type: "array"
  2301. items:
  2302. type: "object"
  2303. properties:
  2304. Target:
  2305. type: "string"
  2306. Aliases:
  2307. type: "array"
  2308. items:
  2309. type: "string"
  2310. EndpointSpec:
  2311. $ref: "#/definitions/EndpointSpec"
  2312. EndpointPortConfig:
  2313. type: "object"
  2314. properties:
  2315. Name:
  2316. type: "string"
  2317. Protocol:
  2318. type: "string"
  2319. enum:
  2320. - "tcp"
  2321. - "udp"
  2322. TargetPort:
  2323. description: "The port inside the container."
  2324. type: "integer"
  2325. PublishedPort:
  2326. description: "The port on the swarm hosts."
  2327. type: "integer"
  2328. EndpointSpec:
  2329. description: "Properties that can be configured to access and load balance a service."
  2330. type: "object"
  2331. properties:
  2332. Mode:
  2333. description: "The mode of resolution to use for internal load balancing
  2334. between tasks."
  2335. type: "string"
  2336. enum:
  2337. - "vip"
  2338. - "dnsrr"
  2339. default: "vip"
  2340. Ports:
  2341. description: "List of exposed ports that this service is accessible on from the outside. Ports can only be provided if `vip` resolution mode is used."
  2342. type: "array"
  2343. items:
  2344. $ref: "#/definitions/EndpointPortConfig"
  2345. Service:
  2346. type: "object"
  2347. properties:
  2348. ID:
  2349. type: "string"
  2350. Version:
  2351. $ref: "#/definitions/ObjectVersion"
  2352. CreatedAt:
  2353. type: "string"
  2354. format: "dateTime"
  2355. UpdatedAt:
  2356. type: "string"
  2357. format: "dateTime"
  2358. Spec:
  2359. $ref: "#/definitions/ServiceSpec"
  2360. Endpoint:
  2361. type: "object"
  2362. properties:
  2363. Spec:
  2364. $ref: "#/definitions/EndpointSpec"
  2365. Ports:
  2366. type: "array"
  2367. items:
  2368. $ref: "#/definitions/EndpointPortConfig"
  2369. VirtualIPs:
  2370. type: "array"
  2371. items:
  2372. type: "object"
  2373. properties:
  2374. NetworkID:
  2375. type: "string"
  2376. Addr:
  2377. type: "string"
  2378. UpdateStatus:
  2379. description: "The status of a service update."
  2380. type: "object"
  2381. properties:
  2382. State:
  2383. type: "string"
  2384. enum:
  2385. - "updating"
  2386. - "paused"
  2387. - "completed"
  2388. StartedAt:
  2389. type: "string"
  2390. format: "dateTime"
  2391. CompletedAt:
  2392. type: "string"
  2393. format: "dateTime"
  2394. Message:
  2395. type: "string"
  2396. example:
  2397. ID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  2398. Version:
  2399. Index: 19
  2400. CreatedAt: "2016-06-07T21:05:51.880065305Z"
  2401. UpdatedAt: "2016-06-07T21:07:29.962229872Z"
  2402. Spec:
  2403. Name: "hopeful_cori"
  2404. TaskTemplate:
  2405. ContainerSpec:
  2406. Image: "redis"
  2407. Resources:
  2408. Limits: {}
  2409. Reservations: {}
  2410. RestartPolicy:
  2411. Condition: "any"
  2412. MaxAttempts: 0
  2413. Placement: {}
  2414. ForceUpdate: 0
  2415. Mode:
  2416. Replicated:
  2417. Replicas: 1
  2418. UpdateConfig:
  2419. Parallelism: 1
  2420. Delay: 1000000000
  2421. FailureAction: "pause"
  2422. Monitor: 15000000000
  2423. MaxFailureRatio: 0.15
  2424. RollbackConfig:
  2425. Parallelism: 1
  2426. Delay: 1000000000
  2427. FailureAction: "pause"
  2428. Monitor: 15000000000
  2429. MaxFailureRatio: 0.15
  2430. EndpointSpec:
  2431. Mode: "vip"
  2432. Ports:
  2433. -
  2434. Protocol: "tcp"
  2435. TargetPort: 6379
  2436. PublishedPort: 30001
  2437. Endpoint:
  2438. Spec:
  2439. Mode: "vip"
  2440. Ports:
  2441. -
  2442. Protocol: "tcp"
  2443. TargetPort: 6379
  2444. PublishedPort: 30001
  2445. Ports:
  2446. -
  2447. Protocol: "tcp"
  2448. TargetPort: 6379
  2449. PublishedPort: 30001
  2450. VirtualIPs:
  2451. -
  2452. NetworkID: "4qvuz4ko70xaltuqbt8956gd1"
  2453. Addr: "10.255.0.2/16"
  2454. -
  2455. NetworkID: "4qvuz4ko70xaltuqbt8956gd1"
  2456. Addr: "10.255.0.3/16"
  2457. ImageDeleteResponseItem:
  2458. type: "object"
  2459. properties:
  2460. Untagged:
  2461. description: "The image ID of an image that was untagged"
  2462. type: "string"
  2463. Deleted:
  2464. description: "The image ID of an image that was deleted"
  2465. type: "string"
  2466. ServiceUpdateResponse:
  2467. type: "object"
  2468. properties:
  2469. Warnings:
  2470. description: "Optional warning messages"
  2471. type: "array"
  2472. items:
  2473. type: "string"
  2474. example:
  2475. Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
  2476. ContainerSummary:
  2477. type: "array"
  2478. items:
  2479. type: "object"
  2480. properties:
  2481. Id:
  2482. description: "The ID of this container"
  2483. type: "string"
  2484. x-go-name: "ID"
  2485. Names:
  2486. description: "The names that this container has been given"
  2487. type: "array"
  2488. items:
  2489. type: "string"
  2490. Image:
  2491. description: "The name of the image used when creating this container"
  2492. type: "string"
  2493. ImageID:
  2494. description: "The ID of the image that this container was created from"
  2495. type: "string"
  2496. Command:
  2497. description: "Command to run when starting the container"
  2498. type: "string"
  2499. Created:
  2500. description: "When the container was created"
  2501. type: "integer"
  2502. format: "int64"
  2503. Ports:
  2504. description: "The ports exposed by this container"
  2505. type: "array"
  2506. items:
  2507. $ref: "#/definitions/Port"
  2508. SizeRw:
  2509. description: "The size of files that have been created or changed by this container"
  2510. type: "integer"
  2511. format: "int64"
  2512. SizeRootFs:
  2513. description: "The total size of all the files in this container"
  2514. type: "integer"
  2515. format: "int64"
  2516. Labels:
  2517. description: "User-defined key/value metadata."
  2518. type: "object"
  2519. additionalProperties:
  2520. type: "string"
  2521. State:
  2522. description: "The state of this container (e.g. `Exited`)"
  2523. type: "string"
  2524. Status:
  2525. description: "Additional human-readable status of this container (e.g. `Exit 0`)"
  2526. type: "string"
  2527. HostConfig:
  2528. type: "object"
  2529. properties:
  2530. NetworkMode:
  2531. type: "string"
  2532. NetworkSettings:
  2533. description: "A summary of the container's network settings"
  2534. type: "object"
  2535. properties:
  2536. Networks:
  2537. type: "object"
  2538. additionalProperties:
  2539. $ref: "#/definitions/EndpointSettings"
  2540. Mounts:
  2541. type: "array"
  2542. items:
  2543. $ref: "#/definitions/MountPoint"
  2544. SecretSpec:
  2545. type: "object"
  2546. properties:
  2547. Name:
  2548. description: "User-defined name of the secret."
  2549. type: "string"
  2550. Labels:
  2551. description: "User-defined key/value metadata."
  2552. type: "object"
  2553. additionalProperties:
  2554. type: "string"
  2555. Data:
  2556. description: "Base64-url-safe-encoded secret data"
  2557. type: "array"
  2558. items:
  2559. type: "string"
  2560. Secret:
  2561. type: "object"
  2562. properties:
  2563. ID:
  2564. type: "string"
  2565. Version:
  2566. $ref: "#/definitions/ObjectVersion"
  2567. CreatedAt:
  2568. type: "string"
  2569. format: "dateTime"
  2570. UpdatedAt:
  2571. type: "string"
  2572. format: "dateTime"
  2573. Spec:
  2574. $ref: "#/definitions/ServiceSpec"
  2575. paths:
  2576. /containers/json:
  2577. get:
  2578. summary: "List containers"
  2579. operationId: "ContainerList"
  2580. produces:
  2581. - "application/json"
  2582. parameters:
  2583. - name: "all"
  2584. in: "query"
  2585. description: "Return all containers. By default, only running containers are shown"
  2586. type: "boolean"
  2587. default: false
  2588. - name: "limit"
  2589. in: "query"
  2590. description: "Return this number of most recently created containers, including non-running ones."
  2591. type: "integer"
  2592. - name: "size"
  2593. in: "query"
  2594. description: "Return the size of container as fields `SizeRw` and `SizeRootFs`."
  2595. type: "boolean"
  2596. default: false
  2597. - name: "filters"
  2598. in: "query"
  2599. description: |
  2600. Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{"status": ["paused"]}` will only return paused containers. Available filters:
  2601. - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`)
  2602. - `before`=(`<container id>` or `<container name>`)
  2603. - `expose`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)
  2604. - `exited=<int>` containers with exit code of `<int>`
  2605. - `health`=(`starting`|`healthy`|`unhealthy`|`none`)
  2606. - `id=<ID>` a container's ID
  2607. - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only)
  2608. - `is-task=`(`true`|`false`)
  2609. - `label=key` or `label="key=value"` of a container label
  2610. - `name=<name>` a container's name
  2611. - `network`=(`<network id>` or `<network name>`)
  2612. - `publish`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`)
  2613. - `since`=(`<container id>` or `<container name>`)
  2614. - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`)
  2615. - `volume`=(`<volume name>` or `<mount point destination>`)
  2616. type: "string"
  2617. responses:
  2618. 200:
  2619. description: "no error"
  2620. schema:
  2621. $ref: "#/definitions/ContainerSummary"
  2622. examples:
  2623. application/json:
  2624. - Id: "8dfafdbc3a40"
  2625. Names:
  2626. - "/boring_feynman"
  2627. Image: "ubuntu:latest"
  2628. ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  2629. Command: "echo 1"
  2630. Created: 1367854155
  2631. State: "Exited"
  2632. Status: "Exit 0"
  2633. Ports:
  2634. - PrivatePort: 2222
  2635. PublicPort: 3333
  2636. Type: "tcp"
  2637. Labels:
  2638. com.example.vendor: "Acme"
  2639. com.example.license: "GPL"
  2640. com.example.version: "1.0"
  2641. SizeRw: 12288
  2642. SizeRootFs: 0
  2643. HostConfig:
  2644. NetworkMode: "default"
  2645. NetworkSettings:
  2646. Networks:
  2647. bridge:
  2648. NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  2649. EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f"
  2650. Gateway: "172.17.0.1"
  2651. IPAddress: "172.17.0.2"
  2652. IPPrefixLen: 16
  2653. IPv6Gateway: ""
  2654. GlobalIPv6Address: ""
  2655. GlobalIPv6PrefixLen: 0
  2656. MacAddress: "02:42:ac:11:00:02"
  2657. Mounts:
  2658. - Name: "fac362...80535"
  2659. Source: "/data"
  2660. Destination: "/data"
  2661. Driver: "local"
  2662. Mode: "ro,Z"
  2663. RW: false
  2664. Propagation: ""
  2665. - Id: "9cd87474be90"
  2666. Names:
  2667. - "/coolName"
  2668. Image: "ubuntu:latest"
  2669. ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  2670. Command: "echo 222222"
  2671. Created: 1367854155
  2672. State: "Exited"
  2673. Status: "Exit 0"
  2674. Ports: []
  2675. Labels: {}
  2676. SizeRw: 12288
  2677. SizeRootFs: 0
  2678. HostConfig:
  2679. NetworkMode: "default"
  2680. NetworkSettings:
  2681. Networks:
  2682. bridge:
  2683. NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  2684. EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a"
  2685. Gateway: "172.17.0.1"
  2686. IPAddress: "172.17.0.8"
  2687. IPPrefixLen: 16
  2688. IPv6Gateway: ""
  2689. GlobalIPv6Address: ""
  2690. GlobalIPv6PrefixLen: 0
  2691. MacAddress: "02:42:ac:11:00:08"
  2692. Mounts: []
  2693. - Id: "3176a2479c92"
  2694. Names:
  2695. - "/sleepy_dog"
  2696. Image: "ubuntu:latest"
  2697. ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  2698. Command: "echo 3333333333333333"
  2699. Created: 1367854154
  2700. State: "Exited"
  2701. Status: "Exit 0"
  2702. Ports: []
  2703. Labels: {}
  2704. SizeRw: 12288
  2705. SizeRootFs: 0
  2706. HostConfig:
  2707. NetworkMode: "default"
  2708. NetworkSettings:
  2709. Networks:
  2710. bridge:
  2711. NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  2712. EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d"
  2713. Gateway: "172.17.0.1"
  2714. IPAddress: "172.17.0.6"
  2715. IPPrefixLen: 16
  2716. IPv6Gateway: ""
  2717. GlobalIPv6Address: ""
  2718. GlobalIPv6PrefixLen: 0
  2719. MacAddress: "02:42:ac:11:00:06"
  2720. Mounts: []
  2721. - Id: "4cb07b47f9fb"
  2722. Names:
  2723. - "/running_cat"
  2724. Image: "ubuntu:latest"
  2725. ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82"
  2726. Command: "echo 444444444444444444444444444444444"
  2727. Created: 1367854152
  2728. State: "Exited"
  2729. Status: "Exit 0"
  2730. Ports: []
  2731. Labels: {}
  2732. SizeRw: 12288
  2733. SizeRootFs: 0
  2734. HostConfig:
  2735. NetworkMode: "default"
  2736. NetworkSettings:
  2737. Networks:
  2738. bridge:
  2739. NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  2740. EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9"
  2741. Gateway: "172.17.0.1"
  2742. IPAddress: "172.17.0.5"
  2743. IPPrefixLen: 16
  2744. IPv6Gateway: ""
  2745. GlobalIPv6Address: ""
  2746. GlobalIPv6PrefixLen: 0
  2747. MacAddress: "02:42:ac:11:00:05"
  2748. Mounts: []
  2749. 400:
  2750. description: "bad parameter"
  2751. schema:
  2752. $ref: "#/definitions/ErrorResponse"
  2753. 500:
  2754. description: "server error"
  2755. schema:
  2756. $ref: "#/definitions/ErrorResponse"
  2757. tags: ["Container"]
  2758. /containers/create:
  2759. post:
  2760. summary: "Create a container"
  2761. operationId: "ContainerCreate"
  2762. consumes:
  2763. - "application/json"
  2764. - "application/octet-stream"
  2765. produces:
  2766. - "application/json"
  2767. parameters:
  2768. - name: "name"
  2769. in: "query"
  2770. description: "Assign the specified name to the container. Must match `/?[a-zA-Z0-9_-]+`."
  2771. type: "string"
  2772. pattern: "/?[a-zA-Z0-9_-]+"
  2773. - name: "body"
  2774. in: "body"
  2775. description: "Container to create"
  2776. schema:
  2777. allOf:
  2778. - $ref: "#/definitions/Config"
  2779. - type: "object"
  2780. properties:
  2781. HostConfig:
  2782. $ref: "#/definitions/HostConfig"
  2783. NetworkingConfig:
  2784. description: "This container's networking configuration."
  2785. type: "object"
  2786. properties:
  2787. EndpointsConfig:
  2788. description: "A mapping of network name to endpoint configuration for that network."
  2789. type: "object"
  2790. additionalProperties:
  2791. $ref: "#/definitions/EndpointSettings"
  2792. example:
  2793. Hostname: ""
  2794. Domainname: ""
  2795. User: ""
  2796. AttachStdin: false
  2797. AttachStdout: true
  2798. AttachStderr: true
  2799. Tty: false
  2800. OpenStdin: false
  2801. StdinOnce: false
  2802. Env:
  2803. - "FOO=bar"
  2804. - "BAZ=quux"
  2805. Cmd:
  2806. - "date"
  2807. Entrypoint: ""
  2808. Image: "ubuntu"
  2809. Labels:
  2810. com.example.vendor: "Acme"
  2811. com.example.license: "GPL"
  2812. com.example.version: "1.0"
  2813. Volumes:
  2814. /volumes/data: {}
  2815. WorkingDir: ""
  2816. NetworkDisabled: false
  2817. MacAddress: "12:34:56:78:9a:bc"
  2818. ExposedPorts:
  2819. 22/tcp: {}
  2820. StopSignal: "SIGTERM"
  2821. StopTimeout: 10
  2822. HostConfig:
  2823. Binds:
  2824. - "/tmp:/tmp"
  2825. Links:
  2826. - "redis3:redis"
  2827. Memory: 0
  2828. MemorySwap: 0
  2829. MemoryReservation: 0
  2830. KernelMemory: 0
  2831. NanoCpus: 500000
  2832. CpuPercent: 80
  2833. CpuShares: 512
  2834. CpuPeriod: 100000
  2835. CpuRealtimePeriod: 1000000
  2836. CpuRealtimeRuntime: 10000
  2837. CpuQuota: 50000
  2838. CpusetCpus: "0,1"
  2839. CpusetMems: "0,1"
  2840. MaximumIOps: 0
  2841. MaximumIOBps: 0
  2842. BlkioWeight: 300
  2843. BlkioWeightDevice:
  2844. - {}
  2845. BlkioDeviceReadBps:
  2846. - {}
  2847. BlkioDeviceReadIOps:
  2848. - {}
  2849. BlkioDeviceWriteBps:
  2850. - {}
  2851. BlkioDeviceWriteIOps:
  2852. - {}
  2853. MemorySwappiness: 60
  2854. OomKillDisable: false
  2855. OomScoreAdj: 500
  2856. PidMode: ""
  2857. PidsLimit: -1
  2858. PortBindings:
  2859. 22/tcp:
  2860. - HostPort: "11022"
  2861. PublishAllPorts: false
  2862. Privileged: false
  2863. ReadonlyRootfs: false
  2864. Dns:
  2865. - "8.8.8.8"
  2866. DnsOptions:
  2867. - ""
  2868. DnsSearch:
  2869. - ""
  2870. VolumesFrom:
  2871. - "parent"
  2872. - "other:ro"
  2873. CapAdd:
  2874. - "NET_ADMIN"
  2875. CapDrop:
  2876. - "MKNOD"
  2877. GroupAdd:
  2878. - "newgroup"
  2879. RestartPolicy:
  2880. Name: ""
  2881. MaximumRetryCount: 0
  2882. AutoRemove: true
  2883. NetworkMode: "bridge"
  2884. Devices: []
  2885. Ulimits:
  2886. - {}
  2887. LogConfig:
  2888. Type: "json-file"
  2889. Config: {}
  2890. SecurityOpt: []
  2891. StorageOpt: {}
  2892. CgroupParent: ""
  2893. VolumeDriver: ""
  2894. ShmSize: 67108864
  2895. NetworkingConfig:
  2896. EndpointsConfig:
  2897. isolated_nw:
  2898. IPAMConfig:
  2899. IPv4Address: "172.20.30.33"
  2900. IPv6Address: "2001:db8:abcd::3033"
  2901. LinkLocalIPs:
  2902. - "169.254.34.68"
  2903. - "fe80::3468"
  2904. Links:
  2905. - "container_1"
  2906. - "container_2"
  2907. Aliases:
  2908. - "server_x"
  2909. - "server_y"
  2910. required: true
  2911. responses:
  2912. 201:
  2913. description: "Container created successfully"
  2914. schema:
  2915. type: "object"
  2916. required: [Id, Warnings]
  2917. properties:
  2918. Id:
  2919. description: "The ID of the created container"
  2920. type: "string"
  2921. x-nullable: false
  2922. Warnings:
  2923. description: "Warnings encountered when creating the container"
  2924. type: "array"
  2925. x-nullable: false
  2926. items:
  2927. type: "string"
  2928. examples:
  2929. application/json:
  2930. Id: "e90e34656806"
  2931. Warnings: []
  2932. 400:
  2933. description: "bad parameter"
  2934. schema:
  2935. $ref: "#/definitions/ErrorResponse"
  2936. 404:
  2937. description: "no such image"
  2938. schema:
  2939. $ref: "#/definitions/ErrorResponse"
  2940. examples:
  2941. application/json:
  2942. message: "No such image: c2ada9df5af8"
  2943. 406:
  2944. description: "impossible to attach"
  2945. schema:
  2946. $ref: "#/definitions/ErrorResponse"
  2947. 409:
  2948. description: "conflict"
  2949. schema:
  2950. $ref: "#/definitions/ErrorResponse"
  2951. 500:
  2952. description: "server error"
  2953. schema:
  2954. $ref: "#/definitions/ErrorResponse"
  2955. tags: ["Container"]
  2956. /containers/{id}/json:
  2957. get:
  2958. summary: "Inspect a container"
  2959. description: "Return low-level information about a container."
  2960. operationId: "ContainerInspect"
  2961. produces:
  2962. - "application/json"
  2963. responses:
  2964. 200:
  2965. description: "no error"
  2966. schema:
  2967. type: "object"
  2968. properties:
  2969. Id:
  2970. description: "The ID of the container"
  2971. type: "string"
  2972. Created:
  2973. description: "The time the container was created"
  2974. type: "string"
  2975. Path:
  2976. description: "The path to the command being run"
  2977. type: "string"
  2978. Args:
  2979. description: "The arguments to the command being run"
  2980. type: "array"
  2981. items:
  2982. type: "string"
  2983. State:
  2984. description: "The state of the container."
  2985. type: "object"
  2986. properties:
  2987. Status:
  2988. description: "The status of the container. For example, `running` or `exited`."
  2989. type: "string"
  2990. Running:
  2991. description: "Whether this container is running."
  2992. type: "boolean"
  2993. Paused:
  2994. description: "Whether this container is paused."
  2995. type: "boolean"
  2996. Restarting:
  2997. description: "Whether this container is restarting."
  2998. type: "boolean"
  2999. OOMKilled:
  3000. description: "Whether this container has been killed because it ran out of memory."
  3001. type: "boolean"
  3002. Dead:
  3003. type: "boolean"
  3004. Pid:
  3005. description: "The process ID of this container"
  3006. type: "integer"
  3007. ExitCode:
  3008. description: "The last exit code of this container"
  3009. type: "integer"
  3010. Error:
  3011. type: "string"
  3012. StartedAt:
  3013. description: "The time when this container was last started."
  3014. type: "string"
  3015. FinishedAt:
  3016. description: "The time when this container last exited."
  3017. type: "string"
  3018. Image:
  3019. description: "The container's image"
  3020. type: "string"
  3021. ResolvConfPath:
  3022. type: "string"
  3023. HostnamePath:
  3024. type: "string"
  3025. HostsPath:
  3026. type: "string"
  3027. LogPath:
  3028. type: "string"
  3029. Node:
  3030. description: "TODO"
  3031. type: "object"
  3032. Name:
  3033. type: "string"
  3034. RestartCount:
  3035. type: "integer"
  3036. Driver:
  3037. type: "string"
  3038. MountLabel:
  3039. type: "string"
  3040. ProcessLabel:
  3041. type: "string"
  3042. AppArmorProfile:
  3043. type: "string"
  3044. ExecIDs:
  3045. type: "string"
  3046. HostConfig:
  3047. $ref: "#/definitions/HostConfig"
  3048. GraphDriver:
  3049. $ref: "#/definitions/GraphDriverData"
  3050. SizeRw:
  3051. description: "The size of files that have been created or changed by this container."
  3052. type: "integer"
  3053. format: "int64"
  3054. SizeRootFs:
  3055. description: "The total size of all the files in this container."
  3056. type: "integer"
  3057. format: "int64"
  3058. Mounts:
  3059. type: "array"
  3060. items:
  3061. $ref: "#/definitions/MountPoint"
  3062. Config:
  3063. $ref: "#/definitions/Config"
  3064. NetworkSettings:
  3065. $ref: "#/definitions/NetworkConfig"
  3066. examples:
  3067. application/json:
  3068. AppArmorProfile: ""
  3069. Args:
  3070. - "-c"
  3071. - "exit 9"
  3072. Config:
  3073. AttachStderr: true
  3074. AttachStdin: false
  3075. AttachStdout: true
  3076. Cmd:
  3077. - "/bin/sh"
  3078. - "-c"
  3079. - "exit 9"
  3080. Domainname: ""
  3081. Env:
  3082. - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  3083. Hostname: "ba033ac44011"
  3084. Image: "ubuntu"
  3085. Labels:
  3086. com.example.vendor: "Acme"
  3087. com.example.license: "GPL"
  3088. com.example.version: "1.0"
  3089. MacAddress: ""
  3090. NetworkDisabled: false
  3091. OpenStdin: false
  3092. StdinOnce: false
  3093. Tty: false
  3094. User: ""
  3095. Volumes:
  3096. /volumes/data: {}
  3097. WorkingDir: ""
  3098. StopSignal: "SIGTERM"
  3099. StopTimeout: 10
  3100. Created: "2015-01-06T15:47:31.485331387Z"
  3101. Driver: "overlay2"
  3102. HostConfig:
  3103. MaximumIOps: 0
  3104. MaximumIOBps: 0
  3105. BlkioWeight: 0
  3106. BlkioWeightDevice:
  3107. - {}
  3108. BlkioDeviceReadBps:
  3109. - {}
  3110. BlkioDeviceWriteBps:
  3111. - {}
  3112. BlkioDeviceReadIOps:
  3113. - {}
  3114. BlkioDeviceWriteIOps:
  3115. - {}
  3116. ContainerIDFile: ""
  3117. CpusetCpus: ""
  3118. CpusetMems: ""
  3119. CpuPercent: 80
  3120. CpuShares: 0
  3121. CpuPeriod: 100000
  3122. CpuRealtimePeriod: 1000000
  3123. CpuRealtimeRuntime: 10000
  3124. Devices: []
  3125. IpcMode: ""
  3126. Memory: 0
  3127. MemorySwap: 0
  3128. MemoryReservation: 0
  3129. KernelMemory: 0
  3130. OomKillDisable: false
  3131. OomScoreAdj: 500
  3132. NetworkMode: "bridge"
  3133. PidMode: ""
  3134. PortBindings: {}
  3135. Privileged: false
  3136. ReadonlyRootfs: false
  3137. PublishAllPorts: false
  3138. RestartPolicy:
  3139. MaximumRetryCount: 2
  3140. Name: "on-failure"
  3141. LogConfig:
  3142. Type: "json-file"
  3143. Sysctls:
  3144. net.ipv4.ip_forward: "1"
  3145. Ulimits:
  3146. - {}
  3147. VolumeDriver: ""
  3148. ShmSize: 67108864
  3149. HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname"
  3150. HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts"
  3151. LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log"
  3152. Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39"
  3153. Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2"
  3154. MountLabel: ""
  3155. Name: "/boring_euclid"
  3156. NetworkSettings:
  3157. Bridge: ""
  3158. SandboxID: ""
  3159. HairpinMode: false
  3160. LinkLocalIPv6Address: ""
  3161. LinkLocalIPv6PrefixLen: 0
  3162. SandboxKey: ""
  3163. SecondaryIPAddresses: null
  3164. SecondaryIPv6Addresses: null
  3165. EndpointID: ""
  3166. Gateway: ""
  3167. GlobalIPv6Address: ""
  3168. GlobalIPv6PrefixLen: 0
  3169. IPAddress: ""
  3170. IPPrefixLen: 0
  3171. IPv6Gateway: ""
  3172. MacAddress: ""
  3173. Networks:
  3174. bridge:
  3175. NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812"
  3176. EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d"
  3177. Gateway: "172.17.0.1"
  3178. IPAddress: "172.17.0.2"
  3179. IPPrefixLen: 16
  3180. IPv6Gateway: ""
  3181. GlobalIPv6Address: ""
  3182. GlobalIPv6PrefixLen: 0
  3183. MacAddress: "02:42:ac:12:00:02"
  3184. Path: "/bin/sh"
  3185. ProcessLabel: ""
  3186. ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf"
  3187. RestartCount: 1
  3188. State:
  3189. Error: ""
  3190. ExitCode: 9
  3191. FinishedAt: "2015-01-06T15:47:32.080254511Z"
  3192. OOMKilled: false
  3193. Dead: false
  3194. Paused: false
  3195. Pid: 0
  3196. Restarting: false
  3197. Running: true
  3198. StartedAt: "2015-01-06T15:47:32.072697474Z"
  3199. Status: "running"
  3200. Mounts:
  3201. - Name: "fac362...80535"
  3202. Source: "/data"
  3203. Destination: "/data"
  3204. Driver: "local"
  3205. Mode: "ro,Z"
  3206. RW: false
  3207. Propagation: ""
  3208. 404:
  3209. description: "no such container"
  3210. schema:
  3211. $ref: "#/definitions/ErrorResponse"
  3212. examples:
  3213. application/json:
  3214. message: "No such container: c2ada9df5af8"
  3215. 500:
  3216. description: "server error"
  3217. schema:
  3218. $ref: "#/definitions/ErrorResponse"
  3219. parameters:
  3220. - name: "id"
  3221. in: "path"
  3222. required: true
  3223. description: "ID or name of the container"
  3224. type: "string"
  3225. - name: "size"
  3226. in: "query"
  3227. type: "boolean"
  3228. default: false
  3229. description: "Return the size of container as fields `SizeRw` and `SizeRootFs`"
  3230. tags: ["Container"]
  3231. /containers/{id}/top:
  3232. get:
  3233. summary: "List processes running inside a container"
  3234. description: "On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows."
  3235. operationId: "ContainerTop"
  3236. responses:
  3237. 200:
  3238. description: "no error"
  3239. schema:
  3240. type: "object"
  3241. properties:
  3242. Titles:
  3243. description: "The ps column titles"
  3244. type: "array"
  3245. items:
  3246. type: "string"
  3247. Processes:
  3248. description: "Each process running in the container, where each is process is an array of values corresponding to the titles"
  3249. type: "array"
  3250. items:
  3251. type: "array"
  3252. items:
  3253. type: "string"
  3254. examples:
  3255. application/json:
  3256. Titles:
  3257. - "UID"
  3258. - "PID"
  3259. - "PPID"
  3260. - "C"
  3261. - "STIME"
  3262. - "TTY"
  3263. - "TIME"
  3264. - "CMD"
  3265. Processes:
  3266. -
  3267. - "root"
  3268. - "13642"
  3269. - "882"
  3270. - "0"
  3271. - "17:03"
  3272. - "pts/0"
  3273. - "00:00:00"
  3274. - "/bin/bash"
  3275. -
  3276. - "root"
  3277. - "13735"
  3278. - "13642"
  3279. - "0"
  3280. - "17:06"
  3281. - "pts/0"
  3282. - "00:00:00"
  3283. - "sleep 10"
  3284. 404:
  3285. description: "no such container"
  3286. schema:
  3287. $ref: "#/definitions/ErrorResponse"
  3288. examples:
  3289. application/json:
  3290. message: "No such container: c2ada9df5af8"
  3291. 500:
  3292. description: "server error"
  3293. schema:
  3294. $ref: "#/definitions/ErrorResponse"
  3295. parameters:
  3296. - name: "id"
  3297. in: "path"
  3298. required: true
  3299. description: "ID or name of the container"
  3300. type: "string"
  3301. - name: "ps_args"
  3302. in: "query"
  3303. description: "The arguments to pass to `ps`. For example, `aux`"
  3304. type: "string"
  3305. default: "-ef"
  3306. tags: ["Container"]
  3307. /containers/{id}/logs:
  3308. get:
  3309. summary: "Get container logs"
  3310. description: |
  3311. Get `stdout` and `stderr` logs from a container.
  3312. Note: This endpoint works only for containers with the `json-file` or `journald` logging driver.
  3313. operationId: "ContainerLogs"
  3314. responses:
  3315. 101:
  3316. description: "logs returned as a stream"
  3317. schema:
  3318. type: "string"
  3319. format: "binary"
  3320. 200:
  3321. description: "logs returned as a string in response body"
  3322. schema:
  3323. type: "string"
  3324. 404:
  3325. description: "no such container"
  3326. schema:
  3327. $ref: "#/definitions/ErrorResponse"
  3328. examples:
  3329. application/json:
  3330. message: "No such container: c2ada9df5af8"
  3331. 500:
  3332. description: "server error"
  3333. schema:
  3334. $ref: "#/definitions/ErrorResponse"
  3335. parameters:
  3336. - name: "id"
  3337. in: "path"
  3338. required: true
  3339. description: "ID or name of the container"
  3340. type: "string"
  3341. - name: "follow"
  3342. in: "query"
  3343. description: |
  3344. Return the logs as a stream.
  3345. This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach).
  3346. type: "boolean"
  3347. default: false
  3348. - name: "stdout"
  3349. in: "query"
  3350. description: "Return logs from `stdout`"
  3351. type: "boolean"
  3352. default: false
  3353. - name: "stderr"
  3354. in: "query"
  3355. description: "Return logs from `stderr`"
  3356. type: "boolean"
  3357. default: false
  3358. - name: "since"
  3359. in: "query"
  3360. description: "Only return logs since this time, as a UNIX timestamp"
  3361. type: "integer"
  3362. default: 0
  3363. - name: "timestamps"
  3364. in: "query"
  3365. description: "Add timestamps to every log line"
  3366. type: "boolean"
  3367. default: false
  3368. - name: "tail"
  3369. in: "query"
  3370. description: "Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines."
  3371. type: "string"
  3372. default: "all"
  3373. tags: ["Container"]
  3374. /containers/{id}/changes:
  3375. get:
  3376. summary: "Get changes on a container’s filesystem"
  3377. description: |
  3378. Returns which files in a container's filesystem have been added, deleted,
  3379. or modified. The `Kind` of modification can be one of:
  3380. - `0`: Modified
  3381. - `1`: Added
  3382. - `2`: Deleted
  3383. operationId: "ContainerChanges"
  3384. produces: ["application/json"]
  3385. responses:
  3386. 200:
  3387. description: "The list of changes"
  3388. schema:
  3389. type: "array"
  3390. items:
  3391. type: "object"
  3392. x-go-name: "ContainerChangeResponseItem"
  3393. required: [Path, Kind]
  3394. properties:
  3395. Path:
  3396. description: "Path to file that has changed"
  3397. type: "string"
  3398. x-nullable: false
  3399. Kind:
  3400. description: "Kind of change"
  3401. type: "integer"
  3402. format: "uint8"
  3403. enum: [0, 1, 2]
  3404. x-nullable: false
  3405. examples:
  3406. application/json:
  3407. - Path: "/dev"
  3408. Kind: 0
  3409. - Path: "/dev/kmsg"
  3410. Kind: 1
  3411. - Path: "/test"
  3412. Kind: 1
  3413. 404:
  3414. description: "no such container"
  3415. schema:
  3416. $ref: "#/definitions/ErrorResponse"
  3417. examples:
  3418. application/json:
  3419. message: "No such container: c2ada9df5af8"
  3420. 500:
  3421. description: "server error"
  3422. schema:
  3423. $ref: "#/definitions/ErrorResponse"
  3424. parameters:
  3425. - name: "id"
  3426. in: "path"
  3427. required: true
  3428. description: "ID or name of the container"
  3429. type: "string"
  3430. tags: ["Container"]
  3431. /containers/{id}/export:
  3432. get:
  3433. summary: "Export a container"
  3434. description: "Export the contents of a container as a tarball."
  3435. operationId: "ContainerExport"
  3436. produces:
  3437. - "application/octet-stream"
  3438. responses:
  3439. 200:
  3440. description: "no error"
  3441. 404:
  3442. description: "no such container"
  3443. schema:
  3444. $ref: "#/definitions/ErrorResponse"
  3445. examples:
  3446. application/json:
  3447. message: "No such container: c2ada9df5af8"
  3448. 500:
  3449. description: "server error"
  3450. schema:
  3451. $ref: "#/definitions/ErrorResponse"
  3452. parameters:
  3453. - name: "id"
  3454. in: "path"
  3455. required: true
  3456. description: "ID or name of the container"
  3457. type: "string"
  3458. tags: ["Container"]
  3459. /containers/{id}/stats:
  3460. get:
  3461. summary: "Get container stats based on resource usage"
  3462. description: |
  3463. This endpoint returns a live stream of a container’s resource usage
  3464. statistics.
  3465. The `precpu_stats` is the CPU statistic of last read, which is used
  3466. for calculating the CPU usage percentage. It is not the same as the
  3467. `cpu_stats` field.
  3468. If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is
  3469. nil then for compatibility with older daemons the length of the
  3470. corresponding `cpu_usage.percpu_usage` array should be used.
  3471. operationId: "ContainerStats"
  3472. produces: ["application/json"]
  3473. responses:
  3474. 200:
  3475. description: "no error"
  3476. schema:
  3477. type: "object"
  3478. examples:
  3479. application/json:
  3480. read: "2015-01-08T22:57:31.547920715Z"
  3481. pids_stats:
  3482. current: 3
  3483. networks:
  3484. eth0:
  3485. rx_bytes: 5338
  3486. rx_dropped: 0
  3487. rx_errors: 0
  3488. rx_packets: 36
  3489. tx_bytes: 648
  3490. tx_dropped: 0
  3491. tx_errors: 0
  3492. tx_packets: 8
  3493. eth5:
  3494. rx_bytes: 4641
  3495. rx_dropped: 0
  3496. rx_errors: 0
  3497. rx_packets: 26
  3498. tx_bytes: 690
  3499. tx_dropped: 0
  3500. tx_errors: 0
  3501. tx_packets: 9
  3502. memory_stats:
  3503. stats:
  3504. total_pgmajfault: 0
  3505. cache: 0
  3506. mapped_file: 0
  3507. total_inactive_file: 0
  3508. pgpgout: 414
  3509. rss: 6537216
  3510. total_mapped_file: 0
  3511. writeback: 0
  3512. unevictable: 0
  3513. pgpgin: 477
  3514. total_unevictable: 0
  3515. pgmajfault: 0
  3516. total_rss: 6537216
  3517. total_rss_huge: 6291456
  3518. total_writeback: 0
  3519. total_inactive_anon: 0
  3520. rss_huge: 6291456
  3521. hierarchical_memory_limit: 67108864
  3522. total_pgfault: 964
  3523. total_active_file: 0
  3524. active_anon: 6537216
  3525. total_active_anon: 6537216
  3526. total_pgpgout: 414
  3527. total_cache: 0
  3528. inactive_anon: 0
  3529. active_file: 0
  3530. pgfault: 964
  3531. inactive_file: 0
  3532. total_pgpgin: 477
  3533. max_usage: 6651904
  3534. usage: 6537216
  3535. failcnt: 0
  3536. limit: 67108864
  3537. blkio_stats: {}
  3538. cpu_stats:
  3539. cpu_usage:
  3540. percpu_usage:
  3541. - 8646879
  3542. - 24472255
  3543. - 36438778
  3544. - 30657443
  3545. usage_in_usermode: 50000000
  3546. total_usage: 100215355
  3547. usage_in_kernelmode: 30000000
  3548. system_cpu_usage: 739306590000000
  3549. online_cpus: 4
  3550. throttling_data:
  3551. periods: 0
  3552. throttled_periods: 0
  3553. throttled_time: 0
  3554. precpu_stats:
  3555. cpu_usage:
  3556. percpu_usage:
  3557. - 8646879
  3558. - 24350896
  3559. - 36438778
  3560. - 30657443
  3561. usage_in_usermode: 50000000
  3562. total_usage: 100093996
  3563. usage_in_kernelmode: 30000000
  3564. system_cpu_usage: 9492140000000
  3565. online_cpus: 4
  3566. throttling_data:
  3567. periods: 0
  3568. throttled_periods: 0
  3569. throttled_time: 0
  3570. 404:
  3571. description: "no such container"
  3572. schema:
  3573. $ref: "#/definitions/ErrorResponse"
  3574. examples:
  3575. application/json:
  3576. message: "No such container: c2ada9df5af8"
  3577. 500:
  3578. description: "server error"
  3579. schema:
  3580. $ref: "#/definitions/ErrorResponse"
  3581. parameters:
  3582. - name: "id"
  3583. in: "path"
  3584. required: true
  3585. description: "ID or name of the container"
  3586. type: "string"
  3587. - name: "stream"
  3588. in: "query"
  3589. description: "Stream the output. If false, the stats will be output once and then it will disconnect."
  3590. type: "boolean"
  3591. default: true
  3592. tags: ["Container"]
  3593. /containers/{id}/resize:
  3594. post:
  3595. summary: "Resize a container TTY"
  3596. description: "Resize the TTY for a container. You must restart the container for the resize to take effect."
  3597. operationId: "ContainerResize"
  3598. consumes:
  3599. - "application/octet-stream"
  3600. produces:
  3601. - "text/plain"
  3602. responses:
  3603. 200:
  3604. description: "no error"
  3605. 404:
  3606. description: "no such container"
  3607. schema:
  3608. $ref: "#/definitions/ErrorResponse"
  3609. examples:
  3610. application/json:
  3611. message: "No such container: c2ada9df5af8"
  3612. 500:
  3613. description: "cannot resize container"
  3614. schema:
  3615. $ref: "#/definitions/ErrorResponse"
  3616. parameters:
  3617. - name: "id"
  3618. in: "path"
  3619. required: true
  3620. description: "ID or name of the container"
  3621. type: "string"
  3622. - name: "h"
  3623. in: "query"
  3624. description: "Height of the tty session in characters"
  3625. type: "integer"
  3626. - name: "w"
  3627. in: "query"
  3628. description: "Width of the tty session in characters"
  3629. type: "integer"
  3630. tags: ["Container"]
  3631. /containers/{id}/start:
  3632. post:
  3633. summary: "Start a container"
  3634. operationId: "ContainerStart"
  3635. responses:
  3636. 204:
  3637. description: "no error"
  3638. 304:
  3639. description: "container already started"
  3640. schema:
  3641. $ref: "#/definitions/ErrorResponse"
  3642. 404:
  3643. description: "no such container"
  3644. schema:
  3645. $ref: "#/definitions/ErrorResponse"
  3646. examples:
  3647. application/json:
  3648. message: "No such container: c2ada9df5af8"
  3649. 500:
  3650. description: "server error"
  3651. schema:
  3652. $ref: "#/definitions/ErrorResponse"
  3653. parameters:
  3654. - name: "id"
  3655. in: "path"
  3656. required: true
  3657. description: "ID or name of the container"
  3658. type: "string"
  3659. - name: "detachKeys"
  3660. in: "query"
  3661. description: "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`."
  3662. type: "string"
  3663. tags: ["Container"]
  3664. /containers/{id}/stop:
  3665. post:
  3666. summary: "Stop a container"
  3667. operationId: "ContainerStop"
  3668. responses:
  3669. 204:
  3670. description: "no error"
  3671. 304:
  3672. description: "container already stopped"
  3673. schema:
  3674. $ref: "#/definitions/ErrorResponse"
  3675. 404:
  3676. description: "no such container"
  3677. schema:
  3678. $ref: "#/definitions/ErrorResponse"
  3679. examples:
  3680. application/json:
  3681. message: "No such container: c2ada9df5af8"
  3682. 500:
  3683. description: "server error"
  3684. schema:
  3685. $ref: "#/definitions/ErrorResponse"
  3686. parameters:
  3687. - name: "id"
  3688. in: "path"
  3689. required: true
  3690. description: "ID or name of the container"
  3691. type: "string"
  3692. - name: "t"
  3693. in: "query"
  3694. description: "Number of seconds to wait before killing the container"
  3695. type: "integer"
  3696. tags: ["Container"]
  3697. /containers/{id}/restart:
  3698. post:
  3699. summary: "Restart a container"
  3700. operationId: "ContainerRestart"
  3701. responses:
  3702. 204:
  3703. description: "no error"
  3704. 404:
  3705. description: "no such container"
  3706. schema:
  3707. $ref: "#/definitions/ErrorResponse"
  3708. examples:
  3709. application/json:
  3710. message: "No such container: c2ada9df5af8"
  3711. 500:
  3712. description: "server error"
  3713. schema:
  3714. $ref: "#/definitions/ErrorResponse"
  3715. parameters:
  3716. - name: "id"
  3717. in: "path"
  3718. required: true
  3719. description: "ID or name of the container"
  3720. type: "string"
  3721. - name: "t"
  3722. in: "query"
  3723. description: "Number of seconds to wait before killing the container"
  3724. type: "integer"
  3725. tags: ["Container"]
  3726. /containers/{id}/kill:
  3727. post:
  3728. summary: "Kill a container"
  3729. description: "Send a POSIX signal to a container, defaulting to killing to the container."
  3730. operationId: "ContainerKill"
  3731. responses:
  3732. 204:
  3733. description: "no error"
  3734. 404:
  3735. description: "no such container"
  3736. schema:
  3737. $ref: "#/definitions/ErrorResponse"
  3738. examples:
  3739. application/json:
  3740. message: "No such container: c2ada9df5af8"
  3741. 500:
  3742. description: "server error"
  3743. schema:
  3744. $ref: "#/definitions/ErrorResponse"
  3745. parameters:
  3746. - name: "id"
  3747. in: "path"
  3748. required: true
  3749. description: "ID or name of the container"
  3750. type: "string"
  3751. - name: "signal"
  3752. in: "query"
  3753. description: "Signal to send to the container as an integer or string (e.g. `SIGINT`)"
  3754. type: "string"
  3755. default: "SIGKILL"
  3756. tags: ["Container"]
  3757. /containers/{id}/update:
  3758. post:
  3759. summary: "Update a container"
  3760. description: "Change various configuration options of a container without having to recreate it."
  3761. operationId: "ContainerUpdate"
  3762. consumes: ["application/json"]
  3763. produces: ["application/json"]
  3764. responses:
  3765. 200:
  3766. description: "The container has been updated."
  3767. schema:
  3768. type: "object"
  3769. properties:
  3770. Warnings:
  3771. type: "array"
  3772. items:
  3773. type: "string"
  3774. 404:
  3775. description: "no such container"
  3776. schema:
  3777. $ref: "#/definitions/ErrorResponse"
  3778. examples:
  3779. application/json:
  3780. message: "No such container: c2ada9df5af8"
  3781. 500:
  3782. description: "server error"
  3783. schema:
  3784. $ref: "#/definitions/ErrorResponse"
  3785. parameters:
  3786. - name: "id"
  3787. in: "path"
  3788. required: true
  3789. description: "ID or name of the container"
  3790. type: "string"
  3791. - name: "update"
  3792. in: "body"
  3793. required: true
  3794. schema:
  3795. allOf:
  3796. - $ref: "#/definitions/Resources"
  3797. - type: "object"
  3798. properties:
  3799. RestartPolicy:
  3800. $ref: "#/definitions/RestartPolicy"
  3801. example:
  3802. BlkioWeight: 300
  3803. CpuShares: 512
  3804. CpuPeriod: 100000
  3805. CpuQuota: 50000
  3806. CpuRealtimePeriod: 1000000
  3807. CpuRealtimeRuntime: 10000
  3808. CpusetCpus: "0,1"
  3809. CpusetMems: "0"
  3810. Memory: 314572800
  3811. MemorySwap: 514288000
  3812. MemoryReservation: 209715200
  3813. KernelMemory: 52428800
  3814. RestartPolicy:
  3815. MaximumRetryCount: 4
  3816. Name: "on-failure"
  3817. tags: ["Container"]
  3818. /containers/{id}/rename:
  3819. post:
  3820. summary: "Rename a container"
  3821. operationId: "ContainerRename"
  3822. responses:
  3823. 204:
  3824. description: "no error"
  3825. 404:
  3826. description: "no such container"
  3827. schema:
  3828. $ref: "#/definitions/ErrorResponse"
  3829. examples:
  3830. application/json:
  3831. message: "No such container: c2ada9df5af8"
  3832. 409:
  3833. description: "name already in use"
  3834. schema:
  3835. $ref: "#/definitions/ErrorResponse"
  3836. 500:
  3837. description: "server error"
  3838. schema:
  3839. $ref: "#/definitions/ErrorResponse"
  3840. parameters:
  3841. - name: "id"
  3842. in: "path"
  3843. required: true
  3844. description: "ID or name of the container"
  3845. type: "string"
  3846. - name: "name"
  3847. in: "query"
  3848. required: true
  3849. description: "New name for the container"
  3850. type: "string"
  3851. tags: ["Container"]
  3852. /containers/{id}/pause:
  3853. post:
  3854. summary: "Pause a container"
  3855. description: |
  3856. Use the cgroups freezer to suspend all processes in a container.
  3857. Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the cgroups freezer the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed.
  3858. operationId: "ContainerPause"
  3859. responses:
  3860. 204:
  3861. description: "no error"
  3862. 404:
  3863. description: "no such container"
  3864. schema:
  3865. $ref: "#/definitions/ErrorResponse"
  3866. examples:
  3867. application/json:
  3868. message: "No such container: c2ada9df5af8"
  3869. 500:
  3870. description: "server error"
  3871. schema:
  3872. $ref: "#/definitions/ErrorResponse"
  3873. parameters:
  3874. - name: "id"
  3875. in: "path"
  3876. required: true
  3877. description: "ID or name of the container"
  3878. type: "string"
  3879. tags: ["Container"]
  3880. /containers/{id}/unpause:
  3881. post:
  3882. summary: "Unpause a container"
  3883. description: "Resume a container which has been paused."
  3884. operationId: "ContainerUnpause"
  3885. responses:
  3886. 204:
  3887. description: "no error"
  3888. 404:
  3889. description: "no such container"
  3890. schema:
  3891. $ref: "#/definitions/ErrorResponse"
  3892. examples:
  3893. application/json:
  3894. message: "No such container: c2ada9df5af8"
  3895. 500:
  3896. description: "server error"
  3897. schema:
  3898. $ref: "#/definitions/ErrorResponse"
  3899. parameters:
  3900. - name: "id"
  3901. in: "path"
  3902. required: true
  3903. description: "ID or name of the container"
  3904. type: "string"
  3905. tags: ["Container"]
  3906. /containers/{id}/attach:
  3907. post:
  3908. summary: "Attach to a container"
  3909. description: |
  3910. Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached.
  3911. Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything.
  3912. See [the documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details.
  3913. ### Hijacking
  3914. This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket.
  3915. This is the response from the daemon for an attach request:
  3916. ```
  3917. HTTP/1.1 200 OK
  3918. Content-Type: application/vnd.docker.raw-stream
  3919. [STREAM]
  3920. ```
  3921. After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server.
  3922. To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers.
  3923. For example, the client sends this request to upgrade the connection:
  3924. ```
  3925. POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1
  3926. Upgrade: tcp
  3927. Connection: Upgrade
  3928. ```
  3929. The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream:
  3930. ```
  3931. HTTP/1.1 101 UPGRADED
  3932. Content-Type: application/vnd.docker.raw-stream
  3933. Connection: Upgrade
  3934. Upgrade: tcp
  3935. [STREAM]
  3936. ```
  3937. ### Stream format
  3938. When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload.
  3939. The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`).
  3940. It is encoded on the first eight bytes like this:
  3941. ```go
  3942. header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}
  3943. ```
  3944. `STREAM_TYPE` can be:
  3945. - 0: `stdin` (is written on `stdout`)
  3946. - 1: `stdout`
  3947. - 2: `stderr`
  3948. `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian.
  3949. Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`.
  3950. The simplest way to implement this protocol is the following:
  3951. 1. Read 8 bytes.
  3952. 2. Choose `stdout` or `stderr` depending on the first byte.
  3953. 3. Extract the frame size from the last four bytes.
  3954. 4. Read the extracted size and output it on the correct output.
  3955. 5. Goto 1.
  3956. ### Stream format when using a TTY
  3957. When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`.
  3958. operationId: "ContainerAttach"
  3959. produces:
  3960. - "application/vnd.docker.raw-stream"
  3961. responses:
  3962. 101:
  3963. description: "no error, hints proxy about hijacking"
  3964. 200:
  3965. description: "no error, no upgrade header found"
  3966. 400:
  3967. description: "bad parameter"
  3968. schema:
  3969. $ref: "#/definitions/ErrorResponse"
  3970. 404:
  3971. description: "no such container"
  3972. schema:
  3973. $ref: "#/definitions/ErrorResponse"
  3974. examples:
  3975. application/json:
  3976. message: "No such container: c2ada9df5af8"
  3977. 500:
  3978. description: "server error"
  3979. schema:
  3980. $ref: "#/definitions/ErrorResponse"
  3981. parameters:
  3982. - name: "id"
  3983. in: "path"
  3984. required: true
  3985. description: "ID or name of the container"
  3986. type: "string"
  3987. - name: "detachKeys"
  3988. in: "query"
  3989. description: "Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`."
  3990. type: "string"
  3991. - name: "logs"
  3992. in: "query"
  3993. description: |
  3994. Replay previous logs from the container.
  3995. This is useful for attaching to a container that has started and you want to output everything since the container started.
  3996. If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output.
  3997. type: "boolean"
  3998. default: false
  3999. - name: "stream"
  4000. in: "query"
  4001. description: "Stream attached streams from the time the request was made onwards"
  4002. type: "boolean"
  4003. default: false
  4004. - name: "stdin"
  4005. in: "query"
  4006. description: "Attach to `stdin`"
  4007. type: "boolean"
  4008. default: false
  4009. - name: "stdout"
  4010. in: "query"
  4011. description: "Attach to `stdout`"
  4012. type: "boolean"
  4013. default: false
  4014. - name: "stderr"
  4015. in: "query"
  4016. description: "Attach to `stderr`"
  4017. type: "boolean"
  4018. default: false
  4019. tags: ["Container"]
  4020. /containers/{id}/attach/ws:
  4021. get:
  4022. summary: "Attach to a container via a websocket"
  4023. operationId: "ContainerAttachWebsocket"
  4024. responses:
  4025. 101:
  4026. description: "no error, hints proxy about hijacking"
  4027. 200:
  4028. description: "no error, no upgrade header found"
  4029. 400:
  4030. description: "bad parameter"
  4031. schema:
  4032. $ref: "#/definitions/ErrorResponse"
  4033. 404:
  4034. description: "no such container"
  4035. schema:
  4036. $ref: "#/definitions/ErrorResponse"
  4037. examples:
  4038. application/json:
  4039. message: "No such container: c2ada9df5af8"
  4040. 500:
  4041. description: "server error"
  4042. schema:
  4043. $ref: "#/definitions/ErrorResponse"
  4044. parameters:
  4045. - name: "id"
  4046. in: "path"
  4047. required: true
  4048. description: "ID or name of the container"
  4049. type: "string"
  4050. - name: "detachKeys"
  4051. in: "query"
  4052. description: "Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`."
  4053. type: "string"
  4054. - name: "logs"
  4055. in: "query"
  4056. description: "Return logs"
  4057. type: "boolean"
  4058. default: false
  4059. - name: "stream"
  4060. in: "query"
  4061. description: "Return stream"
  4062. type: "boolean"
  4063. default: false
  4064. tags: ["Container"]
  4065. /containers/{id}/wait:
  4066. post:
  4067. summary: "Wait for a container"
  4068. description: "Block until a container stops, then returns the exit code."
  4069. operationId: "ContainerWait"
  4070. produces: ["application/json"]
  4071. responses:
  4072. 200:
  4073. description: "The container has exit."
  4074. schema:
  4075. type: "object"
  4076. required: [StatusCode]
  4077. properties:
  4078. StatusCode:
  4079. description: "Exit code of the container"
  4080. type: "integer"
  4081. x-nullable: false
  4082. 404:
  4083. description: "no such container"
  4084. schema:
  4085. $ref: "#/definitions/ErrorResponse"
  4086. examples:
  4087. application/json:
  4088. message: "No such container: c2ada9df5af8"
  4089. 500:
  4090. description: "server error"
  4091. schema:
  4092. $ref: "#/definitions/ErrorResponse"
  4093. parameters:
  4094. - name: "id"
  4095. in: "path"
  4096. required: true
  4097. description: "ID or name of the container"
  4098. type: "string"
  4099. tags: ["Container"]
  4100. /containers/{id}:
  4101. delete:
  4102. summary: "Remove a container"
  4103. operationId: "ContainerDelete"
  4104. responses:
  4105. 204:
  4106. description: "no error"
  4107. 400:
  4108. description: "bad parameter"
  4109. schema:
  4110. $ref: "#/definitions/ErrorResponse"
  4111. 404:
  4112. description: "no such container"
  4113. schema:
  4114. $ref: "#/definitions/ErrorResponse"
  4115. examples:
  4116. application/json:
  4117. message: "No such container: c2ada9df5af8"
  4118. 409:
  4119. description: "conflict"
  4120. schema:
  4121. $ref: "#/definitions/ErrorResponse"
  4122. examples:
  4123. application/json:
  4124. message: "You cannot remove a running container: c2ada9df5af8. Stop the container before attempting removal or force remove"
  4125. 500:
  4126. description: "server error"
  4127. schema:
  4128. $ref: "#/definitions/ErrorResponse"
  4129. parameters:
  4130. - name: "id"
  4131. in: "path"
  4132. required: true
  4133. description: "ID or name of the container"
  4134. type: "string"
  4135. - name: "v"
  4136. in: "query"
  4137. description: "Remove anonymous volumes associated with the container."
  4138. type: "boolean"
  4139. default: false
  4140. - name: "force"
  4141. in: "query"
  4142. description: "If the container is running, kill it before removing it."
  4143. type: "boolean"
  4144. default: false
  4145. - name: "link"
  4146. in: "query"
  4147. description: "Remove the specified link associated with the container."
  4148. type: "boolean"
  4149. default: false
  4150. tags: ["Container"]
  4151. /containers/{id}/archive:
  4152. head:
  4153. summary: "Get information about files in a container"
  4154. description: "A response header `X-Docker-Container-Path-Stat` is return containing a base64 - encoded JSON object with some filesystem header information about the path."
  4155. operationId: "ContainerArchiveInfo"
  4156. responses:
  4157. 200:
  4158. description: "no error"
  4159. headers:
  4160. X-Docker-Container-Path-Stat:
  4161. type: "string"
  4162. description: "TODO"
  4163. 400:
  4164. description: "Bad parameter"
  4165. schema:
  4166. $ref: "#/definitions/ErrorResponse"
  4167. 404:
  4168. description: "Container or path does not exist"
  4169. schema:
  4170. $ref: "#/definitions/ErrorResponse"
  4171. examples:
  4172. application/json:
  4173. message: "No such container: c2ada9df5af8"
  4174. 500:
  4175. description: "Server error"
  4176. schema:
  4177. $ref: "#/definitions/ErrorResponse"
  4178. parameters:
  4179. - name: "id"
  4180. in: "path"
  4181. required: true
  4182. description: "ID or name of the container"
  4183. type: "string"
  4184. - name: "path"
  4185. in: "query"
  4186. required: true
  4187. description: "Resource in the container’s filesystem to archive."
  4188. type: "string"
  4189. tags: ["Container"]
  4190. get:
  4191. summary: "Get an archive of a filesystem resource in a container"
  4192. description: "Get a tar archive of a resource in the filesystem of container id."
  4193. operationId: "ContainerArchive"
  4194. produces: ["application/x-tar"]
  4195. responses:
  4196. 200:
  4197. description: "no error"
  4198. 400:
  4199. description: "Bad parameter"
  4200. schema:
  4201. $ref: "#/definitions/ErrorResponse"
  4202. 404:
  4203. description: "Container or path does not exist"
  4204. schema:
  4205. $ref: "#/definitions/ErrorResponse"
  4206. examples:
  4207. application/json:
  4208. message: "No such container: c2ada9df5af8"
  4209. 500:
  4210. description: "server error"
  4211. schema:
  4212. $ref: "#/definitions/ErrorResponse"
  4213. parameters:
  4214. - name: "id"
  4215. in: "path"
  4216. required: true
  4217. description: "ID or name of the container"
  4218. type: "string"
  4219. - name: "path"
  4220. in: "query"
  4221. required: true
  4222. description: "Resource in the container’s filesystem to archive."
  4223. type: "string"
  4224. tags: ["Container"]
  4225. put:
  4226. summary: "Extract an archive of files or folders to a directory in a container"
  4227. description: |
  4228. Upload a tar archive to be extracted to a path in the filesystem of container id.
  4229. `path` parameter is asserted to be a directory. If it exists as a file, 400 error
  4230. will be returned with message "not a directory".
  4231. operationId: "PutContainerArchive"
  4232. consumes: ["application/x-tar", "application/octet-stream"]
  4233. responses:
  4234. 200:
  4235. description: "The content was extracted successfully"
  4236. 400:
  4237. description: "Bad parameter"
  4238. schema:
  4239. $ref: "#/definitions/ErrorResponse"
  4240. examples:
  4241. application/json:
  4242. message: "not a directory"
  4243. 403:
  4244. description: "Permission denied, the volume or container rootfs is marked as read-only."
  4245. schema:
  4246. $ref: "#/definitions/ErrorResponse"
  4247. 404:
  4248. description: "No such container or path does not exist inside the container"
  4249. schema:
  4250. $ref: "#/definitions/ErrorResponse"
  4251. examples:
  4252. application/json:
  4253. message: "No such container: c2ada9df5af8"
  4254. 500:
  4255. description: "Server error"
  4256. schema:
  4257. $ref: "#/definitions/ErrorResponse"
  4258. parameters:
  4259. - name: "id"
  4260. in: "path"
  4261. required: true
  4262. description: "ID or name of the container"
  4263. type: "string"
  4264. - name: "path"
  4265. in: "query"
  4266. required: true
  4267. description: "Path to a directory in the container to extract the archive’s contents into. "
  4268. type: "string"
  4269. - name: "noOverwriteDirNonDir"
  4270. in: "query"
  4271. description: "If “1”, “true”, or “True” then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa."
  4272. type: "string"
  4273. - name: "inputStream"
  4274. in: "body"
  4275. required: true
  4276. description: "The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz."
  4277. schema:
  4278. type: "string"
  4279. tags: ["Container"]
  4280. /containers/prune:
  4281. post:
  4282. summary: "Delete stopped containers"
  4283. produces:
  4284. - "application/json"
  4285. operationId: "ContainerPrune"
  4286. parameters:
  4287. - name: "filters"
  4288. in: "query"
  4289. description: |
  4290. Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  4291. Available filters:
  4292. - `until=<timestamp>` Prune containers created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time.
  4293. type: "string"
  4294. responses:
  4295. 200:
  4296. description: "No error"
  4297. schema:
  4298. type: "object"
  4299. properties:
  4300. ContainersDeleted:
  4301. description: "Container IDs that were deleted"
  4302. type: "array"
  4303. items:
  4304. type: "string"
  4305. SpaceReclaimed:
  4306. description: "Disk space reclaimed in bytes"
  4307. type: "integer"
  4308. format: "int64"
  4309. 500:
  4310. description: "Server error"
  4311. schema:
  4312. $ref: "#/definitions/ErrorResponse"
  4313. tags: ["Container"]
  4314. /images/json:
  4315. get:
  4316. summary: "List Images"
  4317. description: "Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image."
  4318. operationId: "ImageList"
  4319. produces:
  4320. - "application/json"
  4321. responses:
  4322. 200:
  4323. description: "Summary image data for the images matching the query"
  4324. schema:
  4325. type: "array"
  4326. items:
  4327. $ref: "#/definitions/ImageSummary"
  4328. examples:
  4329. application/json:
  4330. - Id: "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8"
  4331. ParentId: ""
  4332. RepoTags:
  4333. - "ubuntu:12.04"
  4334. - "ubuntu:precise"
  4335. RepoDigests:
  4336. - "ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787"
  4337. Created: 1474925151
  4338. Size: 103579269
  4339. VirtualSize: 103579269
  4340. SharedSize: 0
  4341. Labels: {}
  4342. Containers: 2
  4343. - Id: "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175"
  4344. ParentId: ""
  4345. RepoTags:
  4346. - "ubuntu:12.10"
  4347. - "ubuntu:quantal"
  4348. RepoDigests:
  4349. - "ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7"
  4350. - "ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3"
  4351. Created: 1403128455
  4352. Size: 172064416
  4353. VirtualSize: 172064416
  4354. SharedSize: 0
  4355. Labels: {}
  4356. Containers: 5
  4357. 500:
  4358. description: "server error"
  4359. schema:
  4360. $ref: "#/definitions/ErrorResponse"
  4361. parameters:
  4362. - name: "all"
  4363. in: "query"
  4364. description: "Show all images. Only images from a final layer (no children) are shown by default."
  4365. type: "boolean"
  4366. default: false
  4367. - name: "filters"
  4368. in: "query"
  4369. description: |
  4370. A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:
  4371. - `before`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
  4372. - `dangling=true`
  4373. - `label=key` or `label="key=value"` of an image label
  4374. - `reference`=(`<image-name>[:<tag>]`)
  4375. - `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
  4376. type: "string"
  4377. - name: "digests"
  4378. in: "query"
  4379. description: "Show digest information as a `RepoDigests` field on each image."
  4380. type: "boolean"
  4381. default: false
  4382. tags: ["Image"]
  4383. /build:
  4384. post:
  4385. summary: "Build an image"
  4386. description: |
  4387. Build an image from a tar archive with a `Dockerfile` in it.
  4388. The `Dockerfile` specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the `dockerfile` parameter. [See the `Dockerfile` reference for more information](https://docs.docker.com/engine/reference/builder/).
  4389. The Docker daemon performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output.
  4390. The build is canceled if the client drops the connection by quitting or being killed.
  4391. operationId: "ImageBuild"
  4392. consumes:
  4393. - "application/octet-stream"
  4394. produces:
  4395. - "application/json"
  4396. parameters:
  4397. - name: "inputStream"
  4398. in: "body"
  4399. description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz."
  4400. schema:
  4401. type: "string"
  4402. format: "binary"
  4403. - name: "dockerfile"
  4404. in: "query"
  4405. description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`."
  4406. type: "string"
  4407. default: "Dockerfile"
  4408. - name: "t"
  4409. in: "query"
  4410. description: "A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters."
  4411. type: "string"
  4412. - name: "extrahosts"
  4413. in: "query"
  4414. description: "Extra hosts to add to /etc/hosts"
  4415. type: "string"
  4416. - name: "remote"
  4417. in: "query"
  4418. description: "A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball."
  4419. type: "string"
  4420. - name: "q"
  4421. in: "query"
  4422. description: "Suppress verbose build output."
  4423. type: "boolean"
  4424. default: false
  4425. - name: "nocache"
  4426. in: "query"
  4427. description: "Do not use the cache when building the image."
  4428. type: "boolean"
  4429. default: false
  4430. - name: "cachefrom"
  4431. in: "query"
  4432. description: "JSON array of images used for build cache resolution."
  4433. type: "string"
  4434. - name: "pull"
  4435. in: "query"
  4436. description: "Attempt to pull the image even if an older image exists locally."
  4437. type: "string"
  4438. - name: "rm"
  4439. in: "query"
  4440. description: "Remove intermediate containers after a successful build."
  4441. type: "boolean"
  4442. default: true
  4443. - name: "forcerm"
  4444. in: "query"
  4445. description: "Always remove intermediate containers, even upon failure."
  4446. type: "boolean"
  4447. default: false
  4448. - name: "memory"
  4449. in: "query"
  4450. description: "Set memory limit for build."
  4451. type: "integer"
  4452. - name: "memswap"
  4453. in: "query"
  4454. description: "Total memory (memory + swap). Set as `-1` to disable swap."
  4455. type: "integer"
  4456. - name: "cpushares"
  4457. in: "query"
  4458. description: "CPU shares (relative weight)."
  4459. type: "integer"
  4460. - name: "cpusetcpus"
  4461. in: "query"
  4462. description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)."
  4463. type: "string"
  4464. - name: "cpuperiod"
  4465. in: "query"
  4466. description: "The length of a CPU period in microseconds."
  4467. type: "integer"
  4468. - name: "cpuquota"
  4469. in: "query"
  4470. description: "Microseconds of CPU time that the container can get in a CPU period."
  4471. type: "integer"
  4472. - name: "buildargs"
  4473. in: "query"
  4474. description: "JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)"
  4475. type: "integer"
  4476. - name: "shmsize"
  4477. in: "query"
  4478. description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB."
  4479. type: "integer"
  4480. - name: "squash"
  4481. in: "query"
  4482. description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*"
  4483. type: "boolean"
  4484. - name: "labels"
  4485. in: "query"
  4486. description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs."
  4487. type: "string"
  4488. - name: "networkmode"
  4489. in: "query"
  4490. description: "Sets the networking mode for the run commands during
  4491. build. Supported standard values are: `bridge`, `host`, `none`, and
  4492. `container:<name|id>`. Any other value is taken as a custom network's
  4493. name to which this container should connect to."
  4494. type: "string"
  4495. - name: "Content-type"
  4496. in: "header"
  4497. type: "string"
  4498. enum:
  4499. - "application/x-tar"
  4500. default: "application/x-tar"
  4501. - name: "X-Registry-Config"
  4502. in: "header"
  4503. description: |
  4504. This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to.
  4505. The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example:
  4506. ```
  4507. {
  4508. "docker.example.com": {
  4509. "username": "janedoe",
  4510. "password": "hunter2"
  4511. },
  4512. "https://index.docker.io/v1/": {
  4513. "username": "mobydock",
  4514. "password": "conta1n3rize14"
  4515. }
  4516. }
  4517. ```
  4518. Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API.
  4519. type: "string"
  4520. responses:
  4521. 200:
  4522. description: "no error"
  4523. 400:
  4524. description: "Bad parameter"
  4525. schema:
  4526. $ref: "#/definitions/ErrorResponse"
  4527. 500:
  4528. description: "server error"
  4529. schema:
  4530. $ref: "#/definitions/ErrorResponse"
  4531. tags: ["Image"]
  4532. /images/create:
  4533. post:
  4534. summary: "Create an image"
  4535. description: "Create an image by either pulling it from a registry or importing it."
  4536. operationId: "ImageCreate"
  4537. consumes:
  4538. - "text/plain"
  4539. - "application/octet-stream"
  4540. produces:
  4541. - "application/json"
  4542. responses:
  4543. 200:
  4544. description: "no error"
  4545. 404:
  4546. description: "repository does not exist or no read access"
  4547. schema:
  4548. $ref: "#/definitions/ErrorResponse"
  4549. 500:
  4550. description: "server error"
  4551. schema:
  4552. $ref: "#/definitions/ErrorResponse"
  4553. parameters:
  4554. - name: "fromImage"
  4555. in: "query"
  4556. description: "Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed."
  4557. type: "string"
  4558. - name: "fromSrc"
  4559. in: "query"
  4560. description: "Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image."
  4561. type: "string"
  4562. - name: "repo"
  4563. in: "query"
  4564. description: "Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image."
  4565. type: "string"
  4566. - name: "tag"
  4567. in: "query"
  4568. description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled."
  4569. type: "string"
  4570. - name: "inputImage"
  4571. in: "body"
  4572. description: "Image content if the value `-` has been specified in fromSrc query parameter"
  4573. schema:
  4574. type: "string"
  4575. required: false
  4576. - name: "X-Registry-Auth"
  4577. in: "header"
  4578. description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)"
  4579. type: "string"
  4580. tags: ["Image"]
  4581. /images/{name}/json:
  4582. get:
  4583. summary: "Inspect an image"
  4584. description: "Return low-level information about an image."
  4585. operationId: "ImageInspect"
  4586. produces:
  4587. - "application/json"
  4588. responses:
  4589. 200:
  4590. description: "No error"
  4591. schema:
  4592. $ref: "#/definitions/Image"
  4593. examples:
  4594. application/json:
  4595. Id: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c"
  4596. Container: "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a"
  4597. Comment: ""
  4598. Os: "linux"
  4599. Architecture: "amd64"
  4600. Parent: "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
  4601. ContainerConfig:
  4602. Tty: false
  4603. Hostname: "e611e15f9c9d"
  4604. Domainname: ""
  4605. AttachStdout: false
  4606. PublishService: ""
  4607. AttachStdin: false
  4608. OpenStdin: false
  4609. StdinOnce: false
  4610. NetworkDisabled: false
  4611. OnBuild: []
  4612. Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
  4613. User: ""
  4614. WorkingDir: ""
  4615. MacAddress: ""
  4616. AttachStderr: false
  4617. Labels:
  4618. com.example.license: "GPL"
  4619. com.example.version: "1.0"
  4620. com.example.vendor: "Acme"
  4621. Env:
  4622. - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  4623. Cmd:
  4624. - "/bin/sh"
  4625. - "-c"
  4626. - "#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0"
  4627. DockerVersion: "1.9.0-dev"
  4628. VirtualSize: 188359297
  4629. Size: 0
  4630. Author: ""
  4631. Created: "2015-09-10T08:30:53.26995814Z"
  4632. GraphDriver:
  4633. Name: "aufs"
  4634. Data: {}
  4635. RepoDigests:
  4636. - "localhost:5000/test/busybox/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf"
  4637. RepoTags:
  4638. - "example:1.0"
  4639. - "example:latest"
  4640. - "example:stable"
  4641. Config:
  4642. Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c"
  4643. NetworkDisabled: false
  4644. OnBuild: []
  4645. StdinOnce: false
  4646. PublishService: ""
  4647. AttachStdin: false
  4648. OpenStdin: false
  4649. Domainname: ""
  4650. AttachStdout: false
  4651. Tty: false
  4652. Hostname: "e611e15f9c9d"
  4653. Cmd:
  4654. - "/bin/bash"
  4655. Env:
  4656. - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  4657. Labels:
  4658. com.example.vendor: "Acme"
  4659. com.example.version: "1.0"
  4660. com.example.license: "GPL"
  4661. MacAddress: ""
  4662. AttachStderr: false
  4663. WorkingDir: ""
  4664. User: ""
  4665. RootFS:
  4666. Type: "layers"
  4667. Layers:
  4668. - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6"
  4669. - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
  4670. 404:
  4671. description: "No such image"
  4672. schema:
  4673. $ref: "#/definitions/ErrorResponse"
  4674. examples:
  4675. application/json:
  4676. message: "No such image: someimage (tag: latest)"
  4677. 500:
  4678. description: "Server error"
  4679. schema:
  4680. $ref: "#/definitions/ErrorResponse"
  4681. parameters:
  4682. - name: "name"
  4683. in: "path"
  4684. description: "Image name or id"
  4685. type: "string"
  4686. required: true
  4687. tags: ["Image"]
  4688. /images/{name}/history:
  4689. get:
  4690. summary: "Get the history of an image"
  4691. description: "Return parent layers of an image."
  4692. operationId: "ImageHistory"
  4693. produces: ["application/json"]
  4694. responses:
  4695. 200:
  4696. description: "List of image layers"
  4697. schema:
  4698. type: "array"
  4699. items:
  4700. type: "object"
  4701. x-go-name: HistoryResponseItem
  4702. required: [Id, Created, CreatedBy, Tags, Size, Comment]
  4703. properties:
  4704. Id:
  4705. type: "string"
  4706. x-nullable: false
  4707. Created:
  4708. type: "integer"
  4709. format: "int64"
  4710. x-nullable: false
  4711. CreatedBy:
  4712. type: "string"
  4713. x-nullable: false
  4714. Tags:
  4715. type: "array"
  4716. items:
  4717. type: "string"
  4718. Size:
  4719. type: "integer"
  4720. format: "int64"
  4721. x-nullable: false
  4722. Comment:
  4723. type: "string"
  4724. x-nullable: false
  4725. examples:
  4726. application/json:
  4727. - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710"
  4728. Created: 1398108230
  4729. CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /"
  4730. Tags:
  4731. - "ubuntu:lucid"
  4732. - "ubuntu:10.04"
  4733. Size: 182964289
  4734. Comment: ""
  4735. - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8"
  4736. Created: 1398108222
  4737. CreatedBy: "/bin/sh -c #(nop) MAINTAINER Tianon Gravi <admwiggin@gmail.com> - mkimage-debootstrap.sh -i iproute,iputils-ping,ubuntu-minimal -t lucid.tar.xz lucid http://archive.ubuntu.com/ubuntu/"
  4738. Tags: []
  4739. Size: 0
  4740. Comment: ""
  4741. - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158"
  4742. Created: 1371157430
  4743. CreatedBy: ""
  4744. Tags:
  4745. - "scratch12:latest"
  4746. - "scratch:latest"
  4747. Size: 0
  4748. Comment: "Imported from -"
  4749. 404:
  4750. description: "No such image"
  4751. schema:
  4752. $ref: "#/definitions/ErrorResponse"
  4753. 500:
  4754. description: "Server error"
  4755. schema:
  4756. $ref: "#/definitions/ErrorResponse"
  4757. parameters:
  4758. - name: "name"
  4759. in: "path"
  4760. description: "Image name or ID"
  4761. type: "string"
  4762. required: true
  4763. tags: ["Image"]
  4764. /images/{name}/push:
  4765. post:
  4766. summary: "Push an image"
  4767. description: |
  4768. Push an image to a registry.
  4769. If you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, `registry.example.com/myimage:latest`.
  4770. The push is cancelled if the HTTP connection is closed.
  4771. operationId: "ImagePush"
  4772. consumes:
  4773. - "application/octet-stream"
  4774. responses:
  4775. 200:
  4776. description: "No error"
  4777. 404:
  4778. description: "No such image"
  4779. schema:
  4780. $ref: "#/definitions/ErrorResponse"
  4781. 500:
  4782. description: "Server error"
  4783. schema:
  4784. $ref: "#/definitions/ErrorResponse"
  4785. parameters:
  4786. - name: "name"
  4787. in: "path"
  4788. description: "Image name or ID."
  4789. type: "string"
  4790. required: true
  4791. - name: "tag"
  4792. in: "query"
  4793. description: "The tag to associate with the image on the registry."
  4794. type: "string"
  4795. - name: "X-Registry-Auth"
  4796. in: "header"
  4797. description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)"
  4798. type: "string"
  4799. required: true
  4800. tags: ["Image"]
  4801. /images/{name}/tag:
  4802. post:
  4803. summary: "Tag an image"
  4804. description: "Tag an image so that it becomes part of a repository."
  4805. operationId: "ImageTag"
  4806. responses:
  4807. 201:
  4808. description: "No error"
  4809. 400:
  4810. description: "Bad parameter"
  4811. schema:
  4812. $ref: "#/definitions/ErrorResponse"
  4813. 404:
  4814. description: "No such image"
  4815. schema:
  4816. $ref: "#/definitions/ErrorResponse"
  4817. 409:
  4818. description: "Conflict"
  4819. schema:
  4820. $ref: "#/definitions/ErrorResponse"
  4821. 500:
  4822. description: "Server error"
  4823. schema:
  4824. $ref: "#/definitions/ErrorResponse"
  4825. parameters:
  4826. - name: "name"
  4827. in: "path"
  4828. description: "Image name or ID to tag."
  4829. type: "string"
  4830. required: true
  4831. - name: "repo"
  4832. in: "query"
  4833. description: "The repository to tag in. For example, `someuser/someimage`."
  4834. type: "string"
  4835. - name: "tag"
  4836. in: "query"
  4837. description: "The name of the new tag."
  4838. type: "string"
  4839. tags: ["Image"]
  4840. /images/{name}:
  4841. delete:
  4842. summary: "Remove an image"
  4843. description: |
  4844. Remove an image, along with any untagged parent images that were
  4845. referenced by that image.
  4846. Images can't be removed if they have descendant images, are being
  4847. used by a running container or are being used by a build.
  4848. operationId: "ImageDelete"
  4849. produces: ["application/json"]
  4850. responses:
  4851. 200:
  4852. description: "The image was deleted successfully"
  4853. schema:
  4854. type: "array"
  4855. items:
  4856. $ref: "#/definitions/ImageDeleteResponseItem"
  4857. examples:
  4858. application/json:
  4859. - Untagged: "3e2f21a89f"
  4860. - Deleted: "3e2f21a89f"
  4861. - Deleted: "53b4f83ac9"
  4862. 404:
  4863. description: "No such image"
  4864. schema:
  4865. $ref: "#/definitions/ErrorResponse"
  4866. 409:
  4867. description: "Conflict"
  4868. schema:
  4869. $ref: "#/definitions/ErrorResponse"
  4870. 500:
  4871. description: "Server error"
  4872. schema:
  4873. $ref: "#/definitions/ErrorResponse"
  4874. parameters:
  4875. - name: "name"
  4876. in: "path"
  4877. description: "Image name or ID"
  4878. type: "string"
  4879. required: true
  4880. - name: "force"
  4881. in: "query"
  4882. description: "Remove the image even if it is being used by stopped containers or has other tags"
  4883. type: "boolean"
  4884. default: false
  4885. - name: "noprune"
  4886. in: "query"
  4887. description: "Do not delete untagged parent images"
  4888. type: "boolean"
  4889. default: false
  4890. tags: ["Image"]
  4891. /images/search:
  4892. get:
  4893. summary: "Search images"
  4894. description: "Search for an image on Docker Hub."
  4895. operationId: "ImageSearch"
  4896. produces:
  4897. - "application/json"
  4898. responses:
  4899. 200:
  4900. description: "No error"
  4901. schema:
  4902. type: "array"
  4903. items:
  4904. type: "object"
  4905. properties:
  4906. description:
  4907. type: "string"
  4908. is_official:
  4909. type: "boolean"
  4910. is_automated:
  4911. type: "boolean"
  4912. name:
  4913. type: "string"
  4914. star_count:
  4915. type: "integer"
  4916. examples:
  4917. application/json:
  4918. - description: ""
  4919. is_official: false
  4920. is_automated: false
  4921. name: "wma55/u1210sshd"
  4922. star_count: 0
  4923. - description: ""
  4924. is_official: false
  4925. is_automated: false
  4926. name: "jdswinbank/sshd"
  4927. star_count: 0
  4928. - description: ""
  4929. is_official: false
  4930. is_automated: false
  4931. name: "vgauthier/sshd"
  4932. star_count: 0
  4933. 500:
  4934. description: "Server error"
  4935. schema:
  4936. $ref: "#/definitions/ErrorResponse"
  4937. parameters:
  4938. - name: "term"
  4939. in: "query"
  4940. description: "Term to search"
  4941. type: "string"
  4942. required: true
  4943. - name: "limit"
  4944. in: "query"
  4945. description: "Maximum number of results to return"
  4946. type: "integer"
  4947. - name: "filters"
  4948. in: "query"
  4949. description: |
  4950. A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:
  4951. - `is-automated=(true|false)`
  4952. - `is-official=(true|false)`
  4953. - `stars=<number>` Matches images that has at least 'number' stars.
  4954. type: "string"
  4955. tags: ["Image"]
  4956. /images/prune:
  4957. post:
  4958. summary: "Delete unused images"
  4959. produces:
  4960. - "application/json"
  4961. operationId: "ImagePrune"
  4962. parameters:
  4963. - name: "filters"
  4964. in: "query"
  4965. description: |
  4966. Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters:
  4967. - `dangling=<boolean>` When set to `true` (or `1`), prune only
  4968. unused *and* untagged images. When set to `false`
  4969. (or `0`), all unused images are pruned.
  4970. - `until=<string>` Prune images created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time.
  4971. type: "string"
  4972. responses:
  4973. 200:
  4974. description: "No error"
  4975. schema:
  4976. type: "object"
  4977. properties:
  4978. ImagesDeleted:
  4979. description: "Images that were deleted"
  4980. type: "array"
  4981. items:
  4982. $ref: "#/definitions/ImageDeleteResponseItem"
  4983. SpaceReclaimed:
  4984. description: "Disk space reclaimed in bytes"
  4985. type: "integer"
  4986. format: "int64"
  4987. 500:
  4988. description: "Server error"
  4989. schema:
  4990. $ref: "#/definitions/ErrorResponse"
  4991. tags: ["Image"]
  4992. /auth:
  4993. post:
  4994. summary: "Check auth configuration"
  4995. description: "Validate credentials for a registry and, if available, get an identity token for accessing the registry without password."
  4996. operationId: "SystemAuth"
  4997. consumes: ["application/json"]
  4998. produces: ["application/json"]
  4999. responses:
  5000. 200:
  5001. description: "An identity token was generated successfully."
  5002. schema:
  5003. type: "object"
  5004. required: [Status]
  5005. properties:
  5006. Status:
  5007. description: "The status of the authentication"
  5008. type: "string"
  5009. x-nullable: false
  5010. IdentityToken:
  5011. description: "An opaque token used to authenticate a user after a successful login"
  5012. type: "string"
  5013. x-nullable: false
  5014. examples:
  5015. application/json:
  5016. Status: "Login Succeeded"
  5017. IdentityToken: "9cbaf023786cd7..."
  5018. 204:
  5019. description: "No error"
  5020. 500:
  5021. description: "Server error"
  5022. schema:
  5023. $ref: "#/definitions/ErrorResponse"
  5024. parameters:
  5025. - name: "authConfig"
  5026. in: "body"
  5027. description: "Authentication to check"
  5028. schema:
  5029. $ref: "#/definitions/AuthConfig"
  5030. tags: ["System"]
  5031. /info:
  5032. get:
  5033. summary: "Get system information"
  5034. operationId: "SystemInfo"
  5035. produces:
  5036. - "application/json"
  5037. responses:
  5038. 200:
  5039. description: "No error"
  5040. schema:
  5041. type: "object"
  5042. properties:
  5043. Architecture:
  5044. type: "string"
  5045. Containers:
  5046. type: "integer"
  5047. ContainersRunning:
  5048. type: "integer"
  5049. ContainersStopped:
  5050. type: "integer"
  5051. ContainersPaused:
  5052. type: "integer"
  5053. CpuCfsPeriod:
  5054. type: "boolean"
  5055. CpuCfsQuota:
  5056. type: "boolean"
  5057. Debug:
  5058. type: "boolean"
  5059. DiscoveryBackend:
  5060. type: "string"
  5061. DockerRootDir:
  5062. type: "string"
  5063. Driver:
  5064. type: "string"
  5065. DriverStatus:
  5066. type: "array"
  5067. items:
  5068. type: "array"
  5069. items:
  5070. type: "string"
  5071. SystemStatus:
  5072. type: "array"
  5073. items:
  5074. type: "array"
  5075. items:
  5076. type: "string"
  5077. Plugins:
  5078. type: "object"
  5079. properties:
  5080. Volume:
  5081. type: "array"
  5082. items:
  5083. type: "string"
  5084. Network:
  5085. type: "array"
  5086. items:
  5087. type: "string"
  5088. ExperimentalBuild:
  5089. type: "boolean"
  5090. HttpProxy:
  5091. type: "string"
  5092. HttpsProxy:
  5093. type: "string"
  5094. ID:
  5095. type: "string"
  5096. IPv4Forwarding:
  5097. type: "boolean"
  5098. Images:
  5099. type: "integer"
  5100. IndexServerAddress:
  5101. type: "string"
  5102. InitPath:
  5103. type: "string"
  5104. InitSha1:
  5105. type: "string"
  5106. KernelVersion:
  5107. type: "string"
  5108. Labels:
  5109. type: "array"
  5110. items:
  5111. type: "string"
  5112. MemTotal:
  5113. type: "integer"
  5114. MemoryLimit:
  5115. type: "boolean"
  5116. NCPU:
  5117. type: "integer"
  5118. NEventsListener:
  5119. type: "integer"
  5120. NFd:
  5121. type: "integer"
  5122. NGoroutines:
  5123. type: "integer"
  5124. Name:
  5125. type: "string"
  5126. NoProxy:
  5127. type: "string"
  5128. OomKillDisable:
  5129. type: "boolean"
  5130. OSType:
  5131. type: "string"
  5132. OomScoreAdj:
  5133. type: "integer"
  5134. OperatingSystem:
  5135. type: "string"
  5136. RegistryConfig:
  5137. type: "object"
  5138. properties:
  5139. IndexConfigs:
  5140. type: "object"
  5141. additionalProperties:
  5142. type: "object"
  5143. properties:
  5144. Mirrors:
  5145. type: "array"
  5146. items:
  5147. type: "string"
  5148. Name:
  5149. type: "string"
  5150. Official:
  5151. type: "boolean"
  5152. Secure:
  5153. type: "boolean"
  5154. InsecureRegistryCIDRs:
  5155. type: "array"
  5156. items:
  5157. type: "string"
  5158. SwapLimit:
  5159. type: "boolean"
  5160. SystemTime:
  5161. type: "string"
  5162. ServerVersion:
  5163. type: "string"
  5164. examples:
  5165. application/json:
  5166. Architecture: "x86_64"
  5167. ClusterStore: "etcd://localhost:2379"
  5168. CgroupDriver: "cgroupfs"
  5169. Containers: 11
  5170. ContainersRunning: 7
  5171. ContainersStopped: 3
  5172. ContainersPaused: 1
  5173. CpuCfsPeriod: true
  5174. CpuCfsQuota: true
  5175. Debug: false
  5176. DockerRootDir: "/var/lib/docker"
  5177. Driver: "btrfs"
  5178. DriverStatus:
  5179. -
  5180. - ""
  5181. ExperimentalBuild: false
  5182. HttpProxy: "http://test:test@localhost:8080"
  5183. HttpsProxy: "https://test:test@localhost:8080"
  5184. ID: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS"
  5185. IPv4Forwarding: true
  5186. Images: 16
  5187. IndexServerAddress: "https://index.docker.io/v1/"
  5188. InitPath: "/usr/bin/docker"
  5189. InitSha1: ""
  5190. KernelMemory: true
  5191. KernelVersion: "3.12.0-1-amd64"
  5192. Labels:
  5193. - "storage=ssd"
  5194. MemTotal: 2099236864
  5195. MemoryLimit: true
  5196. NCPU: 1
  5197. NEventsListener: 0
  5198. NFd: 11
  5199. NGoroutines: 21
  5200. Name: "prod-server-42"
  5201. NoProxy: "9.81.1.160"
  5202. OomKillDisable: true
  5203. OSType: "linux"
  5204. OperatingSystem: "Boot2Docker"
  5205. Plugins:
  5206. Volume:
  5207. - "local"
  5208. Network:
  5209. - "null"
  5210. - "host"
  5211. - "bridge"
  5212. RegistryConfig:
  5213. IndexConfigs:
  5214. docker.io:
  5215. Name: "docker.io"
  5216. Official: true
  5217. Secure: true
  5218. InsecureRegistryCIDRs:
  5219. - "127.0.0.0/8"
  5220. SecurityOptions:
  5221. - Key: "Name"
  5222. Value: "seccomp"
  5223. - Key: "Profile"
  5224. Value: "default"
  5225. - Key: "Name"
  5226. Value: "apparmor"
  5227. - Key: "Name"
  5228. Value: "selinux"
  5229. - Key: "Name"
  5230. Value: "userns"
  5231. ServerVersion: "1.9.0"
  5232. SwapLimit: false
  5233. SystemStatus:
  5234. -
  5235. - "State"
  5236. - "Healthy"
  5237. SystemTime: "2015-03-10T11:11:23.730591467-07:00"
  5238. 500:
  5239. description: "Server error"
  5240. schema:
  5241. $ref: "#/definitions/ErrorResponse"
  5242. tags: ["System"]
  5243. /version:
  5244. get:
  5245. summary: "Get version"
  5246. description: "Returns the version of Docker that is running and various information about the system that Docker is running on."
  5247. operationId: "SystemVersion"
  5248. produces: ["application/json"]
  5249. responses:
  5250. 200:
  5251. description: "no error"
  5252. schema:
  5253. type: "object"
  5254. properties:
  5255. Version:
  5256. type: "string"
  5257. ApiVersion:
  5258. type: "string"
  5259. MinAPIVersion:
  5260. type: "string"
  5261. GitCommit:
  5262. type: "string"
  5263. GoVersion:
  5264. type: "string"
  5265. Os:
  5266. type: "string"
  5267. Arch:
  5268. type: "string"
  5269. KernelVersion:
  5270. type: "string"
  5271. Experimental:
  5272. type: "boolean"
  5273. BuildTime:
  5274. type: "string"
  5275. examples:
  5276. application/json:
  5277. Version: "17.04.0"
  5278. Os: "linux"
  5279. KernelVersion: "3.19.0-23-generic"
  5280. GoVersion: "go1.7.5"
  5281. GitCommit: "deadbee"
  5282. Arch: "amd64"
  5283. ApiVersion: "1.27"
  5284. MinAPIVersion: "1.12"
  5285. BuildTime: "2016-06-14T07:09:13.444803460+00:00"
  5286. Experimental: true
  5287. 500:
  5288. description: "server error"
  5289. schema:
  5290. $ref: "#/definitions/ErrorResponse"
  5291. tags: ["System"]
  5292. /_ping:
  5293. get:
  5294. summary: "Ping"
  5295. description: "This is a dummy endpoint you can use to test if the server is accessible."
  5296. operationId: "SystemPing"
  5297. produces: ["text/plain"]
  5298. responses:
  5299. 200:
  5300. description: "no error"
  5301. schema:
  5302. type: "string"
  5303. example: "OK"
  5304. headers:
  5305. API-Version:
  5306. type: "string"
  5307. description: "Max API Version the server supports"
  5308. Docker-Experimental:
  5309. type: "boolean"
  5310. description: "If the server is running with experimental mode enabled"
  5311. 500:
  5312. description: "server error"
  5313. schema:
  5314. $ref: "#/definitions/ErrorResponse"
  5315. tags: ["System"]
  5316. /commit:
  5317. post:
  5318. summary: "Create a new image from a container"
  5319. operationId: "ImageCommit"
  5320. consumes:
  5321. - "application/json"
  5322. produces:
  5323. - "application/json"
  5324. responses:
  5325. 201:
  5326. description: "no error"
  5327. schema:
  5328. $ref: "#/definitions/IdResponse"
  5329. 404:
  5330. description: "no such container"
  5331. schema:
  5332. $ref: "#/definitions/ErrorResponse"
  5333. examples:
  5334. application/json:
  5335. message: "No such container: c2ada9df5af8"
  5336. 500:
  5337. description: "server error"
  5338. schema:
  5339. $ref: "#/definitions/ErrorResponse"
  5340. parameters:
  5341. - name: "containerConfig"
  5342. in: "body"
  5343. description: "The container configuration"
  5344. schema:
  5345. $ref: "#/definitions/Config"
  5346. - name: "container"
  5347. in: "query"
  5348. description: "The ID or name of the container to commit"
  5349. type: "string"
  5350. - name: "repo"
  5351. in: "query"
  5352. description: "Repository name for the created image"
  5353. type: "string"
  5354. - name: "tag"
  5355. in: "query"
  5356. description: "Tag name for the create image"
  5357. type: "string"
  5358. - name: "comment"
  5359. in: "query"
  5360. description: "Commit message"
  5361. type: "string"
  5362. - name: "author"
  5363. in: "query"
  5364. description: "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)"
  5365. type: "string"
  5366. - name: "pause"
  5367. in: "query"
  5368. description: "Whether to pause the container before committing"
  5369. type: "boolean"
  5370. default: true
  5371. - name: "changes"
  5372. in: "query"
  5373. description: "`Dockerfile` instructions to apply while committing"
  5374. type: "string"
  5375. tags: ["Image"]
  5376. /events:
  5377. get:
  5378. summary: "Monitor events"
  5379. description: |
  5380. Stream real-time events from the server.
  5381. Various objects within Docker report events when something happens to them.
  5382. Containers report these events: `attach, commit, copy, create, destroy, detach, die, exec_create, exec_detach, exec_start, export, health_status, kill, oom, pause, rename, resize, restart, start, stop, top, unpause, update`
  5383. Images report these events: `delete, import, load, pull, push, save, tag, untag`
  5384. Volumes report these events: `create, mount, unmount, destroy`
  5385. Networks report these events: `create, connect, disconnect, destroy`
  5386. The Docker daemon reports these events: `reload`
  5387. operationId: "SystemEvents"
  5388. produces:
  5389. - "application/json"
  5390. responses:
  5391. 200:
  5392. description: "no error"
  5393. schema:
  5394. type: "object"
  5395. properties:
  5396. Type:
  5397. description: "The type of object emitting the event"
  5398. type: "string"
  5399. Action:
  5400. description: "The type of event"
  5401. type: "string"
  5402. Actor:
  5403. type: "object"
  5404. properties:
  5405. ID:
  5406. description: "The ID of the object emitting the event"
  5407. type: "string"
  5408. Attributes:
  5409. description: "Various key/value attributes of the object, depending on its type"
  5410. type: "object"
  5411. additionalProperties:
  5412. type: "string"
  5413. time:
  5414. description: "Timestamp of event"
  5415. type: "integer"
  5416. timeNano:
  5417. description: "Timestamp of event, with nanosecond accuracy"
  5418. type: "integer"
  5419. format: "int64"
  5420. examples:
  5421. application/json:
  5422. Type: "container"
  5423. Action: "create"
  5424. Actor:
  5425. ID: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743"
  5426. Attributes:
  5427. com.example.some-label: "some-label-value"
  5428. image: "alpine"
  5429. name: "my-container"
  5430. time: 1461943101
  5431. 400:
  5432. description: "bad parameter"
  5433. schema:
  5434. $ref: "#/definitions/ErrorResponse"
  5435. 500:
  5436. description: "server error"
  5437. schema:
  5438. $ref: "#/definitions/ErrorResponse"
  5439. parameters:
  5440. - name: "since"
  5441. in: "query"
  5442. description: "Show events created since this timestamp then stream new events."
  5443. type: "string"
  5444. - name: "until"
  5445. in: "query"
  5446. description: "Show events created until this timestamp then stop streaming."
  5447. type: "string"
  5448. - name: "filters"
  5449. in: "query"
  5450. description: |
  5451. A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters:
  5452. - `container=<string>` container name or ID
  5453. - `daemon=<string>` daemon name or ID
  5454. - `event=<string>` event type
  5455. - `image=<string>` image name or ID
  5456. - `label=<string>` image or container label
  5457. - `network=<string>` network name or ID
  5458. - `plugin`=<string> plugin name or ID
  5459. - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, or `daemon`
  5460. - `volume=<string>` volume name or ID
  5461. type: "string"
  5462. tags: ["System"]
  5463. /system/df:
  5464. get:
  5465. summary: "Get data usage information"
  5466. operationId: "SystemDataUsage"
  5467. responses:
  5468. 200:
  5469. description: "no error"
  5470. schema:
  5471. type: "object"
  5472. properties:
  5473. LayersSize:
  5474. type: "integer"
  5475. format: "int64"
  5476. Images:
  5477. type: "array"
  5478. items:
  5479. $ref: "#/definitions/ImageSummary"
  5480. Containers:
  5481. type: "array"
  5482. items:
  5483. $ref: "#/definitions/ContainerSummary"
  5484. Volumes:
  5485. type: "array"
  5486. items:
  5487. $ref: "#/definitions/Volume"
  5488. example:
  5489. LayersSize: 1092588
  5490. Images:
  5491. -
  5492. Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
  5493. ParentId: ""
  5494. RepoTags:
  5495. - "busybox:latest"
  5496. RepoDigests:
  5497. - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6"
  5498. Created: 1466724217
  5499. Size: 1092588
  5500. SharedSize: 0
  5501. VirtualSize: 1092588
  5502. Labels: {}
  5503. Containers: 1
  5504. Containers:
  5505. -
  5506. Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148"
  5507. Names:
  5508. - "/top"
  5509. Image: "busybox"
  5510. ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
  5511. Command: "top"
  5512. Created: 1472592424
  5513. Ports: []
  5514. SizeRootFs: 1092588
  5515. Labels: {}
  5516. State: "exited"
  5517. Status: "Exited (0) 56 minutes ago"
  5518. HostConfig:
  5519. NetworkMode: "default"
  5520. NetworkSettings:
  5521. Networks:
  5522. bridge:
  5523. IPAMConfig: null
  5524. Links: null
  5525. Aliases: null
  5526. NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92"
  5527. EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a"
  5528. Gateway: "172.18.0.1"
  5529. IPAddress: "172.18.0.2"
  5530. IPPrefixLen: 16
  5531. IPv6Gateway: ""
  5532. GlobalIPv6Address: ""
  5533. GlobalIPv6PrefixLen: 0
  5534. MacAddress: "02:42:ac:12:00:02"
  5535. Mounts: []
  5536. Volumes:
  5537. -
  5538. Name: "my-volume"
  5539. Driver: "local"
  5540. Mountpoint: ""
  5541. Labels: null
  5542. Scope: ""
  5543. Options: null
  5544. UsageData:
  5545. Size: 0
  5546. RefCount: 0
  5547. 500:
  5548. description: "server error"
  5549. schema:
  5550. $ref: "#/definitions/ErrorResponse"
  5551. tags: ["System"]
  5552. /images/{name}/get:
  5553. get:
  5554. summary: "Export an image"
  5555. description: |
  5556. Get a tarball containing all images and metadata for a repository.
  5557. If `name` is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned. If `name` is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the `repositories` file in the tarball, as there were no image names referenced.
  5558. ### Image tarball format
  5559. An image tarball contains one directory per image layer (named using its long ID), each containing these files:
  5560. - `VERSION`: currently `1.0` - the file format version
  5561. - `json`: detailed layer information, similar to `docker inspect layer_id`
  5562. - `layer.tar`: A tarfile containing the filesystem changes in this layer
  5563. The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions.
  5564. If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs.
  5565. ```json
  5566. {
  5567. "hello-world": {
  5568. "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"
  5569. }
  5570. }
  5571. ```
  5572. operationId: "ImageGet"
  5573. produces:
  5574. - "application/x-tar"
  5575. responses:
  5576. 200:
  5577. description: "no error"
  5578. schema:
  5579. type: "string"
  5580. format: "binary"
  5581. 500:
  5582. description: "server error"
  5583. schema:
  5584. $ref: "#/definitions/ErrorResponse"
  5585. parameters:
  5586. - name: "name"
  5587. in: "path"
  5588. description: "Image name or ID"
  5589. type: "string"
  5590. required: true
  5591. tags: ["Image"]
  5592. /images/get:
  5593. get:
  5594. summary: "Export several images"
  5595. description: |
  5596. Get a tarball containing all images and metadata for several image repositories.
  5597. For each value of the `names` parameter: if it is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned; if it is an image ID, similarly only that image (and its parents) are returned and there would be no names referenced in the 'repositories' file for this image ID.
  5598. For details on the format, see [the export image endpoint](#operation/ImageGet).
  5599. operationId: "ImageGetAll"
  5600. produces:
  5601. - "application/x-tar"
  5602. responses:
  5603. 200:
  5604. description: "no error"
  5605. schema:
  5606. type: "string"
  5607. format: "binary"
  5608. 500:
  5609. description: "server error"
  5610. schema:
  5611. $ref: "#/definitions/ErrorResponse"
  5612. parameters:
  5613. - name: "names"
  5614. in: "query"
  5615. description: "Image names to filter by"
  5616. type: "array"
  5617. items:
  5618. type: "string"
  5619. tags: ["Image"]
  5620. /images/load:
  5621. post:
  5622. summary: "Import images"
  5623. description: |
  5624. Load a set of images and tags into a repository.
  5625. For details on the format, see [the export image endpoint](#operation/ImageGet).
  5626. operationId: "ImageLoad"
  5627. consumes:
  5628. - "application/x-tar"
  5629. produces:
  5630. - "application/json"
  5631. responses:
  5632. 200:
  5633. description: "no error"
  5634. 500:
  5635. description: "server error"
  5636. schema:
  5637. $ref: "#/definitions/ErrorResponse"
  5638. parameters:
  5639. - name: "imagesTarball"
  5640. in: "body"
  5641. description: "Tar archive containing images"
  5642. schema:
  5643. type: "string"
  5644. format: "binary"
  5645. - name: "quiet"
  5646. in: "query"
  5647. description: "Suppress progress details during load."
  5648. type: "boolean"
  5649. default: false
  5650. tags: ["Image"]
  5651. /containers/{id}/exec:
  5652. post:
  5653. summary: "Create an exec instance"
  5654. description: "Run a command inside a running container."
  5655. operationId: "ContainerExec"
  5656. consumes:
  5657. - "application/json"
  5658. produces:
  5659. - "application/json"
  5660. responses:
  5661. 201:
  5662. description: "no error"
  5663. schema:
  5664. $ref: "#/definitions/IdResponse"
  5665. 404:
  5666. description: "no such container"
  5667. schema:
  5668. $ref: "#/definitions/ErrorResponse"
  5669. examples:
  5670. application/json:
  5671. message: "No such container: c2ada9df5af8"
  5672. 409:
  5673. description: "container is paused"
  5674. schema:
  5675. $ref: "#/definitions/ErrorResponse"
  5676. 500:
  5677. description: "Server error"
  5678. schema:
  5679. $ref: "#/definitions/ErrorResponse"
  5680. parameters:
  5681. - name: "execConfig"
  5682. in: "body"
  5683. description: "Exec configuration"
  5684. schema:
  5685. type: "object"
  5686. properties:
  5687. AttachStdin:
  5688. type: "boolean"
  5689. description: "Attach to `stdin` of the exec command."
  5690. AttachStdout:
  5691. type: "boolean"
  5692. description: "Attach to `stdout` of the exec command."
  5693. AttachStderr:
  5694. type: "boolean"
  5695. description: "Attach to `stderr` of the exec command."
  5696. DetachKeys:
  5697. type: "string"
  5698. description: "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`."
  5699. Tty:
  5700. type: "boolean"
  5701. description: "Allocate a pseudo-TTY."
  5702. Env:
  5703. description: "A list of environment variables in the form `[\"VAR=value\", ...]`."
  5704. type: "array"
  5705. items:
  5706. type: "string"
  5707. Cmd:
  5708. type: "array"
  5709. description: "Command to run, as a string or array of strings."
  5710. items:
  5711. type: "string"
  5712. Privileged:
  5713. type: "boolean"
  5714. description: "Runs the exec process with extended privileges."
  5715. default: false
  5716. User:
  5717. type: "string"
  5718. description: "The user, and optionally, group to run the exec process inside the container. Format is one of: `user`, `user:group`, `uid`, or `uid:gid`."
  5719. example:
  5720. AttachStdin: false
  5721. AttachStdout: true
  5722. AttachStderr: true
  5723. DetachKeys: "ctrl-p,ctrl-q"
  5724. Tty: false
  5725. Cmd:
  5726. - "date"
  5727. Env:
  5728. - "FOO=bar"
  5729. - "BAZ=quux"
  5730. required: true
  5731. - name: "id"
  5732. in: "path"
  5733. description: "ID or name of container"
  5734. type: "string"
  5735. required: true
  5736. tags: ["Exec"]
  5737. /exec/{id}/start:
  5738. post:
  5739. summary: "Start an exec instance"
  5740. description: "Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command."
  5741. operationId: "ExecStart"
  5742. consumes:
  5743. - "application/json"
  5744. produces:
  5745. - "application/vnd.docker.raw-stream"
  5746. responses:
  5747. 200:
  5748. description: "No error"
  5749. 404:
  5750. description: "No such exec instance"
  5751. schema:
  5752. $ref: "#/definitions/ErrorResponse"
  5753. 409:
  5754. description: "Container is stopped or paused"
  5755. schema:
  5756. $ref: "#/definitions/ErrorResponse"
  5757. parameters:
  5758. - name: "execStartConfig"
  5759. in: "body"
  5760. schema:
  5761. type: "object"
  5762. properties:
  5763. Detach:
  5764. type: "boolean"
  5765. description: "Detach from the command."
  5766. Tty:
  5767. type: "boolean"
  5768. description: "Allocate a pseudo-TTY."
  5769. example:
  5770. Detach: false
  5771. Tty: false
  5772. - name: "id"
  5773. in: "path"
  5774. description: "Exec instance ID"
  5775. required: true
  5776. type: "string"
  5777. tags: ["Exec"]
  5778. /exec/{id}/resize:
  5779. post:
  5780. summary: "Resize an exec instance"
  5781. description: "Resize the TTY session used by an exec instance. This endpoint only works if `tty` was specified as part of creating and starting the exec instance."
  5782. operationId: "ExecResize"
  5783. responses:
  5784. 200:
  5785. description: "No error"
  5786. 400:
  5787. description: "bad parameter"
  5788. schema:
  5789. $ref: "#/definitions/ErrorResponse"
  5790. 404:
  5791. description: "No such exec instance"
  5792. schema:
  5793. $ref: "#/definitions/ErrorResponse"
  5794. 500:
  5795. description: "Server error"
  5796. schema:
  5797. $ref: "#/definitions/ErrorResponse"
  5798. parameters:
  5799. - name: "id"
  5800. in: "path"
  5801. description: "Exec instance ID"
  5802. required: true
  5803. type: "string"
  5804. - name: "h"
  5805. in: "query"
  5806. description: "Height of the TTY session in characters"
  5807. type: "integer"
  5808. - name: "w"
  5809. in: "query"
  5810. description: "Width of the TTY session in characters"
  5811. type: "integer"
  5812. tags: ["Exec"]
  5813. /exec/{id}/json:
  5814. get:
  5815. summary: "Inspect an exec instance"
  5816. description: "Return low-level information about an exec instance."
  5817. operationId: "ExecInspect"
  5818. produces:
  5819. - "application/json"
  5820. responses:
  5821. 200:
  5822. description: "No error"
  5823. schema:
  5824. type: "object"
  5825. properties:
  5826. ID:
  5827. type: "string"
  5828. Running:
  5829. type: "boolean"
  5830. ExitCode:
  5831. type: "integer"
  5832. ProcessConfig:
  5833. $ref: "#/definitions/ProcessConfig"
  5834. OpenStdin:
  5835. type: "boolean"
  5836. OpenStderr:
  5837. type: "boolean"
  5838. OpenStdout:
  5839. type: "boolean"
  5840. ContainerID:
  5841. type: "string"
  5842. Pid:
  5843. type: "integer"
  5844. description: "The system process ID for the exec process."
  5845. examples:
  5846. application/json:
  5847. CanRemove: false
  5848. ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126"
  5849. DetachKeys: ""
  5850. ExitCode: 2
  5851. ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b"
  5852. OpenStderr: true
  5853. OpenStdin: true
  5854. OpenStdout: true
  5855. ProcessConfig:
  5856. arguments:
  5857. - "-c"
  5858. - "exit 2"
  5859. entrypoint: "sh"
  5860. privileged: false
  5861. tty: true
  5862. user: "1000"
  5863. Running: false
  5864. Pid: 42000
  5865. 404:
  5866. description: "No such exec instance"
  5867. schema:
  5868. $ref: "#/definitions/ErrorResponse"
  5869. 500:
  5870. description: "Server error"
  5871. schema:
  5872. $ref: "#/definitions/ErrorResponse"
  5873. parameters:
  5874. - name: "id"
  5875. in: "path"
  5876. description: "Exec instance ID"
  5877. required: true
  5878. type: "string"
  5879. tags: ["Exec"]
  5880. /volumes:
  5881. get:
  5882. summary: "List volumes"
  5883. operationId: "VolumeList"
  5884. produces: ["application/json"]
  5885. responses:
  5886. 200:
  5887. description: "Summary volume data that matches the query"
  5888. schema:
  5889. type: "object"
  5890. required: [Volumes, Warnings]
  5891. properties:
  5892. Volumes:
  5893. type: "array"
  5894. x-nullable: false
  5895. description: "List of volumes"
  5896. items:
  5897. $ref: "#/definitions/Volume"
  5898. Warnings:
  5899. type: "array"
  5900. x-nullable: false
  5901. description: "Warnings that occurred when fetching the list of volumes"
  5902. items:
  5903. type: "string"
  5904. examples:
  5905. application/json:
  5906. Volumes:
  5907. - Name: "tardis"
  5908. Driver: "local"
  5909. Mountpoint: "/var/lib/docker/volumes/tardis"
  5910. Labels:
  5911. com.example.some-label: "some-value"
  5912. com.example.some-other-label: "some-other-value"
  5913. Scope: "local"
  5914. Options:
  5915. device: "tmpfs"
  5916. o: "size=100m,uid=1000"
  5917. type: "tmpfs"
  5918. Warnings: []
  5919. 500:
  5920. description: "Server error"
  5921. schema:
  5922. $ref: "#/definitions/ErrorResponse"
  5923. parameters:
  5924. - name: "filters"
  5925. in: "query"
  5926. description: |
  5927. JSON encoded value of the filters (a `map[string][]string`) to
  5928. process on the volumes list. Available filters:
  5929. - `dangling=<boolean>` When set to `true` (or `1`), returns all
  5930. volumes that are not in use by a container. When set to `false`
  5931. (or `0`), only volumes that are in use by one or more
  5932. containers are returned.
  5933. - `driver=<volume-driver-name>` Matches volumes based on their driver.
  5934. - `label=<key>` or `label=<key>:<value>` Matches volumes based on
  5935. the presence of a `label` alone or a `label` and a value.
  5936. - `name=<volume-name>` Matches all or part of a volume name.
  5937. type: "string"
  5938. format: "json"
  5939. tags: ["Volume"]
  5940. /volumes/create:
  5941. post:
  5942. summary: "Create a volume"
  5943. operationId: "VolumeCreate"
  5944. consumes: ["application/json"]
  5945. produces: ["application/json"]
  5946. responses:
  5947. 201:
  5948. description: "The volume was created successfully"
  5949. schema:
  5950. $ref: "#/definitions/Volume"
  5951. 500:
  5952. description: "Server error"
  5953. schema:
  5954. $ref: "#/definitions/ErrorResponse"
  5955. parameters:
  5956. - name: "volumeConfig"
  5957. in: "body"
  5958. required: true
  5959. description: "Volume configuration"
  5960. schema:
  5961. type: "object"
  5962. properties:
  5963. Name:
  5964. description: "The new volume's name. If not specified, Docker generates a name."
  5965. type: "string"
  5966. x-nullable: false
  5967. Driver:
  5968. description: "Name of the volume driver to use."
  5969. type: "string"
  5970. default: "local"
  5971. x-nullable: false
  5972. DriverOpts:
  5973. description: "A mapping of driver options and values. These options are passed directly to the driver and are driver specific."
  5974. type: "object"
  5975. additionalProperties:
  5976. type: "string"
  5977. Labels:
  5978. description: "User-defined key/value metadata."
  5979. type: "object"
  5980. additionalProperties:
  5981. type: "string"
  5982. example:
  5983. Name: "tardis"
  5984. Labels:
  5985. com.example.some-label: "some-value"
  5986. com.example.some-other-label: "some-other-value"
  5987. Driver: "custom"
  5988. tags: ["Volume"]
  5989. /volumes/{name}:
  5990. get:
  5991. summary: "Inspect a volume"
  5992. operationId: "VolumeInspect"
  5993. produces: ["application/json"]
  5994. responses:
  5995. 200:
  5996. description: "No error"
  5997. schema:
  5998. $ref: "#/definitions/Volume"
  5999. 404:
  6000. description: "No such volume"
  6001. schema:
  6002. $ref: "#/definitions/ErrorResponse"
  6003. 500:
  6004. description: "Server error"
  6005. schema:
  6006. $ref: "#/definitions/ErrorResponse"
  6007. parameters:
  6008. - name: "name"
  6009. in: "path"
  6010. required: true
  6011. description: "Volume name or ID"
  6012. type: "string"
  6013. tags: ["Volume"]
  6014. delete:
  6015. summary: "Remove a volume"
  6016. description: "Instruct the driver to remove the volume."
  6017. operationId: "VolumeDelete"
  6018. responses:
  6019. 204:
  6020. description: "The volume was removed"
  6021. 404:
  6022. description: "No such volume or volume driver"
  6023. schema:
  6024. $ref: "#/definitions/ErrorResponse"
  6025. 409:
  6026. description: "Volume is in use and cannot be removed"
  6027. schema:
  6028. $ref: "#/definitions/ErrorResponse"
  6029. 500:
  6030. description: "Server error"
  6031. schema:
  6032. $ref: "#/definitions/ErrorResponse"
  6033. parameters:
  6034. - name: "name"
  6035. in: "path"
  6036. required: true
  6037. description: "Volume name or ID"
  6038. type: "string"
  6039. - name: "force"
  6040. in: "query"
  6041. description: "Force the removal of the volume"
  6042. type: "boolean"
  6043. default: false
  6044. tags: ["Volume"]
  6045. /volumes/prune:
  6046. post:
  6047. summary: "Delete unused volumes"
  6048. produces:
  6049. - "application/json"
  6050. operationId: "VolumePrune"
  6051. parameters:
  6052. - name: "filters"
  6053. in: "query"
  6054. description: |
  6055. Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  6056. Available filters:
  6057. type: "string"
  6058. responses:
  6059. 200:
  6060. description: "No error"
  6061. schema:
  6062. type: "object"
  6063. properties:
  6064. VolumesDeleted:
  6065. description: "Volumes that were deleted"
  6066. type: "array"
  6067. items:
  6068. type: "string"
  6069. SpaceReclaimed:
  6070. description: "Disk space reclaimed in bytes"
  6071. type: "integer"
  6072. format: "int64"
  6073. 500:
  6074. description: "Server error"
  6075. schema:
  6076. $ref: "#/definitions/ErrorResponse"
  6077. tags: ["Volume"]
  6078. /networks:
  6079. get:
  6080. summary: "List networks"
  6081. operationId: "NetworkList"
  6082. produces:
  6083. - "application/json"
  6084. responses:
  6085. 200:
  6086. description: "No error"
  6087. schema:
  6088. type: "array"
  6089. items:
  6090. $ref: "#/definitions/Network"
  6091. examples:
  6092. application/json:
  6093. - Name: "bridge"
  6094. Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566"
  6095. Created: "2016-10-19T06:21:00.416543526Z"
  6096. Scope: "local"
  6097. Driver: "bridge"
  6098. EnableIPv6: false
  6099. Internal: false
  6100. Attachable: false
  6101. Ingress: false
  6102. IPAM:
  6103. Driver: "default"
  6104. Config:
  6105. -
  6106. Subnet: "172.17.0.0/16"
  6107. Containers:
  6108. 39b69226f9d79f5634485fb236a23b2fe4e96a0a94128390a7fbbcc167065867:
  6109. EndpointID: "ed2419a97c1d9954d05b46e462e7002ea552f216e9b136b80a7db8d98b442eda"
  6110. MacAddress: "02:42:ac:11:00:02"
  6111. IPv4Address: "172.17.0.2/16"
  6112. IPv6Address: ""
  6113. Options:
  6114. com.docker.network.bridge.default_bridge: "true"
  6115. com.docker.network.bridge.enable_icc: "true"
  6116. com.docker.network.bridge.enable_ip_masquerade: "true"
  6117. com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  6118. com.docker.network.bridge.name: "docker0"
  6119. com.docker.network.driver.mtu: "1500"
  6120. - Name: "none"
  6121. Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794"
  6122. Created: "0001-01-01T00:00:00Z"
  6123. Scope: "local"
  6124. Driver: "null"
  6125. EnableIPv6: false
  6126. Internal: false
  6127. Attachable: false
  6128. Ingress: false
  6129. IPAM:
  6130. Driver: "default"
  6131. Config: []
  6132. Containers: {}
  6133. Options: {}
  6134. - Name: "host"
  6135. Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e"
  6136. Created: "0001-01-01T00:00:00Z"
  6137. Scope: "local"
  6138. Driver: "host"
  6139. EnableIPv6: false
  6140. Internal: false
  6141. Attachable: false
  6142. Ingress: false
  6143. IPAM:
  6144. Driver: "default"
  6145. Config: []
  6146. Containers: {}
  6147. Options: {}
  6148. 500:
  6149. description: "Server error"
  6150. schema:
  6151. $ref: "#/definitions/ErrorResponse"
  6152. parameters:
  6153. - name: "filters"
  6154. in: "query"
  6155. description: |
  6156. JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters:
  6157. - `driver=<driver-name>` Matches a network's driver.
  6158. - `id=<network-id>` Matches all or part of a network ID.
  6159. - `label=<key>` or `label=<key>=<value>` of a network label.
  6160. - `name=<network-name>` Matches all or part of a network name.
  6161. - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`).
  6162. - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks.
  6163. type: "string"
  6164. tags: ["Network"]
  6165. /networks/{id}:
  6166. get:
  6167. summary: "Inspect a network"
  6168. operationId: "NetworkInspect"
  6169. produces:
  6170. - "application/json"
  6171. responses:
  6172. 200:
  6173. description: "No error"
  6174. schema:
  6175. $ref: "#/definitions/Network"
  6176. 404:
  6177. description: "Network not found"
  6178. schema:
  6179. $ref: "#/definitions/ErrorResponse"
  6180. parameters:
  6181. - name: "id"
  6182. in: "path"
  6183. description: "Network ID or name"
  6184. required: true
  6185. type: "string"
  6186. - name: "verbose"
  6187. in: "query"
  6188. description: "Detailed inspect output for troubleshooting"
  6189. type: "boolean"
  6190. default: false
  6191. tags: ["Network"]
  6192. delete:
  6193. summary: "Remove a network"
  6194. operationId: "NetworkDelete"
  6195. responses:
  6196. 204:
  6197. description: "No error"
  6198. 404:
  6199. description: "no such network"
  6200. schema:
  6201. $ref: "#/definitions/ErrorResponse"
  6202. 500:
  6203. description: "Server error"
  6204. schema:
  6205. $ref: "#/definitions/ErrorResponse"
  6206. parameters:
  6207. - name: "id"
  6208. in: "path"
  6209. description: "Network ID or name"
  6210. required: true
  6211. type: "string"
  6212. tags: ["Network"]
  6213. /networks/create:
  6214. post:
  6215. summary: "Create a network"
  6216. operationId: "NetworkCreate"
  6217. consumes:
  6218. - "application/json"
  6219. produces:
  6220. - "application/json"
  6221. responses:
  6222. 201:
  6223. description: "No error"
  6224. schema:
  6225. type: "object"
  6226. properties:
  6227. Id:
  6228. description: "The ID of the created network."
  6229. type: "string"
  6230. Warning:
  6231. type: "string"
  6232. example:
  6233. Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30"
  6234. Warning: ""
  6235. 400:
  6236. description: "bad parameter"
  6237. schema:
  6238. $ref: "#/definitions/ErrorResponse"
  6239. 403:
  6240. description: "operation not supported for pre-defined networks"
  6241. schema:
  6242. $ref: "#/definitions/ErrorResponse"
  6243. 404:
  6244. description: "plugin not found"
  6245. schema:
  6246. $ref: "#/definitions/ErrorResponse"
  6247. 500:
  6248. description: "Server error"
  6249. schema:
  6250. $ref: "#/definitions/ErrorResponse"
  6251. parameters:
  6252. - name: "networkConfig"
  6253. in: "body"
  6254. description: "Network configuration"
  6255. required: true
  6256. schema:
  6257. type: "object"
  6258. required: ["Name"]
  6259. properties:
  6260. Name:
  6261. description: "The network's name."
  6262. type: "string"
  6263. CheckDuplicate:
  6264. description: "Check for networks with duplicate names. Since Network is primarily keyed based on a random ID and not on the name, and network name is strictly a user-friendly alias to the network which is uniquely identified using ID, there is no guaranteed way to check for duplicates. CheckDuplicate is there to provide a best effort checking of any networks which has the same name but it is not guaranteed to catch all name collisions."
  6265. type: "boolean"
  6266. Driver:
  6267. description: "Name of the network driver plugin to use."
  6268. type: "string"
  6269. default: "bridge"
  6270. Internal:
  6271. description: "Restrict external access to the network."
  6272. type: "boolean"
  6273. Attachable:
  6274. description: "Globally scoped network is manually attachable by regular containers from workers in swarm mode."
  6275. type: "boolean"
  6276. Ingress:
  6277. description: "Ingress network is the network which provides the routing-mesh in swarm mode."
  6278. type: "boolean"
  6279. IPAM:
  6280. description: "Optional custom IP scheme for the network."
  6281. $ref: "#/definitions/IPAM"
  6282. EnableIPv6:
  6283. description: "Enable IPv6 on the network."
  6284. type: "boolean"
  6285. Options:
  6286. description: "Network specific options to be used by the drivers."
  6287. type: "object"
  6288. additionalProperties:
  6289. type: "string"
  6290. Labels:
  6291. description: "User-defined key/value metadata."
  6292. type: "object"
  6293. additionalProperties:
  6294. type: "string"
  6295. example:
  6296. Name: "isolated_nw"
  6297. CheckDuplicate: false
  6298. Driver: "bridge"
  6299. EnableIPv6: true
  6300. IPAM:
  6301. Driver: "default"
  6302. Config:
  6303. - Subnet: "172.20.0.0/16"
  6304. IPRange: "172.20.10.0/24"
  6305. Gateway: "172.20.10.11"
  6306. - Subnet: "2001:db8:abcd::/64"
  6307. Gateway: "2001:db8:abcd::1011"
  6308. Options:
  6309. foo: "bar"
  6310. Internal: true
  6311. Attachable: false
  6312. Ingress: false
  6313. Options:
  6314. com.docker.network.bridge.default_bridge: "true"
  6315. com.docker.network.bridge.enable_icc: "true"
  6316. com.docker.network.bridge.enable_ip_masquerade: "true"
  6317. com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
  6318. com.docker.network.bridge.name: "docker0"
  6319. com.docker.network.driver.mtu: "1500"
  6320. Labels:
  6321. com.example.some-label: "some-value"
  6322. com.example.some-other-label: "some-other-value"
  6323. tags: ["Network"]
  6324. /networks/{id}/connect:
  6325. post:
  6326. summary: "Connect a container to a network"
  6327. operationId: "NetworkConnect"
  6328. consumes:
  6329. - "application/octet-stream"
  6330. responses:
  6331. 200:
  6332. description: "No error"
  6333. 403:
  6334. description: "Operation not supported for swarm scoped networks"
  6335. schema:
  6336. $ref: "#/definitions/ErrorResponse"
  6337. 404:
  6338. description: "Network or container not found"
  6339. schema:
  6340. $ref: "#/definitions/ErrorResponse"
  6341. 500:
  6342. description: "Server error"
  6343. schema:
  6344. $ref: "#/definitions/ErrorResponse"
  6345. parameters:
  6346. - name: "id"
  6347. in: "path"
  6348. description: "Network ID or name"
  6349. required: true
  6350. type: "string"
  6351. - name: "container"
  6352. in: "body"
  6353. required: true
  6354. schema:
  6355. type: "object"
  6356. properties:
  6357. Container:
  6358. type: "string"
  6359. description: "The ID or name of the container to connect to the network."
  6360. EndpointConfig:
  6361. $ref: "#/definitions/EndpointSettings"
  6362. example:
  6363. Container: "3613f73ba0e4"
  6364. EndpointConfig:
  6365. IPAMConfig:
  6366. IPv4Address: "172.24.56.89"
  6367. IPv6Address: "2001:db8::5689"
  6368. tags: ["Network"]
  6369. /networks/{id}/disconnect:
  6370. post:
  6371. summary: "Disconnect a container from a network"
  6372. operationId: "NetworkDisconnect"
  6373. consumes:
  6374. - "application/json"
  6375. responses:
  6376. 200:
  6377. description: "No error"
  6378. 403:
  6379. description: "Operation not supported for swarm scoped networks"
  6380. schema:
  6381. $ref: "#/definitions/ErrorResponse"
  6382. 404:
  6383. description: "Network or container not found"
  6384. schema:
  6385. $ref: "#/definitions/ErrorResponse"
  6386. 500:
  6387. description: "Server error"
  6388. schema:
  6389. $ref: "#/definitions/ErrorResponse"
  6390. parameters:
  6391. - name: "id"
  6392. in: "path"
  6393. description: "Network ID or name"
  6394. required: true
  6395. type: "string"
  6396. - name: "container"
  6397. in: "body"
  6398. required: true
  6399. schema:
  6400. type: "object"
  6401. properties:
  6402. Container:
  6403. type: "string"
  6404. description: "The ID or name of the container to disconnect from the network."
  6405. Force:
  6406. type: "boolean"
  6407. description: "Force the container to disconnect from the network."
  6408. tags: ["Network"]
  6409. /networks/prune:
  6410. post:
  6411. summary: "Delete unused networks"
  6412. produces:
  6413. - "application/json"
  6414. operationId: "NetworkPrune"
  6415. parameters:
  6416. - name: "filters"
  6417. in: "query"
  6418. description: |
  6419. Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
  6420. Available filters:
  6421. - `until=<timestamp>` Prune networks created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time.
  6422. type: "string"
  6423. responses:
  6424. 200:
  6425. description: "No error"
  6426. schema:
  6427. type: "object"
  6428. properties:
  6429. NetworksDeleted:
  6430. description: "Networks that were deleted"
  6431. type: "array"
  6432. items:
  6433. type: "string"
  6434. 500:
  6435. description: "Server error"
  6436. schema:
  6437. $ref: "#/definitions/ErrorResponse"
  6438. tags: ["Network"]
  6439. /plugins:
  6440. get:
  6441. summary: "List plugins"
  6442. operationId: "PluginList"
  6443. description: "Returns information about installed plugins."
  6444. produces: ["application/json"]
  6445. responses:
  6446. 200:
  6447. description: "No error"
  6448. schema:
  6449. type: "array"
  6450. items:
  6451. $ref: "#/definitions/Plugin"
  6452. example:
  6453. - Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078"
  6454. Name: "tiborvass/sample-volume-plugin"
  6455. Tag: "latest"
  6456. Active: true
  6457. Settings:
  6458. Env:
  6459. - "DEBUG=0"
  6460. Args: null
  6461. Devices: null
  6462. Config:
  6463. Description: "A sample volume plugin for Docker"
  6464. Documentation: "https://docs.docker.com/engine/extend/plugins/"
  6465. Interface:
  6466. Types:
  6467. - "docker.volumedriver/1.0"
  6468. Socket: "plugins.sock"
  6469. Entrypoint:
  6470. - "/usr/bin/sample-volume-plugin"
  6471. - "/data"
  6472. WorkDir: ""
  6473. User: {}
  6474. Network:
  6475. Type: ""
  6476. Linux:
  6477. Capabilities: null
  6478. AllowAllDevices: false
  6479. Devices: null
  6480. Mounts: null
  6481. PropagatedMount: "/data"
  6482. Env:
  6483. - Name: "DEBUG"
  6484. Description: "If set, prints debug messages"
  6485. Settable: null
  6486. Value: "0"
  6487. Args:
  6488. Name: "args"
  6489. Description: "command line arguments"
  6490. Settable: null
  6491. Value: []
  6492. 500:
  6493. description: "Server error"
  6494. schema:
  6495. $ref: "#/definitions/ErrorResponse"
  6496. parameters:
  6497. - name: "filters"
  6498. in: "query"
  6499. type: "string"
  6500. description: |
  6501. A JSON encoded value of the filters (a `map[string][]string`) to process on the plugin list. Available filters:
  6502. - `capability=<capability name>`
  6503. - `enable=<true>|<false>`
  6504. tags: ["Plugin"]
  6505. /plugins/privileges:
  6506. get:
  6507. summary: "Get plugin privileges"
  6508. operationId: "GetPluginPrivileges"
  6509. responses:
  6510. 200:
  6511. description: "no error"
  6512. schema:
  6513. type: "array"
  6514. items:
  6515. description: "Describes a permission the user has to accept upon installing the plugin."
  6516. type: "object"
  6517. properties:
  6518. Name:
  6519. type: "string"
  6520. Description:
  6521. type: "string"
  6522. Value:
  6523. type: "array"
  6524. items:
  6525. type: "string"
  6526. example:
  6527. - Name: "network"
  6528. Description: ""
  6529. Value:
  6530. - "host"
  6531. - Name: "mount"
  6532. Description: ""
  6533. Value:
  6534. - "/data"
  6535. - Name: "device"
  6536. Description: ""
  6537. Value:
  6538. - "/dev/cpu_dma_latency"
  6539. 500:
  6540. description: "server error"
  6541. schema:
  6542. $ref: "#/definitions/ErrorResponse"
  6543. parameters:
  6544. - name: "remote"
  6545. in: "query"
  6546. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  6547. required: true
  6548. type: "string"
  6549. tags:
  6550. - "Plugin"
  6551. /plugins/pull:
  6552. post:
  6553. summary: "Install a plugin"
  6554. operationId: "PluginPull"
  6555. description: |
  6556. Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable).
  6557. produces:
  6558. - "application/json"
  6559. responses:
  6560. 204:
  6561. description: "no error"
  6562. 500:
  6563. description: "server error"
  6564. schema:
  6565. $ref: "#/definitions/ErrorResponse"
  6566. parameters:
  6567. - name: "remote"
  6568. in: "query"
  6569. description: |
  6570. Remote reference for plugin to install.
  6571. The `:latest` tag is optional, and is used as the default if omitted.
  6572. required: true
  6573. type: "string"
  6574. - name: "name"
  6575. in: "query"
  6576. description: |
  6577. Local name for the pulled plugin.
  6578. The `:latest` tag is optional, and is used as the default if omitted.
  6579. required: false
  6580. type: "string"
  6581. - name: "X-Registry-Auth"
  6582. in: "header"
  6583. description: "A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication)"
  6584. type: "string"
  6585. - name: "body"
  6586. in: "body"
  6587. schema:
  6588. type: "array"
  6589. items:
  6590. description: "Describes a permission accepted by the user upon installing the plugin."
  6591. type: "object"
  6592. properties:
  6593. Name:
  6594. type: "string"
  6595. Description:
  6596. type: "string"
  6597. Value:
  6598. type: "array"
  6599. items:
  6600. type: "string"
  6601. example:
  6602. - Name: "network"
  6603. Description: ""
  6604. Value:
  6605. - "host"
  6606. - Name: "mount"
  6607. Description: ""
  6608. Value:
  6609. - "/data"
  6610. - Name: "device"
  6611. Description: ""
  6612. Value:
  6613. - "/dev/cpu_dma_latency"
  6614. tags: ["Plugin"]
  6615. /plugins/{name}/json:
  6616. get:
  6617. summary: "Inspect a plugin"
  6618. operationId: "PluginInspect"
  6619. responses:
  6620. 200:
  6621. description: "no error"
  6622. schema:
  6623. $ref: "#/definitions/Plugin"
  6624. 404:
  6625. description: "plugin is not installed"
  6626. schema:
  6627. $ref: "#/definitions/ErrorResponse"
  6628. 500:
  6629. description: "server error"
  6630. schema:
  6631. $ref: "#/definitions/ErrorResponse"
  6632. parameters:
  6633. - name: "name"
  6634. in: "path"
  6635. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  6636. required: true
  6637. type: "string"
  6638. tags: ["Plugin"]
  6639. /plugins/{name}:
  6640. delete:
  6641. summary: "Remove a plugin"
  6642. operationId: "PluginDelete"
  6643. responses:
  6644. 200:
  6645. description: "no error"
  6646. schema:
  6647. $ref: "#/definitions/Plugin"
  6648. 404:
  6649. description: "plugin is not installed"
  6650. schema:
  6651. $ref: "#/definitions/ErrorResponse"
  6652. 500:
  6653. description: "server error"
  6654. schema:
  6655. $ref: "#/definitions/ErrorResponse"
  6656. parameters:
  6657. - name: "name"
  6658. in: "path"
  6659. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  6660. required: true
  6661. type: "string"
  6662. - name: "force"
  6663. in: "query"
  6664. description: "Disable the plugin before removing. This may result in issues if the plugin is in use by a container."
  6665. type: "boolean"
  6666. default: false
  6667. tags: ["Plugin"]
  6668. /plugins/{name}/enable:
  6669. post:
  6670. summary: "Enable a plugin"
  6671. operationId: "PluginEnable"
  6672. responses:
  6673. 200:
  6674. description: "no error"
  6675. 404:
  6676. description: "plugin is not installed"
  6677. schema:
  6678. $ref: "#/definitions/ErrorResponse"
  6679. 500:
  6680. description: "server error"
  6681. schema:
  6682. $ref: "#/definitions/ErrorResponse"
  6683. parameters:
  6684. - name: "name"
  6685. in: "path"
  6686. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  6687. required: true
  6688. type: "string"
  6689. - name: "timeout"
  6690. in: "query"
  6691. description: "Set the HTTP client timeout (in seconds)"
  6692. type: "integer"
  6693. default: 0
  6694. tags: ["Plugin"]
  6695. /plugins/{name}/disable:
  6696. post:
  6697. summary: "Disable a plugin"
  6698. operationId: "PluginDisable"
  6699. responses:
  6700. 200:
  6701. description: "no error"
  6702. 404:
  6703. description: "plugin is not installed"
  6704. schema:
  6705. $ref: "#/definitions/ErrorResponse"
  6706. 500:
  6707. description: "server error"
  6708. schema:
  6709. $ref: "#/definitions/ErrorResponse"
  6710. parameters:
  6711. - name: "name"
  6712. in: "path"
  6713. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  6714. required: true
  6715. type: "string"
  6716. - name: "force"
  6717. in: "query"
  6718. description: |
  6719. Force disable a plugin even if still in use.
  6720. required: false
  6721. type: "boolean"
  6722. tags: ["Plugin"]
  6723. /plugins/{name}/upgrade:
  6724. post:
  6725. summary: "Upgrade a plugin"
  6726. operationId: "PluginUpgrade"
  6727. responses:
  6728. 204:
  6729. description: "no error"
  6730. 404:
  6731. description: "plugin not installed"
  6732. schema:
  6733. $ref: "#/definitions/ErrorResponse"
  6734. 500:
  6735. description: "server error"
  6736. schema:
  6737. $ref: "#/definitions/ErrorResponse"
  6738. parameters:
  6739. - name: "name"
  6740. in: "path"
  6741. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  6742. required: true
  6743. type: "string"
  6744. - name: "remote"
  6745. in: "query"
  6746. description: |
  6747. Remote reference to upgrade to.
  6748. The `:latest` tag is optional, and is used as the default if omitted.
  6749. required: true
  6750. type: "string"
  6751. - name: "X-Registry-Auth"
  6752. in: "header"
  6753. description: "A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication)"
  6754. type: "string"
  6755. - name: "body"
  6756. in: "body"
  6757. schema:
  6758. type: "array"
  6759. items:
  6760. description: "Describes a permission accepted by the user upon installing the plugin."
  6761. type: "object"
  6762. properties:
  6763. Name:
  6764. type: "string"
  6765. Description:
  6766. type: "string"
  6767. Value:
  6768. type: "array"
  6769. items:
  6770. type: "string"
  6771. example:
  6772. - Name: "network"
  6773. Description: ""
  6774. Value:
  6775. - "host"
  6776. - Name: "mount"
  6777. Description: ""
  6778. Value:
  6779. - "/data"
  6780. - Name: "device"
  6781. Description: ""
  6782. Value:
  6783. - "/dev/cpu_dma_latency"
  6784. tags: ["Plugin"]
  6785. /plugins/create:
  6786. post:
  6787. summary: "Create a plugin"
  6788. operationId: "PluginCreate"
  6789. consumes:
  6790. - "application/x-tar"
  6791. responses:
  6792. 204:
  6793. description: "no error"
  6794. 500:
  6795. description: "server error"
  6796. schema:
  6797. $ref: "#/definitions/ErrorResponse"
  6798. parameters:
  6799. - name: "name"
  6800. in: "query"
  6801. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  6802. required: true
  6803. type: "string"
  6804. - name: "tarContext"
  6805. in: "body"
  6806. description: "Path to tar containing plugin rootfs and manifest"
  6807. schema:
  6808. type: "string"
  6809. format: "binary"
  6810. tags: ["Plugin"]
  6811. /plugins/{name}/push:
  6812. post:
  6813. summary: "Push a plugin"
  6814. operationId: "PluginPush"
  6815. description: |
  6816. Push a plugin to the registry.
  6817. parameters:
  6818. - name: "name"
  6819. in: "path"
  6820. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  6821. required: true
  6822. type: "string"
  6823. responses:
  6824. 200:
  6825. description: "no error"
  6826. 404:
  6827. description: "plugin not installed"
  6828. schema:
  6829. $ref: "#/definitions/ErrorResponse"
  6830. 500:
  6831. description: "server error"
  6832. schema:
  6833. $ref: "#/definitions/ErrorResponse"
  6834. tags: ["Plugin"]
  6835. /plugins/{name}/set:
  6836. post:
  6837. summary: "Configure a plugin"
  6838. operationId: "PluginSet"
  6839. consumes:
  6840. - "application/json"
  6841. parameters:
  6842. - name: "name"
  6843. in: "path"
  6844. description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted."
  6845. required: true
  6846. type: "string"
  6847. - name: "body"
  6848. in: "body"
  6849. schema:
  6850. type: "array"
  6851. items:
  6852. type: "string"
  6853. example: ["DEBUG=1"]
  6854. responses:
  6855. 204:
  6856. description: "No error"
  6857. 404:
  6858. description: "Plugin not installed"
  6859. schema:
  6860. $ref: "#/definitions/ErrorResponse"
  6861. 500:
  6862. description: "Server error"
  6863. schema:
  6864. $ref: "#/definitions/ErrorResponse"
  6865. tags: ["Plugin"]
  6866. /nodes:
  6867. get:
  6868. summary: "List nodes"
  6869. operationId: "NodeList"
  6870. responses:
  6871. 200:
  6872. description: "no error"
  6873. schema:
  6874. type: "array"
  6875. items:
  6876. $ref: "#/definitions/Node"
  6877. 500:
  6878. description: "server error"
  6879. schema:
  6880. $ref: "#/definitions/ErrorResponse"
  6881. 503:
  6882. description: "node is not part of a swarm"
  6883. schema:
  6884. $ref: "#/definitions/ErrorResponse"
  6885. parameters:
  6886. - name: "filters"
  6887. in: "query"
  6888. description: |
  6889. Filters to process on the nodes list, encoded as JSON (a `map[string][]string`).
  6890. Available filters:
  6891. - `id=<node id>`
  6892. - `label=<engine label>`
  6893. - `membership=`(`accepted`|`pending`)`
  6894. - `name=<node name>`
  6895. - `role=`(`manager`|`worker`)`
  6896. type: "string"
  6897. tags: ["Node"]
  6898. /nodes/{id}:
  6899. get:
  6900. summary: "Inspect a node"
  6901. operationId: "NodeInspect"
  6902. responses:
  6903. 200:
  6904. description: "no error"
  6905. schema:
  6906. $ref: "#/definitions/Node"
  6907. 404:
  6908. description: "no such node"
  6909. schema:
  6910. $ref: "#/definitions/ErrorResponse"
  6911. 500:
  6912. description: "server error"
  6913. schema:
  6914. $ref: "#/definitions/ErrorResponse"
  6915. 503:
  6916. description: "node is not part of a swarm"
  6917. schema:
  6918. $ref: "#/definitions/ErrorResponse"
  6919. parameters:
  6920. - name: "id"
  6921. in: "path"
  6922. description: "The ID or name of the node"
  6923. type: "string"
  6924. required: true
  6925. tags: ["Node"]
  6926. delete:
  6927. summary: "Delete a node"
  6928. operationId: "NodeDelete"
  6929. responses:
  6930. 200:
  6931. description: "no error"
  6932. 404:
  6933. description: "no such node"
  6934. schema:
  6935. $ref: "#/definitions/ErrorResponse"
  6936. 500:
  6937. description: "server error"
  6938. schema:
  6939. $ref: "#/definitions/ErrorResponse"
  6940. 503:
  6941. description: "node is not part of a swarm"
  6942. schema:
  6943. $ref: "#/definitions/ErrorResponse"
  6944. parameters:
  6945. - name: "id"
  6946. in: "path"
  6947. description: "The ID or name of the node"
  6948. type: "string"
  6949. required: true
  6950. - name: "force"
  6951. in: "query"
  6952. description: "Force remove a node from the swarm"
  6953. default: false
  6954. type: "boolean"
  6955. tags: ["Node"]
  6956. /nodes/{id}/update:
  6957. post:
  6958. summary: "Update a node"
  6959. operationId: "NodeUpdate"
  6960. responses:
  6961. 200:
  6962. description: "no error"
  6963. 404:
  6964. description: "no such node"
  6965. schema:
  6966. $ref: "#/definitions/ErrorResponse"
  6967. 500:
  6968. description: "server error"
  6969. schema:
  6970. $ref: "#/definitions/ErrorResponse"
  6971. 503:
  6972. description: "node is not part of a swarm"
  6973. schema:
  6974. $ref: "#/definitions/ErrorResponse"
  6975. parameters:
  6976. - name: "id"
  6977. in: "path"
  6978. description: "The ID of the node"
  6979. type: "string"
  6980. required: true
  6981. - name: "body"
  6982. in: "body"
  6983. schema:
  6984. $ref: "#/definitions/NodeSpec"
  6985. - name: "version"
  6986. in: "query"
  6987. description: "The version number of the node object being updated. This is required to avoid conflicting writes."
  6988. type: "integer"
  6989. format: "int64"
  6990. required: true
  6991. tags: ["Node"]
  6992. /swarm:
  6993. get:
  6994. summary: "Inspect swarm"
  6995. operationId: "SwarmInspect"
  6996. responses:
  6997. 200:
  6998. description: "no error"
  6999. schema:
  7000. allOf:
  7001. - $ref: "#/definitions/ClusterInfo"
  7002. - type: "object"
  7003. properties:
  7004. JoinTokens:
  7005. description: "The tokens workers and managers need to join the swarm."
  7006. type: "object"
  7007. properties:
  7008. Worker:
  7009. description: "The token workers can use to join the swarm."
  7010. type: "string"
  7011. Manager:
  7012. description: "The token managers can use to join the swarm."
  7013. type: "string"
  7014. example:
  7015. CreatedAt: "2016-08-15T16:00:20.349727406Z"
  7016. Spec:
  7017. Dispatcher:
  7018. HeartbeatPeriod: 5000000000
  7019. Orchestration:
  7020. TaskHistoryRetentionLimit: 10
  7021. CAConfig:
  7022. NodeCertExpiry: 7776000000000000
  7023. Raft:
  7024. LogEntriesForSlowFollowers: 500
  7025. HeartbeatTick: 1
  7026. SnapshotInterval: 10000
  7027. ElectionTick: 3
  7028. TaskDefaults: {}
  7029. EncryptionConfig:
  7030. AutoLockManagers: false
  7031. Name: "default"
  7032. JoinTokens:
  7033. Worker: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-6qmn92w6bu3jdvnglku58u11a"
  7034. Manager: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-8llk83c4wm9lwioey2s316r9l"
  7035. ID: "70ilmkj2f6sp2137c753w2nmt"
  7036. UpdatedAt: "2016-08-15T16:32:09.623207604Z"
  7037. Version:
  7038. Index: 51
  7039. 404:
  7040. description: "no such swarm"
  7041. schema:
  7042. $ref: "#/definitions/ErrorResponse"
  7043. 500:
  7044. description: "server error"
  7045. schema:
  7046. $ref: "#/definitions/ErrorResponse"
  7047. 503:
  7048. description: "node is not part of a swarm"
  7049. schema:
  7050. $ref: "#/definitions/ErrorResponse"
  7051. tags: ["Swarm"]
  7052. /swarm/init:
  7053. post:
  7054. summary: "Initialize a new swarm"
  7055. operationId: "SwarmInit"
  7056. produces:
  7057. - "application/json"
  7058. - "text/plain"
  7059. responses:
  7060. 200:
  7061. description: "no error"
  7062. schema:
  7063. description: "The node ID"
  7064. type: "string"
  7065. example: "7v2t30z9blmxuhnyo6s4cpenp"
  7066. 400:
  7067. description: "bad parameter"
  7068. schema:
  7069. $ref: "#/definitions/ErrorResponse"
  7070. 500:
  7071. description: "server error"
  7072. schema:
  7073. $ref: "#/definitions/ErrorResponse"
  7074. 503:
  7075. description: "node is already part of a swarm"
  7076. schema:
  7077. $ref: "#/definitions/ErrorResponse"
  7078. parameters:
  7079. - name: "body"
  7080. in: "body"
  7081. required: true
  7082. schema:
  7083. type: "object"
  7084. properties:
  7085. ListenAddr:
  7086. description: "Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the default swarm listening port is used."
  7087. type: "string"
  7088. AdvertiseAddr:
  7089. description: "Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible."
  7090. type: "string"
  7091. ForceNewCluster:
  7092. description: "Force creation of a new swarm."
  7093. type: "boolean"
  7094. Spec:
  7095. $ref: "#/definitions/SwarmSpec"
  7096. example:
  7097. ListenAddr: "0.0.0.0:2377"
  7098. AdvertiseAddr: "192.168.1.1:2377"
  7099. ForceNewCluster: false
  7100. Spec:
  7101. Orchestration: {}
  7102. Raft: {}
  7103. Dispatcher: {}
  7104. CAConfig: {}
  7105. EncryptionConfig:
  7106. AutoLockManagers: false
  7107. tags: ["Swarm"]
  7108. /swarm/join:
  7109. post:
  7110. summary: "Join an existing swarm"
  7111. operationId: "SwarmJoin"
  7112. responses:
  7113. 200:
  7114. description: "no error"
  7115. 400:
  7116. description: "bad parameter"
  7117. schema:
  7118. $ref: "#/definitions/ErrorResponse"
  7119. 500:
  7120. description: "server error"
  7121. schema:
  7122. $ref: "#/definitions/ErrorResponse"
  7123. 503:
  7124. description: "node is already part of a swarm"
  7125. schema:
  7126. $ref: "#/definitions/ErrorResponse"
  7127. parameters:
  7128. - name: "body"
  7129. in: "body"
  7130. required: true
  7131. schema:
  7132. type: "object"
  7133. properties:
  7134. ListenAddr:
  7135. description: "Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP)."
  7136. type: "string"
  7137. AdvertiseAddr:
  7138. description: "Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible."
  7139. type: "string"
  7140. RemoteAddrs:
  7141. description: "Addresses of manager nodes already participating in the swarm."
  7142. type: "string"
  7143. JoinToken:
  7144. description: "Secret token for joining this swarm."
  7145. type: "string"
  7146. example:
  7147. ListenAddr: "0.0.0.0:2377"
  7148. AdvertiseAddr: "192.168.1.1:2377"
  7149. RemoteAddrs:
  7150. - "node1:2377"
  7151. JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2"
  7152. tags: ["Swarm"]
  7153. /swarm/leave:
  7154. post:
  7155. summary: "Leave a swarm"
  7156. operationId: "SwarmLeave"
  7157. responses:
  7158. 200:
  7159. description: "no error"
  7160. 500:
  7161. description: "server error"
  7162. schema:
  7163. $ref: "#/definitions/ErrorResponse"
  7164. 503:
  7165. description: "node is not part of a swarm"
  7166. schema:
  7167. $ref: "#/definitions/ErrorResponse"
  7168. parameters:
  7169. - name: "force"
  7170. description: "Force leave swarm, even if this is the last manager or that it will break the cluster."
  7171. in: "query"
  7172. type: "boolean"
  7173. default: false
  7174. tags: ["Swarm"]
  7175. /swarm/update:
  7176. post:
  7177. summary: "Update a swarm"
  7178. operationId: "SwarmUpdate"
  7179. responses:
  7180. 200:
  7181. description: "no error"
  7182. 400:
  7183. description: "bad parameter"
  7184. schema:
  7185. $ref: "#/definitions/ErrorResponse"
  7186. 500:
  7187. description: "server error"
  7188. schema:
  7189. $ref: "#/definitions/ErrorResponse"
  7190. 503:
  7191. description: "node is not part of a swarm"
  7192. schema:
  7193. $ref: "#/definitions/ErrorResponse"
  7194. parameters:
  7195. - name: "body"
  7196. in: "body"
  7197. required: true
  7198. schema:
  7199. $ref: "#/definitions/SwarmSpec"
  7200. - name: "version"
  7201. in: "query"
  7202. description: "The version number of the swarm object being updated. This is required to avoid conflicting writes."
  7203. type: "integer"
  7204. format: "int64"
  7205. required: true
  7206. - name: "rotateWorkerToken"
  7207. in: "query"
  7208. description: "Rotate the worker join token."
  7209. type: "boolean"
  7210. default: false
  7211. - name: "rotateManagerToken"
  7212. in: "query"
  7213. description: "Rotate the manager join token."
  7214. type: "boolean"
  7215. default: false
  7216. - name: "rotateManagerUnlockKey"
  7217. in: "query"
  7218. description: "Rotate the manager unlock key."
  7219. type: "boolean"
  7220. default: false
  7221. tags: ["Swarm"]
  7222. /swarm/unlockkey:
  7223. get:
  7224. summary: "Get the unlock key"
  7225. operationId: "SwarmUnlockkey"
  7226. consumes:
  7227. - "application/json"
  7228. responses:
  7229. 200:
  7230. description: "no error"
  7231. schema:
  7232. type: "object"
  7233. properties:
  7234. UnlockKey:
  7235. description: "The swarm's unlock key."
  7236. type: "string"
  7237. example:
  7238. UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
  7239. 500:
  7240. description: "server error"
  7241. schema:
  7242. $ref: "#/definitions/ErrorResponse"
  7243. 503:
  7244. description: "node is not part of a swarm"
  7245. schema:
  7246. $ref: "#/definitions/ErrorResponse"
  7247. tags: ["Swarm"]
  7248. /swarm/unlock:
  7249. post:
  7250. summary: "Unlock a locked manager"
  7251. operationId: "SwarmUnlock"
  7252. consumes:
  7253. - "application/json"
  7254. produces:
  7255. - "application/json"
  7256. parameters:
  7257. - name: "body"
  7258. in: "body"
  7259. required: true
  7260. schema:
  7261. type: "object"
  7262. properties:
  7263. UnlockKey:
  7264. description: "The swarm's unlock key."
  7265. type: "string"
  7266. example:
  7267. UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8"
  7268. responses:
  7269. 200:
  7270. description: "no error"
  7271. 500:
  7272. description: "server error"
  7273. schema:
  7274. $ref: "#/definitions/ErrorResponse"
  7275. 503:
  7276. description: "node is not part of a swarm"
  7277. schema:
  7278. $ref: "#/definitions/ErrorResponse"
  7279. tags: ["Swarm"]
  7280. /services:
  7281. get:
  7282. summary: "List services"
  7283. operationId: "ServiceList"
  7284. responses:
  7285. 200:
  7286. description: "no error"
  7287. schema:
  7288. type: "array"
  7289. items:
  7290. $ref: "#/definitions/Service"
  7291. 500:
  7292. description: "server error"
  7293. schema:
  7294. $ref: "#/definitions/ErrorResponse"
  7295. 503:
  7296. description: "node is not part of a swarm"
  7297. schema:
  7298. $ref: "#/definitions/ErrorResponse"
  7299. parameters:
  7300. - name: "filters"
  7301. in: "query"
  7302. type: "string"
  7303. description: |
  7304. A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters:
  7305. - `id=<service id>`
  7306. - `label=<service label>`
  7307. - `mode=["replicated"|"global"]`
  7308. - `name=<service name>`
  7309. tags: ["Service"]
  7310. /services/create:
  7311. post:
  7312. summary: "Create a service"
  7313. operationId: "ServiceCreate"
  7314. consumes:
  7315. - "application/json"
  7316. produces:
  7317. - "application/json"
  7318. responses:
  7319. 201:
  7320. description: "no error"
  7321. schema:
  7322. type: "object"
  7323. properties:
  7324. ID:
  7325. description: "The ID of the created service."
  7326. type: "string"
  7327. Warning:
  7328. description: "Optional warning message"
  7329. type: "string"
  7330. example:
  7331. ID: "ak7w3gjqoa3kuz8xcpnyy0pvl"
  7332. Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found"
  7333. 400:
  7334. description: "bad parameter"
  7335. schema:
  7336. $ref: "#/definitions/ErrorResponse"
  7337. 403:
  7338. description: "network is not eligible for services"
  7339. schema:
  7340. $ref: "#/definitions/ErrorResponse"
  7341. 409:
  7342. description: "name conflicts with an existing service"
  7343. schema:
  7344. $ref: "#/definitions/ErrorResponse"
  7345. 500:
  7346. description: "server error"
  7347. schema:
  7348. $ref: "#/definitions/ErrorResponse"
  7349. 503:
  7350. description: "node is not part of a swarm"
  7351. schema:
  7352. $ref: "#/definitions/ErrorResponse"
  7353. parameters:
  7354. - name: "body"
  7355. in: "body"
  7356. required: true
  7357. schema:
  7358. allOf:
  7359. - $ref: "#/definitions/ServiceSpec"
  7360. - type: "object"
  7361. example:
  7362. Name: "web"
  7363. TaskTemplate:
  7364. ContainerSpec:
  7365. Image: "nginx:alpine"
  7366. Mounts:
  7367. -
  7368. ReadOnly: true
  7369. Source: "web-data"
  7370. Target: "/usr/share/nginx/html"
  7371. Type: "volume"
  7372. VolumeOptions:
  7373. DriverConfig: {}
  7374. Labels:
  7375. com.example.something: "something-value"
  7376. Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"]
  7377. User: "33"
  7378. DNSConfig:
  7379. Nameservers: ["8.8.8.8"]
  7380. Search: ["example.org"]
  7381. Options: ["timeout:3"]
  7382. LogDriver:
  7383. Name: "json-file"
  7384. Options:
  7385. max-file: "3"
  7386. max-size: "10M"
  7387. Placement: {}
  7388. Resources:
  7389. Limits:
  7390. MemoryBytes: 104857600
  7391. Reservations: {}
  7392. RestartPolicy:
  7393. Condition: "on-failure"
  7394. Delay: 10000000000
  7395. MaxAttempts: 10
  7396. Mode:
  7397. Replicated:
  7398. Replicas: 4
  7399. UpdateConfig:
  7400. Parallelism: 2
  7401. Delay: 1000000000
  7402. FailureAction: "pause"
  7403. Monitor: 15000000000
  7404. MaxFailureRatio: 0.15
  7405. RollbackConfig:
  7406. Parallelism: 1
  7407. Delay: 1000000000
  7408. FailureAction: "pause"
  7409. Monitor: 15000000000
  7410. MaxFailureRatio: 0.15
  7411. EndpointSpec:
  7412. Ports:
  7413. -
  7414. Protocol: "tcp"
  7415. PublishedPort: 8080
  7416. TargetPort: 80
  7417. Labels:
  7418. foo: "bar"
  7419. - name: "X-Registry-Auth"
  7420. in: "header"
  7421. description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)"
  7422. type: "string"
  7423. tags: ["Service"]
  7424. /services/{id}:
  7425. get:
  7426. summary: "Inspect a service"
  7427. operationId: "ServiceInspect"
  7428. responses:
  7429. 200:
  7430. description: "no error"
  7431. schema:
  7432. $ref: "#/definitions/Service"
  7433. 404:
  7434. description: "no such service"
  7435. schema:
  7436. $ref: "#/definitions/ErrorResponse"
  7437. 500:
  7438. description: "server error"
  7439. schema:
  7440. $ref: "#/definitions/ErrorResponse"
  7441. 503:
  7442. description: "node is not part of a swarm"
  7443. schema:
  7444. $ref: "#/definitions/ErrorResponse"
  7445. parameters:
  7446. - name: "id"
  7447. in: "path"
  7448. description: "ID or name of service."
  7449. required: true
  7450. type: "string"
  7451. - name: "insertDefaults"
  7452. in: "query"
  7453. description: "Fill empty fields with default values."
  7454. type: "boolean"
  7455. default: false
  7456. tags: ["Service"]
  7457. delete:
  7458. summary: "Delete a service"
  7459. operationId: "ServiceDelete"
  7460. responses:
  7461. 200:
  7462. description: "no error"
  7463. 404:
  7464. description: "no such service"
  7465. schema:
  7466. $ref: "#/definitions/ErrorResponse"
  7467. 500:
  7468. description: "server error"
  7469. schema:
  7470. $ref: "#/definitions/ErrorResponse"
  7471. 503:
  7472. description: "node is not part of a swarm"
  7473. schema:
  7474. $ref: "#/definitions/ErrorResponse"
  7475. parameters:
  7476. - name: "id"
  7477. in: "path"
  7478. description: "ID or name of service."
  7479. required: true
  7480. type: "string"
  7481. tags: ["Service"]
  7482. /services/{id}/update:
  7483. post:
  7484. summary: "Update a service"
  7485. operationId: "ServiceUpdate"
  7486. consumes: ["application/json"]
  7487. produces: ["application/json"]
  7488. responses:
  7489. 200:
  7490. description: "no error"
  7491. schema:
  7492. $ref: "#/definitions/ServiceUpdateResponse"
  7493. 400:
  7494. description: "bad parameter"
  7495. schema:
  7496. $ref: "#/definitions/ErrorResponse"
  7497. 404:
  7498. description: "no such service"
  7499. schema:
  7500. $ref: "#/definitions/ErrorResponse"
  7501. 500:
  7502. description: "server error"
  7503. schema:
  7504. $ref: "#/definitions/ErrorResponse"
  7505. 503:
  7506. description: "node is not part of a swarm"
  7507. schema:
  7508. $ref: "#/definitions/ErrorResponse"
  7509. parameters:
  7510. - name: "id"
  7511. in: "path"
  7512. description: "ID or name of service."
  7513. required: true
  7514. type: "string"
  7515. - name: "body"
  7516. in: "body"
  7517. required: true
  7518. schema:
  7519. allOf:
  7520. - $ref: "#/definitions/ServiceSpec"
  7521. - type: "object"
  7522. example:
  7523. Name: "top"
  7524. TaskTemplate:
  7525. ContainerSpec:
  7526. Image: "busybox"
  7527. Args:
  7528. - "top"
  7529. Resources:
  7530. Limits: {}
  7531. Reservations: {}
  7532. RestartPolicy:
  7533. Condition: "any"
  7534. MaxAttempts: 0
  7535. Placement: {}
  7536. ForceUpdate: 0
  7537. Mode:
  7538. Replicated:
  7539. Replicas: 1
  7540. UpdateConfig:
  7541. Parallelism: 2
  7542. Delay: 1000000000
  7543. FailureAction: "pause"
  7544. Monitor: 15000000000
  7545. MaxFailureRatio: 0.15
  7546. RollbackConfig:
  7547. Parallelism: 1
  7548. Delay: 1000000000
  7549. FailureAction: "pause"
  7550. Monitor: 15000000000
  7551. MaxFailureRatio: 0.15
  7552. EndpointSpec:
  7553. Mode: "vip"
  7554. - name: "version"
  7555. in: "query"
  7556. description: "The version number of the service object being updated. This is required to avoid conflicting writes."
  7557. required: true
  7558. type: "integer"
  7559. - name: "registryAuthFrom"
  7560. in: "query"
  7561. type: "string"
  7562. description: "If the X-Registry-Auth header is not specified, this
  7563. parameter indicates where to find registry authorization credentials. The
  7564. valid values are `spec` and `previous-spec`."
  7565. default: "spec"
  7566. - name: "rollback"
  7567. in: "query"
  7568. type: "string"
  7569. description: "Set to this parameter to `previous` to cause a
  7570. server-side rollback to the previous service spec. The supplied spec will be
  7571. ignored in this case."
  7572. - name: "X-Registry-Auth"
  7573. in: "header"
  7574. description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)"
  7575. type: "string"
  7576. tags: ["Service"]
  7577. /services/{id}/logs:
  7578. get:
  7579. summary: "Get service logs"
  7580. description: |
  7581. Get `stdout` and `stderr` logs from a service.
  7582. **Note**: This endpoint works only for services with the `json-file` or `journald` logging drivers.
  7583. operationId: "ServiceLogs"
  7584. produces:
  7585. - "application/vnd.docker.raw-stream"
  7586. - "application/json"
  7587. responses:
  7588. 101:
  7589. description: "logs returned as a stream"
  7590. schema:
  7591. type: "string"
  7592. format: "binary"
  7593. 200:
  7594. description: "logs returned as a string in response body"
  7595. schema:
  7596. type: "string"
  7597. 404:
  7598. description: "no such service"
  7599. schema:
  7600. $ref: "#/definitions/ErrorResponse"
  7601. examples:
  7602. application/json:
  7603. message: "No such service: c2ada9df5af8"
  7604. 500:
  7605. description: "server error"
  7606. schema:
  7607. $ref: "#/definitions/ErrorResponse"
  7608. 503:
  7609. description: "node is not part of a swarm"
  7610. schema:
  7611. $ref: "#/definitions/ErrorResponse"
  7612. parameters:
  7613. - name: "id"
  7614. in: "path"
  7615. required: true
  7616. description: "ID or name of the service"
  7617. type: "string"
  7618. - name: "details"
  7619. in: "query"
  7620. description: "Show service context and extra details provided to logs."
  7621. type: "boolean"
  7622. default: false
  7623. - name: "follow"
  7624. in: "query"
  7625. description: |
  7626. Return the logs as a stream.
  7627. This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach).
  7628. type: "boolean"
  7629. default: false
  7630. - name: "stdout"
  7631. in: "query"
  7632. description: "Return logs from `stdout`"
  7633. type: "boolean"
  7634. default: false
  7635. - name: "stderr"
  7636. in: "query"
  7637. description: "Return logs from `stderr`"
  7638. type: "boolean"
  7639. default: false
  7640. - name: "since"
  7641. in: "query"
  7642. description: "Only return logs since this time, as a UNIX timestamp"
  7643. type: "integer"
  7644. default: 0
  7645. - name: "timestamps"
  7646. in: "query"
  7647. description: "Add timestamps to every log line"
  7648. type: "boolean"
  7649. default: false
  7650. - name: "tail"
  7651. in: "query"
  7652. description: "Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines."
  7653. type: "string"
  7654. default: "all"
  7655. tags: ["Service"]
  7656. /tasks:
  7657. get:
  7658. summary: "List tasks"
  7659. operationId: "TaskList"
  7660. produces:
  7661. - "application/json"
  7662. responses:
  7663. 200:
  7664. description: "no error"
  7665. schema:
  7666. type: "array"
  7667. items:
  7668. $ref: "#/definitions/Task"
  7669. example:
  7670. - ID: "0kzzo1i0y4jz6027t0k7aezc7"
  7671. Version:
  7672. Index: 71
  7673. CreatedAt: "2016-06-07T21:07:31.171892745Z"
  7674. UpdatedAt: "2016-06-07T21:07:31.376370513Z"
  7675. Spec:
  7676. ContainerSpec:
  7677. Image: "redis"
  7678. Resources:
  7679. Limits: {}
  7680. Reservations: {}
  7681. RestartPolicy:
  7682. Condition: "any"
  7683. MaxAttempts: 0
  7684. Placement: {}
  7685. ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  7686. Slot: 1
  7687. NodeID: "60gvrl6tm78dmak4yl7srz94v"
  7688. Status:
  7689. Timestamp: "2016-06-07T21:07:31.290032978Z"
  7690. State: "running"
  7691. Message: "started"
  7692. ContainerStatus:
  7693. ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035"
  7694. PID: 677
  7695. DesiredState: "running"
  7696. NetworksAttachments:
  7697. - Network:
  7698. ID: "4qvuz4ko70xaltuqbt8956gd1"
  7699. Version:
  7700. Index: 18
  7701. CreatedAt: "2016-06-07T20:31:11.912919752Z"
  7702. UpdatedAt: "2016-06-07T21:07:29.955277358Z"
  7703. Spec:
  7704. Name: "ingress"
  7705. Labels:
  7706. com.docker.swarm.internal: "true"
  7707. DriverConfiguration: {}
  7708. IPAMOptions:
  7709. Driver: {}
  7710. Configs:
  7711. - Subnet: "10.255.0.0/16"
  7712. Gateway: "10.255.0.1"
  7713. DriverState:
  7714. Name: "overlay"
  7715. Options:
  7716. com.docker.network.driver.overlay.vxlanid_list: "256"
  7717. IPAMOptions:
  7718. Driver:
  7719. Name: "default"
  7720. Configs:
  7721. - Subnet: "10.255.0.0/16"
  7722. Gateway: "10.255.0.1"
  7723. Addresses:
  7724. - "10.255.0.10/16"
  7725. - ID: "1yljwbmlr8er2waf8orvqpwms"
  7726. Version:
  7727. Index: 30
  7728. CreatedAt: "2016-06-07T21:07:30.019104782Z"
  7729. UpdatedAt: "2016-06-07T21:07:30.231958098Z"
  7730. Name: "hopeful_cori"
  7731. Spec:
  7732. ContainerSpec:
  7733. Image: "redis"
  7734. Resources:
  7735. Limits: {}
  7736. Reservations: {}
  7737. RestartPolicy:
  7738. Condition: "any"
  7739. MaxAttempts: 0
  7740. Placement: {}
  7741. ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz"
  7742. Slot: 1
  7743. NodeID: "60gvrl6tm78dmak4yl7srz94v"
  7744. Status:
  7745. Timestamp: "2016-06-07T21:07:30.202183143Z"
  7746. State: "shutdown"
  7747. Message: "shutdown"
  7748. ContainerStatus:
  7749. ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213"
  7750. DesiredState: "shutdown"
  7751. NetworksAttachments:
  7752. - Network:
  7753. ID: "4qvuz4ko70xaltuqbt8956gd1"
  7754. Version:
  7755. Index: 18
  7756. CreatedAt: "2016-06-07T20:31:11.912919752Z"
  7757. UpdatedAt: "2016-06-07T21:07:29.955277358Z"
  7758. Spec:
  7759. Name: "ingress"
  7760. Labels:
  7761. com.docker.swarm.internal: "true"
  7762. DriverConfiguration: {}
  7763. IPAMOptions:
  7764. Driver: {}
  7765. Configs:
  7766. - Subnet: "10.255.0.0/16"
  7767. Gateway: "10.255.0.1"
  7768. DriverState:
  7769. Name: "overlay"
  7770. Options:
  7771. com.docker.network.driver.overlay.vxlanid_list: "256"
  7772. IPAMOptions:
  7773. Driver:
  7774. Name: "default"
  7775. Configs:
  7776. - Subnet: "10.255.0.0/16"
  7777. Gateway: "10.255.0.1"
  7778. Addresses:
  7779. - "10.255.0.5/16"
  7780. 500:
  7781. description: "server error"
  7782. schema:
  7783. $ref: "#/definitions/ErrorResponse"
  7784. 503:
  7785. description: "node is not part of a swarm"
  7786. schema:
  7787. $ref: "#/definitions/ErrorResponse"
  7788. parameters:
  7789. - name: "filters"
  7790. in: "query"
  7791. type: "string"
  7792. description: |
  7793. A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters:
  7794. - `desired-state=(running | shutdown | accepted)`
  7795. - `id=<task id>`
  7796. - `label=key` or `label="key=value"`
  7797. - `name=<task name>`
  7798. - `node=<node id or name>`
  7799. - `service=<service name>`
  7800. tags: ["Task"]
  7801. /tasks/{id}:
  7802. get:
  7803. summary: "Inspect a task"
  7804. operationId: "TaskInspect"
  7805. produces:
  7806. - "application/json"
  7807. responses:
  7808. 200:
  7809. description: "no error"
  7810. schema:
  7811. $ref: "#/definitions/Task"
  7812. 404:
  7813. description: "no such task"
  7814. schema:
  7815. $ref: "#/definitions/ErrorResponse"
  7816. 500:
  7817. description: "server error"
  7818. schema:
  7819. $ref: "#/definitions/ErrorResponse"
  7820. 503:
  7821. description: "node is not part of a swarm"
  7822. schema:
  7823. $ref: "#/definitions/ErrorResponse"
  7824. parameters:
  7825. - name: "id"
  7826. in: "path"
  7827. description: "ID of the task"
  7828. required: true
  7829. type: "string"
  7830. tags: ["Task"]
  7831. /tasks/{id}/logs:
  7832. get:
  7833. summary: "Get task logs"
  7834. description: |
  7835. Get `stdout` and `stderr` logs from a task.
  7836. **Note**: This endpoint works only for services with the `json-file` or `journald` logging drivers.
  7837. operationId: "TaskLogs"
  7838. produces:
  7839. - "application/vnd.docker.raw-stream"
  7840. - "application/json"
  7841. responses:
  7842. 101:
  7843. description: "logs returned as a stream"
  7844. schema:
  7845. type: "string"
  7846. format: "binary"
  7847. 200:
  7848. description: "logs returned as a string in response body"
  7849. schema:
  7850. type: "string"
  7851. 404:
  7852. description: "no such task"
  7853. schema:
  7854. $ref: "#/definitions/ErrorResponse"
  7855. examples:
  7856. application/json:
  7857. message: "No such task: c2ada9df5af8"
  7858. 500:
  7859. description: "server error"
  7860. schema:
  7861. $ref: "#/definitions/ErrorResponse"
  7862. 503:
  7863. description: "node is not part of a swarm"
  7864. schema:
  7865. $ref: "#/definitions/ErrorResponse"
  7866. parameters:
  7867. - name: "id"
  7868. in: "path"
  7869. required: true
  7870. description: "ID of the task"
  7871. type: "string"
  7872. - name: "details"
  7873. in: "query"
  7874. description: "Show task context and extra details provided to logs."
  7875. type: "boolean"
  7876. default: false
  7877. - name: "follow"
  7878. in: "query"
  7879. description: |
  7880. Return the logs as a stream.
  7881. This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach).
  7882. type: "boolean"
  7883. default: false
  7884. - name: "stdout"
  7885. in: "query"
  7886. description: "Return logs from `stdout`"
  7887. type: "boolean"
  7888. default: false
  7889. - name: "stderr"
  7890. in: "query"
  7891. description: "Return logs from `stderr`"
  7892. type: "boolean"
  7893. default: false
  7894. - name: "since"
  7895. in: "query"
  7896. description: "Only return logs since this time, as a UNIX timestamp"
  7897. type: "integer"
  7898. default: 0
  7899. - name: "timestamps"
  7900. in: "query"
  7901. description: "Add timestamps to every log line"
  7902. type: "boolean"
  7903. default: false
  7904. - name: "tail"
  7905. in: "query"
  7906. description: "Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines."
  7907. type: "string"
  7908. default: "all"
  7909. /secrets:
  7910. get:
  7911. summary: "List secrets"
  7912. operationId: "SecretList"
  7913. produces:
  7914. - "application/json"
  7915. responses:
  7916. 200:
  7917. description: "no error"
  7918. schema:
  7919. type: "array"
  7920. items:
  7921. $ref: "#/definitions/Secret"
  7922. example:
  7923. - ID: "ktnbjxoalbkvbvedmg1urrz8h"
  7924. Version:
  7925. Index: 11
  7926. CreatedAt: "2016-11-05T01:20:17.327670065Z"
  7927. UpdatedAt: "2016-11-05T01:20:17.327670065Z"
  7928. Spec:
  7929. Name: "app-dev.crt"
  7930. 500:
  7931. description: "server error"
  7932. schema:
  7933. $ref: "#/definitions/ErrorResponse"
  7934. 503:
  7935. description: "node is not part of a swarm"
  7936. schema:
  7937. $ref: "#/definitions/ErrorResponse"
  7938. parameters:
  7939. - name: "filters"
  7940. in: "query"
  7941. type: "string"
  7942. description: |
  7943. A JSON encoded value of the filters (a `map[string][]string`) to process on the secrets list. Available filters:
  7944. - `id=<secret id>`
  7945. - `label=<key> or label=<key>=value`
  7946. - `name=<secret name>`
  7947. - `names=<secret name>`
  7948. tags: ["Secret"]
  7949. /secrets/create:
  7950. post:
  7951. summary: "Create a secret"
  7952. operationId: "SecretCreate"
  7953. consumes:
  7954. - "application/json"
  7955. produces:
  7956. - "application/json"
  7957. responses:
  7958. 201:
  7959. description: "no error"
  7960. schema:
  7961. type: "object"
  7962. properties:
  7963. ID:
  7964. description: "The ID of the created secret."
  7965. type: "string"
  7966. example:
  7967. ID: "ktnbjxoalbkvbvedmg1urrz8h"
  7968. 409:
  7969. description: "name conflicts with an existing object"
  7970. schema:
  7971. $ref: "#/definitions/ErrorResponse"
  7972. 500:
  7973. description: "server error"
  7974. schema:
  7975. $ref: "#/definitions/ErrorResponse"
  7976. 503:
  7977. description: "node is not part of a swarm"
  7978. schema:
  7979. $ref: "#/definitions/ErrorResponse"
  7980. parameters:
  7981. - name: "body"
  7982. in: "body"
  7983. schema:
  7984. allOf:
  7985. - $ref: "#/definitions/SecretSpec"
  7986. - type: "object"
  7987. example:
  7988. Name: "app-key.crt"
  7989. Labels:
  7990. foo: "bar"
  7991. Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg=="
  7992. tags: ["Secret"]
  7993. /secrets/{id}:
  7994. get:
  7995. summary: "Inspect a secret"
  7996. operationId: "SecretInspect"
  7997. produces:
  7998. - "application/json"
  7999. responses:
  8000. 200:
  8001. description: "no error"
  8002. schema:
  8003. $ref: "#/definitions/Secret"
  8004. example:
  8005. ID: "ktnbjxoalbkvbvedmg1urrz8h"
  8006. Version:
  8007. Index: 11
  8008. CreatedAt: "2016-11-05T01:20:17.327670065Z"
  8009. UpdatedAt: "2016-11-05T01:20:17.327670065Z"
  8010. Spec:
  8011. Name: "app-dev.crt"
  8012. 404:
  8013. description: "secret not found"
  8014. schema:
  8015. $ref: "#/definitions/ErrorResponse"
  8016. 500:
  8017. description: "server error"
  8018. schema:
  8019. $ref: "#/definitions/ErrorResponse"
  8020. 503:
  8021. description: "node is not part of a swarm"
  8022. schema:
  8023. $ref: "#/definitions/ErrorResponse"
  8024. parameters:
  8025. - name: "id"
  8026. in: "path"
  8027. required: true
  8028. type: "string"
  8029. description: "ID of the secret"
  8030. tags: ["Secret"]
  8031. delete:
  8032. summary: "Delete a secret"
  8033. operationId: "SecretDelete"
  8034. produces:
  8035. - "application/json"
  8036. responses:
  8037. 204:
  8038. description: "no error"
  8039. 404:
  8040. description: "secret not found"
  8041. schema:
  8042. $ref: "#/definitions/ErrorResponse"
  8043. 500:
  8044. description: "server error"
  8045. schema:
  8046. $ref: "#/definitions/ErrorResponse"
  8047. 503:
  8048. description: "node is not part of a swarm"
  8049. schema:
  8050. $ref: "#/definitions/ErrorResponse"
  8051. parameters:
  8052. - name: "id"
  8053. in: "path"
  8054. required: true
  8055. type: "string"
  8056. description: "ID of the secret"
  8057. tags: ["Secret"]
  8058. /secrets/{id}/update:
  8059. post:
  8060. summary: "Update a Secret"
  8061. operationId: "SecretUpdate"
  8062. responses:
  8063. 200:
  8064. description: "no error"
  8065. 404:
  8066. description: "no such secret"
  8067. schema:
  8068. $ref: "#/definitions/ErrorResponse"
  8069. 500:
  8070. description: "server error"
  8071. schema:
  8072. $ref: "#/definitions/ErrorResponse"
  8073. 503:
  8074. description: "node is not part of a swarm"
  8075. schema:
  8076. $ref: "#/definitions/ErrorResponse"
  8077. parameters:
  8078. - name: "id"
  8079. in: "path"
  8080. description: "The ID or name of the secret"
  8081. type: "string"
  8082. required: true
  8083. - name: "body"
  8084. in: "body"
  8085. schema:
  8086. $ref: "#/definitions/SecretSpec"
  8087. description: "The spec of the secret to update. Currently, only the Labels field can be updated. All other fields must remain unchanged from the [SecretInspect endpoint](#operation/SecretInspect) response values."
  8088. - name: "version"
  8089. in: "query"
  8090. description: "The version number of the secret object being updated. This is required to avoid conflicting writes."
  8091. type: "integer"
  8092. format: "int64"
  8093. required: true
  8094. tags: ["Secret"]