v1.25.yaml 250 KB

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