v1.25.yaml 250 KB

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