swagger.yaml 283 KB

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