v1.26.yaml 255 KB

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