v1.29.yaml 272 KB

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