v1.31.yaml 300 KB

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