oss.yml 562 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582
  1. openapi: 3.0.0
  2. info:
  3. title: InfluxDB OSS API Service
  4. version: 2.0.0
  5. description: |
  6. The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
  7. servers:
  8. - url: /api/v2
  9. tags:
  10. - name: Authorizations
  11. description: |
  12. Create and manage _API tokens_.
  13. An _authorization_ contains a list of `read` and `write`
  14. permissions for organization resources and provides an API token for authentication.
  15. An authorization belongs to an organization and only contains permissions for that organization.
  16. An authorization is only visible to the user that created it.
  17. Optionally, when creating an authorization, you can scope it to a specific user.
  18. A _user session_ carries all the permissions granted by all the user's authorizations.
  19. To create a user session, use the [`POST /api/v2/signin`](#operation/PostSignin) endpoint.
  20. ### Related endpoints
  21. - [Signin](#tag/Signin)
  22. - [Signout](#tag/Signout)
  23. ### Related guides
  24. - [Authorize API requests](https://docs.influxdata.com/influxdb/v2.3/api-guide/api_intro/#authentication).
  25. - [Manage API tokens](https://docs.influxdata.com/influxdb/v2.3/security/tokens/).
  26. - [Assign a token to a specific user](https://docs.influxdata.com/influxdb/v2.3/security/tokens/create-token/).
  27. - name: Buckets
  28. description: |
  29. Store your data in InfluxDB [buckets](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#bucket).
  30. A bucket is a named location where time series data is stored. All buckets
  31. have a [retention period](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#retention-period),
  32. a duration of time that each data point persists. InfluxDB drops all
  33. points with timestamps older than the bucket’s retention period.
  34. A bucket belongs to an organization.
  35. ### Related guides
  36. - [Manage buckets](https://docs.influxdata.com/influxdb/v2.3/organizations/buckets/)
  37. - name: Debug
  38. description: |
  39. Generate profiling and trace reports.
  40. Use routes under `/debug/pprof` to analyze the Go runtime of InfluxDB.
  41. These endpoints generate [Go runtime profiles](https://pkg.go.dev/runtime/pprof)
  42. and **trace** reports.
  43. **Profiles** are collections of stack traces that show call sequences
  44. leading to instances of a particular event, such as allocation.
  45. For more information about **pprof profile** and **trace** reports,
  46. see the following resources:
  47. - [Google pprof tool](https://github.com/google/pprof)
  48. - [Golang diagnostics](https://go.dev/doc/diagnostics)
  49. - name: Delete
  50. description: |
  51. Delete data from an InfluxDB bucket.
  52. - name: Query
  53. description: |
  54. Retrieve data, analyze queries, and get query suggestions.
  55. - name: Tasks
  56. description: |
  57. Process and analyze your data with tasks in the InfluxDB task engine.
  58. With tasks, you can schedule Flux scripts to query, analyze, modify, and act on data.
  59. Use the `/api/v2/tasks` endpoints to create and manage tasks, retry task runs, and retrieve run logs.
  60. #### Related guides
  61. - [Get started with tasks](https://docs.influxdata.com/influxdb/v2.3/process-data/get-started/)
  62. - [Common data processing tasks](https://docs.influxdata.com/influxdb/v2.3/process-data/common-tasks/)
  63. - name: Templates
  64. description: |
  65. Export and apply InfluxDB **templates**.
  66. Manage **stacks** of templated InfluxDB resources.
  67. InfluxDB templates are prepackaged configurations for
  68. everything from dashboards and Telegraf to notifications and alerts.
  69. Use InfluxDB templates to quickly configure a fresh instance of InfluxDB,
  70. back up your dashboard configuration, or share your configuration with the
  71. InfluxData community.
  72. Use the `/api/v2/templates` endpoints to export templates and apply templates.
  73. **InfluxDB stacks** are stateful InfluxDB templates that let you
  74. add, update, and remove installed template resources over time, avoid duplicating
  75. resources when applying the same or similar templates more than once, and
  76. apply changes to distributed instances of InfluxDB OSS or InfluxDB Cloud.
  77. Use the `/api/v2/stacks` endpoints to manage installed template resources.
  78. #### Related guides
  79. - [InfluxDB stacks](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/stacks/)
  80. - [InfluxDB templates](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/)
  81. - name: Write
  82. description: |
  83. Write time series data to buckets.
  84. - name: Authentication
  85. description: |
  86. Use one of the following schemes to authenticate to the InfluxDB API:
  87. - [Token authentication](#section/Authentication/TokenAuthentication)
  88. - [Basic authentication](#section/Authentication/BasicAuthentication)
  89. - [Querystring authentication](#section/Authentication/QuerystringAuthentication)
  90. <!-- ReDoc-Inject: <security-definitions> -->
  91. x-traitTag: true
  92. - name: Quick start
  93. x-traitTag: true
  94. description: |
  95. See the [**API Quick Start**](https://docs.influxdata.com/influxdb/v2.3/api-guide/api_intro/)
  96. to get up and running authenticating with tokens, writing to buckets, and querying data.
  97. [**InfluxDB API client libraries**](https://docs.influxdata.com/influxdb/v2.3/api-guide/client-libraries/)
  98. are available for popular languages and ready to import into your application.
  99. - name: Common parameters
  100. x-traitTag: true
  101. description: |
  102. Many InfluxDB API endpoints require parameters to specify resources--for example,
  103. writing to a **bucket** in an **organization**.
  104. ### Common query parameters
  105. | Query parameter | Value type | Description |
  106. |:------------------------ |:--------------------- |:-------------------------------------------|
  107. | `bucket` | string | The bucket name or ID ([find your bucket](https://docs.influxdata.com/influxdb/v2.3/organizations/buckets/view-buckets/). |
  108. | `bucketID` | string | The bucket ID ([find your bucket](https://docs.influxdata.com/influxdb/v2.3/organizations/buckets/view-buckets/). |
  109. | `org` | string | The organization name or ID ([find your organization](https://docs.influxdata.com/influxdb/v2.3/organizations/view-orgs/). |
  110. | `orgID` | 16-byte string | The organization ID ([find your organization](https://docs.influxdata.com/influxdb/v2.3/organizations/view-orgs/). |
  111. - name: Headers
  112. x-traitTag: true
  113. description: |
  114. InfluxDB API endpoints use standard HTTP request and response headers.
  115. **Note**: Not all operations support all headers.
  116. ### Request headers
  117. | Header | Value type | Description |
  118. |:------------------------ |:--------------------- |:-------------------------------------------|
  119. | `Accept` | string | The content type that the client can understand. |
  120. | `Authorization` | string | The authorization scheme and credential. |
  121. | `Content-Encoding` | string | The compression applied to the line protocol in the request payload. |
  122. | `Content-Length` | integer | The size of the entity-body, in bytes, sent to the database. |
  123. | `Content-Type` | string | The format of the data in the request body. |
  124. - name: Response codes
  125. x-traitTag: true
  126. description: |
  127. InfluxDB API endpoints use standard HTTP status codes for success and failure responses.
  128. The response body may include additional details.
  129. For details about a specific operation's response,
  130. see **Responses** and **Response Samples** for that operation.
  131. API operations may return the following HTTP status codes:
  132. | &nbsp;Code&nbsp; | Status | Description |
  133. |:-----------:|:------------------------ |:--------------------- |
  134. | `200` | Success | |
  135. | `204` | No content | For a `POST` request, `204` indicates that InfluxDB accepted the request and request data is valid. Asynchronous operations, such as `write`, might not have completed yet. |
  136. | `400` | Bad request | May indicate one of the following: <ul><li>Line protocol is malformed. The response body contains the first malformed line in the data and indicates what was expected. For partial writes, the number of points written and the number of points rejected are also included. For more information, check the `rejected_points` measurement in your `_monitoring` bucket.</li><li>`Authorization` header is missing or malformed or the API token doesn't have permission for the operation.</li></ul> |
  137. | `401` | Unauthorized | May indicate one of the following: <ul><li>`Authorization: Token` header is missing or malformed</li><li>API token value is missing from the header</li><li>API token doesn't have permission. For more information about token types and permissions, see [Manage API tokens](https://docs.influxdata.com/influxdb/latest/security/tokens/)</li></ul> |
  138. | `404` | Not found | Requested resource was not found. `message` in the response body provides details about the requested resource. |
  139. | `413` | Request entity too large | Request payload exceeds the size limit. |
  140. | `422` | Unprocessable entity | Request data is invalid. `code` and `message` in the response body provide details about the problem. |
  141. | `429` | Too many requests | API token is temporarily over the request quota. The `Retry-After` header describes when to try the request again. |
  142. | `500` | Internal server error | |
  143. | `503` | Service unavailable | Server is temporarily unavailable to process the request. The `Retry-After` header describes when to try the request again. |
  144. x-tagGroups:
  145. - name: Overview
  146. tags:
  147. - Quick start
  148. - Authentication
  149. - Headers
  150. - Response codes
  151. - name: Popular endpoints
  152. tags:
  153. - Data I/O endpoints
  154. - Security and access endpoints
  155. - System information endpoints
  156. - name: All endpoints
  157. tags: []
  158. paths:
  159. /signin:
  160. post:
  161. operationId: PostSignin
  162. summary: Create a user session.
  163. description: 'Authenticates ***Basic Auth*** credentials for a user. If successful, creates a new UI session for the user.'
  164. tags:
  165. - Signin
  166. security:
  167. - BasicAuthentication: []
  168. parameters:
  169. - $ref: '#/components/parameters/TraceSpan'
  170. responses:
  171. '204':
  172. description: Success. User authenticated.
  173. '401':
  174. description: Unauthorized access.
  175. content:
  176. application/json:
  177. schema:
  178. $ref: '#/components/schemas/Error'
  179. '403':
  180. description: User account is disabled.
  181. content:
  182. application/json:
  183. schema:
  184. $ref: '#/components/schemas/Error'
  185. default:
  186. description: Unsuccessful authentication.
  187. content:
  188. application/json:
  189. schema:
  190. $ref: '#/components/schemas/Error'
  191. /signout:
  192. post:
  193. operationId: PostSignout
  194. summary: Expire the current UI session
  195. tags:
  196. - Signout
  197. description: Expires the current UI session for the user.
  198. parameters:
  199. - $ref: '#/components/parameters/TraceSpan'
  200. responses:
  201. '204':
  202. description: Session successfully expired
  203. '401':
  204. description: Unauthorized access
  205. content:
  206. application/json:
  207. schema:
  208. $ref: '#/components/schemas/Error'
  209. default:
  210. description: Unsuccessful session expiry
  211. content:
  212. application/json:
  213. schema:
  214. $ref: '#/components/schemas/Error'
  215. /ping:
  216. get:
  217. operationId: GetPing
  218. summary: Get the status and version of the instance
  219. description: Returns the status and InfluxDB version of the instance.
  220. servers:
  221. - url: ''
  222. tags:
  223. - Ping
  224. - System information endpoints
  225. responses:
  226. '204':
  227. description: |
  228. OK.
  229. Headers contain InfluxDB version information.
  230. headers:
  231. X-Influxdb-Build:
  232. schema:
  233. type: string
  234. description: The type of InfluxDB build.
  235. X-Influxdb-Version:
  236. schema:
  237. type: integer
  238. description: The version of InfluxDB.
  239. head:
  240. operationId: HeadPing
  241. summary: Get the status and version of the instance
  242. description: Returns the status and InfluxDB version of the instance.
  243. servers:
  244. - url: ''
  245. tags:
  246. - Ping
  247. responses:
  248. '204':
  249. description: |
  250. OK.
  251. Headers contain InfluxDB version information.
  252. headers:
  253. X-Influxdb-Build:
  254. schema:
  255. type: string
  256. description: The type of InfluxDB build.
  257. X-Influxdb-Version:
  258. schema:
  259. type: integer
  260. description: The version of InfluxDB.
  261. /:
  262. get:
  263. operationId: GetRoutes
  264. summary: List all top level routes
  265. tags:
  266. - Routes
  267. - System information endpoints
  268. parameters:
  269. - $ref: '#/components/parameters/TraceSpan'
  270. responses:
  271. default:
  272. description: All routes
  273. content:
  274. application/json:
  275. schema:
  276. $ref: '#/components/schemas/Routes'
  277. /dbrps:
  278. get:
  279. operationId: GetDBRPs
  280. tags:
  281. - DBRPs
  282. summary: List database retention policy mappings
  283. parameters:
  284. - $ref: '#/components/parameters/TraceSpan'
  285. - in: query
  286. name: orgID
  287. description: Specifies the organization ID to filter on
  288. schema:
  289. type: string
  290. - in: query
  291. name: org
  292. description: Specifies the organization name to filter on
  293. schema:
  294. type: string
  295. - in: query
  296. name: id
  297. description: Specifies the mapping ID to filter on
  298. schema:
  299. type: string
  300. - in: query
  301. name: bucketID
  302. description: Specifies the bucket ID to filter on
  303. schema:
  304. type: string
  305. - in: query
  306. name: default
  307. description: Specifies filtering on default
  308. schema:
  309. type: boolean
  310. - in: query
  311. name: db
  312. description: Specifies the database to filter on
  313. schema:
  314. type: string
  315. - in: query
  316. name: rp
  317. description: Specifies the retention policy to filter on
  318. schema:
  319. type: string
  320. responses:
  321. '200':
  322. description: Success. Returns a list of database retention policy mappings.
  323. content:
  324. application/json:
  325. schema:
  326. $ref: '#/components/schemas/DBRPs'
  327. '400':
  328. description: Bad request. The request has one or more invalid parameters.
  329. content:
  330. application/json:
  331. schema:
  332. $ref: '#/components/schemas/Error'
  333. default:
  334. description: Unexpected error
  335. content:
  336. application/json:
  337. schema:
  338. $ref: '#/components/schemas/Error'
  339. post:
  340. operationId: PostDBRP
  341. tags:
  342. - DBRPs
  343. summary: Add a database retention policy mapping
  344. parameters:
  345. - $ref: '#/components/parameters/TraceSpan'
  346. requestBody:
  347. description: The database retention policy mapping to add
  348. required: true
  349. content:
  350. application/json:
  351. schema:
  352. $ref: '#/components/schemas/DBRPCreate'
  353. responses:
  354. '201':
  355. description: Created. Returns the created database retention policy mapping.
  356. content:
  357. application/json:
  358. schema:
  359. $ref: '#/components/schemas/DBRP'
  360. '400':
  361. description: Bad request. The mapping in the request has one or more invalid IDs.
  362. content:
  363. application/json:
  364. schema:
  365. $ref: '#/components/schemas/Error'
  366. default:
  367. description: Unexpected error
  368. content:
  369. application/json:
  370. schema:
  371. $ref: '#/components/schemas/Error'
  372. '/dbrps/{dbrpID}':
  373. get:
  374. operationId: GetDBRPsID
  375. tags:
  376. - DBRPs
  377. summary: Retrieve a database retention policy mapping
  378. parameters:
  379. - $ref: '#/components/parameters/TraceSpan'
  380. - in: query
  381. name: orgID
  382. description: Specifies the organization ID of the mapping
  383. schema:
  384. type: string
  385. - in: query
  386. name: org
  387. description: Specifies the organization name of the mapping
  388. schema:
  389. type: string
  390. - in: path
  391. name: dbrpID
  392. schema:
  393. type: string
  394. required: true
  395. description: The database retention policy mapping ID
  396. responses:
  397. '200':
  398. description: The database retention policy requested
  399. content:
  400. application/json:
  401. schema:
  402. $ref: '#/components/schemas/DBRPGet'
  403. '400':
  404. description: if any of the IDs passed is invalid
  405. content:
  406. application/json:
  407. schema:
  408. $ref: '#/components/schemas/Error'
  409. default:
  410. description: Unexpected error
  411. content:
  412. application/json:
  413. schema:
  414. $ref: '#/components/schemas/Error'
  415. patch:
  416. operationId: PatchDBRPID
  417. tags:
  418. - DBRPs
  419. summary: Update a database retention policy mapping
  420. requestBody:
  421. description: Database retention policy update to apply
  422. required: true
  423. content:
  424. application/json:
  425. schema:
  426. $ref: '#/components/schemas/DBRPUpdate'
  427. parameters:
  428. - $ref: '#/components/parameters/TraceSpan'
  429. - in: query
  430. name: orgID
  431. description: Specifies the organization ID of the mapping
  432. schema:
  433. type: string
  434. - in: query
  435. name: org
  436. description: Specifies the organization name of the mapping
  437. schema:
  438. type: string
  439. - in: path
  440. name: dbrpID
  441. schema:
  442. type: string
  443. required: true
  444. description: The database retention policy mapping.
  445. responses:
  446. '200':
  447. description: An updated mapping
  448. content:
  449. application/json:
  450. schema:
  451. $ref: '#/components/schemas/DBRPGet'
  452. '400':
  453. description: if any of the IDs passed is invalid
  454. content:
  455. application/json:
  456. schema:
  457. $ref: '#/components/schemas/Error'
  458. '404':
  459. description: The mapping was not found
  460. content:
  461. application/json:
  462. schema:
  463. $ref: '#/components/schemas/Error'
  464. default:
  465. description: Unexpected error
  466. content:
  467. application/json:
  468. schema:
  469. $ref: '#/components/schemas/Error'
  470. delete:
  471. operationId: DeleteDBRPID
  472. tags:
  473. - DBRPs
  474. summary: Delete a database retention policy
  475. parameters:
  476. - $ref: '#/components/parameters/TraceSpan'
  477. - in: query
  478. name: orgID
  479. description: Specifies the organization ID of the mapping
  480. schema:
  481. type: string
  482. - in: query
  483. name: org
  484. description: Specifies the organization name of the mapping
  485. schema:
  486. type: string
  487. - in: path
  488. name: dbrpID
  489. schema:
  490. type: string
  491. required: true
  492. description: The database retention policy mapping
  493. responses:
  494. '204':
  495. description: Delete has been accepted
  496. '400':
  497. description: if any of the IDs passed is invalid
  498. content:
  499. application/json:
  500. schema:
  501. $ref: '#/components/schemas/Error'
  502. default:
  503. description: Unexpected error
  504. content:
  505. application/json:
  506. schema:
  507. $ref: '#/components/schemas/Error'
  508. /telegraf/plugins:
  509. get:
  510. operationId: GetTelegrafPlugins
  511. tags:
  512. - Telegraf Plugins
  513. summary: List all Telegraf plugins
  514. parameters:
  515. - $ref: '#/components/parameters/TraceSpan'
  516. - in: query
  517. name: type
  518. description: The type of plugin desired.
  519. schema:
  520. type: string
  521. responses:
  522. '200':
  523. description: A list of Telegraf plugins.
  524. content:
  525. application/json:
  526. schema:
  527. $ref: '#/components/schemas/TelegrafPlugins'
  528. default:
  529. description: Unexpected error
  530. content:
  531. application/json:
  532. schema:
  533. $ref: '#/components/schemas/Error'
  534. /telegrafs:
  535. get:
  536. operationId: GetTelegrafs
  537. tags:
  538. - Telegrafs
  539. summary: List all Telegraf configurations
  540. parameters:
  541. - $ref: '#/components/parameters/TraceSpan'
  542. - in: query
  543. name: orgID
  544. description: The organization ID the Telegraf config belongs to.
  545. schema:
  546. type: string
  547. responses:
  548. '200':
  549. description: A list of Telegraf configurations
  550. content:
  551. application/json:
  552. schema:
  553. $ref: '#/components/schemas/Telegrafs'
  554. default:
  555. description: Unexpected error
  556. content:
  557. application/json:
  558. schema:
  559. $ref: '#/components/schemas/Error'
  560. post:
  561. operationId: PostTelegrafs
  562. tags:
  563. - Telegrafs
  564. summary: Create a Telegraf configuration
  565. parameters:
  566. - $ref: '#/components/parameters/TraceSpan'
  567. requestBody:
  568. description: Telegraf configuration to create
  569. required: true
  570. content:
  571. application/json:
  572. schema:
  573. $ref: '#/components/schemas/TelegrafPluginRequest'
  574. responses:
  575. '201':
  576. description: Telegraf configuration created
  577. content:
  578. application/json:
  579. schema:
  580. $ref: '#/components/schemas/Telegraf'
  581. default:
  582. description: Unexpected error
  583. content:
  584. application/json:
  585. schema:
  586. $ref: '#/components/schemas/Error'
  587. '/telegrafs/{telegrafID}':
  588. get:
  589. operationId: GetTelegrafsID
  590. tags:
  591. - Telegrafs
  592. summary: Retrieve a Telegraf configuration
  593. parameters:
  594. - $ref: '#/components/parameters/TraceSpan'
  595. - in: path
  596. name: telegrafID
  597. schema:
  598. type: string
  599. required: true
  600. description: The Telegraf configuration ID.
  601. - in: header
  602. name: Accept
  603. required: false
  604. schema:
  605. type: string
  606. default: application/toml
  607. enum:
  608. - application/toml
  609. - application/json
  610. - application/octet-stream
  611. responses:
  612. '200':
  613. description: Telegraf configuration details
  614. content:
  615. application/toml:
  616. example: |-
  617. [agent]
  618. interval = "10s"
  619. schema:
  620. type: string
  621. application/json:
  622. schema:
  623. $ref: '#/components/schemas/Telegraf'
  624. application/octet-stream:
  625. example: |-
  626. [agent]
  627. interval = "10s"
  628. schema:
  629. type: string
  630. default:
  631. description: Unexpected error
  632. content:
  633. application/json:
  634. schema:
  635. $ref: '#/components/schemas/Error'
  636. put:
  637. operationId: PutTelegrafsID
  638. tags:
  639. - Telegrafs
  640. summary: Update a Telegraf configuration
  641. parameters:
  642. - $ref: '#/components/parameters/TraceSpan'
  643. - in: path
  644. name: telegrafID
  645. schema:
  646. type: string
  647. required: true
  648. description: The Telegraf config ID.
  649. requestBody:
  650. description: Telegraf configuration update to apply
  651. required: true
  652. content:
  653. application/json:
  654. schema:
  655. $ref: '#/components/schemas/TelegrafPluginRequest'
  656. responses:
  657. '200':
  658. description: An updated Telegraf configurations
  659. content:
  660. application/json:
  661. schema:
  662. $ref: '#/components/schemas/Telegraf'
  663. default:
  664. description: Unexpected error
  665. content:
  666. application/json:
  667. schema:
  668. $ref: '#/components/schemas/Error'
  669. delete:
  670. operationId: DeleteTelegrafsID
  671. tags:
  672. - Telegrafs
  673. summary: Delete a Telegraf configuration
  674. parameters:
  675. - $ref: '#/components/parameters/TraceSpan'
  676. - in: path
  677. name: telegrafID
  678. schema:
  679. type: string
  680. required: true
  681. description: The Telegraf configuration ID.
  682. responses:
  683. '204':
  684. description: Delete has been accepted
  685. default:
  686. description: Unexpected error
  687. content:
  688. application/json:
  689. schema:
  690. $ref: '#/components/schemas/Error'
  691. '/telegrafs/{telegrafID}/labels':
  692. get:
  693. operationId: GetTelegrafsIDLabels
  694. tags:
  695. - Telegrafs
  696. summary: List all labels for a Telegraf config
  697. parameters:
  698. - $ref: '#/components/parameters/TraceSpan'
  699. - in: path
  700. name: telegrafID
  701. schema:
  702. type: string
  703. required: true
  704. description: The Telegraf config ID.
  705. responses:
  706. '200':
  707. description: A list of all labels for a Telegraf config
  708. content:
  709. application/json:
  710. schema:
  711. $ref: '#/components/schemas/LabelsResponse'
  712. default:
  713. description: Unexpected error
  714. content:
  715. application/json:
  716. schema:
  717. $ref: '#/components/schemas/Error'
  718. post:
  719. operationId: PostTelegrafsIDLabels
  720. tags:
  721. - Telegrafs
  722. summary: Add a label to a Telegraf config
  723. parameters:
  724. - $ref: '#/components/parameters/TraceSpan'
  725. - in: path
  726. name: telegrafID
  727. schema:
  728. type: string
  729. required: true
  730. description: The Telegraf config ID.
  731. requestBody:
  732. description: Label to add
  733. required: true
  734. content:
  735. application/json:
  736. schema:
  737. $ref: '#/components/schemas/LabelMapping'
  738. responses:
  739. '201':
  740. description: The label added to the Telegraf config
  741. content:
  742. application/json:
  743. schema:
  744. $ref: '#/components/schemas/LabelResponse'
  745. default:
  746. description: Unexpected error
  747. content:
  748. application/json:
  749. schema:
  750. $ref: '#/components/schemas/Error'
  751. '/telegrafs/{telegrafID}/labels/{labelID}':
  752. delete:
  753. operationId: DeleteTelegrafsIDLabelsID
  754. tags:
  755. - Telegrafs
  756. summary: Delete a label from a Telegraf config
  757. parameters:
  758. - $ref: '#/components/parameters/TraceSpan'
  759. - in: path
  760. name: telegrafID
  761. schema:
  762. type: string
  763. required: true
  764. description: The Telegraf config ID.
  765. - in: path
  766. name: labelID
  767. schema:
  768. type: string
  769. required: true
  770. description: The label ID.
  771. responses:
  772. '204':
  773. description: Delete has been accepted
  774. '404':
  775. description: Telegraf config not found
  776. content:
  777. application/json:
  778. schema:
  779. $ref: '#/components/schemas/Error'
  780. default:
  781. description: Unexpected error
  782. content:
  783. application/json:
  784. schema:
  785. $ref: '#/components/schemas/Error'
  786. '/telegrafs/{telegrafID}/members':
  787. get:
  788. operationId: GetTelegrafsIDMembers
  789. tags:
  790. - Telegrafs
  791. summary: List all users with member privileges for a Telegraf config
  792. parameters:
  793. - $ref: '#/components/parameters/TraceSpan'
  794. - in: path
  795. name: telegrafID
  796. schema:
  797. type: string
  798. required: true
  799. description: The Telegraf config ID.
  800. responses:
  801. '200':
  802. description: A list of Telegraf config members
  803. content:
  804. application/json:
  805. schema:
  806. $ref: '#/components/schemas/ResourceMembers'
  807. default:
  808. description: Unexpected error
  809. content:
  810. application/json:
  811. schema:
  812. $ref: '#/components/schemas/Error'
  813. post:
  814. operationId: PostTelegrafsIDMembers
  815. tags:
  816. - Telegrafs
  817. summary: Add a member to a Telegraf config
  818. parameters:
  819. - $ref: '#/components/parameters/TraceSpan'
  820. - in: path
  821. name: telegrafID
  822. schema:
  823. type: string
  824. required: true
  825. description: The Telegraf config ID.
  826. requestBody:
  827. description: User to add as member
  828. required: true
  829. content:
  830. application/json:
  831. schema:
  832. $ref: '#/components/schemas/AddResourceMemberRequestBody'
  833. responses:
  834. '201':
  835. description: Member added to Telegraf config
  836. content:
  837. application/json:
  838. schema:
  839. $ref: '#/components/schemas/ResourceMember'
  840. default:
  841. description: Unexpected error
  842. content:
  843. application/json:
  844. schema:
  845. $ref: '#/components/schemas/Error'
  846. '/telegrafs/{telegrafID}/members/{userID}':
  847. delete:
  848. operationId: DeleteTelegrafsIDMembersID
  849. tags:
  850. - Telegrafs
  851. summary: Remove a member from a Telegraf config
  852. parameters:
  853. - $ref: '#/components/parameters/TraceSpan'
  854. - in: path
  855. name: userID
  856. schema:
  857. type: string
  858. required: true
  859. description: The ID of the member to remove.
  860. - in: path
  861. name: telegrafID
  862. schema:
  863. type: string
  864. required: true
  865. description: The Telegraf config ID.
  866. responses:
  867. '204':
  868. description: Member removed
  869. default:
  870. description: Unexpected error
  871. content:
  872. application/json:
  873. schema:
  874. $ref: '#/components/schemas/Error'
  875. '/telegrafs/{telegrafID}/owners':
  876. get:
  877. operationId: GetTelegrafsIDOwners
  878. tags:
  879. - Telegrafs
  880. summary: List all owners of a Telegraf configuration
  881. parameters:
  882. - $ref: '#/components/parameters/TraceSpan'
  883. - in: path
  884. name: telegrafID
  885. schema:
  886. type: string
  887. required: true
  888. description: The Telegraf configuration ID.
  889. responses:
  890. '200':
  891. description: Returns Telegraf configuration owners as a ResourceOwners list
  892. content:
  893. application/json:
  894. schema:
  895. $ref: '#/components/schemas/ResourceOwners'
  896. default:
  897. description: Unexpected error
  898. content:
  899. application/json:
  900. schema:
  901. $ref: '#/components/schemas/Error'
  902. post:
  903. operationId: PostTelegrafsIDOwners
  904. tags:
  905. - Telegrafs
  906. summary: Add an owner to a Telegraf configuration
  907. parameters:
  908. - $ref: '#/components/parameters/TraceSpan'
  909. - in: path
  910. name: telegrafID
  911. schema:
  912. type: string
  913. required: true
  914. description: The Telegraf configuration ID.
  915. requestBody:
  916. description: User to add as owner
  917. required: true
  918. content:
  919. application/json:
  920. schema:
  921. $ref: '#/components/schemas/AddResourceMemberRequestBody'
  922. responses:
  923. '201':
  924. description: Telegraf configuration owner was added. Returns a ResourceOwner that references the User.
  925. content:
  926. application/json:
  927. schema:
  928. $ref: '#/components/schemas/ResourceOwner'
  929. default:
  930. description: Unexpected error
  931. content:
  932. application/json:
  933. schema:
  934. $ref: '#/components/schemas/Error'
  935. '/telegrafs/{telegrafID}/owners/{userID}':
  936. delete:
  937. operationId: DeleteTelegrafsIDOwnersID
  938. tags:
  939. - Telegrafs
  940. summary: Remove an owner from a Telegraf config
  941. parameters:
  942. - $ref: '#/components/parameters/TraceSpan'
  943. - in: path
  944. name: userID
  945. schema:
  946. type: string
  947. required: true
  948. description: The ID of the owner to remove.
  949. - in: path
  950. name: telegrafID
  951. schema:
  952. type: string
  953. required: true
  954. description: The Telegraf config ID.
  955. responses:
  956. '204':
  957. description: Owner removed
  958. default:
  959. description: Unexpected error
  960. content:
  961. application/json:
  962. schema:
  963. $ref: '#/components/schemas/Error'
  964. '/variables/{variableID}/labels':
  965. get:
  966. operationId: GetVariablesIDLabels
  967. tags:
  968. - Variables
  969. summary: List all labels for a variable
  970. parameters:
  971. - $ref: '#/components/parameters/TraceSpan'
  972. - in: path
  973. name: variableID
  974. schema:
  975. type: string
  976. required: true
  977. description: The variable ID.
  978. responses:
  979. '200':
  980. description: A list of all labels for a variable
  981. content:
  982. application/json:
  983. schema:
  984. $ref: '#/components/schemas/LabelsResponse'
  985. default:
  986. description: Unexpected error
  987. content:
  988. application/json:
  989. schema:
  990. $ref: '#/components/schemas/Error'
  991. post:
  992. operationId: PostVariablesIDLabels
  993. tags:
  994. - Variables
  995. summary: Add a label to a variable
  996. parameters:
  997. - $ref: '#/components/parameters/TraceSpan'
  998. - in: path
  999. name: variableID
  1000. schema:
  1001. type: string
  1002. required: true
  1003. description: The variable ID.
  1004. requestBody:
  1005. description: Label to add
  1006. required: true
  1007. content:
  1008. application/json:
  1009. schema:
  1010. $ref: '#/components/schemas/LabelMapping'
  1011. responses:
  1012. '201':
  1013. description: The newly added label
  1014. content:
  1015. application/json:
  1016. schema:
  1017. $ref: '#/components/schemas/LabelResponse'
  1018. default:
  1019. description: Unexpected error
  1020. content:
  1021. application/json:
  1022. schema:
  1023. $ref: '#/components/schemas/Error'
  1024. '/variables/{variableID}/labels/{labelID}':
  1025. delete:
  1026. operationId: DeleteVariablesIDLabelsID
  1027. tags:
  1028. - Variables
  1029. summary: Delete a label from a variable
  1030. parameters:
  1031. - $ref: '#/components/parameters/TraceSpan'
  1032. - in: path
  1033. name: variableID
  1034. schema:
  1035. type: string
  1036. required: true
  1037. description: The variable ID.
  1038. - in: path
  1039. name: labelID
  1040. schema:
  1041. type: string
  1042. required: true
  1043. description: The label ID to delete.
  1044. responses:
  1045. '204':
  1046. description: Delete has been accepted
  1047. '404':
  1048. description: Variable not found
  1049. content:
  1050. application/json:
  1051. schema:
  1052. $ref: '#/components/schemas/Error'
  1053. default:
  1054. description: Unexpected error
  1055. content:
  1056. application/json:
  1057. schema:
  1058. $ref: '#/components/schemas/Error'
  1059. /write:
  1060. post:
  1061. operationId: PostWrite
  1062. tags:
  1063. - Data I/O endpoints
  1064. - Write
  1065. summary: Write data
  1066. description: |
  1067. Writes data to a bucket.
  1068. Use this endpoint to send data in [line protocol](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/line-protocol/) format to InfluxDB.
  1069. #### InfluxDB Cloud
  1070. - Takes the following steps when you send a write request:
  1071. 1. Validates the request and queues the write.
  1072. 2. If the write is queued, responds with an HTTP `204` status code.
  1073. 3. Handles the write asynchronously and reaches eventual consistency.
  1074. An HTTP `2xx` status code acknowledges that the write or delete is queued.
  1075. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them,
  1076. wait for a response before you send the next request.
  1077. Because writes are asynchronous, data might not yet be written
  1078. when you receive the response.
  1079. #### InfluxDB OSS
  1080. - Validates the request, handles the write synchronously,
  1081. and then responds with success or failure.
  1082. - If all points were written successfully, responds with HTTP `204` status code;
  1083. otherwise, returns the first line that failed.
  1084. #### Required permissions
  1085. - `write-buckets` or `write-bucket BUCKET_ID`.
  1086. `BUCKET_ID` is the ID of the destination bucket.
  1087. #### Rate limits (with InfluxDB Cloud)
  1088. `write` rate limits apply.
  1089. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/).
  1090. #### Related guides
  1091. - [Write data with the InfluxDB API](https://docs.influxdata.com/influxdb/v2.3/write-data/developer-tools/api).
  1092. - [Optimize writes to InfluxDB](https://docs.influxdata.com/influxdb/v2.3/write-data/best-practices/optimize-writes/).
  1093. - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/v2.3/write-data/troubleshoot/)
  1094. requestBody:
  1095. description: |
  1096. Data in line protocol format.
  1097. To send compressed data, do the following:
  1098. 1. Use [GZIP](https://www.gzip.org/) to compress the line protocol data.
  1099. 2. In your request, send the compressed data and the
  1100. `Content-Encoding: gzip` header.
  1101. #### Related guides
  1102. - [Best practices for optimizing writes](https://docs.influxdata.com/influxdb/v2.3/write-data/best-practices/optimize-writes/).
  1103. required: true
  1104. content:
  1105. text/plain:
  1106. schema:
  1107. type: string
  1108. format: byte
  1109. examples:
  1110. plain-utf8:
  1111. value: |
  1112. airSensors,sensor_id=TLM0201 temperature=73.97038159354763,humidity=35.23103248356096,co=0.48445310567793615 1630424257000000000
  1113. airSensors,sensor_id=TLM0202 temperature=75.30007505999716,humidity=35.651929918691714,co=0.5141876544505826 1630424257000000000
  1114. parameters:
  1115. - $ref: '#/components/parameters/TraceSpan'
  1116. - in: header
  1117. name: Content-Encoding
  1118. description: |
  1119. The compression applied to the line protocol in the request payload.
  1120. To send a GZIP payload, pass `Content-Encoding: gzip` header.
  1121. schema:
  1122. type: string
  1123. description: |
  1124. Content coding.
  1125. Use `gzip` for compressed data or `identity` for unmodified, uncompressed data.
  1126. default: identity
  1127. enum:
  1128. - gzip
  1129. - identity
  1130. - in: header
  1131. name: Content-Type
  1132. description: |
  1133. The format of the data in the request body.
  1134. To send a line protocol payload, pass `Content-Type: text/plain; charset=utf-8`.
  1135. schema:
  1136. type: string
  1137. description: |
  1138. `text/plain` is the content type for line protocol. `UTF-8` is the default character set.
  1139. default: text/plain; charset=utf-8
  1140. enum:
  1141. - text/plain
  1142. - text/plain; charset=utf-8
  1143. - in: header
  1144. name: Content-Length
  1145. description: |
  1146. The size of the entity-body, in bytes, sent to InfluxDB.
  1147. If the length is greater than the `max body` configuration option,
  1148. the server responds with status code `413`.
  1149. schema:
  1150. type: integer
  1151. description: The length in decimal number of octets.
  1152. - in: header
  1153. name: Accept
  1154. description: |
  1155. The content type that the client can understand.
  1156. Writes only return a response body if they fail--for example,
  1157. due to a formatting problem or quota limit.
  1158. #### InfluxDB Cloud
  1159. - Returns only `application/json` for format and limit errors.
  1160. - Returns only `text/html` for some quota limit errors.
  1161. #### InfluxDB OSS
  1162. - Returns only `application/json` for format and limit errors.
  1163. #### Related guides
  1164. - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/v2.3/write-data/troubleshoot/).
  1165. schema:
  1166. type: string
  1167. description: Error content type.
  1168. default: application/json
  1169. enum:
  1170. - application/json
  1171. - in: query
  1172. name: org
  1173. description: |
  1174. The destination organization for writes.
  1175. InfluxDB writes all points in the batch to this organization.
  1176. If you pass both `orgID` and `org`, they must both be valid.
  1177. #### InfluxDB Cloud
  1178. - Doesn't require `org` or `orgID`.
  1179. - Writes to the bucket in the organization associated with the authorization (API token).
  1180. #### InfluxDB OSS
  1181. - Requires either `org` or `orgID`.
  1182. - InfluxDB writes all points in the batch to this organization.
  1183. required: true
  1184. schema:
  1185. type: string
  1186. description: The organization name or ID.
  1187. - in: query
  1188. name: orgID
  1189. description: |
  1190. The ID of the destination organization for writes.
  1191. If you pass both `orgID` and `org`, they must both be valid.
  1192. #### InfluxDB Cloud
  1193. - Doesn't require `org` or `orgID`.
  1194. - Writes to the bucket in the organization associated with the authorization (API token).
  1195. #### InfluxDB OSS
  1196. - Requires either `org` or `orgID`.
  1197. - InfluxDB writes all points in the batch to this organization.
  1198. schema:
  1199. type: string
  1200. - in: query
  1201. name: bucket
  1202. description: |
  1203. The destination bucket for writes.
  1204. InfluxDB writes all points in the batch to this bucket.
  1205. required: true
  1206. schema:
  1207. type: string
  1208. description: The bucket name or ID.
  1209. - in: query
  1210. name: precision
  1211. description: The precision for unix timestamps in the line protocol batch.
  1212. schema:
  1213. $ref: '#/components/schemas/WritePrecision'
  1214. responses:
  1215. '204':
  1216. description: |
  1217. Success.
  1218. #### InfluxDB Cloud
  1219. - Validated and queued the request.
  1220. - Handles the write asynchronously - the write might not have completed yet.
  1221. #### InfluxDB OSS
  1222. - Successfully wrote all points in the batch.
  1223. #### Related guides
  1224. - [How to check for write errors](https://docs.influxdata.com/influxdb/v2.3/write-data/troubleshoot/).
  1225. '400':
  1226. description: |
  1227. Bad request. The response body contains detail about the error.
  1228. InfluxDB returns this error if the line protocol data in the request is malformed.
  1229. The response body contains the first malformed line in the data, and indicates what was expected.
  1230. For partial writes, the number of points written and the number of points rejected are also included.
  1231. For more information, check the `rejected_points` measurement in your `_monitoring` bucket.
  1232. #### InfluxDB Cloud
  1233. - Returns this error for bucket schema conflicts.
  1234. #### InfluxDB OSS
  1235. - Returns this error if `org` or `orgID` doesn't match an organization.
  1236. content:
  1237. application/json:
  1238. schema:
  1239. $ref: '#/components/schemas/LineProtocolError'
  1240. examples:
  1241. measurementSchemaFieldTypeConflict:
  1242. summary: (Cloud) field type conflict thrown by an explicit bucket schema
  1243. value:
  1244. code: invalid
  1245. message: 'partial write error (2 written): unable to parse ''air_sensor,service=S1,sensor=L1 temperature="90.5",humidity=70.0 1632850122'': schema: field type for field "temperature" not permitted by schema; got String but expected Float'
  1246. orgNotFound:
  1247. summary: (OSS) organization not found
  1248. value:
  1249. code: invalid
  1250. message: 'failed to decode request body: organization not found'
  1251. '401':
  1252. $ref: '#/components/responses/AuthorizationError'
  1253. '404':
  1254. $ref: '#/components/responses/ResourceNotFoundError'
  1255. '413':
  1256. description: |
  1257. The request payload is too large.
  1258. InfluxDB rejected the batch and did not write any data.
  1259. #### InfluxDB Cloud:
  1260. - Returns this error if the payload exceeds the 50MB size limit.
  1261. - Returns `Content-Type: text/html` for this error.
  1262. #### InfluxDB OSS:
  1263. - Returns this error only if the [Go (golang) `ioutil.ReadAll()`](https://pkg.go.dev/io/ioutil#ReadAll) function raises an error.
  1264. - Returns `Content-Type: application/json` for this error.
  1265. content:
  1266. application/json:
  1267. schema:
  1268. $ref: '#/components/schemas/LineProtocolLengthError'
  1269. examples:
  1270. dataExceedsSizeLimitOSS:
  1271. summary: InfluxDB OSS response
  1272. value: |
  1273. {"code":"request too large","message":"unable to read data: points batch is too large"}
  1274. text/html:
  1275. schema:
  1276. type: string
  1277. examples:
  1278. dataExceedsSizeLimit:
  1279. summary: InfluxDB Cloud response
  1280. value: |
  1281. <html>
  1282. <head><title>413 Request Entity Too Large</title></head>
  1283. <body>
  1284. <center><h1>413 Request Entity Too Large</h1></center>
  1285. <hr>
  1286. <center>nginx</center>
  1287. </body>
  1288. </html>
  1289. '429':
  1290. description: |
  1291. Too many requests.
  1292. #### InfluxDB Cloud
  1293. - Returns this error if a **read** or **write** request exceeds your plan's [adjustable service quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/#adjustable-service-quotas)
  1294. or if a **delete** request exceeds the maximum [global limit](https://docs.influxdata.com/influxdb/cloud/account-management/limits/#global-limits).
  1295. - For rate limits that reset automatically, returns a `Retry-After` header that describes when to try the write again.
  1296. - For limits that can't reset (for example, **cardinality limit**), doesn't return a `Retry-After` header.
  1297. Rates (data-in (writes), queries (reads), and deletes) accrue within a fixed five-minute window.
  1298. Once a rate limit is exceeded, InfluxDB returns an error response until the current five-minute window resets.
  1299. #### InfluxDB OSS
  1300. - Doesn't return this error.
  1301. headers:
  1302. Retry-After:
  1303. description: Non-negative decimal integer indicating seconds to wait before retrying the request.
  1304. schema:
  1305. type: integer
  1306. format: int32
  1307. '500':
  1308. $ref: '#/components/responses/InternalServerError'
  1309. '503':
  1310. description: |
  1311. Service unavailable.
  1312. - Returns this error if
  1313. the server is temporarily unavailable to accept writes.
  1314. - Returns a `Retry-After` header that describes when to try the write again.
  1315. headers:
  1316. Retry-After:
  1317. description: Non-negative decimal integer indicating seconds to wait before retrying the request.
  1318. schema:
  1319. type: integer
  1320. format: int32
  1321. default:
  1322. $ref: '#/components/responses/GeneralServerError'
  1323. /delete:
  1324. post:
  1325. operationId: PostDelete
  1326. tags:
  1327. - Data I/O endpoints
  1328. - Delete
  1329. summary: Delete data
  1330. description: |
  1331. Deletes data from a bucket.
  1332. Use this endpoint to delete points from a bucket in a specified time range.
  1333. #### InfluxDB Cloud
  1334. - Does the following when you send a delete request:
  1335. 1. Validates the request and queues the delete.
  1336. 2. Returns _success_ if queued; _error_ otherwise.
  1337. 3. Handles the delete asynchronously.
  1338. #### InfluxDB OSS
  1339. - Validates the request, handles the delete synchronously,
  1340. and then responds with success or failure.
  1341. #### Required permissions
  1342. - `write-buckets` or `write-bucket BUCKET_ID`.
  1343. `BUCKET_ID` is the ID of the destination bucket.
  1344. #### Rate limits (with InfluxDB Cloud)
  1345. `write` rate limits apply.
  1346. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/).
  1347. #### Related guides
  1348. - [Delete data](https://docs.influxdata.com/influxdb/v2.3/write-data/delete-data/).
  1349. - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/delete-predicate/).
  1350. - Learn how InfluxDB handles [deleted tags](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys/)
  1351. and [deleted fields](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys/).
  1352. x-codeSamples:
  1353. - lang: Shell
  1354. label: cURL
  1355. source: |
  1356. curl --request POST INFLUX_URL/api/v2/delete?org=INFLUX_ORG&bucket=INFLUX_BUCKET \
  1357. --header 'Authorization: Token INFLUX_API_TOKEN' \
  1358. --header 'Content-Type: application/json' \
  1359. --data '{
  1360. "start": "2020-03-01T00:00:00Z",
  1361. "stop": "2020-11-14T00:00:00Z",
  1362. "predicate": "tag1=\"value1\" and (tag2=\"value2\" and tag3!=\"value3\")"
  1363. }'
  1364. requestBody:
  1365. description: |
  1366. Time range parameters and an optional **delete predicate expression**.
  1367. To select points to delete within the specified time range, pass a
  1368. **delete predicate expression** in the `predicate` property of the request body.
  1369. If you don't pass a `predicate`, InfluxDB deletes all data with timestamps
  1370. in the specified time range.
  1371. #### Related guides
  1372. - [Delete data](https://docs.influxdata.com/influxdb/v2.3/write-data/delete-data/).
  1373. - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/delete-predicate/).
  1374. required: true
  1375. content:
  1376. application/json:
  1377. schema:
  1378. $ref: '#/components/schemas/DeletePredicateRequest'
  1379. parameters:
  1380. - $ref: '#/components/parameters/TraceSpan'
  1381. - in: query
  1382. name: org
  1383. description: |
  1384. The organization to delete data from.
  1385. If you pass both `orgID` and `org`, they must both be valid.
  1386. #### InfluxDB Cloud
  1387. - Doesn't require `org` or `orgID`.
  1388. - Deletes data from the bucket in the organization associated with the authorization (API token).
  1389. #### InfluxDB OSS
  1390. - Requires either `org` or `orgID`.
  1391. schema:
  1392. type: string
  1393. description: The organization name or ID.
  1394. - in: query
  1395. name: bucket
  1396. description: |
  1397. The name or ID of the bucket to delete data from.
  1398. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence.
  1399. schema:
  1400. type: string
  1401. description: The bucket name or ID.
  1402. - in: query
  1403. name: orgID
  1404. description: |
  1405. The ID of the organization to delete data from.
  1406. If you pass both `orgID` and `org`, they must both be valid.
  1407. #### InfluxDB Cloud
  1408. - Doesn't require `org` or `orgID`.
  1409. - Deletes data from the bucket in the organization associated with the authorization (API token).
  1410. #### InfluxDB OSS
  1411. - Requires either `org` or `orgID`.
  1412. schema:
  1413. type: string
  1414. description: The organization ID.
  1415. - in: query
  1416. name: bucketID
  1417. description: |
  1418. The ID of the bucket to delete data from.
  1419. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence.
  1420. schema:
  1421. type: string
  1422. description: The bucket ID.
  1423. responses:
  1424. '204':
  1425. description: |
  1426. Success.
  1427. #### InfluxDB Cloud
  1428. - Validated and queued the request.
  1429. - Handles the delete asynchronously - the deletion might not have completed yet.
  1430. An HTTP `2xx` status code acknowledges that the write or delete is queued.
  1431. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them,
  1432. wait for a response before you send the next request.
  1433. Because writes are asynchronous, data might not yet be written
  1434. when you receive the response.
  1435. #### InfluxDB OSS
  1436. - Deleted the data.
  1437. '400':
  1438. description: |
  1439. Bad request.
  1440. The response body contains detail about the error.
  1441. #### InfluxDB OSS
  1442. - Returns this error if `org` or `orgID` doesn't match an organization.
  1443. content:
  1444. application/json:
  1445. schema:
  1446. $ref: '#/components/schemas/Error'
  1447. examples:
  1448. orgNotFound:
  1449. summary: Organization not found
  1450. value:
  1451. code: invalid
  1452. message: 'failed to decode request body: organization not found'
  1453. '401':
  1454. $ref: '#/components/responses/AuthorizationError'
  1455. '404':
  1456. $ref: '#/components/responses/ResourceNotFoundError'
  1457. '500':
  1458. $ref: '#/components/responses/InternalServerError'
  1459. default:
  1460. $ref: '#/components/responses/GeneralServerError'
  1461. /labels:
  1462. post:
  1463. operationId: PostLabels
  1464. tags:
  1465. - Labels
  1466. summary: Create a label
  1467. requestBody:
  1468. description: The label to create.
  1469. required: true
  1470. content:
  1471. application/json:
  1472. schema:
  1473. $ref: '#/components/schemas/LabelCreateRequest'
  1474. responses:
  1475. '201':
  1476. description: Success. The label was created.
  1477. content:
  1478. application/json:
  1479. schema:
  1480. $ref: '#/components/schemas/LabelResponse'
  1481. '500':
  1482. $ref: '#/components/responses/InternalServerError'
  1483. default:
  1484. $ref: '#/components/responses/GeneralServerError'
  1485. get:
  1486. operationId: GetLabels
  1487. tags:
  1488. - Labels
  1489. summary: List all labels
  1490. parameters:
  1491. - $ref: '#/components/parameters/TraceSpan'
  1492. - in: query
  1493. name: orgID
  1494. description: The organization ID.
  1495. schema:
  1496. type: string
  1497. responses:
  1498. '200':
  1499. description: Success. The response body contains a list of labels.
  1500. content:
  1501. application/json:
  1502. schema:
  1503. $ref: '#/components/schemas/LabelsResponse'
  1504. '500':
  1505. $ref: '#/components/responses/InternalServerError'
  1506. default:
  1507. $ref: '#/components/responses/GeneralServerError'
  1508. '/labels/{labelID}':
  1509. get:
  1510. operationId: GetLabelsID
  1511. tags:
  1512. - Labels
  1513. summary: Retrieve a label
  1514. parameters:
  1515. - $ref: '#/components/parameters/TraceSpan'
  1516. - in: path
  1517. name: labelID
  1518. schema:
  1519. type: string
  1520. required: true
  1521. description: The ID of the label to update.
  1522. responses:
  1523. '200':
  1524. description: Success. The response body contains the label.
  1525. content:
  1526. application/json:
  1527. schema:
  1528. $ref: '#/components/schemas/LabelResponse'
  1529. '500':
  1530. $ref: '#/components/responses/InternalServerError'
  1531. default:
  1532. $ref: '#/components/responses/GeneralServerError'
  1533. patch:
  1534. operationId: PatchLabelsID
  1535. tags:
  1536. - Labels
  1537. summary: Update a label
  1538. requestBody:
  1539. description: A label update.
  1540. required: true
  1541. content:
  1542. application/json:
  1543. schema:
  1544. $ref: '#/components/schemas/LabelUpdate'
  1545. parameters:
  1546. - $ref: '#/components/parameters/TraceSpan'
  1547. - in: path
  1548. name: labelID
  1549. schema:
  1550. type: string
  1551. required: true
  1552. description: The ID of the label to update.
  1553. responses:
  1554. '200':
  1555. description: Success. The response body contains the updated label.
  1556. content:
  1557. application/json:
  1558. schema:
  1559. $ref: '#/components/schemas/LabelResponse'
  1560. '401':
  1561. $ref: '#/components/responses/AuthorizationError'
  1562. '404':
  1563. $ref: '#/components/responses/ResourceNotFoundError'
  1564. '500':
  1565. $ref: '#/components/responses/InternalServerError'
  1566. default:
  1567. $ref: '#/components/responses/GeneralServerError'
  1568. delete:
  1569. operationId: DeleteLabelsID
  1570. tags:
  1571. - Labels
  1572. summary: Delete a label
  1573. parameters:
  1574. - $ref: '#/components/parameters/TraceSpan'
  1575. - in: path
  1576. name: labelID
  1577. schema:
  1578. type: string
  1579. required: true
  1580. description: The ID of the label to delete.
  1581. responses:
  1582. '204':
  1583. description: Success. The delete was accepted.
  1584. '401':
  1585. $ref: '#/components/responses/AuthorizationError'
  1586. '404':
  1587. $ref: '#/components/responses/ResourceNotFoundError'
  1588. '500':
  1589. $ref: '#/components/responses/InternalServerError'
  1590. default:
  1591. $ref: '#/components/responses/GeneralServerError'
  1592. '/dashboards/{dashboardID}':
  1593. get:
  1594. operationId: GetDashboardsID
  1595. tags:
  1596. - Dashboards
  1597. summary: Retrieve a dashboard
  1598. parameters:
  1599. - $ref: '#/components/parameters/TraceSpan'
  1600. - in: path
  1601. name: dashboardID
  1602. schema:
  1603. type: string
  1604. required: true
  1605. description: The ID of the dashboard to update.
  1606. - in: query
  1607. name: include
  1608. required: false
  1609. schema:
  1610. type: string
  1611. enum:
  1612. - properties
  1613. description: 'If `properties`, includes the cell view properties in the response.'
  1614. responses:
  1615. '200':
  1616. description: Retrieve a single dashboard
  1617. content:
  1618. application/json:
  1619. schema:
  1620. oneOf:
  1621. - $ref: '#/components/schemas/Dashboard'
  1622. - $ref: '#/components/schemas/DashboardWithViewProperties'
  1623. '404':
  1624. description: Dashboard not found
  1625. content:
  1626. application/json:
  1627. schema:
  1628. $ref: '#/components/schemas/Error'
  1629. default:
  1630. description: Unexpected error
  1631. content:
  1632. application/json:
  1633. schema:
  1634. $ref: '#/components/schemas/Error'
  1635. patch:
  1636. operationId: PatchDashboardsID
  1637. tags:
  1638. - Dashboards
  1639. summary: Update a dashboard
  1640. requestBody:
  1641. description: Patching of a dashboard
  1642. required: true
  1643. content:
  1644. application/json:
  1645. schema:
  1646. type: object
  1647. title: PatchDashboardRequest
  1648. properties:
  1649. name:
  1650. description: 'optional, when provided will replace the name'
  1651. type: string
  1652. description:
  1653. description: 'optional, when provided will replace the description'
  1654. type: string
  1655. cells:
  1656. description: 'optional, when provided will replace all existing cells with the cells provided'
  1657. $ref: '#/components/schemas/CellWithViewProperties'
  1658. parameters:
  1659. - $ref: '#/components/parameters/TraceSpan'
  1660. - in: path
  1661. name: dashboardID
  1662. schema:
  1663. type: string
  1664. required: true
  1665. description: The ID of the dashboard to update.
  1666. responses:
  1667. '200':
  1668. description: Updated dashboard
  1669. content:
  1670. application/json:
  1671. schema:
  1672. $ref: '#/components/schemas/Dashboard'
  1673. '404':
  1674. description: Dashboard not found
  1675. content:
  1676. application/json:
  1677. schema:
  1678. $ref: '#/components/schemas/Error'
  1679. default:
  1680. description: Unexpected error
  1681. content:
  1682. application/json:
  1683. schema:
  1684. $ref: '#/components/schemas/Error'
  1685. delete:
  1686. operationId: DeleteDashboardsID
  1687. tags:
  1688. - Dashboards
  1689. summary: Delete a dashboard
  1690. parameters:
  1691. - $ref: '#/components/parameters/TraceSpan'
  1692. - in: path
  1693. name: dashboardID
  1694. schema:
  1695. type: string
  1696. required: true
  1697. description: The ID of the dashboard to update.
  1698. responses:
  1699. '204':
  1700. description: Delete has been accepted
  1701. '404':
  1702. description: Dashboard not found
  1703. content:
  1704. application/json:
  1705. schema:
  1706. $ref: '#/components/schemas/Error'
  1707. default:
  1708. description: Unexpected error
  1709. content:
  1710. application/json:
  1711. schema:
  1712. $ref: '#/components/schemas/Error'
  1713. '/dashboards/{dashboardID}/cells':
  1714. put:
  1715. operationId: PutDashboardsIDCells
  1716. tags:
  1717. - Cells
  1718. - Dashboards
  1719. summary: Replace cells in a dashboard
  1720. description: Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
  1721. requestBody:
  1722. required: true
  1723. content:
  1724. application/json:
  1725. schema:
  1726. $ref: '#/components/schemas/Cells'
  1727. parameters:
  1728. - $ref: '#/components/parameters/TraceSpan'
  1729. - in: path
  1730. name: dashboardID
  1731. schema:
  1732. type: string
  1733. required: true
  1734. description: The ID of the dashboard to update.
  1735. responses:
  1736. '201':
  1737. description: Replaced dashboard cells
  1738. content:
  1739. application/json:
  1740. schema:
  1741. $ref: '#/components/schemas/Dashboard'
  1742. '404':
  1743. description: Dashboard not found
  1744. content:
  1745. application/json:
  1746. schema:
  1747. $ref: '#/components/schemas/Error'
  1748. default:
  1749. description: Unexpected error
  1750. content:
  1751. application/json:
  1752. schema:
  1753. $ref: '#/components/schemas/Error'
  1754. post:
  1755. operationId: PostDashboardsIDCells
  1756. tags:
  1757. - Cells
  1758. - Dashboards
  1759. summary: Create a dashboard cell
  1760. requestBody:
  1761. description: Cell that will be added
  1762. required: true
  1763. content:
  1764. application/json:
  1765. schema:
  1766. $ref: '#/components/schemas/CreateCell'
  1767. parameters:
  1768. - $ref: '#/components/parameters/TraceSpan'
  1769. - in: path
  1770. name: dashboardID
  1771. schema:
  1772. type: string
  1773. required: true
  1774. description: The ID of the dashboard to update.
  1775. responses:
  1776. '201':
  1777. description: Cell successfully added
  1778. content:
  1779. application/json:
  1780. schema:
  1781. $ref: '#/components/schemas/Cell'
  1782. '404':
  1783. description: Dashboard not found
  1784. content:
  1785. application/json:
  1786. schema:
  1787. $ref: '#/components/schemas/Error'
  1788. default:
  1789. description: Unexpected error
  1790. content:
  1791. application/json:
  1792. schema:
  1793. $ref: '#/components/schemas/Error'
  1794. '/dashboards/{dashboardID}/cells/{cellID}':
  1795. patch:
  1796. operationId: PatchDashboardsIDCellsID
  1797. tags:
  1798. - Cells
  1799. - Dashboards
  1800. summary: Update the non-positional information related to a cell
  1801. description: Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
  1802. requestBody:
  1803. required: true
  1804. content:
  1805. application/json:
  1806. schema:
  1807. $ref: '#/components/schemas/CellUpdate'
  1808. parameters:
  1809. - $ref: '#/components/parameters/TraceSpan'
  1810. - in: path
  1811. name: dashboardID
  1812. schema:
  1813. type: string
  1814. required: true
  1815. description: The ID of the dashboard to update.
  1816. - in: path
  1817. name: cellID
  1818. schema:
  1819. type: string
  1820. required: true
  1821. description: The ID of the cell to update.
  1822. responses:
  1823. '200':
  1824. description: Updated dashboard cell
  1825. content:
  1826. application/json:
  1827. schema:
  1828. $ref: '#/components/schemas/Cell'
  1829. '404':
  1830. description: Cell or dashboard not found
  1831. content:
  1832. application/json:
  1833. schema:
  1834. $ref: '#/components/schemas/Error'
  1835. default:
  1836. description: Unexpected error
  1837. content:
  1838. application/json:
  1839. schema:
  1840. $ref: '#/components/schemas/Error'
  1841. delete:
  1842. operationId: DeleteDashboardsIDCellsID
  1843. tags:
  1844. - Cells
  1845. - Dashboards
  1846. summary: Delete a dashboard cell
  1847. parameters:
  1848. - $ref: '#/components/parameters/TraceSpan'
  1849. - in: path
  1850. name: dashboardID
  1851. schema:
  1852. type: string
  1853. required: true
  1854. description: The ID of the dashboard to delete.
  1855. - in: path
  1856. name: cellID
  1857. schema:
  1858. type: string
  1859. required: true
  1860. description: The ID of the cell to delete.
  1861. responses:
  1862. '204':
  1863. description: Cell successfully deleted
  1864. '404':
  1865. description: Cell or dashboard not found
  1866. content:
  1867. application/json:
  1868. schema:
  1869. $ref: '#/components/schemas/Error'
  1870. default:
  1871. description: Unexpected error
  1872. content:
  1873. application/json:
  1874. schema:
  1875. $ref: '#/components/schemas/Error'
  1876. '/dashboards/{dashboardID}/cells/{cellID}/view':
  1877. get:
  1878. operationId: GetDashboardsIDCellsIDView
  1879. tags:
  1880. - Cells
  1881. - Dashboards
  1882. - Views
  1883. summary: Retrieve the view for a cell
  1884. parameters:
  1885. - $ref: '#/components/parameters/TraceSpan'
  1886. - in: path
  1887. name: dashboardID
  1888. schema:
  1889. type: string
  1890. required: true
  1891. description: The dashboard ID.
  1892. - in: path
  1893. name: cellID
  1894. schema:
  1895. type: string
  1896. required: true
  1897. description: The cell ID.
  1898. responses:
  1899. '200':
  1900. description: A dashboard cells view
  1901. content:
  1902. application/json:
  1903. schema:
  1904. $ref: '#/components/schemas/View'
  1905. '404':
  1906. description: Cell or dashboard not found
  1907. content:
  1908. application/json:
  1909. schema:
  1910. $ref: '#/components/schemas/Error'
  1911. default:
  1912. description: Unexpected error
  1913. content:
  1914. application/json:
  1915. schema:
  1916. $ref: '#/components/schemas/Error'
  1917. patch:
  1918. operationId: PatchDashboardsIDCellsIDView
  1919. tags:
  1920. - Cells
  1921. - Dashboards
  1922. - Views
  1923. summary: Update the view for a cell
  1924. requestBody:
  1925. required: true
  1926. content:
  1927. application/json:
  1928. schema:
  1929. $ref: '#/components/schemas/View'
  1930. parameters:
  1931. - $ref: '#/components/parameters/TraceSpan'
  1932. - in: path
  1933. name: dashboardID
  1934. schema:
  1935. type: string
  1936. required: true
  1937. description: The ID of the dashboard to update.
  1938. - in: path
  1939. name: cellID
  1940. schema:
  1941. type: string
  1942. required: true
  1943. description: The ID of the cell to update.
  1944. responses:
  1945. '200':
  1946. description: Updated cell view
  1947. content:
  1948. application/json:
  1949. schema:
  1950. $ref: '#/components/schemas/View'
  1951. '404':
  1952. description: Cell or dashboard not found
  1953. content:
  1954. application/json:
  1955. schema:
  1956. $ref: '#/components/schemas/Error'
  1957. default:
  1958. description: Unexpected error
  1959. content:
  1960. application/json:
  1961. schema:
  1962. $ref: '#/components/schemas/Error'
  1963. '/dashboards/{dashboardID}/labels':
  1964. get:
  1965. operationId: GetDashboardsIDLabels
  1966. tags:
  1967. - Dashboards
  1968. summary: List all labels for a dashboard
  1969. parameters:
  1970. - $ref: '#/components/parameters/TraceSpan'
  1971. - in: path
  1972. name: dashboardID
  1973. schema:
  1974. type: string
  1975. required: true
  1976. description: The dashboard ID.
  1977. responses:
  1978. '200':
  1979. description: A list of all labels for a dashboard
  1980. content:
  1981. application/json:
  1982. schema:
  1983. $ref: '#/components/schemas/LabelsResponse'
  1984. default:
  1985. description: Unexpected error
  1986. content:
  1987. application/json:
  1988. schema:
  1989. $ref: '#/components/schemas/Error'
  1990. post:
  1991. operationId: PostDashboardsIDLabels
  1992. tags:
  1993. - Dashboards
  1994. summary: Add a label to a dashboard
  1995. parameters:
  1996. - $ref: '#/components/parameters/TraceSpan'
  1997. - in: path
  1998. name: dashboardID
  1999. schema:
  2000. type: string
  2001. required: true
  2002. description: The dashboard ID.
  2003. requestBody:
  2004. description: Label to add
  2005. required: true
  2006. content:
  2007. application/json:
  2008. schema:
  2009. $ref: '#/components/schemas/LabelMapping'
  2010. responses:
  2011. '201':
  2012. description: The label added to the dashboard
  2013. content:
  2014. application/json:
  2015. schema:
  2016. $ref: '#/components/schemas/LabelResponse'
  2017. default:
  2018. description: Unexpected error
  2019. content:
  2020. application/json:
  2021. schema:
  2022. $ref: '#/components/schemas/Error'
  2023. '/dashboards/{dashboardID}/labels/{labelID}':
  2024. delete:
  2025. operationId: DeleteDashboardsIDLabelsID
  2026. tags:
  2027. - Dashboards
  2028. summary: Delete a label from a dashboard
  2029. parameters:
  2030. - $ref: '#/components/parameters/TraceSpan'
  2031. - in: path
  2032. name: dashboardID
  2033. schema:
  2034. type: string
  2035. required: true
  2036. description: The dashboard ID.
  2037. - in: path
  2038. name: labelID
  2039. schema:
  2040. type: string
  2041. required: true
  2042. description: The ID of the label to delete.
  2043. responses:
  2044. '204':
  2045. description: Delete has been accepted
  2046. '404':
  2047. description: Dashboard not found
  2048. content:
  2049. application/json:
  2050. schema:
  2051. $ref: '#/components/schemas/Error'
  2052. default:
  2053. description: Unexpected error
  2054. content:
  2055. application/json:
  2056. schema:
  2057. $ref: '#/components/schemas/Error'
  2058. '/dashboards/{dashboardID}/members':
  2059. get:
  2060. operationId: GetDashboardsIDMembers
  2061. tags:
  2062. - Dashboards
  2063. summary: List all dashboard members
  2064. parameters:
  2065. - $ref: '#/components/parameters/TraceSpan'
  2066. - in: path
  2067. name: dashboardID
  2068. schema:
  2069. type: string
  2070. required: true
  2071. description: The dashboard ID.
  2072. responses:
  2073. '200':
  2074. description: A list of users who have member privileges for a dashboard
  2075. content:
  2076. application/json:
  2077. schema:
  2078. $ref: '#/components/schemas/ResourceMembers'
  2079. default:
  2080. description: Unexpected error
  2081. content:
  2082. application/json:
  2083. schema:
  2084. $ref: '#/components/schemas/Error'
  2085. post:
  2086. operationId: PostDashboardsIDMembers
  2087. tags:
  2088. - Dashboards
  2089. summary: Add a member to a dashboard
  2090. parameters:
  2091. - $ref: '#/components/parameters/TraceSpan'
  2092. - in: path
  2093. name: dashboardID
  2094. schema:
  2095. type: string
  2096. required: true
  2097. description: The dashboard ID.
  2098. requestBody:
  2099. description: User to add as member
  2100. required: true
  2101. content:
  2102. application/json:
  2103. schema:
  2104. $ref: '#/components/schemas/AddResourceMemberRequestBody'
  2105. responses:
  2106. '201':
  2107. description: Added to dashboard members
  2108. content:
  2109. application/json:
  2110. schema:
  2111. $ref: '#/components/schemas/ResourceMember'
  2112. default:
  2113. description: Unexpected error
  2114. content:
  2115. application/json:
  2116. schema:
  2117. $ref: '#/components/schemas/Error'
  2118. '/dashboards/{dashboardID}/members/{userID}':
  2119. delete:
  2120. operationId: DeleteDashboardsIDMembersID
  2121. tags:
  2122. - Dashboards
  2123. summary: Remove a member from a dashboard
  2124. parameters:
  2125. - $ref: '#/components/parameters/TraceSpan'
  2126. - in: path
  2127. name: userID
  2128. schema:
  2129. type: string
  2130. required: true
  2131. description: The ID of the member to remove.
  2132. - in: path
  2133. name: dashboardID
  2134. schema:
  2135. type: string
  2136. required: true
  2137. description: The dashboard ID.
  2138. responses:
  2139. '204':
  2140. description: Member removed
  2141. default:
  2142. description: Unexpected error
  2143. content:
  2144. application/json:
  2145. schema:
  2146. $ref: '#/components/schemas/Error'
  2147. '/dashboards/{dashboardID}/owners':
  2148. get:
  2149. operationId: GetDashboardsIDOwners
  2150. tags:
  2151. - Dashboards
  2152. summary: List all dashboard owners
  2153. parameters:
  2154. - $ref: '#/components/parameters/TraceSpan'
  2155. - in: path
  2156. name: dashboardID
  2157. schema:
  2158. type: string
  2159. required: true
  2160. description: The dashboard ID.
  2161. responses:
  2162. '200':
  2163. description: A list of users who have owner privileges for a dashboard
  2164. content:
  2165. application/json:
  2166. schema:
  2167. $ref: '#/components/schemas/ResourceOwners'
  2168. default:
  2169. description: Unexpected error
  2170. content:
  2171. application/json:
  2172. schema:
  2173. $ref: '#/components/schemas/Error'
  2174. post:
  2175. operationId: PostDashboardsIDOwners
  2176. tags:
  2177. - Dashboards
  2178. summary: Add an owner to a dashboard
  2179. parameters:
  2180. - $ref: '#/components/parameters/TraceSpan'
  2181. - in: path
  2182. name: dashboardID
  2183. schema:
  2184. type: string
  2185. required: true
  2186. description: The dashboard ID.
  2187. requestBody:
  2188. description: User to add as owner
  2189. required: true
  2190. content:
  2191. application/json:
  2192. schema:
  2193. $ref: '#/components/schemas/AddResourceMemberRequestBody'
  2194. responses:
  2195. '201':
  2196. description: Added to dashboard owners
  2197. content:
  2198. application/json:
  2199. schema:
  2200. $ref: '#/components/schemas/ResourceOwner'
  2201. default:
  2202. description: Unexpected error
  2203. content:
  2204. application/json:
  2205. schema:
  2206. $ref: '#/components/schemas/Error'
  2207. '/dashboards/{dashboardID}/owners/{userID}':
  2208. delete:
  2209. operationId: DeleteDashboardsIDOwnersID
  2210. tags:
  2211. - Dashboards
  2212. summary: Remove an owner from a dashboard
  2213. parameters:
  2214. - $ref: '#/components/parameters/TraceSpan'
  2215. - in: path
  2216. name: userID
  2217. schema:
  2218. type: string
  2219. required: true
  2220. description: The ID of the owner to remove.
  2221. - in: path
  2222. name: dashboardID
  2223. schema:
  2224. type: string
  2225. required: true
  2226. description: The dashboard ID.
  2227. responses:
  2228. '204':
  2229. description: Owner removed
  2230. default:
  2231. description: Unexpected error
  2232. content:
  2233. application/json:
  2234. schema:
  2235. $ref: '#/components/schemas/Error'
  2236. /query/ast:
  2237. post:
  2238. operationId: PostQueryAst
  2239. tags:
  2240. - Query
  2241. summary: Generate a query Abstract Syntax Tree (AST)
  2242. description: |
  2243. Analyzes a Flux query and returns a complete package source [Abstract Syntax
  2244. Tree (AST)](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#abstract-syntax-tree-ast)
  2245. for the query.
  2246. Use this endpoint for deep query analysis such as debugging unexpected query
  2247. results.
  2248. A Flux query AST provides a semantic, tree-like representation with contextual
  2249. information about the query. The AST illustrates how the query is distributed
  2250. into different components for execution.
  2251. #### Limitations
  2252. - The endpoint doesn't validate values in the query--for example:
  2253. The following sample Flux query has correct syntax, but contains an incorrect `from()` property key:
  2254. ```js
  2255. from(foo: "iot_center")
  2256. |> range(start: -90d)
  2257. |> filter(fn: (r) => r._measurement == "environment")
  2258. ```
  2259. The following sample JSON shows how to pass the query in the request body:
  2260. ```js
  2261. from(foo: "iot_center")
  2262. |> range(start: -90d)
  2263. |> filter(fn: (r) => r._measurement == "environment")
  2264. ```
  2265. The following code sample shows how to pass the query as JSON in the request body:
  2266. ```json
  2267. { "query": "from(foo: \"iot_center\")\
  2268. |> range(start: -90d)\
  2269. |> filter(fn: (r) => r._measurement == \"environment\")"
  2270. }
  2271. ```
  2272. Passing this to `/api/v2/query/ast` will return a successful response
  2273. with a generated AST.
  2274. parameters:
  2275. - $ref: '#/components/parameters/TraceSpan'
  2276. - in: header
  2277. name: Content-Type
  2278. schema:
  2279. type: string
  2280. enum:
  2281. - application/json
  2282. requestBody:
  2283. description: The Flux query to analyze.
  2284. content:
  2285. application/json:
  2286. schema:
  2287. $ref: '#/components/schemas/LanguageRequest'
  2288. x-codeSamples:
  2289. - lang: Shell
  2290. label: 'cURL: Analyze and generate AST for the query'
  2291. source: |
  2292. curl --request POST "http://localhost:8086/api/v2/query/ast" \
  2293. --header 'Content-Type: application/json' \
  2294. --header 'Accept: application/json' \
  2295. --header "Authorization: Token INFLUX_TOKEN" \
  2296. --data-binary @- << EOL
  2297. {
  2298. "query": "from(bucket: \"INFLUX_BUCKET_NAME\")\
  2299. |> range(start: -5m)\
  2300. |> filter(fn: (r) => r._measurement == \"example-measurement\")"
  2301. }
  2302. EOL
  2303. responses:
  2304. '200':
  2305. description: |
  2306. Success.
  2307. The response body contains an Abstract Syntax Tree (AST) of the Flux query.
  2308. content:
  2309. application/json:
  2310. schema:
  2311. $ref: '#/components/schemas/ASTResponse'
  2312. examples:
  2313. successResponse:
  2314. value:
  2315. ast:
  2316. type: Package
  2317. package: main
  2318. files:
  2319. - type: File
  2320. location:
  2321. start:
  2322. line: 1
  2323. column: 1
  2324. end:
  2325. line: 1
  2326. column: 109
  2327. source: 'from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "example-measurement")'
  2328. metadata: parser-type=rust
  2329. package: null
  2330. imports: null
  2331. body:
  2332. - type: ExpressionStatement
  2333. location:
  2334. start:
  2335. line: 1
  2336. column: 1
  2337. end:
  2338. line: 1
  2339. column: 109
  2340. source: 'from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "example-measurement")'
  2341. expression:
  2342. type: PipeExpression
  2343. location:
  2344. start:
  2345. line: 1
  2346. column: 1
  2347. end:
  2348. line: 1
  2349. column: 109
  2350. source: 'from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "example-measurement")'
  2351. argument:
  2352. type: PipeExpression
  2353. location:
  2354. start:
  2355. line: 1
  2356. column: 1
  2357. end:
  2358. line: 1
  2359. column: 47
  2360. source: 'from(bucket: "example-bucket") |> range(start: -5m)'
  2361. argument:
  2362. type: CallExpression
  2363. location:
  2364. start:
  2365. line: 1
  2366. column: 1
  2367. end:
  2368. line: 1
  2369. column: 26
  2370. source: 'from(bucket: "example-bucket")'
  2371. callee:
  2372. type: Identifier
  2373. location:
  2374. start:
  2375. line: 1
  2376. column: 1
  2377. end:
  2378. line: 1
  2379. column: 5
  2380. source: from
  2381. name: from
  2382. arguments:
  2383. - type: ObjectExpression
  2384. location:
  2385. start:
  2386. line: 1
  2387. column: 6
  2388. end:
  2389. line: 1
  2390. column: 25
  2391. source: 'bucket: "example-bucket"'
  2392. properties:
  2393. - type: Property
  2394. location:
  2395. start:
  2396. line: 1
  2397. column: 6
  2398. end:
  2399. line: 1
  2400. column: 25
  2401. source: 'bucket: "example-bucket"'
  2402. key:
  2403. type: Identifier
  2404. location:
  2405. start:
  2406. line: 1
  2407. column: 6
  2408. end:
  2409. line: 1
  2410. column: 12
  2411. source: bucket
  2412. name: bucket
  2413. value:
  2414. type: StringLiteral
  2415. location:
  2416. start:
  2417. line: 1
  2418. column: 14
  2419. end:
  2420. line: 1
  2421. column: 25
  2422. source: '"example-bucket"'
  2423. value: example-bucket
  2424. call:
  2425. type: CallExpression
  2426. location:
  2427. start:
  2428. line: 1
  2429. column: 30
  2430. end:
  2431. line: 1
  2432. column: 47
  2433. source: 'range(start: -5m)'
  2434. callee:
  2435. type: Identifier
  2436. location:
  2437. start:
  2438. line: 1
  2439. column: 30
  2440. end:
  2441. line: 1
  2442. column: 35
  2443. source: range
  2444. name: range
  2445. arguments:
  2446. - type: ObjectExpression
  2447. location:
  2448. start:
  2449. line: 1
  2450. column: 36
  2451. end:
  2452. line: 1
  2453. column: 46
  2454. source: 'start: -5m'
  2455. properties:
  2456. - type: Property
  2457. location:
  2458. start:
  2459. line: 1
  2460. column: 36
  2461. end:
  2462. line: 1
  2463. column: 46
  2464. source: 'start: -5m'
  2465. key:
  2466. type: Identifier
  2467. location:
  2468. start:
  2469. line: 1
  2470. column: 36
  2471. end:
  2472. line: 1
  2473. column: 41
  2474. source: start
  2475. name: start
  2476. value:
  2477. type: UnaryExpression
  2478. location:
  2479. start:
  2480. line: 1
  2481. column: 43
  2482. end:
  2483. line: 1
  2484. column: 46
  2485. source: '-5m'
  2486. operator: '-'
  2487. argument:
  2488. type: DurationLiteral
  2489. location:
  2490. start:
  2491. line: 1
  2492. column: 44
  2493. end:
  2494. line: 1
  2495. column: 46
  2496. source: 5m
  2497. values:
  2498. - magnitude: 5
  2499. unit: m
  2500. call:
  2501. type: CallExpression
  2502. location:
  2503. start:
  2504. line: 1
  2505. column: 51
  2506. end:
  2507. line: 1
  2508. column: 109
  2509. source: 'filter(fn: (r) => r._measurement == "example-measurement")'
  2510. callee:
  2511. type: Identifier
  2512. location:
  2513. start:
  2514. line: 1
  2515. column: 51
  2516. end:
  2517. line: 1
  2518. column: 57
  2519. source: filter
  2520. name: filter
  2521. arguments:
  2522. - type: ObjectExpression
  2523. location:
  2524. start:
  2525. line: 1
  2526. column: 58
  2527. end:
  2528. line: 1
  2529. column: 108
  2530. source: 'fn: (r) => r._measurement == "example-measurement"'
  2531. properties:
  2532. - type: Property
  2533. location:
  2534. start:
  2535. line: 1
  2536. column: 58
  2537. end:
  2538. line: 1
  2539. column: 108
  2540. source: 'fn: (r) => r._measurement == "example-measurement"'
  2541. key:
  2542. type: Identifier
  2543. location:
  2544. start:
  2545. line: 1
  2546. column: 58
  2547. end:
  2548. line: 1
  2549. column: 60
  2550. source: fn
  2551. name: fn
  2552. value:
  2553. type: FunctionExpression
  2554. location:
  2555. start:
  2556. line: 1
  2557. column: 62
  2558. end:
  2559. line: 1
  2560. column: 108
  2561. source: (r) => r._measurement == "example-measurement"
  2562. params:
  2563. - type: Property
  2564. location:
  2565. start:
  2566. line: 1
  2567. column: 63
  2568. end:
  2569. line: 1
  2570. column: 64
  2571. source: r
  2572. key:
  2573. type: Identifier
  2574. location:
  2575. start:
  2576. line: 1
  2577. column: 63
  2578. end:
  2579. line: 1
  2580. column: 64
  2581. source: r
  2582. name: r
  2583. value: null
  2584. body:
  2585. type: BinaryExpression
  2586. location:
  2587. start:
  2588. line: 1
  2589. column: 69
  2590. end:
  2591. line: 1
  2592. column: 108
  2593. source: r._measurement == "example-measurement"
  2594. operator: '=='
  2595. left:
  2596. type: MemberExpression
  2597. location:
  2598. start:
  2599. line: 1
  2600. column: 69
  2601. end:
  2602. line: 1
  2603. column: 83
  2604. source: r._measurement
  2605. object:
  2606. type: Identifier
  2607. location:
  2608. start:
  2609. line: 1
  2610. column: 69
  2611. end:
  2612. line: 1
  2613. column: 70
  2614. source: r
  2615. name: r
  2616. property:
  2617. type: Identifier
  2618. location:
  2619. start:
  2620. line: 1
  2621. column: 71
  2622. end:
  2623. line: 1
  2624. column: 83
  2625. source: _measurement
  2626. name: _measurement
  2627. right:
  2628. type: StringLiteral
  2629. location:
  2630. start:
  2631. line: 1
  2632. column: 87
  2633. end:
  2634. line: 1
  2635. column: 108
  2636. source: '"example-measurement"'
  2637. value: example-measurement
  2638. '400':
  2639. description: |
  2640. Bad request.
  2641. InfluxDB is unable to parse the request.
  2642. The response body contains detail about the problem.
  2643. headers:
  2644. X-Platform-Error-Code:
  2645. description: |
  2646. The reason for the error.
  2647. schema:
  2648. type: string
  2649. example: invalid
  2650. content:
  2651. application/json:
  2652. schema:
  2653. $ref: '#/components/schemas/Error'
  2654. examples:
  2655. invalidASTValue:
  2656. summary: Invalid AST
  2657. description: |
  2658. If the request body contains a missing property key in `from()`,
  2659. returns `invalid` and problem detail.
  2660. value:
  2661. code: invalid
  2662. message: 'invalid AST: loc 1:6-1:19: missing property key'
  2663. default:
  2664. description: Internal server error.
  2665. content:
  2666. application/json:
  2667. schema:
  2668. $ref: '#/components/schemas/Error'
  2669. /query/suggestions:
  2670. get:
  2671. operationId: GetQuerySuggestions
  2672. tags:
  2673. - Query
  2674. summary: Retrieve Flux query suggestions
  2675. description: |
  2676. Retrieves a list of Flux query suggestions. Each suggestion contains a
  2677. [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/)
  2678. name and parameters.
  2679. Use this endpoint to retrieve a list of Flux query suggestions used in the
  2680. InfluxDB Flux Query Builder. Helper function names have an underscore (`_`)
  2681. prefix and aren't meant to be used directly in queries--for example:
  2682. - **Recommended**: Use `top(n, columns=["_value"], tables=<-)` to sort
  2683. on a column and keep the top n records instead of `_sortLimit_`.
  2684. `top` uses the `_sortLimit` helper function.
  2685. #### Limitations
  2686. - Using `/api/v2/query/suggestions/` (note the trailing slash) with cURL
  2687. will result in a HTTP `301 Moved Permanently` status code. Please use
  2688. `/api/v2/query/suggestions` without a trailing slash.
  2689. - When writing a query, avoid using `_functionName()` helper functions
  2690. exposed by this endpoint.
  2691. #### Related Guides
  2692. - [List of all Flux functions](https://docs.influxdata.com/influxdb/v2.3/flux/v0.x/stdlib/all-functions/).
  2693. parameters:
  2694. - $ref: '#/components/parameters/TraceSpan'
  2695. responses:
  2696. '200':
  2697. description: |
  2698. Success.
  2699. The response body contains a list of Flux query suggestions--function
  2700. names used in the Flux Query Builder autocomplete suggestions.
  2701. content:
  2702. application/json:
  2703. schema:
  2704. $ref: '#/components/schemas/FluxSuggestions'
  2705. examples:
  2706. successResponse:
  2707. value:
  2708. funcs:
  2709. - name: _fillEmpty
  2710. params:
  2711. createEmpty: bool
  2712. tables: stream
  2713. - name: _highestOrLowest
  2714. params:
  2715. _sortLimit: function
  2716. column: invalid
  2717. groupColumns: array
  2718. 'n': invalid
  2719. reducer: function
  2720. tables: stream
  2721. - name: _hourSelection
  2722. params:
  2723. location: object
  2724. start: int
  2725. stop: int
  2726. tables: stream
  2727. timeColumn: string
  2728. - name: _sortLimit
  2729. params:
  2730. columns: array
  2731. desc: bool
  2732. 'n': int
  2733. tables: stream
  2734. - name: _window
  2735. params:
  2736. createEmpty: bool
  2737. every: duration
  2738. location: object
  2739. offset: duration
  2740. period: duration
  2741. startColumn: string
  2742. stopColumn: string
  2743. tables: stream
  2744. timeColumn: string
  2745. - name: aggregateWindow
  2746. params:
  2747. column: invalid
  2748. createEmpty: bool
  2749. every: duration
  2750. fn: function
  2751. location: object
  2752. offset: duration
  2753. period: duration
  2754. tables: stream
  2755. timeDst: string
  2756. timeSrc: string
  2757. - name: bool
  2758. params:
  2759. v: invalid
  2760. - name: bottom
  2761. params:
  2762. columns: array
  2763. 'n': int
  2764. tables: stream
  2765. - name: buckets
  2766. params:
  2767. host: string
  2768. org: string
  2769. orgID: string
  2770. token: string
  2771. - name: bytes
  2772. params:
  2773. v: invalid
  2774. - name: cardinality
  2775. params:
  2776. bucket: string
  2777. bucketID: string
  2778. host: string
  2779. org: string
  2780. orgID: string
  2781. predicate: function
  2782. start: invalid
  2783. stop: invalid
  2784. token: string
  2785. - name: chandeMomentumOscillator
  2786. params:
  2787. columns: array
  2788. 'n': int
  2789. tables: stream
  2790. - name: columns
  2791. params:
  2792. column: string
  2793. tables: stream
  2794. - name: contains
  2795. params:
  2796. set: array
  2797. value: invalid
  2798. - name: count
  2799. params:
  2800. column: string
  2801. tables: stream
  2802. - name: cov
  2803. params:
  2804. 'on': array
  2805. pearsonr: bool
  2806. x: invalid
  2807. 'y': invalid
  2808. - name: covariance
  2809. params:
  2810. columns: array
  2811. pearsonr: bool
  2812. tables: stream
  2813. valueDst: string
  2814. - name: cumulativeSum
  2815. params:
  2816. columns: array
  2817. tables: stream
  2818. - name: derivative
  2819. params:
  2820. columns: array
  2821. initialZero: bool
  2822. nonNegative: bool
  2823. tables: stream
  2824. timeColumn: string
  2825. unit: duration
  2826. - name: die
  2827. params:
  2828. msg: string
  2829. - name: difference
  2830. params:
  2831. columns: array
  2832. initialZero: bool
  2833. keepFirst: bool
  2834. nonNegative: bool
  2835. tables: stream
  2836. - name: display
  2837. params:
  2838. v: invalid
  2839. - name: distinct
  2840. params:
  2841. column: string
  2842. tables: stream
  2843. - name: doubleEMA
  2844. params:
  2845. 'n': int
  2846. tables: stream
  2847. - name: drop
  2848. params:
  2849. columns: array
  2850. fn: function
  2851. tables: stream
  2852. - name: duplicate
  2853. params:
  2854. as: string
  2855. column: string
  2856. tables: stream
  2857. - name: duration
  2858. params:
  2859. v: invalid
  2860. - name: elapsed
  2861. params:
  2862. columnName: string
  2863. tables: stream
  2864. timeColumn: string
  2865. unit: duration
  2866. - name: exponentialMovingAverage
  2867. params:
  2868. 'n': int
  2869. tables: stream
  2870. - name: fill
  2871. params:
  2872. column: string
  2873. tables: stream
  2874. usePrevious: bool
  2875. value: invalid
  2876. - name: filter
  2877. params:
  2878. fn: function
  2879. onEmpty: string
  2880. tables: stream
  2881. - name: findColumn
  2882. params:
  2883. column: string
  2884. fn: function
  2885. tables: stream
  2886. - name: findRecord
  2887. params:
  2888. fn: function
  2889. idx: int
  2890. tables: stream
  2891. - name: first
  2892. params:
  2893. column: string
  2894. tables: stream
  2895. - name: float
  2896. params:
  2897. v: invalid
  2898. - name: from
  2899. params:
  2900. bucket: string
  2901. bucketID: string
  2902. host: string
  2903. org: string
  2904. orgID: string
  2905. token: string
  2906. - name: getColumn
  2907. params:
  2908. column: string
  2909. - name: getRecord
  2910. params:
  2911. idx: int
  2912. - name: group
  2913. params:
  2914. columns: array
  2915. mode: string
  2916. tables: stream
  2917. - name: highestAverage
  2918. params:
  2919. column: string
  2920. groupColumns: array
  2921. 'n': int
  2922. tables: stream
  2923. - name: highestCurrent
  2924. params:
  2925. column: string
  2926. groupColumns: array
  2927. 'n': int
  2928. tables: stream
  2929. - name: highestMax
  2930. params:
  2931. column: string
  2932. groupColumns: array
  2933. 'n': int
  2934. tables: stream
  2935. - name: histogram
  2936. params:
  2937. bins: array
  2938. column: string
  2939. countColumn: string
  2940. normalize: bool
  2941. tables: stream
  2942. upperBoundColumn: string
  2943. - name: histogramQuantile
  2944. params:
  2945. countColumn: string
  2946. minValue: float
  2947. quantile: float
  2948. tables: stream
  2949. upperBoundColumn: string
  2950. valueColumn: string
  2951. - name: holtWinters
  2952. params:
  2953. column: string
  2954. interval: duration
  2955. 'n': int
  2956. seasonality: int
  2957. tables: stream
  2958. timeColumn: string
  2959. withFit: bool
  2960. - name: hourSelection
  2961. params:
  2962. location: object
  2963. start: int
  2964. stop: int
  2965. tables: stream
  2966. timeColumn: string
  2967. - name: increase
  2968. params:
  2969. columns: array
  2970. tables: stream
  2971. - name: int
  2972. params:
  2973. v: invalid
  2974. - name: integral
  2975. params:
  2976. column: string
  2977. interpolate: string
  2978. tables: stream
  2979. timeColumn: string
  2980. unit: duration
  2981. - name: join
  2982. params:
  2983. method: string
  2984. 'on': array
  2985. tables: invalid
  2986. - name: kaufmansAMA
  2987. params:
  2988. column: string
  2989. 'n': int
  2990. tables: stream
  2991. - name: kaufmansER
  2992. params:
  2993. 'n': int
  2994. tables: stream
  2995. - name: keep
  2996. params:
  2997. columns: array
  2998. fn: function
  2999. tables: stream
  3000. - name: keyValues
  3001. params:
  3002. keyColumns: array
  3003. tables: stream
  3004. - name: keys
  3005. params:
  3006. column: string
  3007. tables: stream
  3008. - name: last
  3009. params:
  3010. column: string
  3011. tables: stream
  3012. - name: length
  3013. params:
  3014. arr: array
  3015. - name: limit
  3016. params:
  3017. 'n': int
  3018. offset: int
  3019. tables: stream
  3020. - name: linearBins
  3021. params:
  3022. count: int
  3023. infinity: bool
  3024. start: float
  3025. width: float
  3026. - name: logarithmicBins
  3027. params:
  3028. count: int
  3029. factor: float
  3030. infinity: bool
  3031. start: float
  3032. - name: lowestAverage
  3033. params:
  3034. column: string
  3035. groupColumns: array
  3036. 'n': int
  3037. tables: stream
  3038. - name: lowestCurrent
  3039. params:
  3040. column: string
  3041. groupColumns: array
  3042. 'n': int
  3043. tables: stream
  3044. - name: lowestMin
  3045. params:
  3046. column: string
  3047. groupColumns: array
  3048. 'n': int
  3049. tables: stream
  3050. - name: map
  3051. params:
  3052. fn: function
  3053. mergeKey: bool
  3054. tables: stream
  3055. - name: max
  3056. params:
  3057. column: string
  3058. tables: stream
  3059. - name: mean
  3060. params:
  3061. column: string
  3062. tables: stream
  3063. - name: median
  3064. params:
  3065. column: string
  3066. compression: float
  3067. method: string
  3068. tables: stream
  3069. - name: min
  3070. params:
  3071. column: string
  3072. tables: stream
  3073. - name: mode
  3074. params:
  3075. column: string
  3076. tables: stream
  3077. - name: movingAverage
  3078. params:
  3079. 'n': int
  3080. tables: stream
  3081. - name: now
  3082. params: {}
  3083. - name: pearsonr
  3084. params:
  3085. 'on': array
  3086. x: invalid
  3087. 'y': invalid
  3088. - name: pivot
  3089. params:
  3090. columnKey: array
  3091. rowKey: array
  3092. tables: stream
  3093. valueColumn: string
  3094. - name: quantile
  3095. params:
  3096. column: string
  3097. compression: float
  3098. method: string
  3099. q: float
  3100. tables: stream
  3101. - name: range
  3102. params:
  3103. start: invalid
  3104. stop: invalid
  3105. tables: stream
  3106. - name: reduce
  3107. params:
  3108. fn: function
  3109. identity: invalid
  3110. tables: stream
  3111. - name: relativeStrengthIndex
  3112. params:
  3113. columns: array
  3114. 'n': int
  3115. tables: stream
  3116. - name: rename
  3117. params:
  3118. columns: invalid
  3119. fn: function
  3120. tables: stream
  3121. - name: sample
  3122. params:
  3123. column: string
  3124. 'n': int
  3125. pos: int
  3126. tables: stream
  3127. - name: set
  3128. params:
  3129. key: string
  3130. tables: stream
  3131. value: string
  3132. - name: skew
  3133. params:
  3134. column: string
  3135. tables: stream
  3136. - name: sort
  3137. params:
  3138. columns: array
  3139. desc: bool
  3140. tables: stream
  3141. - name: spread
  3142. params:
  3143. column: string
  3144. tables: stream
  3145. - name: stateCount
  3146. params:
  3147. column: string
  3148. fn: function
  3149. tables: stream
  3150. - name: stateDuration
  3151. params:
  3152. column: string
  3153. fn: function
  3154. tables: stream
  3155. timeColumn: string
  3156. unit: duration
  3157. - name: stateTracking
  3158. params:
  3159. countColumn: string
  3160. durationColumn: string
  3161. durationUnit: duration
  3162. fn: function
  3163. tables: stream
  3164. timeColumn: string
  3165. - name: stddev
  3166. params:
  3167. column: string
  3168. mode: string
  3169. tables: stream
  3170. - name: string
  3171. params:
  3172. v: invalid
  3173. - name: sum
  3174. params:
  3175. column: string
  3176. tables: stream
  3177. - name: tableFind
  3178. params:
  3179. fn: function
  3180. tables: stream
  3181. - name: tail
  3182. params:
  3183. 'n': int
  3184. offset: int
  3185. tables: stream
  3186. - name: time
  3187. params:
  3188. v: invalid
  3189. - name: timeShift
  3190. params:
  3191. columns: array
  3192. duration: duration
  3193. tables: stream
  3194. - name: timeWeightedAvg
  3195. params:
  3196. tables: stream
  3197. unit: duration
  3198. - name: timedMovingAverage
  3199. params:
  3200. column: string
  3201. every: duration
  3202. period: duration
  3203. tables: stream
  3204. - name: to
  3205. params:
  3206. bucket: string
  3207. bucketID: string
  3208. fieldFn: function
  3209. host: string
  3210. measurementColumn: string
  3211. org: string
  3212. orgID: string
  3213. tables: stream
  3214. tagColumns: array
  3215. timeColumn: string
  3216. token: string
  3217. - name: toBool
  3218. params:
  3219. tables: stream
  3220. - name: toFloat
  3221. params:
  3222. tables: stream
  3223. - name: toInt
  3224. params:
  3225. tables: stream
  3226. - name: toString
  3227. params:
  3228. tables: stream
  3229. - name: toTime
  3230. params:
  3231. tables: stream
  3232. - name: toUInt
  3233. params:
  3234. tables: stream
  3235. - name: today
  3236. params: {}
  3237. - name: top
  3238. params:
  3239. columns: array
  3240. 'n': int
  3241. tables: stream
  3242. - name: tripleEMA
  3243. params:
  3244. 'n': int
  3245. tables: stream
  3246. - name: tripleExponentialDerivative
  3247. params:
  3248. 'n': int
  3249. tables: stream
  3250. - name: truncateTimeColumn
  3251. params:
  3252. tables: stream
  3253. timeColumn: invalid
  3254. unit: duration
  3255. - name: uint
  3256. params:
  3257. v: invalid
  3258. - name: union
  3259. params:
  3260. tables: array
  3261. - name: unique
  3262. params:
  3263. column: string
  3264. tables: stream
  3265. - name: wideTo
  3266. params:
  3267. bucket: string
  3268. bucketID: string
  3269. host: string
  3270. org: string
  3271. orgID: string
  3272. tables: stream
  3273. token: string
  3274. - name: window
  3275. params:
  3276. createEmpty: bool
  3277. every: duration
  3278. location: object
  3279. offset: duration
  3280. period: duration
  3281. startColumn: string
  3282. stopColumn: string
  3283. tables: stream
  3284. timeColumn: string
  3285. - name: yield
  3286. params:
  3287. name: string
  3288. tables: stream
  3289. '301':
  3290. description: |
  3291. Moved Permanently.
  3292. InfluxData has moved the URL of the endpoint.
  3293. Use `/api/v2/query/suggestions`.
  3294. content:
  3295. text/html:
  3296. schema:
  3297. properties:
  3298. body:
  3299. readOnly: true
  3300. description: Response message with URL of requested resource.
  3301. type: string
  3302. examples:
  3303. movedPermanently:
  3304. summary: Invalid URL
  3305. description: |
  3306. The URL has been permanently moved. Use `/api/v2/query/suggestions`.
  3307. value: |
  3308. <a href="/api/v2/query/suggestions?orgID=INFLUX_ORG_ID">Moved Permanently</a>
  3309. default:
  3310. description: Internal server error.
  3311. content:
  3312. application/json:
  3313. schema:
  3314. $ref: '#/components/schemas/Error'
  3315. x-codeSamples:
  3316. - lang: Shell
  3317. label: cURL
  3318. source: |
  3319. curl --request GET "https://cloud2.influxdata.com/api/v2/query/suggestions" \
  3320. --header "Accept: application/json" \
  3321. --header "Authorization: Token INFLUX_API_TOKEN"
  3322. '/query/suggestions/{name}':
  3323. get:
  3324. operationId: GetQuerySuggestionsName
  3325. tags:
  3326. - Query
  3327. summary: Retrieve a query suggestion for a branching suggestion
  3328. description: |
  3329. Retrieves a query suggestion that contains the name and parameters of the
  3330. requested function.
  3331. Use this endpoint to pass a branching suggestion (a Flux function name) and
  3332. retrieve the parameters of the requested function.
  3333. #### Limitations
  3334. - Use `/api/v2/query/suggestions/{name}` (without a trailing slash).
  3335. `/api/v2/query/suggestions/{name}/` (note the trailing slash) results in a
  3336. HTTP `301 Moved Permanently` status.
  3337. - The function `name` must exist and must be spelled correctly.
  3338. #### Related Guides
  3339. - [List of all Flux functions](https://docs.influxdata.com/influxdb/v2.3/flux/v0.x/stdlib/all-functions/).
  3340. parameters:
  3341. - $ref: '#/components/parameters/TraceSpan'
  3342. - in: path
  3343. name: name
  3344. schema:
  3345. type: string
  3346. required: true
  3347. description: |
  3348. A Flux Function name.
  3349. Only returns functions with this name.
  3350. responses:
  3351. '200':
  3352. description: |
  3353. Success.
  3354. The response body contains the function name and parameters.
  3355. content:
  3356. application/json:
  3357. schema:
  3358. $ref: '#/components/schemas/FluxSuggestion'
  3359. examples:
  3360. successResponse:
  3361. value:
  3362. name: sum
  3363. params:
  3364. column: string
  3365. tables: stream
  3366. '500':
  3367. description: |
  3368. Internal server error.
  3369. The value passed for _`name`_ may have been misspelled.
  3370. content:
  3371. application/json:
  3372. schema:
  3373. $ref: '#/components/schemas/Error'
  3374. examples:
  3375. internalError:
  3376. summary: Invalid function
  3377. description: |
  3378. The requested function doesn't exist.
  3379. value:
  3380. code: internal error
  3381. message: An internal error has occurred
  3382. x-codeSamples:
  3383. - lang: Shell
  3384. label: cURL
  3385. source: |
  3386. curl --request GET "https://cloud2.influxdata.com/api/v2/query/suggestions/sum/" \
  3387. --header "Accept: application/json" \
  3388. --header "Authorization: Token INFLUX_API_TOKEN"
  3389. /query/analyze:
  3390. post:
  3391. operationId: PostQueryAnalyze
  3392. tags:
  3393. - Query
  3394. summary: Analyze a Flux query
  3395. description: |
  3396. Analyzes a [Flux query](https://docs.influxdata.com/flux/v0.x/) for syntax
  3397. errors and returns the list of errors.
  3398. In the following sample query, `from()` is missing the property key.
  3399. ```json
  3400. { "query": "from(: \"iot_center\")\
  3401. |> range(start: -90d)\
  3402. |> filter(fn: (r) => r._measurement == \"environment\")",
  3403. "type": "flux"
  3404. }
  3405. ```
  3406. If you pass this in a request to the `/api/v2/analyze` endpoint,
  3407. InfluxDB returns an `errors` list that contains an error object for the missing key.
  3408. #### Limitations
  3409. - The endpoint doesn't validate values in the query--for example:
  3410. - The following sample query has correct syntax, but contains an incorrect `from()` property key:
  3411. ```json
  3412. { "query": "from(foo: \"iot_center\")\
  3413. |> range(start: -90d)\
  3414. |> filter(fn: (r) => r._measurement == \"environment\")",
  3415. "type": "flux"
  3416. }
  3417. ```
  3418. If you pass this in a request to the `/api/v2/analyze` endpoint,
  3419. InfluxDB returns an empty `errors` list.
  3420. parameters:
  3421. - $ref: '#/components/parameters/TraceSpan'
  3422. - in: header
  3423. name: Content-Type
  3424. schema:
  3425. type: string
  3426. enum:
  3427. - application/json
  3428. requestBody:
  3429. description: Flux query to analyze
  3430. content:
  3431. application/json:
  3432. schema:
  3433. $ref: '#/components/schemas/Query'
  3434. responses:
  3435. '200':
  3436. description: |
  3437. Success.
  3438. The response body contains the list of `errors`.
  3439. If the query syntax is valid, the endpoint returns an empty `errors` list.
  3440. content:
  3441. application/json:
  3442. schema:
  3443. $ref: '#/components/schemas/AnalyzeQueryResponse'
  3444. examples:
  3445. missingQueryPropertyKey:
  3446. summary: Missing property key error
  3447. description: |
  3448. Returns an error object if the Flux query is missing a property key.
  3449. The following sample query is missing the _`bucket`_ property key:
  3450. ```json
  3451. {
  3452. "query": "from(: \"iot_center\")\
  3453. ...
  3454. }
  3455. ```
  3456. value:
  3457. errors:
  3458. - line: 1
  3459. column: 6
  3460. character: 0
  3461. message: missing property key
  3462. '400':
  3463. description: |
  3464. Bad request.
  3465. InfluxDB is unable to parse the request.
  3466. The response body contains detail about the problem.
  3467. headers:
  3468. X-Platform-Error-Code:
  3469. description: |
  3470. The reason for the error.
  3471. schema:
  3472. type: string
  3473. example: invalid
  3474. content:
  3475. application/json:
  3476. schema:
  3477. $ref: '#/components/schemas/Error'
  3478. examples:
  3479. invalidJSONStringValue:
  3480. summary: Invalid JSON
  3481. description: 'If the request body contains invalid JSON, returns `invalid` and problem detail.'
  3482. value:
  3483. code: invalid
  3484. message: 'invalid json: invalid character ''\'''' looking for beginning of value'
  3485. default:
  3486. description: Internal server error
  3487. headers:
  3488. X-Platform-Error-Code:
  3489. description: The reason for the error.
  3490. schema:
  3491. type: string
  3492. example: internal error
  3493. X-Influx-Error:
  3494. description: A string that describes the problem.
  3495. schema:
  3496. type: string
  3497. X-Influx-Reference:
  3498. description: The numeric reference code for the error type.
  3499. schema:
  3500. type: integer
  3501. content:
  3502. application/json:
  3503. schema:
  3504. $ref: '#/components/schemas/Error'
  3505. examples:
  3506. emptyJSONObject:
  3507. summary: Empty JSON object in request body
  3508. description: |
  3509. If the request body contains an empty JSON object, returns `internal error`.
  3510. value:
  3511. code: internal error
  3512. message: An internal error has occurred - check server logs
  3513. x-codeSamples:
  3514. - lang: Shell
  3515. label: 'cURL: Analyze a Flux query'
  3516. source: |
  3517. curl -v --request POST \
  3518. "http://localhost:8086/api/v2/query/analyze" \
  3519. --header "Authorization: Token INFLUX_API_TOKEN" \
  3520. --header 'Content-type: application/json' \
  3521. --header 'Accept: application/json' \
  3522. --data-binary @- << EOF
  3523. { "query": "from(bucket: \"iot_center\")\
  3524. |> range(start: -90d)\
  3525. |> filter(fn: (r) => r._measurement == \"environment\")",
  3526. "type": "flux"
  3527. }
  3528. EOF
  3529. /query:
  3530. post:
  3531. operationId: PostQuery
  3532. tags:
  3533. - Data I/O endpoints
  3534. - Query
  3535. summary: Query data
  3536. description: |
  3537. Retrieves data from buckets.
  3538. Use this endpoint to send a Flux query request and retrieve data from a bucket.
  3539. #### Rate limits (with InfluxDB Cloud)
  3540. `read` rate limits apply.
  3541. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/).
  3542. #### Related guides
  3543. - [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/v2.3/query-data/execute-queries/influx-api/).
  3544. - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/)
  3545. parameters:
  3546. - $ref: '#/components/parameters/TraceSpan'
  3547. - in: header
  3548. name: Accept-Encoding
  3549. description: The content encoding (usually a compression algorithm) that the client can understand.
  3550. schema:
  3551. type: string
  3552. description: 'The content coding. Use `gzip` for compressed data or `identity` for unmodified, uncompressed data.'
  3553. default: identity
  3554. enum:
  3555. - gzip
  3556. - identity
  3557. - in: header
  3558. name: Content-Type
  3559. schema:
  3560. type: string
  3561. enum:
  3562. - application/json
  3563. - application/vnd.flux
  3564. - in: query
  3565. name: org
  3566. description: |
  3567. The name or ID of the organization executing the query.
  3568. #### InfluxDB Cloud
  3569. - Doesn't use `org` or `orgID`.
  3570. - Queries the bucket in the organization associated with the authorization (API token).
  3571. #### InfluxDB OSS
  3572. - Requires either `org` or `orgID`.
  3573. schema:
  3574. type: string
  3575. - in: query
  3576. name: orgID
  3577. description: |
  3578. The ID of the organization executing the query.
  3579. #### InfluxDB Cloud
  3580. - Doesn't use `org` or `orgID`.
  3581. - Queries the bucket in the organization associated with the authorization (API token).
  3582. #### InfluxDB OSS
  3583. - Requires either `org` or `orgID`.
  3584. schema:
  3585. type: string
  3586. x-codeSamples:
  3587. - lang: Shell
  3588. label: cURL
  3589. source: |
  3590. curl --request POST 'INFLUX_URL/api/v2/query?org=INFLUX_ORG' \
  3591. --header 'Content-Type: application/vnd.flux' \
  3592. --header 'Accept: application/csv \
  3593. --header 'Authorization: Token INFLUX_API_TOKEN' \
  3594. --data 'from(bucket: "example-bucket")
  3595. |> range(start: -5m)
  3596. |> filter(fn: (r) => r._measurement == "example-measurement")'
  3597. requestBody:
  3598. description: Flux query or specification to execute
  3599. content:
  3600. application/json:
  3601. schema:
  3602. $ref: '#/components/schemas/Query'
  3603. application/vnd.flux:
  3604. schema:
  3605. type: string
  3606. example: |
  3607. from(bucket: "example-bucket")
  3608. |> range(start: -5m)
  3609. |> filter(fn: (r) => r._measurement == "example-measurement")
  3610. responses:
  3611. '200':
  3612. description: Success. The response body contains query results.
  3613. headers:
  3614. Content-Encoding:
  3615. description: Lists encodings (usually compression algorithms) that have been applied to the response payload.
  3616. schema:
  3617. type: string
  3618. description: |
  3619. The content coding: `gzip` for compressed data or `identity` for unmodified, uncompressed data.
  3620. default: identity
  3621. enum:
  3622. - gzip
  3623. - identity
  3624. Trace-Id:
  3625. description: 'The trace ID, if generated, of the request.'
  3626. schema:
  3627. type: string
  3628. description: Trace ID of a request.
  3629. content:
  3630. application/csv:
  3631. schema:
  3632. type: string
  3633. example: |
  3634. result,table,_start,_stop,_time,region,host,_value
  3635. mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43
  3636. mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25
  3637. mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62
  3638. '400':
  3639. description: |
  3640. Bad request.
  3641. The response body contains detail about the error.
  3642. #### InfluxDB OSS
  3643. - Returns this error if `org` or `orgID` doesn't match an organization.
  3644. content:
  3645. application/json:
  3646. schema:
  3647. $ref: '#/components/schemas/Error'
  3648. examples:
  3649. orgNotFound:
  3650. summary: Organization not found
  3651. value:
  3652. code: invalid
  3653. message: 'failed to decode request body: organization not found'
  3654. '401':
  3655. $ref: '#/components/responses/AuthorizationError'
  3656. '404':
  3657. $ref: '#/components/responses/ResourceNotFoundError'
  3658. '429':
  3659. description: |
  3660. #### InfluxDB Cloud:
  3661. - returns this error if a **read** or **write** request exceeds your
  3662. plan's [adjustable service quotas](https://docs.influxdata.com/influxdb/v2.3/account-management/limits/#adjustable-service-quotas)
  3663. or if a **delete** request exceeds the maximum
  3664. [global limit](https://docs.influxdata.com/influxdb/v2.3/account-management/limits/#global-limits)
  3665. - returns `Retry-After` header that describes when to try the write again.
  3666. #### InfluxDB OSS:
  3667. - doesn't return this error.
  3668. headers:
  3669. Retry-After:
  3670. description: Non-negative decimal integer indicating seconds to wait before retrying the request.
  3671. schema:
  3672. type: integer
  3673. format: int32
  3674. '500':
  3675. $ref: '#/components/responses/InternalServerError'
  3676. default:
  3677. $ref: '#/components/responses/GeneralServerError'
  3678. /buckets:
  3679. get:
  3680. operationId: GetBuckets
  3681. tags:
  3682. - Buckets
  3683. summary: List buckets
  3684. description: |
  3685. Retrieves a list of [buckets](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#bucket).
  3686. To limit which buckets are returned, pass query parameters in your request.
  3687. If no query parameters are passed, InfluxDB returns all buckets up to the
  3688. default `limit`.
  3689. #### Limitations
  3690. - Paging with an `offset` greater than the number of records will result in
  3691. an empty list of buckets--for example:
  3692. The following request is paging to the 50th record, but the user only has
  3693. 10 buckets.
  3694. ```sh
  3695. $ curl --request GET "INFLUX_URL/api/v2/scripts?limit=1&offset=50"
  3696. $ {
  3697. "links": {
  3698. "prev": "/api/v2/buckets?descending=false\u0026limit=1\u0026offset=49\u0026orgID=ORG_ID",
  3699. "self": "/api/v2/buckets?descending=false\u0026limit=1\u0026offset=50\u0026orgID=ORG_ID"
  3700. },
  3701. "buckets": []
  3702. }
  3703. ```
  3704. #### Related Guides
  3705. - [Manage buckets](https://docs.influxdata.com/influxdb/v2.3/organizations/buckets/)
  3706. parameters:
  3707. - $ref: '#/components/parameters/TraceSpan'
  3708. - $ref: '#/components/parameters/Offset'
  3709. - $ref: '#/components/parameters/Limit'
  3710. - $ref: '#/components/parameters/After'
  3711. - in: query
  3712. name: org
  3713. description: |
  3714. Organization name.
  3715. The name of the organization.
  3716. #### InfluxDB Cloud
  3717. - Doesn't use `org` or `orgID`.
  3718. - Creates a bucket in the organization associated with the authorization (API token).
  3719. #### InfluxDB OSS
  3720. - Accepts either `org` or `orgID`.
  3721. - InfluxDB creates the bucket within this organization.
  3722. schema:
  3723. type: string
  3724. - in: query
  3725. name: orgID
  3726. description: |
  3727. Organization ID.
  3728. The organization ID.
  3729. #### InfluxDB Cloud
  3730. - Doesn't use `org` or `orgID`.
  3731. - Creates a bucket in the organization associated with the authorization (API token).
  3732. #### InfluxDB OSS
  3733. - Accepts either `org` or `orgID`.
  3734. - InfluxDB creates the bucket within this organization.
  3735. schema:
  3736. type: string
  3737. - in: query
  3738. name: name
  3739. description: |
  3740. Bucket name.
  3741. Only returns buckets with this specific name.
  3742. schema:
  3743. type: string
  3744. - in: query
  3745. name: id
  3746. description: |
  3747. Bucket ID.
  3748. Only returns the bucket with this ID.
  3749. schema:
  3750. type: string
  3751. responses:
  3752. '200':
  3753. description: |
  3754. Success.
  3755. The response body contains a list of buckets.
  3756. content:
  3757. application/json:
  3758. schema:
  3759. $ref: '#/components/schemas/Buckets'
  3760. examples:
  3761. successResponse:
  3762. value:
  3763. links:
  3764. self: /api/v2/buckets?descending=false&limit=20&name=_monitoring&offset=0&orgID=ORG_ID
  3765. buckets:
  3766. - id: 77ca9dace40a9bfc
  3767. orgID: INFLUX_ORG_ID
  3768. type: system
  3769. schemaType: implicit
  3770. description: System bucket for monitoring logs
  3771. name: _monitoring
  3772. retentionRules:
  3773. - type: expire
  3774. everySeconds: 604800
  3775. createdAt: '2022-03-15T17:22:33.72617939Z'
  3776. updatedAt: '2022-03-15T17:22:33.726179487Z'
  3777. links:
  3778. labels: /api/v2/buckets/77ca9dace40a9bfc/labels
  3779. members: /api/v2/buckets/77ca9dace40a9bfc/members
  3780. org: /api/v2/orgs/INFLUX_ORG_ID
  3781. owners: /api/v2/buckets/77ca9dace40a9bfc/owners
  3782. self: /api/v2/buckets/77ca9dace40a9bfc
  3783. write: /api/v2/write?org=ORG_ID&bucket=77ca9dace40a9bfc
  3784. labels: []
  3785. '401':
  3786. $ref: '#/components/responses/AuthorizationError'
  3787. '500':
  3788. $ref: '#/components/responses/InternalServerError'
  3789. default:
  3790. description: Unexpected error
  3791. content:
  3792. application/json:
  3793. schema:
  3794. $ref: '#/components/schemas/Error'
  3795. x-codeSamples:
  3796. - lang: Shell
  3797. label: cURL
  3798. source: |
  3799. curl --request GET "http://localhost:8086/api/v2/buckets?name=_monitoring" \
  3800. --header "Authorization: Token INFLUX_TOKEN" \
  3801. --header "Accept: application/json" \
  3802. --header "Content-Type: application/json"
  3803. post:
  3804. operationId: PostBuckets
  3805. tags:
  3806. - Buckets
  3807. summary: Create a bucket
  3808. description: |
  3809. Creates a [bucket](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#bucket)
  3810. and returns the created bucket along with metadata. The default data
  3811. [retention period](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#retention-period)
  3812. is 30 days.
  3813. #### InfluxDB OSS
  3814. - A single InfluxDB OSS instance supports active writes or queries for
  3815. approximately 20 buckets across all organizations at a given time. Reading
  3816. or writing to more than 20 buckets at a time can adversely affect
  3817. performance.
  3818. #### Limitations
  3819. - InfluxDB Cloud Free Plan allows users to create up to two buckets.
  3820. Exceeding the bucket quota will result in an HTTP `403` status code.
  3821. For additional information regarding InfluxDB Cloud offerings, see
  3822. [InfluxDB Cloud Pricing](https://www.influxdata.com/influxdb-cloud-pricing/).
  3823. #### Related Guides
  3824. - [Create bucket](https://docs.influxdata.com/influxdb/v2.3/organizations/buckets/create-bucket/)
  3825. - [Create bucket CLI reference](https://docs.influxdata.com/influxdb/v2.3/reference/cli/influx/bucket/create)
  3826. parameters:
  3827. - $ref: '#/components/parameters/TraceSpan'
  3828. requestBody:
  3829. description: Bucket to create
  3830. required: true
  3831. content:
  3832. application/json:
  3833. schema:
  3834. $ref: '#/components/schemas/PostBucketRequest'
  3835. responses:
  3836. '201':
  3837. description: |
  3838. Success.
  3839. The bucket was created.
  3840. content:
  3841. application/json:
  3842. schema:
  3843. $ref: '#/components/schemas/Bucket'
  3844. examples:
  3845. successResponse:
  3846. value:
  3847. id: 37407e232b3911d8
  3848. orgID: INFLUX_ORG_ID
  3849. type: user
  3850. schemaType: implicit
  3851. description: bucket holding air sensor data
  3852. name: air_sensor
  3853. retentionRules:
  3854. - type: expire
  3855. everySeconds: 2592000
  3856. createdAt: '2022-08-03T23:04:41.073704121Z'
  3857. updatedAt: '2022-08-03T23:04:41.073704228Z'
  3858. links:
  3859. labels: /api/v2/buckets/37407e232b3911d8/labels
  3860. members: /api/v2/buckets/37407e232b3911d8/members
  3861. org: /api/v2/orgs/INFLUX_ORG_ID
  3862. owners: /api/v2/buckets/37407e232b3911d8/owners
  3863. self: /api/v2/buckets/37407e232b3911d8
  3864. write: /api/v2/write?org=INFLUX_ORG_ID&bucket=37407e232b3911d8
  3865. labels: []
  3866. '400':
  3867. description: |
  3868. Bad request.
  3869. content:
  3870. application/json:
  3871. schema:
  3872. $ref: '#/components/schemas/Error'
  3873. '401':
  3874. $ref: '#/components/responses/AuthorizationError'
  3875. '403':
  3876. description: |
  3877. Forbidden.
  3878. The bucket quota is exceeded.
  3879. headers:
  3880. X-Platform-Error-Code:
  3881. description: |
  3882. The reason for the error.
  3883. schema:
  3884. type: string
  3885. example: forbidden
  3886. content:
  3887. application/json:
  3888. schema:
  3889. $ref: '#/components/schemas/Error'
  3890. examples:
  3891. quotaExceeded:
  3892. summary: Bucket quota exceeded
  3893. value:
  3894. code: forbidden
  3895. message: creating bucket would exceed quota
  3896. '422':
  3897. description: |
  3898. Unprocessable Entity.
  3899. The request body failed validation.
  3900. content:
  3901. application/json:
  3902. schema:
  3903. $ref: '#/components/schemas/Error'
  3904. '500':
  3905. $ref: '#/components/responses/InternalServerError'
  3906. default:
  3907. description: Unexpected error
  3908. content:
  3909. application/json:
  3910. schema:
  3911. $ref: '#/components/schemas/Error'
  3912. x-codeSamples:
  3913. - lang: Shell
  3914. label: cURL
  3915. source: |
  3916. curl --request POST "http://localhost:8086/api/v2/buckets \
  3917. --header "Authorization: Token INFLUX_TOKEN" \
  3918. --header "Accept: application/json" \
  3919. --header "Content-Type: application/json" \
  3920. --data '{
  3921. "name": "air_sensor",
  3922. "description": "bucket holding air sensor data",
  3923. "orgID": "INFLUX_ORG_ID",
  3924. "retentionRules": [
  3925. {
  3926. "type": "expire",
  3927. "everySeconds": 2592000,
  3928. }
  3929. ]
  3930. }'
  3931. '/buckets/{bucketID}':
  3932. get:
  3933. operationId: GetBucketsID
  3934. tags:
  3935. - Buckets
  3936. summary: Retrieve a bucket
  3937. description: |
  3938. Retrieves a bucket.
  3939. Use this endpoint to retrieve information for a specific bucket.
  3940. parameters:
  3941. - $ref: '#/components/parameters/TraceSpan'
  3942. - in: path
  3943. name: bucketID
  3944. schema:
  3945. type: string
  3946. required: true
  3947. description: |
  3948. The ID of the bucket to retrieve.
  3949. responses:
  3950. '200':
  3951. description: |
  3952. Success.
  3953. The response body contains the bucket information.
  3954. content:
  3955. application/json:
  3956. schema:
  3957. $ref: '#/components/schemas/Bucket'
  3958. examples:
  3959. successResponse:
  3960. value:
  3961. id: 37407e232b3911d8
  3962. orgID: bea7ea952287f70d
  3963. type: user
  3964. schemaType: implicit
  3965. description: bucket for air sensor data
  3966. name: air-sensor
  3967. retentionRules:
  3968. - type: expire
  3969. everySeconds: 2592000
  3970. createdAt: '2022-08-03T23:04:41.073704121Z'
  3971. updatedAt: '2022-08-03T23:04:41.073704228Z'
  3972. links:
  3973. labels: /api/v2/buckets/37407e232b3911d8/labels
  3974. members: /api/v2/buckets/37407e232b3911d8/members
  3975. org: /api/v2/orgs/INFLUX_ORG_ID
  3976. owners: /api/v2/buckets/37407e232b3911d8/owners
  3977. self: /api/v2/buckets/37407e232b3911d8
  3978. write: /api/v2/write?org=INFLUX_ORG_ID&bucket=37407e232b3911d8
  3979. labels: []
  3980. '401':
  3981. $ref: '#/components/responses/AuthorizationError'
  3982. '404':
  3983. description: |
  3984. Not found.
  3985. Bucket not found.
  3986. content:
  3987. application/json:
  3988. schema:
  3989. $ref: '#/components/schemas/Error'
  3990. examples:
  3991. notFound:
  3992. summary: |
  3993. The requested bucket wasn't found.
  3994. value:
  3995. code: not found
  3996. message: bucket not found
  3997. '500':
  3998. $ref: '#/components/responses/InternalServerError'
  3999. default:
  4000. description: Unexpected error
  4001. content:
  4002. application/json:
  4003. schema:
  4004. $ref: '#/components/schemas/Error'
  4005. patch:
  4006. operationId: PatchBucketsID
  4007. tags:
  4008. - Buckets
  4009. summary: Update a bucket
  4010. description: |
  4011. Updates a bucket.
  4012. Use this endpoint to update properties
  4013. (`name`, `description`, and `retentionRules`) of a bucket.
  4014. #### InfluxDB Cloud
  4015. - Requires the `retentionRules` property in the request body. If you don't
  4016. provide `retentionRules`, InfluxDB responds with an HTTP `403` status code.
  4017. #### InfluxDB OSS
  4018. - Doesn't require `retentionRules`.
  4019. #### Related Guides
  4020. - [Update a bucket](https://docs.influxdata.com/influxdb/v2.3/organizations/buckets/update-bucket/)
  4021. requestBody:
  4022. description: The bucket update to apply.
  4023. required: true
  4024. content:
  4025. application/json:
  4026. schema:
  4027. $ref: '#/components/schemas/PatchBucketRequest'
  4028. parameters:
  4029. - $ref: '#/components/parameters/TraceSpan'
  4030. - in: path
  4031. name: bucketID
  4032. schema:
  4033. type: string
  4034. required: true
  4035. description: The bucket ID.
  4036. responses:
  4037. '200':
  4038. description: An updated bucket
  4039. content:
  4040. application/json:
  4041. schema:
  4042. $ref: '#/components/schemas/Bucket'
  4043. examples:
  4044. successResponse:
  4045. value:
  4046. id: 37407e232b3911d8
  4047. orgID: INFLUX_ORG_ID
  4048. type: user
  4049. schemaType: implicit
  4050. description: bucket holding air sensor data
  4051. name: air_sensor
  4052. retentionRules:
  4053. - type: expire
  4054. everySeconds: 2592000
  4055. createdAt: '2022-08-03T23:04:41.073704121Z'
  4056. updatedAt: '2022-08-07T22:49:49.422962913Z'
  4057. links:
  4058. labels: /api/v2/buckets/37407e232b3911d8/labels
  4059. members: /api/v2/buckets/37407e232b3911d8/members
  4060. org: /api/v2/orgs/INFLUX_ORG_ID
  4061. owners: /api/v2/buckets/37407e232b3911d8/owners
  4062. self: /api/v2/buckets/37407e232b3911d8
  4063. write: /api/v2/write?org=INFLUX_ORG_ID&bucket=37407e232b3911d8
  4064. labels: []
  4065. '400':
  4066. description: |
  4067. Bad Request.
  4068. content:
  4069. application/json:
  4070. schema:
  4071. $ref: '#/components/schemas/Error'
  4072. examples:
  4073. invalidJSONStringValue:
  4074. summary: Invalid JSON
  4075. description: |
  4076. If the request body contains invalid JSON, InfluxDB returns `invalid`
  4077. with detail about the problem.
  4078. value:
  4079. code: invalid
  4080. message: 'invalid json: invalid character ''\'''' looking for beginning of value'
  4081. '401':
  4082. $ref: '#/components/responses/AuthorizationError'
  4083. '403':
  4084. description: |
  4085. Forbidden.
  4086. content:
  4087. application/json:
  4088. schema:
  4089. $ref: '#/components/schemas/Error'
  4090. examples:
  4091. invalidRetention:
  4092. summary: |
  4093. The retention policy provided exceeds the max retention for the
  4094. organization.
  4095. value:
  4096. code: forbidden
  4097. message: provided retention exceeds orgs maximum retention duration
  4098. '404':
  4099. description: |
  4100. Not found.
  4101. Bucket not found.
  4102. content:
  4103. application/json:
  4104. schema:
  4105. $ref: '#/components/schemas/Error'
  4106. examples:
  4107. notFound:
  4108. summary: |
  4109. The requested bucket wasn't found.
  4110. value:
  4111. code: not found
  4112. message: bucket not found
  4113. '500':
  4114. $ref: '#/components/responses/InternalServerError'
  4115. default:
  4116. description: Unexpected error
  4117. content:
  4118. application/json:
  4119. schema:
  4120. $ref: '#/components/schemas/Error'
  4121. x-codeSamples:
  4122. - lang: Shell
  4123. label: cURL
  4124. source: |
  4125. curl --request PATCH "http://localhost:8086/api/v2/buckets/BUCKET_ID \
  4126. --header "Authorization: Token INFLUX_TOKEN" \
  4127. --header "Accept: application/json" \
  4128. --header "Content-Type: application/json" \
  4129. --data '{
  4130. "name": "air_sensor",
  4131. "description": "bucket holding air sensor data",
  4132. "retentionRules": [
  4133. {
  4134. "type": "expire",
  4135. "everySeconds": 2592000
  4136. }
  4137. ]
  4138. }'
  4139. delete:
  4140. operationId: DeleteBucketsID
  4141. tags:
  4142. - Buckets
  4143. summary: Delete a bucket
  4144. description: |
  4145. Deletes a bucket and all associated records.
  4146. #### InfluxDB Cloud
  4147. - Does the following when you send a delete request:
  4148. 1. Validates the request and queues the delete.
  4149. 2. Returns an HTTP `204` status code if queued; _error_ otherwise.
  4150. 3. Handles the delete asynchronously.
  4151. #### InfluxDB OSS
  4152. - Validates the request, handles the delete synchronously,
  4153. and then responds with success or failure.
  4154. #### Limitations
  4155. - Only one bucket can be deleted per request.
  4156. #### Related Guides
  4157. - [Delete a bucket](https://docs.influxdata.com/influxdb/v2.3/organizations/buckets/delete-bucket/#delete-a-bucket-in-the-influxdb-ui)
  4158. parameters:
  4159. - $ref: '#/components/parameters/TraceSpan'
  4160. - in: path
  4161. name: bucketID
  4162. schema:
  4163. type: string
  4164. required: true
  4165. description: |
  4166. Bucket ID.
  4167. The ID of the bucket to delete.
  4168. responses:
  4169. '204':
  4170. description: |
  4171. Success.
  4172. #### InfluxDB Cloud
  4173. - The bucket is queued for deletion.
  4174. #### InfluxDB OSS
  4175. - The bucket is deleted.
  4176. '400':
  4177. description: |
  4178. Bad Request.
  4179. content:
  4180. application/json:
  4181. schema:
  4182. $ref: '#/components/schemas/Error'
  4183. examples:
  4184. invalidID:
  4185. summary: |
  4186. Invalid ID.
  4187. value:
  4188. code: invalid
  4189. message: id must have a length of 16 bytes
  4190. '401':
  4191. $ref: '#/components/responses/AuthorizationError'
  4192. '404':
  4193. description: |
  4194. Not found.
  4195. Bucket not found.
  4196. content:
  4197. application/json:
  4198. schema:
  4199. $ref: '#/components/schemas/Error'
  4200. examples:
  4201. notFound:
  4202. summary: |
  4203. The requested bucket was not found.
  4204. value:
  4205. code: not found
  4206. message: bucket not found
  4207. '500':
  4208. $ref: '#/components/responses/InternalServerError'
  4209. default:
  4210. description: Unexpected error
  4211. content:
  4212. application/json:
  4213. schema:
  4214. $ref: '#/components/schemas/Error'
  4215. x-codeSamples:
  4216. - lang: Shell
  4217. label: cURL
  4218. source: |
  4219. curl --request DELETE "http://localhost:8086/api/v2/buckets/BUCKET_ID" \
  4220. --header "Authorization: Token INFLUX_TOKEN" \
  4221. --header 'Accept: application/json'
  4222. '/buckets/{bucketID}/labels':
  4223. get:
  4224. operationId: GetBucketsIDLabels
  4225. tags:
  4226. - Buckets
  4227. summary: List all labels for a bucket
  4228. description: |
  4229. Retrieves a list of all labels for a bucket.
  4230. Labels are objects that contain `labelID`, `name`, `description`, and `color`
  4231. key-value pairs. They may be used for grouping and filtering InfluxDB
  4232. resources.
  4233. Labels are also capable of grouping across different resources--for example,
  4234. you can apply a label named `air_sensor` to a bucket and a task to quickly
  4235. organize resources.
  4236. #### Related guides
  4237. - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels.
  4238. - [Manage labels in the InfluxDB UI](https://docs.influxdata.com/influxdb/v2.3/visualize-data/labels/)
  4239. parameters:
  4240. - $ref: '#/components/parameters/TraceSpan'
  4241. - in: path
  4242. name: bucketID
  4243. schema:
  4244. type: string
  4245. required: true
  4246. description: |
  4247. The ID of the bucket to retrieve labels for.
  4248. responses:
  4249. '200':
  4250. description: |
  4251. Success.
  4252. The response body contains a list of all labels for the bucket.
  4253. content:
  4254. application/json:
  4255. schema:
  4256. $ref: '#/components/schemas/LabelsResponse'
  4257. examples:
  4258. successResponse:
  4259. value:
  4260. links:
  4261. self: /api/v2/labels
  4262. labels:
  4263. - id: 09cbd068e7ebb000
  4264. orgID: INFLUX_ORG_ID
  4265. name: production_buckets
  4266. '400':
  4267. $ref: '#/components/responses/BadRequestError'
  4268. '401':
  4269. $ref: '#/components/responses/AuthorizationError'
  4270. '404':
  4271. $ref: '#/components/responses/ResourceNotFoundError'
  4272. '500':
  4273. $ref: '#/components/responses/InternalServerError'
  4274. default:
  4275. description: Unexpected error
  4276. content:
  4277. application/json:
  4278. schema:
  4279. $ref: '#/components/schemas/Error'
  4280. post:
  4281. operationId: PostBucketsIDLabels
  4282. tags:
  4283. - Buckets
  4284. summary: Add a label to a bucket
  4285. description: |
  4286. Adds a label to a bucket and returns the new label information.
  4287. Labels are objects that contain `labelID`, `name`, `description`, and `color`
  4288. key-value pairs. They may be used for grouping and filtering across one or
  4289. more kinds of **resources**--for example, you can apply a label named
  4290. `air_sensor` to a bucket and a task to quickly organize resources.
  4291. #### Limitations
  4292. - Before adding a label to a bucket, you must create the label if you
  4293. haven't already. To create a label with the InfluxDB API, send a `POST`
  4294. request to the [`/api/v2/labels` endpoint](#operation/PostLabels)).
  4295. #### Related guides
  4296. - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels.
  4297. - [Manage labels in the InfluxDB UI](https://docs.influxdata.com/influxdb/v2.3/visualize-data/labels/)
  4298. parameters:
  4299. - $ref: '#/components/parameters/TraceSpan'
  4300. - in: path
  4301. name: bucketID
  4302. schema:
  4303. type: string
  4304. required: true
  4305. description: |
  4306. Bucket ID.
  4307. The ID of the bucket to label.
  4308. requestBody:
  4309. description: An object that contains a _`labelID`_ to add to the bucket.
  4310. required: true
  4311. content:
  4312. application/json:
  4313. schema:
  4314. $ref: '#/components/schemas/LabelMapping'
  4315. responses:
  4316. '201':
  4317. description: |
  4318. Success.
  4319. The response body contains the label information.
  4320. content:
  4321. application/json:
  4322. schema:
  4323. $ref: '#/components/schemas/LabelResponse'
  4324. examples:
  4325. successResponse:
  4326. value:
  4327. links:
  4328. self: /api/v2/labels
  4329. label:
  4330. id: 09cbd068e7ebb000
  4331. orgID: INFLUX_ORG_ID
  4332. name: production_buckets
  4333. '400':
  4334. $ref: '#/components/responses/BadRequestError'
  4335. examples:
  4336. invalidRequest:
  4337. summary: The `labelID` is missing from the request body.
  4338. value:
  4339. code: invalid
  4340. message: label id is required
  4341. '401':
  4342. $ref: '#/components/responses/AuthorizationError'
  4343. '404':
  4344. $ref: '#/components/responses/ResourceNotFoundError'
  4345. '422':
  4346. description: |
  4347. Unprocessable entity.
  4348. Label already exists on the resource.
  4349. content:
  4350. application/json:
  4351. schema:
  4352. $ref: '#/components/schemas/Error'
  4353. examples:
  4354. conflictingResource:
  4355. summary: |
  4356. Label already exists on the resource.
  4357. value:
  4358. code: conflict
  4359. message: 'Cannot add label, label already exists on resource'
  4360. '500':
  4361. $ref: '#/components/responses/InternalServerError'
  4362. default:
  4363. description: Unexpected error
  4364. content:
  4365. application/json:
  4366. schema:
  4367. $ref: '#/components/schemas/Error'
  4368. x-codeSamples:
  4369. - lang: Shell
  4370. label: cURL
  4371. source: |
  4372. curl --request POST "http://localhost:8086/api/v2/buckets/BUCKETS_ID/labels \
  4373. --header "Authorization: Token INFLUX_TOKEN" \
  4374. --header "Accept: application/json" \
  4375. --header "Content-Type: application/json" \
  4376. --data '{
  4377. "labelID": "09cbd068e7ebb000"
  4378. }'
  4379. '/buckets/{bucketID}/labels/{labelID}':
  4380. delete:
  4381. operationId: DeleteBucketsIDLabelsID
  4382. tags:
  4383. - Buckets
  4384. summary: Delete a label from a bucket
  4385. parameters:
  4386. - $ref: '#/components/parameters/TraceSpan'
  4387. - in: path
  4388. name: bucketID
  4389. schema:
  4390. type: string
  4391. required: true
  4392. description: The bucket ID.
  4393. - in: path
  4394. name: labelID
  4395. schema:
  4396. type: string
  4397. required: true
  4398. description: The ID of the label to delete.
  4399. responses:
  4400. '204':
  4401. description: Delete has been accepted
  4402. '404':
  4403. description: Bucket not found
  4404. content:
  4405. application/json:
  4406. schema:
  4407. $ref: '#/components/schemas/Error'
  4408. default:
  4409. description: Unexpected error
  4410. content:
  4411. application/json:
  4412. schema:
  4413. $ref: '#/components/schemas/Error'
  4414. '/buckets/{bucketID}/members':
  4415. get:
  4416. operationId: GetBucketsIDMembers
  4417. tags:
  4418. - Buckets
  4419. summary: List all users with member privileges for a bucket
  4420. description: |
  4421. Retrieves a list of all users for a bucket.
  4422. InfluxDB [users](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#user) have
  4423. permission to access InfluxDB.
  4424. [Members](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#member) are users in
  4425. an organization with access to the specified resource.
  4426. Use this endpoint to retrieve all users with access to a bucket.
  4427. #### Related guides
  4428. - [Manage users](https://docs.influxdata.com/influxdb/v2.3/users/)
  4429. - [Manage members](https://docs.influxdata.com/influxdb/v2.3/organizations/members/)
  4430. parameters:
  4431. - $ref: '#/components/parameters/TraceSpan'
  4432. - in: path
  4433. name: bucketID
  4434. schema:
  4435. type: string
  4436. required: true
  4437. description: |
  4438. The ID of the bucket to retrieve users for.
  4439. responses:
  4440. '200':
  4441. description: |
  4442. Success.
  4443. The response body contains a list of all users for the bucket.
  4444. content:
  4445. application/json:
  4446. schema:
  4447. $ref: '#/components/schemas/ResourceMembers'
  4448. examples:
  4449. successResponse:
  4450. value:
  4451. links:
  4452. self: /api/v2/buckets/37407e232b3911d8/members
  4453. users:
  4454. - role: member
  4455. links:
  4456. self: /api/v2/users/791df274afd48a83
  4457. id: 791df274afd48a83
  4458. name: example_user_1
  4459. status: active
  4460. - role: owner
  4461. links:
  4462. self: /api/v2/users/09cfb87051cbe000
  4463. id: 09cfb87051cbe000
  4464. name: example_user_2
  4465. status: active
  4466. '400':
  4467. $ref: '#/components/responses/BadRequestError'
  4468. '401':
  4469. $ref: '#/components/responses/AuthorizationError'
  4470. '404':
  4471. $ref: '#/components/responses/ResourceNotFoundError'
  4472. '500':
  4473. $ref: '#/components/responses/InternalServerError'
  4474. default:
  4475. description: Unexpected error
  4476. content:
  4477. application/json:
  4478. schema:
  4479. $ref: '#/components/schemas/Error'
  4480. post:
  4481. operationId: PostBucketsIDMembers
  4482. tags:
  4483. - Buckets
  4484. summary: Add a member to a bucket
  4485. description: |
  4486. Add a user to a bucket and return the new user information.
  4487. InfluxDB [users](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#user) have
  4488. permission to access InfluxDB.
  4489. [Members](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#member) are users in
  4490. an organization.
  4491. Use this endpoint to give a user member privileges to a bucket.
  4492. #### Related guides
  4493. - [Manage users](https://docs.influxdata.com/influxdb/v2.3/users/)
  4494. - [Manage members](https://docs.influxdata.com/influxdb/v2.3/organizations/members/)
  4495. parameters:
  4496. - $ref: '#/components/parameters/TraceSpan'
  4497. - in: path
  4498. name: bucketID
  4499. schema:
  4500. type: string
  4501. required: true
  4502. description: |
  4503. The ID of the bucket to retrieve users for.
  4504. requestBody:
  4505. description: A user to add as a member to the bucket.
  4506. required: true
  4507. content:
  4508. application/json:
  4509. schema:
  4510. $ref: '#/components/schemas/AddResourceMemberRequestBody'
  4511. responses:
  4512. '201':
  4513. description: |
  4514. Success.
  4515. The response body contains the user information.
  4516. content:
  4517. application/json:
  4518. schema:
  4519. $ref: '#/components/schemas/ResourceMember'
  4520. examples:
  4521. successResponse:
  4522. value:
  4523. role: member
  4524. links:
  4525. self: /api/v2/users/09cfb87051cbe000
  4526. id: 09cfb87051cbe000
  4527. name: example_user_1
  4528. status: active
  4529. '400':
  4530. $ref: '#/components/responses/BadRequestError'
  4531. examples:
  4532. invalidRequest:
  4533. summary: The `userID` is missing from the request body.
  4534. value:
  4535. code: invalid
  4536. message: user id missing or invalid
  4537. '401':
  4538. $ref: '#/components/responses/AuthorizationError'
  4539. '404':
  4540. $ref: '#/components/responses/ResourceNotFoundError'
  4541. '500':
  4542. $ref: '#/components/responses/InternalServerError'
  4543. default:
  4544. description: Unexpected error
  4545. content:
  4546. application/json:
  4547. schema:
  4548. $ref: '#/components/schemas/Error'
  4549. x-codeSamples:
  4550. - lang: Shell
  4551. label: cURL
  4552. source: |
  4553. curl --request POST "http://localhost:8086/api/v2/buckets/BUCKET_ID/members \
  4554. --header "Authorization: Token INFLUX_TOKEN" \
  4555. --header "Accept: application/json" \
  4556. --header "Content-Type: application/json" \
  4557. --data '{
  4558. "id": "09cfb87051cbe000"
  4559. }
  4560. '/buckets/{bucketID}/members/{userID}':
  4561. delete:
  4562. operationId: DeleteBucketsIDMembersID
  4563. tags:
  4564. - Buckets
  4565. summary: Remove a member from a bucket
  4566. description: |
  4567. Removes a member from a bucket.
  4568. Use this endpoint to remove a user's member privileges from a bucket. This
  4569. removes the user's `read` and `write` permissions for the bucket.
  4570. #### Related guides
  4571. - [Manage users](https://docs.influxdata.com/influxdb/v2.3/users/)
  4572. - [Manage members](https://docs.influxdata.com/influxdb/v2.3/organizations/members/)
  4573. parameters:
  4574. - $ref: '#/components/parameters/TraceSpan'
  4575. - in: path
  4576. name: userID
  4577. schema:
  4578. type: string
  4579. required: true
  4580. description: |
  4581. The ID of the user to remove.
  4582. - in: path
  4583. name: bucketID
  4584. schema:
  4585. type: string
  4586. required: true
  4587. description: |
  4588. The ID of the bucket to remove a user from.
  4589. responses:
  4590. '204':
  4591. description: |
  4592. Success.
  4593. The user is no longer a member of the bucket.
  4594. '401':
  4595. $ref: '#/components/responses/AuthorizationError'
  4596. '404':
  4597. $ref: '#/components/responses/ResourceNotFoundError'
  4598. '500':
  4599. $ref: '#/components/responses/InternalServerError'
  4600. default:
  4601. description: Unexpected error
  4602. content:
  4603. application/json:
  4604. schema:
  4605. $ref: '#/components/schemas/Error'
  4606. '/buckets/{bucketID}/owners':
  4607. get:
  4608. operationId: GetBucketsIDOwners
  4609. tags:
  4610. - Buckets
  4611. summary: List all owners of a bucket
  4612. parameters:
  4613. - $ref: '#/components/parameters/TraceSpan'
  4614. - in: path
  4615. name: bucketID
  4616. schema:
  4617. type: string
  4618. required: true
  4619. description: The bucket ID.
  4620. responses:
  4621. '200':
  4622. description: A list of bucket owners
  4623. content:
  4624. application/json:
  4625. schema:
  4626. $ref: '#/components/schemas/ResourceOwners'
  4627. default:
  4628. description: Unexpected error
  4629. content:
  4630. application/json:
  4631. schema:
  4632. $ref: '#/components/schemas/Error'
  4633. post:
  4634. operationId: PostBucketsIDOwners
  4635. tags:
  4636. - Buckets
  4637. summary: Add an owner to a bucket
  4638. parameters:
  4639. - $ref: '#/components/parameters/TraceSpan'
  4640. - in: path
  4641. name: bucketID
  4642. schema:
  4643. type: string
  4644. required: true
  4645. description: The bucket ID.
  4646. requestBody:
  4647. description: User to add as owner
  4648. required: true
  4649. content:
  4650. application/json:
  4651. schema:
  4652. $ref: '#/components/schemas/AddResourceMemberRequestBody'
  4653. responses:
  4654. '201':
  4655. description: Success. The user is an owner of the bucket
  4656. content:
  4657. application/json:
  4658. schema:
  4659. $ref: '#/components/schemas/ResourceOwner'
  4660. default:
  4661. description: Unexpected error
  4662. content:
  4663. application/json:
  4664. schema:
  4665. $ref: '#/components/schemas/Error'
  4666. '/buckets/{bucketID}/owners/{userID}':
  4667. delete:
  4668. operationId: DeleteBucketsIDOwnersID
  4669. tags:
  4670. - Buckets
  4671. summary: Remove an owner from a bucket
  4672. parameters:
  4673. - $ref: '#/components/parameters/TraceSpan'
  4674. - in: path
  4675. name: userID
  4676. schema:
  4677. type: string
  4678. required: true
  4679. description: The ID of the owner to remove.
  4680. - in: path
  4681. name: bucketID
  4682. schema:
  4683. type: string
  4684. required: true
  4685. description: The bucket ID.
  4686. responses:
  4687. '204':
  4688. description: Owner removed
  4689. default:
  4690. description: Unexpected error
  4691. content:
  4692. application/json:
  4693. schema:
  4694. $ref: '#/components/schemas/Error'
  4695. /orgs:
  4696. get:
  4697. operationId: GetOrgs
  4698. tags:
  4699. - Organizations
  4700. - Security and access endpoints
  4701. summary: List organizations
  4702. description: |
  4703. Retrieves a list of [organizations](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#organization/).
  4704. To limit which organizations are returned, pass query parameters in your request.
  4705. If no query parameters are passed, InfluxDB returns all organizations up to the default `limit`.
  4706. #### InfluxDB Cloud
  4707. - Only returns the organization that owns the token passed in the request.
  4708. #### Related guides
  4709. - [View organizations](https://docs.influxdata.com/influxdb/v2.3/organizations/view-orgs/).
  4710. parameters:
  4711. - $ref: '#/components/parameters/TraceSpan'
  4712. - $ref: '#/components/parameters/Offset'
  4713. - $ref: '#/components/parameters/Limit'
  4714. - $ref: '#/components/parameters/Descending'
  4715. - in: query
  4716. name: org
  4717. schema:
  4718. type: string
  4719. description: |
  4720. An organization name.
  4721. Only returns organizations with this name.
  4722. - in: query
  4723. name: orgID
  4724. schema:
  4725. type: string
  4726. description: |
  4727. An organization ID.
  4728. Only returns the organization with this ID.
  4729. - in: query
  4730. name: userID
  4731. schema:
  4732. type: string
  4733. description: |
  4734. A user ID.
  4735. Only returns organizations where this user is a member or owner.
  4736. responses:
  4737. '200':
  4738. description: Success. The response body contains a list of organizations.
  4739. content:
  4740. application/json:
  4741. schema:
  4742. $ref: '#/components/schemas/Organizations'
  4743. '400':
  4744. $ref: '#/components/responses/BadRequestError'
  4745. '401':
  4746. $ref: '#/components/responses/AuthorizationError'
  4747. '404':
  4748. $ref: '#/components/responses/ResourceNotFoundError'
  4749. '500':
  4750. $ref: '#/components/responses/InternalServerError'
  4751. default:
  4752. $ref: '#/components/responses/GeneralServerError'
  4753. post:
  4754. operationId: PostOrgs
  4755. tags:
  4756. - Organizations
  4757. summary: Create an organization
  4758. description: |
  4759. Creates an organization and returns the newly created organization.
  4760. #### InfluxDB Cloud
  4761. - Doesn't allow you to use this endpoint to create organizations.
  4762. parameters:
  4763. - $ref: '#/components/parameters/TraceSpan'
  4764. requestBody:
  4765. description: The organization to create.
  4766. required: true
  4767. content:
  4768. application/json:
  4769. schema:
  4770. $ref: '#/components/schemas/PostOrganizationRequest'
  4771. responses:
  4772. '201':
  4773. description: |
  4774. Success. The organization is created.
  4775. The response body contains the new organization.
  4776. content:
  4777. application/json:
  4778. schema:
  4779. $ref: '#/components/schemas/Organization'
  4780. '400':
  4781. $ref: '#/components/responses/BadRequestError'
  4782. '401':
  4783. $ref: '#/components/responses/AuthorizationError'
  4784. '404':
  4785. $ref: '#/components/responses/ResourceNotFoundError'
  4786. '500':
  4787. $ref: '#/components/responses/InternalServerError'
  4788. default:
  4789. $ref: '#/components/responses/GeneralServerError'
  4790. '/orgs/{orgID}':
  4791. get:
  4792. operationId: GetOrgsID
  4793. tags:
  4794. - Organizations
  4795. - Security and access endpoints
  4796. summary: Retrieve an organization
  4797. parameters:
  4798. - $ref: '#/components/parameters/TraceSpan'
  4799. - in: path
  4800. name: orgID
  4801. schema:
  4802. type: string
  4803. required: true
  4804. description: The ID of the organization to get.
  4805. responses:
  4806. '200':
  4807. description: Organization details
  4808. content:
  4809. application/json:
  4810. schema:
  4811. $ref: '#/components/schemas/Organization'
  4812. default:
  4813. description: Unexpected error
  4814. content:
  4815. application/json:
  4816. schema:
  4817. $ref: '#/components/schemas/Error'
  4818. patch:
  4819. operationId: PatchOrgsID
  4820. tags:
  4821. - Organizations
  4822. summary: Update an organization
  4823. requestBody:
  4824. description: Organization update to apply
  4825. required: true
  4826. content:
  4827. application/json:
  4828. schema:
  4829. $ref: '#/components/schemas/PatchOrganizationRequest'
  4830. parameters:
  4831. - $ref: '#/components/parameters/TraceSpan'
  4832. - in: path
  4833. name: orgID
  4834. schema:
  4835. type: string
  4836. required: true
  4837. description: The ID of the organization to get.
  4838. responses:
  4839. '200':
  4840. description: Organization updated
  4841. content:
  4842. application/json:
  4843. schema:
  4844. $ref: '#/components/schemas/Organization'
  4845. default:
  4846. description: Unexpected error
  4847. content:
  4848. application/json:
  4849. schema:
  4850. $ref: '#/components/schemas/Error'
  4851. delete:
  4852. operationId: DeleteOrgsID
  4853. tags:
  4854. - Organizations
  4855. summary: Delete an organization
  4856. parameters:
  4857. - $ref: '#/components/parameters/TraceSpan'
  4858. - in: path
  4859. name: orgID
  4860. schema:
  4861. type: string
  4862. required: true
  4863. description: The ID of the organization to delete.
  4864. responses:
  4865. '204':
  4866. description: Delete has been accepted
  4867. '404':
  4868. description: Organization not found
  4869. content:
  4870. application/json:
  4871. schema:
  4872. $ref: '#/components/schemas/Error'
  4873. default:
  4874. description: Unexpected error
  4875. content:
  4876. application/json:
  4877. schema:
  4878. $ref: '#/components/schemas/Error'
  4879. '/orgs/{orgID}/secrets':
  4880. get:
  4881. operationId: GetOrgsIDSecrets
  4882. tags:
  4883. - Secrets
  4884. - Security and access endpoints
  4885. summary: List all secret keys for an organization
  4886. parameters:
  4887. - $ref: '#/components/parameters/TraceSpan'
  4888. - in: path
  4889. name: orgID
  4890. schema:
  4891. type: string
  4892. required: true
  4893. description: The organization ID.
  4894. responses:
  4895. '200':
  4896. description: A list of all secret keys
  4897. content:
  4898. application/json:
  4899. schema:
  4900. $ref: '#/components/schemas/SecretKeysResponse'
  4901. default:
  4902. description: Unexpected error
  4903. content:
  4904. application/json:
  4905. schema:
  4906. $ref: '#/components/schemas/Error'
  4907. patch:
  4908. operationId: PatchOrgsIDSecrets
  4909. tags:
  4910. - Secrets
  4911. summary: Update secrets in an organization
  4912. parameters:
  4913. - $ref: '#/components/parameters/TraceSpan'
  4914. - in: path
  4915. name: orgID
  4916. schema:
  4917. type: string
  4918. required: true
  4919. description: The organization ID.
  4920. requestBody:
  4921. description: Secret key value pairs to update/add
  4922. required: true
  4923. content:
  4924. application/json:
  4925. schema:
  4926. $ref: '#/components/schemas/Secrets'
  4927. responses:
  4928. '204':
  4929. description: Keys successfully patched
  4930. default:
  4931. description: Unexpected error
  4932. content:
  4933. application/json:
  4934. schema:
  4935. $ref: '#/components/schemas/Error'
  4936. '/orgs/{orgID}/members':
  4937. get:
  4938. operationId: GetOrgsIDMembers
  4939. tags:
  4940. - Organizations
  4941. - Security and access endpoints
  4942. summary: List all members of an organization
  4943. parameters:
  4944. - $ref: '#/components/parameters/TraceSpan'
  4945. - in: path
  4946. name: orgID
  4947. schema:
  4948. type: string
  4949. required: true
  4950. description: The organization ID.
  4951. responses:
  4952. '200':
  4953. description: A list of organization members
  4954. content:
  4955. application/json:
  4956. schema:
  4957. $ref: '#/components/schemas/ResourceMembers'
  4958. '404':
  4959. description: Organization not found
  4960. content:
  4961. application/json:
  4962. schema:
  4963. $ref: '#/components/schemas/Error'
  4964. default:
  4965. description: Unexpected error
  4966. content:
  4967. application/json:
  4968. schema:
  4969. $ref: '#/components/schemas/Error'
  4970. post:
  4971. operationId: PostOrgsIDMembers
  4972. tags:
  4973. - Organizations
  4974. summary: Add a member to an organization
  4975. parameters:
  4976. - $ref: '#/components/parameters/TraceSpan'
  4977. - in: path
  4978. name: orgID
  4979. schema:
  4980. type: string
  4981. required: true
  4982. description: The organization ID.
  4983. requestBody:
  4984. description: User to add as member
  4985. required: true
  4986. content:
  4987. application/json:
  4988. schema:
  4989. $ref: '#/components/schemas/AddResourceMemberRequestBody'
  4990. responses:
  4991. '201':
  4992. description: Added to organization created
  4993. content:
  4994. application/json:
  4995. schema:
  4996. $ref: '#/components/schemas/ResourceMember'
  4997. default:
  4998. description: Unexpected error
  4999. content:
  5000. application/json:
  5001. schema:
  5002. $ref: '#/components/schemas/Error'
  5003. '/orgs/{orgID}/members/{userID}':
  5004. delete:
  5005. operationId: DeleteOrgsIDMembersID
  5006. tags:
  5007. - Organizations
  5008. - Security and access endpoints
  5009. summary: Remove a member from an organization
  5010. parameters:
  5011. - $ref: '#/components/parameters/TraceSpan'
  5012. - in: path
  5013. name: userID
  5014. schema:
  5015. type: string
  5016. required: true
  5017. description: The ID of the member to remove.
  5018. - in: path
  5019. name: orgID
  5020. schema:
  5021. type: string
  5022. required: true
  5023. description: The organization ID.
  5024. responses:
  5025. '204':
  5026. description: Member removed
  5027. default:
  5028. description: Unexpected error
  5029. content:
  5030. application/json:
  5031. schema:
  5032. $ref: '#/components/schemas/Error'
  5033. '/orgs/{orgID}/owners':
  5034. get:
  5035. operationId: GetOrgsIDOwners
  5036. tags:
  5037. - Organizations
  5038. - Security and access endpoints
  5039. summary: List all owners of an organization
  5040. description: |
  5041. Retrieves a list of all owners of an organization.
  5042. parameters:
  5043. - $ref: '#/components/parameters/TraceSpan'
  5044. - in: path
  5045. name: orgID
  5046. schema:
  5047. type: string
  5048. required: true
  5049. description: |
  5050. The ID of the organization to list owners for.
  5051. responses:
  5052. '200':
  5053. description: A list of organization owners
  5054. content:
  5055. application/json:
  5056. schema:
  5057. $ref: '#/components/schemas/ResourceOwners'
  5058. '404':
  5059. description: Organization not found
  5060. content:
  5061. application/json:
  5062. schema:
  5063. $ref: '#/components/schemas/Error'
  5064. default:
  5065. description: Unexpected error
  5066. content:
  5067. application/json:
  5068. schema:
  5069. $ref: '#/components/schemas/Error'
  5070. post:
  5071. operationId: PostOrgsIDOwners
  5072. tags:
  5073. - Organizations
  5074. summary: Add an owner to an organization
  5075. description: |
  5076. Adds an owner to an organization.
  5077. Use this endpoint to assign the organization `owner` role to a user.
  5078. #### InfluxDB Cloud
  5079. - Doesn't use `owner` and `member` roles.
  5080. Use [`/api/v2/authorizations`](#tag/Authorizations) to assign user permissions.
  5081. #### Required permissions
  5082. - `write-orgs INFLUX_ORG_ID`
  5083. `INFLUX_ORG_ID` is the ID of the organization that you want add an owner for.
  5084. #### Related endpoints
  5085. - [Authorizations](#tag/Authorizations)
  5086. parameters:
  5087. - $ref: '#/components/parameters/TraceSpan'
  5088. - in: path
  5089. name: orgID
  5090. schema:
  5091. type: string
  5092. required: true
  5093. description: The ID of the organization that you want to add an owner for.
  5094. requestBody:
  5095. description: The user to add as an owner of the organization.
  5096. required: true
  5097. content:
  5098. application/json:
  5099. schema:
  5100. $ref: '#/components/schemas/AddResourceMemberRequestBody'
  5101. responses:
  5102. '201':
  5103. description: |
  5104. Success. The user is an owner of the organization.
  5105. The response body contains the owner with role and user detail.
  5106. content:
  5107. application/json:
  5108. schema:
  5109. $ref: '#/components/schemas/ResourceOwner'
  5110. default:
  5111. description: Unexpected error
  5112. content:
  5113. application/json:
  5114. schema:
  5115. $ref: '#/components/schemas/Error'
  5116. '/orgs/{orgID}/owners/{userID}':
  5117. delete:
  5118. operationId: DeleteOrgsIDOwnersID
  5119. tags:
  5120. - Organizations
  5121. - Security and access endpoints
  5122. summary: Remove an owner from an organization
  5123. parameters:
  5124. - $ref: '#/components/parameters/TraceSpan'
  5125. - in: path
  5126. name: userID
  5127. schema:
  5128. type: string
  5129. required: true
  5130. description: The ID of the owner to remove.
  5131. - in: path
  5132. name: orgID
  5133. schema:
  5134. type: string
  5135. required: true
  5136. description: The organization ID.
  5137. responses:
  5138. '204':
  5139. description: Owner removed
  5140. default:
  5141. description: Unexpected error
  5142. content:
  5143. application/json:
  5144. schema:
  5145. $ref: '#/components/schemas/Error'
  5146. '/orgs/{orgID}/secrets/delete':
  5147. post:
  5148. deprecated: true
  5149. operationId: PostOrgsIDSecrets
  5150. tags:
  5151. - Secrets
  5152. - Security and access endpoints
  5153. summary: Delete secrets from an organization
  5154. parameters:
  5155. - $ref: '#/components/parameters/TraceSpan'
  5156. - in: path
  5157. name: orgID
  5158. schema:
  5159. type: string
  5160. required: true
  5161. description: The organization ID.
  5162. requestBody:
  5163. description: Secret key to delete
  5164. required: true
  5165. content:
  5166. application/json:
  5167. schema:
  5168. $ref: '#/components/schemas/SecretKeys'
  5169. responses:
  5170. '204':
  5171. description: Keys successfully patched
  5172. default:
  5173. description: Unexpected error
  5174. content:
  5175. application/json:
  5176. schema:
  5177. $ref: '#/components/schemas/Error'
  5178. '/orgs/{orgID}/secrets/{secretID}':
  5179. delete:
  5180. operationId: DeleteOrgsIDSecretsID
  5181. tags:
  5182. - Secrets
  5183. - Security and access endpoints
  5184. summary: Delete a secret from an organization
  5185. parameters:
  5186. - $ref: '#/components/parameters/TraceSpan'
  5187. - in: path
  5188. name: orgID
  5189. schema:
  5190. type: string
  5191. required: true
  5192. description: The organization ID.
  5193. - in: path
  5194. name: secretID
  5195. schema:
  5196. type: string
  5197. required: true
  5198. description: The secret ID.
  5199. responses:
  5200. '204':
  5201. description: Keys successfully deleted
  5202. default:
  5203. description: Unexpected error
  5204. $ref: '#/components/responses/GeneralServerError'
  5205. /resources:
  5206. get:
  5207. operationId: GetResources
  5208. tags:
  5209. - Resources
  5210. - System information endpoints
  5211. summary: List all known resources
  5212. parameters:
  5213. - $ref: '#/components/parameters/TraceSpan'
  5214. responses:
  5215. '200':
  5216. description: All resources targets
  5217. content:
  5218. application/json:
  5219. schema:
  5220. type: array
  5221. items:
  5222. type: string
  5223. default:
  5224. description: Internal server error
  5225. content:
  5226. application/json:
  5227. schema:
  5228. $ref: '#/components/schemas/Error'
  5229. /stacks:
  5230. get:
  5231. operationId: ListStacks
  5232. tags:
  5233. - Templates
  5234. summary: List installed stacks
  5235. description: |
  5236. Retrieves a list of installed InfluxDB stacks.
  5237. To limit stacks in the response, pass query parameters in your request.
  5238. If no query parameters are passed, InfluxDB returns all installed stacks
  5239. for the organization.
  5240. parameters:
  5241. - in: query
  5242. name: orgID
  5243. required: true
  5244. schema:
  5245. type: string
  5246. description: |
  5247. The ID of the organization that owns the stacks.
  5248. Only returns stacks owned by this organization.
  5249. #### InfluxDB Cloud
  5250. - Doesn't require this parameter;
  5251. InfluxDB only returns resources allowed by the API token.
  5252. - in: query
  5253. name: name
  5254. schema:
  5255. type: string
  5256. description: |
  5257. The stack name.
  5258. Finds stack `events` with this name and returns the stacks.
  5259. Repeatable.
  5260. To filter for more than one stack name,
  5261. repeat this parameter with each name--for example:
  5262. - `http://localhost:8086/api/v2/stacks?&orgID=INFLUX_ORG_ID&name=project-stack-0&name=project-stack-1`
  5263. examples:
  5264. findStackByName:
  5265. summary: Find stacks with the event name
  5266. value: project-stack-0
  5267. - in: query
  5268. name: stackID
  5269. schema:
  5270. type: string
  5271. description: |
  5272. The stack ID.
  5273. Only returns stacks with this ID.
  5274. Repeatable.
  5275. To filter for more than one stack ID,
  5276. repeat this parameter with each ID--for example:
  5277. - `http://localhost:8086/api/v2/stacks?&orgID=INFLUX_ORG_ID&stackID=09bd87cd33be3000&stackID=09bef35081fe3000`
  5278. examples:
  5279. findStackByID:
  5280. summary: Find a stack with the ID
  5281. value: 09bd87cd33be3000
  5282. responses:
  5283. '200':
  5284. description: Success. The response body contains the list of stacks.
  5285. content:
  5286. application/json:
  5287. schema:
  5288. type: object
  5289. properties:
  5290. stacks:
  5291. type: array
  5292. items:
  5293. $ref: '#/components/schemas/Stack'
  5294. '400':
  5295. description: |
  5296. Bad request.
  5297. The response body contains detail about the error.
  5298. #### InfluxDB OSS
  5299. - Returns this error if an incorrect value is passed for `org` or `orgID`.
  5300. content:
  5301. application/json:
  5302. schema:
  5303. $ref: '#/components/schemas/Error'
  5304. examples:
  5305. orgIdMissing:
  5306. summary: The orgID query parameter is missing
  5307. value:
  5308. code: invalid
  5309. message: 'organization id[""] is invalid: id must have a length of 16 bytes'
  5310. orgProvidedNotFound:
  5311. summary: The org or orgID passed doesn't own the token passed in the header
  5312. value:
  5313. code: invalid
  5314. message: 'failed to decode request body: organization not found'
  5315. '401':
  5316. $ref: '#/components/responses/AuthorizationError'
  5317. '500':
  5318. $ref: '#/components/responses/InternalServerError'
  5319. default:
  5320. description: Unexpected error
  5321. content:
  5322. application/json:
  5323. schema:
  5324. $ref: '#/components/schemas/Error'
  5325. post:
  5326. operationId: CreateStack
  5327. tags:
  5328. - Templates
  5329. summary: Create a stack
  5330. description: |
  5331. Creates or initializes a stack.
  5332. Use this endpoint to _manually_ initialize a new stack with the following
  5333. optional information:
  5334. - Stack name
  5335. - Stack description
  5336. - URLs for template manifest files
  5337. To automatically create a stack when applying templates,
  5338. use the [/api/v2/templates/apply endpoint](#operation/ApplyTemplate).
  5339. #### Required permissions
  5340. - `write` permission for the organization
  5341. #### Related guides
  5342. - [InfluxDB stacks](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/stacks/)
  5343. - [Use InfluxDB templates](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/use/#apply-templates-to-an-influxdb-instance)
  5344. requestBody:
  5345. description: The stack to create.
  5346. required: true
  5347. content:
  5348. application/json:
  5349. schema:
  5350. type: object
  5351. title: PostStackRequest
  5352. properties:
  5353. orgID:
  5354. type: string
  5355. name:
  5356. type: string
  5357. description:
  5358. type: string
  5359. urls:
  5360. type: array
  5361. items:
  5362. type: string
  5363. responses:
  5364. '201':
  5365. description: Success. Returns the newly created stack.
  5366. content:
  5367. application/json:
  5368. schema:
  5369. $ref: '#/components/schemas/Stack'
  5370. '401':
  5371. $ref: '#/components/responses/AuthorizationError'
  5372. '422':
  5373. description: |
  5374. Unprocessable entity.
  5375. The error may indicate one of the following problems:
  5376. - The request body isn't valid--the request is well-formed, but InfluxDB can't process it due to semantic errors.
  5377. - You passed a parameter combination that InfluxDB doesn't support.
  5378. content:
  5379. application/json:
  5380. schema:
  5381. $ref: '#/components/schemas/Error'
  5382. '500':
  5383. $ref: '#/components/responses/InternalServerError'
  5384. default:
  5385. description: Unexpected error
  5386. content:
  5387. application/json:
  5388. schema:
  5389. $ref: '#/components/schemas/Error'
  5390. '/stacks/{stack_id}':
  5391. get:
  5392. operationId: ReadStack
  5393. tags:
  5394. - Templates
  5395. summary: Retrieve a stack
  5396. parameters:
  5397. - in: path
  5398. name: stack_id
  5399. required: true
  5400. schema:
  5401. type: string
  5402. description: The identifier of the stack.
  5403. responses:
  5404. '200':
  5405. description: Returns the stack.
  5406. content:
  5407. application/json:
  5408. schema:
  5409. $ref: '#/components/schemas/Stack'
  5410. default:
  5411. description: Unexpected error
  5412. content:
  5413. application/json:
  5414. schema:
  5415. $ref: '#/components/schemas/Error'
  5416. patch:
  5417. operationId: UpdateStack
  5418. tags:
  5419. - Templates
  5420. summary: Update a stack
  5421. parameters:
  5422. - in: path
  5423. name: stack_id
  5424. required: true
  5425. schema:
  5426. type: string
  5427. description: The identifier of the stack.
  5428. requestBody:
  5429. description: The stack to update.
  5430. required: true
  5431. content:
  5432. application/json:
  5433. schema:
  5434. type: object
  5435. title: PatchStackRequest
  5436. properties:
  5437. name:
  5438. type: string
  5439. nullable: true
  5440. description:
  5441. type: string
  5442. nullable: true
  5443. templateURLs:
  5444. type: array
  5445. items:
  5446. type: string
  5447. nullable: true
  5448. additionalResources:
  5449. type: array
  5450. items:
  5451. type: object
  5452. properties:
  5453. resourceID:
  5454. type: string
  5455. kind:
  5456. type: string
  5457. templateMetaName:
  5458. type: string
  5459. required:
  5460. - kind
  5461. - resourceID
  5462. responses:
  5463. '200':
  5464. description: Returns the updated stack.
  5465. content:
  5466. application/json:
  5467. schema:
  5468. $ref: '#/components/schemas/Stack'
  5469. default:
  5470. description: Unexpected error
  5471. content:
  5472. application/json:
  5473. schema:
  5474. $ref: '#/components/schemas/Error'
  5475. delete:
  5476. operationId: DeleteStack
  5477. tags:
  5478. - Templates
  5479. summary: Delete a stack and associated resources
  5480. parameters:
  5481. - in: path
  5482. name: stack_id
  5483. required: true
  5484. schema:
  5485. type: string
  5486. description: The identifier of the stack.
  5487. - in: query
  5488. name: orgID
  5489. required: true
  5490. schema:
  5491. type: string
  5492. description: The identifier of the organization.
  5493. responses:
  5494. '204':
  5495. description: The stack and its associated resources were deleted.
  5496. default:
  5497. description: Unexpected error
  5498. content:
  5499. application/json:
  5500. schema:
  5501. $ref: '#/components/schemas/Error'
  5502. '/stacks/{stack_id}/uninstall':
  5503. post:
  5504. operationId: UninstallStack
  5505. tags:
  5506. - Templates
  5507. summary: Uninstall a stack
  5508. parameters:
  5509. - in: path
  5510. name: stack_id
  5511. required: true
  5512. schema:
  5513. type: string
  5514. description: The identifier of the stack.
  5515. responses:
  5516. '200':
  5517. description: Returns the uninstalled stack.
  5518. content:
  5519. application/json:
  5520. schema:
  5521. $ref: '#/components/schemas/Stack'
  5522. default:
  5523. description: Unexpected error
  5524. content:
  5525. application/json:
  5526. schema:
  5527. $ref: '#/components/schemas/Error'
  5528. /templates/apply:
  5529. post:
  5530. operationId: ApplyTemplate
  5531. tags:
  5532. - Templates
  5533. summary: Apply or dry-run a template
  5534. description: |
  5535. Applies a template to
  5536. create or update a [stack](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/stacks/) of InfluxDB
  5537. [resources](https://docs.influxdata.com/influxdb/v2.3/reference/cli/influx/export/all/#resources).
  5538. The response contains the diff of changes and the stack ID.
  5539. Use this endpoint to install an InfluxDB template to an organization.
  5540. Provide template URLs or template objects in your request.
  5541. To customize which template resources are installed, use the `actions`
  5542. parameter.
  5543. By default, when you apply a template, InfluxDB installs the template to
  5544. create and update stack resources and then generates a diff of the changes.
  5545. If you pass `dryRun: true` in the request body, InfluxDB validates the
  5546. template and generates the resource diff, but doesn’t make any
  5547. changes to your instance.
  5548. #### Custom values for templates
  5549. - Some templates may contain [environment references](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/create/#include-user-definable-resource-names) for custom metadata.
  5550. To provide custom values for environment references, pass the _`envRefs`_
  5551. property in the request body.
  5552. For more information and examples, see how to
  5553. [define environment references](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/use/#define-environment-references).
  5554. - Some templates may contain queries that use
  5555. [secrets](https://docs.influxdata.com/influxdb/v2.3/security/secrets/).
  5556. To provide custom secret values, pass the _`secrets`_ property
  5557. in the request body.
  5558. Don't expose secret values in templates.
  5559. For more information, see [how to pass secrets when installing a template](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/use/#pass-secrets-when-installing-a-template).
  5560. #### Required permissions
  5561. - `write` permissions for resource types in the template.
  5562. #### Rate limits (with InfluxDB Cloud)
  5563. - Adjustable service quotas apply.
  5564. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/).
  5565. #### Related guides
  5566. - [Use templates](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/use/)
  5567. - [Stacks](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/stacks/)
  5568. requestBody:
  5569. required: true
  5570. description: |
  5571. Parameters for applying templates.
  5572. content:
  5573. application/json:
  5574. schema:
  5575. $ref: '#/components/schemas/TemplateApply'
  5576. examples:
  5577. skipKindAction:
  5578. summary: Skip all bucket and task resources in the provided templates
  5579. value:
  5580. orgID: INFLUX_ORG_ID
  5581. actions:
  5582. - action: skipKind
  5583. properties:
  5584. kind: Bucket
  5585. - action: skipKind
  5586. properties:
  5587. kind: Task
  5588. templates:
  5589. - contents:
  5590. - '[object Object]': null
  5591. skipResourceAction:
  5592. summary: Skip specific resources in the provided templates
  5593. value:
  5594. orgID: INFLUX_ORG_ID
  5595. actions:
  5596. - action: skipResource
  5597. properties:
  5598. kind: Label
  5599. resourceTemplateName: foo-001
  5600. - action: skipResource
  5601. properties:
  5602. kind: Bucket
  5603. resourceTemplateName: bar-020
  5604. - action: skipResource
  5605. properties:
  5606. kind: Bucket
  5607. resourceTemplateName: baz-500
  5608. templates:
  5609. - contents:
  5610. - apiVersion: influxdata.com/v2alpha1
  5611. kind: Bucket
  5612. metadata:
  5613. name: baz-500
  5614. templateObjectEnvRefs:
  5615. summary: envRefs for template objects
  5616. value:
  5617. orgID: INFLUX_ORG_ID
  5618. envRefs:
  5619. linux-cpu-label: MY_CPU_LABEL
  5620. docker-bucket: MY_DOCKER_BUCKET
  5621. docker-spec-1: MY_DOCKER_SPEC
  5622. templates:
  5623. - contents:
  5624. - apiVersion: influxdata.com/v2alpha1
  5625. kind: Label
  5626. metadata:
  5627. name:
  5628. envRef:
  5629. key: linux-cpu-label
  5630. spec:
  5631. color: '#326BBA'
  5632. name: inputs.cpu
  5633. - contents:
  5634. - apiVersion: influxdata.com/v2alpha1
  5635. kind: Bucket
  5636. metadata:
  5637. name:
  5638. envRef:
  5639. key: docker-bucket
  5640. application/x-jsonnet:
  5641. schema:
  5642. $ref: '#/components/schemas/TemplateApply'
  5643. text/yml:
  5644. schema:
  5645. $ref: '#/components/schemas/TemplateApply'
  5646. x-codeSamples:
  5647. - lang: Shell
  5648. label: 'cURL: Dry run with a remote template'
  5649. source: |
  5650. curl --request POST "http://localhost:8086/api/v2/templates/apply" \
  5651. --header "Authorization: Token INFLUX_API_TOKEN" \
  5652. --data @- << EOF
  5653. {
  5654. "dryRun": true,
  5655. "orgID": "INFLUX_ORG_ID",
  5656. "remotes": [
  5657. {
  5658. "url": "https://raw.githubusercontent.com/influxdata/community-templates/master/linux_system/linux_system.yml"
  5659. }
  5660. ]
  5661. }
  5662. EOF
  5663. - lang: Shell
  5664. label: 'cURL: Apply with secret values'
  5665. source: |
  5666. curl "http://localhost:8086/api/v2/templates/apply" \
  5667. --header "Authorization: Token INFLUX_API_TOKEN" \
  5668. --data @- << EOF | jq .
  5669. {
  5670. "orgID": "INFLUX_ORG_ID",
  5671. "secrets": {
  5672. "SLACK_WEBHOOK": "YOUR_SECRET_WEBHOOK_URL"
  5673. },
  5674. "remotes": [
  5675. {
  5676. "url": "https://raw.githubusercontent.com/influxdata/community-templates/master/fortnite/fn-template.yml"
  5677. }
  5678. ]
  5679. }
  5680. EOF
  5681. - lang: Shell
  5682. label: 'cURL: Apply template objects with environment references'
  5683. source: |
  5684. curl --request POST "http://localhost:8086/api/v2/templates/apply" \
  5685. --header "Authorization: Token INFLUX_API_TOKEN" \
  5686. --data @- << EOF
  5687. { "orgID": "INFLUX_ORG_ID",
  5688. "envRefs": {
  5689. "linux-cpu-label": "MY_CPU_LABEL",
  5690. "docker-bucket": "MY_DOCKER_BUCKET",
  5691. "docker-spec-1": "MY_DOCKER_SPEC"
  5692. },
  5693. "templates": [
  5694. { "contents": [{
  5695. "apiVersion": "influxdata.com/v2alpha1",
  5696. "kind": "Label",
  5697. "metadata": {
  5698. "name": {
  5699. "envRef": {
  5700. "key": "linux-cpu-label"
  5701. }
  5702. }
  5703. },
  5704. "spec": {
  5705. "color": "#326BBA",
  5706. "name": "inputs.cpu"
  5707. }
  5708. }]
  5709. },
  5710. "templates": [
  5711. { "contents": [{
  5712. "apiVersion": "influxdata.com/v2alpha1",
  5713. "kind": "Label",
  5714. "metadata": {
  5715. "name": {
  5716. "envRef": {
  5717. "key": "linux-cpu-label"
  5718. }
  5719. }
  5720. },
  5721. "spec": {
  5722. "color": "#326BBA",
  5723. "name": "inputs.cpu"
  5724. }
  5725. }]
  5726. },
  5727. { "contents": [{
  5728. "apiVersion": "influxdata.com/v2alpha1",
  5729. "kind": "Bucket",
  5730. "metadata": {
  5731. "name": {
  5732. "envRef": {
  5733. "key": "docker-bucket"
  5734. }
  5735. }
  5736. }
  5737. }]
  5738. }
  5739. ]
  5740. }
  5741. EOF
  5742. responses:
  5743. '200':
  5744. description: |
  5745. Success.
  5746. The template dry run succeeded.
  5747. The response body contains a resource diff of changes that the
  5748. template would have made if installed.
  5749. No resources were created or updated.
  5750. The diff and summary won't contain IDs for resources
  5751. that didn't exist at the time of the dry run.
  5752. content:
  5753. application/json:
  5754. schema:
  5755. $ref: '#/components/schemas/TemplateSummary'
  5756. '201':
  5757. description: |
  5758. Success.
  5759. The template applied successfully.
  5760. The response body contains the stack ID, a diff, and a summary.
  5761. The diff compares the initial state to the state after the template installation.
  5762. The summary contains newly created resources.
  5763. content:
  5764. application/json:
  5765. schema:
  5766. $ref: '#/components/schemas/TemplateSummary'
  5767. '422':
  5768. description: |
  5769. Unprocessable entity.
  5770. The error may indicate one of the following problems:
  5771. - The template failed validation.
  5772. - You passed a parameter combination that InfluxDB doesn't support.
  5773. content:
  5774. application/json:
  5775. schema:
  5776. allOf:
  5777. - $ref: '#/components/schemas/TemplateSummary'
  5778. - type: object
  5779. required:
  5780. - message
  5781. - code
  5782. properties:
  5783. message:
  5784. type: string
  5785. code:
  5786. type: string
  5787. '500':
  5788. description: |
  5789. Internal server error.
  5790. #### InfluxDB Cloud
  5791. - Returns this error if creating one of the template
  5792. resources (bucket, dashboard, task, user) exceeds your plan’s
  5793. adjustable service quotas.
  5794. content:
  5795. application/json:
  5796. schema:
  5797. $ref: '#/components/schemas/Error'
  5798. examples:
  5799. createExceedsQuota:
  5800. summary: 'InfluxDB Cloud: Creating resource would exceed quota.'
  5801. value:
  5802. code: internal error
  5803. message: "resource_type=\"tasks\" err=\"failed to apply resource\"\n\tmetadata_name=\"alerting-gates-b84003\" err_msg=\"failed to create tasks[\\\"alerting-gates-b84003\\\"]: creating task would exceed quota\""
  5804. default:
  5805. description: Unexpected error
  5806. content:
  5807. application/json:
  5808. schema:
  5809. $ref: '#/components/schemas/Error'
  5810. /templates/export:
  5811. post:
  5812. operationId: ExportTemplate
  5813. tags:
  5814. - Templates
  5815. summary: Export a new template
  5816. requestBody:
  5817. description: Export resources as an InfluxDB template.
  5818. required: false
  5819. content:
  5820. application/json:
  5821. schema:
  5822. oneOf:
  5823. - $ref: '#/components/schemas/TemplateExportByID'
  5824. - $ref: '#/components/schemas/TemplateExportByName'
  5825. responses:
  5826. '200':
  5827. description: The template was created successfully. Returns the newly created template.
  5828. content:
  5829. application/json:
  5830. schema:
  5831. $ref: '#/components/schemas/Template'
  5832. application/x-yaml:
  5833. schema:
  5834. $ref: '#/components/schemas/Template'
  5835. default:
  5836. description: Unexpected error
  5837. content:
  5838. application/json:
  5839. schema:
  5840. $ref: '#/components/schemas/Error'
  5841. '/tasks/{taskID}/runs':
  5842. get:
  5843. operationId: GetTasksIDRuns
  5844. tags:
  5845. - Tasks
  5846. summary: List runs for a task
  5847. description: |
  5848. Retrieves a list of runs for a [task](https://docs.influxdata.com/influxdb/v2.3/process-data/).
  5849. To limit which task runs are returned, pass query parameters in your request.
  5850. If no query parameters are passed, InfluxDB returns all task runs up to the default `limit`.
  5851. parameters:
  5852. - $ref: '#/components/parameters/TraceSpan'
  5853. - in: path
  5854. name: taskID
  5855. schema:
  5856. type: string
  5857. required: true
  5858. description: |
  5859. The ID of the task to get runs for.
  5860. Only returns runs for this task.
  5861. - in: query
  5862. name: after
  5863. schema:
  5864. type: string
  5865. description: A task run ID. Only returns runs created after this run.
  5866. - in: query
  5867. name: limit
  5868. schema:
  5869. type: integer
  5870. minimum: 1
  5871. maximum: 500
  5872. default: 100
  5873. description: |
  5874. Limits the number of task runs returned. Default is `100`.
  5875. - in: query
  5876. name: afterTime
  5877. schema:
  5878. type: string
  5879. format: date-time
  5880. description: |
  5881. A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)).
  5882. Only returns runs scheduled after this time.
  5883. - in: query
  5884. name: beforeTime
  5885. schema:
  5886. type: string
  5887. format: date-time
  5888. description: |
  5889. A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)).
  5890. Only returns runs scheduled before this time.
  5891. responses:
  5892. '200':
  5893. description: Success. The response body contains the list of task runs.
  5894. content:
  5895. application/json:
  5896. schema:
  5897. $ref: '#/components/schemas/Runs'
  5898. '401':
  5899. $ref: '#/components/responses/AuthorizationError'
  5900. '500':
  5901. $ref: '#/components/responses/InternalServerError'
  5902. default:
  5903. $ref: '#/components/responses/GeneralServerError'
  5904. post:
  5905. operationId: PostTasksIDRuns
  5906. tags:
  5907. - Data I/O endpoints
  5908. - Tasks
  5909. summary: 'Start a task run, overriding the schedule'
  5910. description: |
  5911. Schedules a task run to start immediately, ignoring scheduled runs.
  5912. Use this endpoint to manually start a task run.
  5913. Scheduled runs will continue to run as scheduled.
  5914. This may result in concurrently running tasks.
  5915. To _retry_ a previous run (and avoid creating a new run),
  5916. use the [`POST /api/v2/tasks/{taskID}/runs/{runID}/retry`](#operation/PostTasksIDRunsIDRetry) endpoint.
  5917. parameters:
  5918. - $ref: '#/components/parameters/TraceSpan'
  5919. - in: path
  5920. name: taskID
  5921. schema:
  5922. type: string
  5923. required: true
  5924. requestBody:
  5925. content:
  5926. application/json:
  5927. schema:
  5928. $ref: '#/components/schemas/RunManually'
  5929. responses:
  5930. '201':
  5931. description: Success. The run is scheduled to start.
  5932. content:
  5933. application/json:
  5934. schema:
  5935. $ref: '#/components/schemas/Run'
  5936. '401':
  5937. $ref: '#/components/responses/AuthorizationError'
  5938. '500':
  5939. $ref: '#/components/responses/InternalServerError'
  5940. default:
  5941. $ref: '#/components/responses/GeneralServerError'
  5942. '/tasks/{taskID}/runs/{runID}':
  5943. get:
  5944. operationId: GetTasksIDRunsID
  5945. tags:
  5946. - Tasks
  5947. summary: Retrieve a run for a task.
  5948. description: |
  5949. Retrieves a specific run for a [task](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#task).
  5950. Use this endpoint to retrieve detail and logs for a specific task run.
  5951. parameters:
  5952. - $ref: '#/components/parameters/TraceSpan'
  5953. - in: path
  5954. name: taskID
  5955. schema:
  5956. type: string
  5957. required: true
  5958. description: The ID of the task to retrieve runs for.
  5959. - in: path
  5960. name: runID
  5961. schema:
  5962. type: string
  5963. required: true
  5964. description: The ID of the run to retrieve.
  5965. responses:
  5966. '200':
  5967. description: Success. The response body contains the task run.
  5968. content:
  5969. application/json:
  5970. schema:
  5971. $ref: '#/components/schemas/Run'
  5972. examples:
  5973. runSuccess:
  5974. summary: A successful task run.
  5975. value:
  5976. links:
  5977. logs: /api/v2/tasks/0996e56b2f378000/runs/09b070dadaa7d000/logs
  5978. retry: /api/v2/tasks/0996e56b2f378000/runs/09b070dadaa7d000/retry
  5979. self: /api/v2/tasks/0996e56b2f378000/runs/09b070dadaa7d000
  5980. task: /api/v2/tasks/0996e56b2f378000
  5981. id: 09b070dadaa7d000
  5982. taskID: 0996e56b2f378000
  5983. status: success
  5984. scheduledFor: '2022-07-18T14:46:06Z'
  5985. startedAt: '2022-07-18T14:46:07.16222Z'
  5986. finishedAt: '2022-07-18T14:46:07.308254Z'
  5987. requestedAt: '2022-07-18T14:46:06Z'
  5988. log:
  5989. - runID: 09b070dadaa7d000
  5990. time: '2022-07-18T14:46:07.101231Z'
  5991. message: 'Started task from script: "option task = {name: \"task1\", every: 30m} from(bucket: \"iot_center\") |> range(start: -90d) |> filter(fn: (r) => r._measurement == \"environment\") |> aggregateWindow(every: 1h, fn: mean)"'
  5992. - runID: 09b070dadaa7d000
  5993. time: '2022-07-18T14:46:07.242859Z'
  5994. message: Completed(success)
  5995. '400':
  5996. $ref: '#/components/responses/BadRequestError'
  5997. '401':
  5998. $ref: '#/components/responses/AuthorizationError'
  5999. '404':
  6000. $ref: '#/components/responses/ResourceNotFoundError'
  6001. '500':
  6002. $ref: '#/components/responses/InternalServerError'
  6003. default:
  6004. $ref: '#/components/responses/GeneralServerError'
  6005. delete:
  6006. operationId: DeleteTasksIDRunsID
  6007. tags:
  6008. - Tasks
  6009. summary: Cancel a running task
  6010. description: |
  6011. Cancels a running [task](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#task).
  6012. Use this endpoint with InfluxDB OSS to cancel a running task.
  6013. #### InfluxDB Cloud
  6014. - Doesn't support this operation.
  6015. parameters:
  6016. - $ref: '#/components/parameters/TraceSpan'
  6017. - in: path
  6018. name: taskID
  6019. schema:
  6020. type: string
  6021. required: true
  6022. description: The ID of the task to cancel.
  6023. - in: path
  6024. name: runID
  6025. schema:
  6026. type: string
  6027. required: true
  6028. description: The ID of the task run to cancel.
  6029. responses:
  6030. '204':
  6031. description: |
  6032. Success. The `DELETE` is accepted and the run will be cancelled.
  6033. #### InfluxDB Cloud
  6034. - Doesn't support this operation.
  6035. - Doesn't return this status.
  6036. '400':
  6037. $ref: '#/components/responses/BadRequestError'
  6038. '401':
  6039. $ref: '#/components/responses/AuthorizationError'
  6040. '404':
  6041. $ref: '#/components/responses/ResourceNotFoundError'
  6042. '405':
  6043. description: |
  6044. Method not allowed.
  6045. #### InfluxDB Cloud
  6046. - Always returns this error; doesn't support cancelling tasks.
  6047. #### InfluxDB OSS
  6048. - Doesn't return this error.
  6049. content:
  6050. application/json:
  6051. schema:
  6052. $ref: '#/components/schemas/Error'
  6053. '500':
  6054. $ref: '#/components/responses/InternalServerError'
  6055. default:
  6056. $ref: '#/components/responses/GeneralServerError'
  6057. '/tasks/{taskID}/runs/{runID}/retry':
  6058. post:
  6059. operationId: PostTasksIDRunsIDRetry
  6060. tags:
  6061. - Tasks
  6062. summary: Retry a task run
  6063. description: |
  6064. Queues a task run to retry and returns the newly scheduled run.
  6065. To manually start a _new_ task run, use the [`POST /api/v2/tasks/{taskID}/runs`](#operation/PostTasksIDRuns) endpoint.
  6066. #### Limitations
  6067. - The task must be _active_ (`status: "active"`).
  6068. requestBody:
  6069. content:
  6070. application/json; charset=utf-8:
  6071. schema:
  6072. type: object
  6073. parameters:
  6074. - $ref: '#/components/parameters/TraceSpan'
  6075. - in: path
  6076. name: taskID
  6077. schema:
  6078. type: string
  6079. required: true
  6080. description: The ID of the task to retry.
  6081. - in: path
  6082. name: runID
  6083. schema:
  6084. type: string
  6085. required: true
  6086. description: The ID of the task run to retry.
  6087. responses:
  6088. '200':
  6089. description: Success. The response body contains the queued run.
  6090. content:
  6091. application/json:
  6092. schema:
  6093. $ref: '#/components/schemas/Run'
  6094. examples:
  6095. retryTaskRun:
  6096. summary: A task run scheduled to retry
  6097. value:
  6098. links:
  6099. logs: /api/v2/tasks/09a776832f381000/runs/09d60ffe08738000/logs
  6100. retry: /api/v2/tasks/09a776832f381000/runs/09d60ffe08738000/retry
  6101. self: /api/v2/tasks/09a776832f381000/runs/09d60ffe08738000
  6102. task: /api/v2/tasks/09a776832f381000
  6103. id: 09d60ffe08738000
  6104. taskID: 09a776832f381000
  6105. status: scheduled
  6106. scheduledFor: '2022-08-15T00:00:00Z'
  6107. requestedAt: '2022-08-16T20:05:11.84145Z'
  6108. '400':
  6109. description: |
  6110. Bad request.
  6111. The response body contains detail about the error.
  6112. InfluxDB may return this error for the following reasons:
  6113. - The task has `status: inactive`.
  6114. content:
  6115. application/json:
  6116. schema:
  6117. $ref: '#/components/schemas/Error'
  6118. examples:
  6119. inactiveTask:
  6120. summary: Can't retry an inactive task
  6121. value:
  6122. code: invalid
  6123. message: 'failed to retry run: inactive task'
  6124. '401':
  6125. $ref: '#/components/responses/AuthorizationError'
  6126. '404':
  6127. $ref: '#/components/responses/ResourceNotFoundError'
  6128. '500':
  6129. $ref: '#/components/responses/InternalServerError'
  6130. default:
  6131. $ref: '#/components/responses/GeneralServerError'
  6132. '/tasks/{taskID}/logs':
  6133. get:
  6134. operationId: GetTasksIDLogs
  6135. tags:
  6136. - Tasks
  6137. summary: Retrieve all logs for a task
  6138. description: |
  6139. Retrieves a list of all logs for a [task](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#task).
  6140. When an InfluxDB task runs, a “run” record is created in the task’s history.
  6141. Logs associated with each run provide relevant log messages, timestamps, and the exit status of the run attempt.
  6142. Use this endpoint to retrieve only the log events for a task,
  6143. without additional task metadata.
  6144. parameters:
  6145. - $ref: '#/components/parameters/TraceSpan'
  6146. - in: path
  6147. name: taskID
  6148. schema:
  6149. type: string
  6150. required: true
  6151. description: The task ID.
  6152. responses:
  6153. '200':
  6154. description: |
  6155. Success. The response body contains an `events` list with logs for the task.
  6156. Each log event `message` contains detail about the event.
  6157. If a task run fails, InfluxDB logs an event with the reason for the failure.
  6158. content:
  6159. application/json:
  6160. schema:
  6161. $ref: '#/components/schemas/Logs'
  6162. examples:
  6163. taskSuccess:
  6164. summary: Events for a successful task run.
  6165. value:
  6166. events:
  6167. - runID: 09b070dadaa7d000
  6168. time: '2022-07-18T14:46:07.101231Z'
  6169. message: 'Started task from script: "option task = {name: \"task1\", every: 30m} from(bucket: \"iot_center\") |> range(start: -90d) |> filter(fn: (r) => r._measurement == \"environment\") |> aggregateWindow(every: 1h, fn: mean)"'
  6170. - runID: 09b070dadaa7d000
  6171. time: '2022-07-18T14:46:07.242859Z'
  6172. message: Completed(success)
  6173. taskFailure:
  6174. summary: Events for a failed task run.
  6175. value:
  6176. events:
  6177. - runID: 09a946fc3167d000
  6178. time: '2022-07-13T07:06:54.198167Z'
  6179. message: 'Started task from script: "option task = {name: \"test task\", every: 3d, offset: 0s}"'
  6180. - runID: 09a946fc3167d000
  6181. time: '2022-07-13T07:07:13.104037Z'
  6182. message: Completed(failed)
  6183. - runID: 09a946fc3167d000
  6184. time: '2022-07-13T08:24:37.115323Z'
  6185. message: 'error exhausting result iterator: error in query specification while starting program: this Flux script returns no streaming data. Consider adding a "yield" or invoking streaming functions directly, without performing an assignment'
  6186. '400':
  6187. $ref: '#/components/responses/BadRequestError'
  6188. '401':
  6189. $ref: '#/components/responses/AuthorizationError'
  6190. '404':
  6191. $ref: '#/components/responses/ResourceNotFoundError'
  6192. '500':
  6193. $ref: '#/components/responses/InternalServerError'
  6194. default:
  6195. $ref: '#/components/responses/GeneralServerError'
  6196. '/tasks/{taskID}/runs/{runID}/logs':
  6197. get:
  6198. operationId: GetTasksIDRunsIDLogs
  6199. tags:
  6200. - Tasks
  6201. summary: Retrieve all logs for a run
  6202. description: |
  6203. Retrieves all logs for a task run.
  6204. A log is a list of run events with `runID`, `time`, and `message` properties.
  6205. Use this endpoint to help analyze task performance and troubleshoot failed task runs.
  6206. parameters:
  6207. - $ref: '#/components/parameters/TraceSpan'
  6208. - in: path
  6209. name: taskID
  6210. schema:
  6211. type: string
  6212. required: true
  6213. description: The ID of the task to get logs for.
  6214. - in: path
  6215. name: runID
  6216. schema:
  6217. type: string
  6218. required: true
  6219. description: The ID of the run to get logs for.
  6220. responses:
  6221. '200':
  6222. description: |
  6223. Success. The response body contains an `events` list with logs for the task run.
  6224. Each log event `message` contains detail about the event.
  6225. If a run fails, InfluxDB logs an event with the reason for the failure.
  6226. content:
  6227. application/json:
  6228. schema:
  6229. $ref: '#/components/schemas/Logs'
  6230. examples:
  6231. taskSuccess:
  6232. summary: Events for a successful task run.
  6233. value:
  6234. events:
  6235. - runID: 09b070dadaa7d000
  6236. time: '2022-07-18T14:46:07.101231Z'
  6237. message: 'Started task from script: "option task = {name: \"task1\", every: 30m} from(bucket: \"iot_center\") |> range(start: -90d) |> filter(fn: (r) => r._measurement == \"environment\") |> aggregateWindow(every: 1h, fn: mean)"'
  6238. - runID: 09b070dadaa7d000
  6239. time: '2022-07-18T14:46:07.242859Z'
  6240. message: Completed(success)
  6241. taskFailure:
  6242. summary: Events for a failed task.
  6243. value:
  6244. events:
  6245. - runID: 09a946fc3167d000
  6246. time: '2022-07-13T07:06:54.198167Z'
  6247. message: 'Started task from script: "option task = {name: \"test task\", every: 3d, offset: 0s}"'
  6248. - runID: 09a946fc3167d000
  6249. time: '2022-07-13T07:07:13.104037Z'
  6250. message: Completed(failed)
  6251. - runID: 09a946fc3167d000
  6252. time: '2022-07-13T08:24:37.115323Z'
  6253. message: 'error exhausting result iterator: error in query specification while starting program: this Flux script returns no streaming data. Consider adding a "yield" or invoking streaming functions directly, without performing an assignment'
  6254. '400':
  6255. $ref: '#/components/responses/BadRequestError'
  6256. '401':
  6257. $ref: '#/components/responses/AuthorizationError'
  6258. '404':
  6259. $ref: '#/components/responses/ResourceNotFoundError'
  6260. '500':
  6261. $ref: '#/components/responses/InternalServerError'
  6262. default:
  6263. $ref: '#/components/responses/GeneralServerError'
  6264. '/tasks/{taskID}/labels':
  6265. get:
  6266. operationId: GetTasksIDLabels
  6267. tags:
  6268. - Tasks
  6269. summary: List labels for a task
  6270. description: |
  6271. Retrieves a list of all labels for a task.
  6272. Labels may be used for grouping and filtering tasks.
  6273. parameters:
  6274. - $ref: '#/components/parameters/TraceSpan'
  6275. - in: path
  6276. name: taskID
  6277. schema:
  6278. type: string
  6279. required: true
  6280. description: The ID of the task to retrieve labels for.
  6281. responses:
  6282. '200':
  6283. description: Success. The response body contains a list of all labels for the task.
  6284. content:
  6285. application/json:
  6286. schema:
  6287. $ref: '#/components/schemas/LabelsResponse'
  6288. '400':
  6289. $ref: '#/components/responses/BadRequestError'
  6290. '401':
  6291. $ref: '#/components/responses/AuthorizationError'
  6292. '404':
  6293. $ref: '#/components/responses/ResourceNotFoundError'
  6294. '500':
  6295. $ref: '#/components/responses/InternalServerError'
  6296. default:
  6297. $ref: '#/components/responses/GeneralServerError'
  6298. post:
  6299. operationId: PostTasksIDLabels
  6300. tags:
  6301. - Tasks
  6302. summary: Add a label to a task
  6303. description: |
  6304. Adds a label to a task.
  6305. Use this endpoint to add a label that you can use to filter tasks in the InfluxDB UI.
  6306. parameters:
  6307. - $ref: '#/components/parameters/TraceSpan'
  6308. - in: path
  6309. name: taskID
  6310. schema:
  6311. type: string
  6312. required: true
  6313. description: The ID of the task to label.
  6314. requestBody:
  6315. description: An object that contains a _`labelID`_ to add to the task.
  6316. required: true
  6317. content:
  6318. application/json:
  6319. schema:
  6320. $ref: '#/components/schemas/LabelMapping'
  6321. responses:
  6322. '201':
  6323. description: Success. The response body contains a list of all labels for the task.
  6324. content:
  6325. application/json:
  6326. schema:
  6327. $ref: '#/components/schemas/LabelResponse'
  6328. '400':
  6329. $ref: '#/components/responses/BadRequestError'
  6330. '401':
  6331. $ref: '#/components/responses/AuthorizationError'
  6332. '404':
  6333. $ref: '#/components/responses/ResourceNotFoundError'
  6334. '500':
  6335. $ref: '#/components/responses/InternalServerError'
  6336. default:
  6337. $ref: '#/components/responses/GeneralServerError'
  6338. '/tasks/{taskID}/labels/{labelID}':
  6339. delete:
  6340. operationId: DeleteTasksIDLabelsID
  6341. tags:
  6342. - Tasks
  6343. summary: Delete a label from a task
  6344. description: |
  6345. Deletes a label from a task.
  6346. parameters:
  6347. - $ref: '#/components/parameters/TraceSpan'
  6348. - in: path
  6349. name: taskID
  6350. schema:
  6351. type: string
  6352. required: true
  6353. description: The ID of the task to delete the label from.
  6354. - in: path
  6355. name: labelID
  6356. schema:
  6357. type: string
  6358. required: true
  6359. description: The ID of the label to delete.
  6360. responses:
  6361. '204':
  6362. description: Success. The label is deleted.
  6363. '400':
  6364. $ref: '#/components/responses/BadRequestError'
  6365. '401':
  6366. $ref: '#/components/responses/AuthorizationError'
  6367. '404':
  6368. $ref: '#/components/responses/ResourceNotFoundError'
  6369. '500':
  6370. $ref: '#/components/responses/InternalServerError'
  6371. default:
  6372. $ref: '#/components/responses/GeneralServerError'
  6373. /flags:
  6374. get:
  6375. operationId: GetFlags
  6376. tags:
  6377. - Users
  6378. summary: Return the feature flags for the currently authenticated user
  6379. parameters:
  6380. - $ref: '#/components/parameters/TraceSpan'
  6381. responses:
  6382. '200':
  6383. description: Feature flags for the currently authenticated user
  6384. content:
  6385. application/json:
  6386. schema:
  6387. $ref: '#/components/schemas/Flags'
  6388. default:
  6389. description: Unexpected error
  6390. content:
  6391. application/json:
  6392. schema:
  6393. $ref: '#/components/schemas/Error'
  6394. /me:
  6395. get:
  6396. operationId: GetMe
  6397. tags:
  6398. - Users
  6399. summary: Retrieve the currently authenticated user
  6400. parameters:
  6401. - $ref: '#/components/parameters/TraceSpan'
  6402. responses:
  6403. '200':
  6404. description: Success. The response body contains the currently authenticated user.
  6405. content:
  6406. application/json:
  6407. schema:
  6408. $ref: '#/components/schemas/UserResponse'
  6409. '401':
  6410. $ref: '#/components/responses/AuthorizationError'
  6411. '500':
  6412. $ref: '#/components/responses/InternalServerError'
  6413. default:
  6414. $ref: '#/components/responses/GeneralServerError'
  6415. /me/password:
  6416. put:
  6417. operationId: PutMePassword
  6418. tags:
  6419. - Users
  6420. summary: Update a password
  6421. description: |
  6422. #### InfluxDB Cloud
  6423. InfluxDB Cloud doesn't support changing user passwords through the API.
  6424. Use the InfluxDB Cloud user interface to update your password.
  6425. security:
  6426. - BasicAuthentication: []
  6427. parameters:
  6428. - $ref: '#/components/parameters/TraceSpan'
  6429. requestBody:
  6430. description: The new password.
  6431. required: true
  6432. content:
  6433. application/json:
  6434. schema:
  6435. $ref: '#/components/schemas/PasswordResetBody'
  6436. responses:
  6437. '204':
  6438. description: Success. The password was updated.
  6439. '400':
  6440. description: |
  6441. Bad request.
  6442. InfluxDB Cloud doesn't support changing passwords through the API and always responds with this status.
  6443. default:
  6444. description: Unsuccessful authentication
  6445. content:
  6446. application/json:
  6447. schema:
  6448. $ref: '#/components/schemas/Error'
  6449. '/tasks/{taskID}/members':
  6450. get:
  6451. operationId: GetTasksIDMembers
  6452. deprecated: true
  6453. tags:
  6454. - Tasks
  6455. summary: List all task members
  6456. description: |
  6457. **Deprecated**: Tasks don't use `owner` and `member` roles.
  6458. Use [`/api/v2/authorizations`](#tag/Authorizations) to assign user permissions.
  6459. parameters:
  6460. - $ref: '#/components/parameters/TraceSpan'
  6461. - in: path
  6462. name: taskID
  6463. schema:
  6464. type: string
  6465. required: true
  6466. description: The task ID.
  6467. responses:
  6468. '200':
  6469. description: |
  6470. Success. The response body contains a list of `users` that have
  6471. the `member` role for a task.
  6472. content:
  6473. application/json:
  6474. schema:
  6475. $ref: '#/components/schemas/ResourceMembers'
  6476. default:
  6477. description: Unexpected error
  6478. content:
  6479. application/json:
  6480. schema:
  6481. $ref: '#/components/schemas/Error'
  6482. post:
  6483. operationId: PostTasksIDMembers
  6484. deprecated: true
  6485. tags:
  6486. - Tasks
  6487. summary: Add a member to a task
  6488. description: |
  6489. **Deprecated**: Tasks don't use `owner` and `member` roles.
  6490. Use [`/api/v2/authorizations`](#tag/Authorizations) to assign user permissions.
  6491. Adds a user to members of a task and returns the newly created member with
  6492. role and user detail.
  6493. parameters:
  6494. - $ref: '#/components/parameters/TraceSpan'
  6495. - in: path
  6496. name: taskID
  6497. schema:
  6498. type: string
  6499. required: true
  6500. description: The task ID.
  6501. requestBody:
  6502. description: A user to add as a member of the task.
  6503. required: true
  6504. content:
  6505. application/json:
  6506. schema:
  6507. $ref: '#/components/schemas/AddResourceMemberRequestBody'
  6508. responses:
  6509. '201':
  6510. description: Created. The user is added to task members.
  6511. content:
  6512. application/json:
  6513. schema:
  6514. $ref: '#/components/schemas/ResourceMember'
  6515. default:
  6516. description: Unexpected error
  6517. content:
  6518. application/json:
  6519. schema:
  6520. $ref: '#/components/schemas/Error'
  6521. '/tasks/{taskID}/members/{userID}':
  6522. delete:
  6523. operationId: DeleteTasksIDMembersID
  6524. deprecated: true
  6525. tags:
  6526. - Tasks
  6527. summary: Remove a member from a task
  6528. description: |
  6529. **Deprecated**: Tasks don't use `owner` and `member` roles.
  6530. Use [`/api/v2/authorizations`](#tag/Authorizations) to assign user permissions.
  6531. parameters:
  6532. - $ref: '#/components/parameters/TraceSpan'
  6533. - in: path
  6534. name: userID
  6535. schema:
  6536. type: string
  6537. required: true
  6538. description: The ID of the member to remove.
  6539. - in: path
  6540. name: taskID
  6541. schema:
  6542. type: string
  6543. required: true
  6544. description: The task ID.
  6545. responses:
  6546. '204':
  6547. description: Member removed
  6548. default:
  6549. description: Unexpected error
  6550. content:
  6551. application/json:
  6552. schema:
  6553. $ref: '#/components/schemas/Error'
  6554. '/tasks/{taskID}/owners':
  6555. get:
  6556. operationId: GetTasksIDOwners
  6557. deprecated: true
  6558. tags:
  6559. - Tasks
  6560. summary: List all owners of a task
  6561. description: |
  6562. **Deprecated**: Tasks don't use `owner` and `member` roles.
  6563. Use [`/api/v2/authorizations`](#tag/Authorizations) to assign user permissions.
  6564. Retrieves all users that have owner permission for a task.
  6565. parameters:
  6566. - $ref: '#/components/parameters/TraceSpan'
  6567. - in: path
  6568. name: taskID
  6569. schema:
  6570. type: string
  6571. required: true
  6572. description: The ID of the task to retrieve owners for.
  6573. responses:
  6574. '200':
  6575. description: |
  6576. Success.
  6577. The response contains a list of `users` that have the `owner` role for the task.
  6578. If the task has no owners, the response contains an empty `users` array.
  6579. content:
  6580. application/json:
  6581. schema:
  6582. $ref: '#/components/schemas/ResourceOwners'
  6583. '401':
  6584. $ref: '#/components/responses/AuthorizationError'
  6585. '422':
  6586. description: |
  6587. Unprocessable entity.
  6588. The error may indicate one of the following problems:
  6589. - The request body isn't valid--the request is well-formed, but InfluxDB can't process it due to semantic errors.
  6590. - You passed a parameter combination that InfluxDB doesn't support.
  6591. content:
  6592. application/json:
  6593. schema:
  6594. $ref: '#/components/schemas/Error'
  6595. '500':
  6596. $ref: '#/components/responses/InternalServerError'
  6597. default:
  6598. description: Unexpected error
  6599. content:
  6600. application/json:
  6601. schema:
  6602. $ref: '#/components/schemas/Error'
  6603. post:
  6604. operationId: PostTasksIDOwners
  6605. deprecated: true
  6606. tags:
  6607. - Tasks
  6608. summary: Add an owner for a task
  6609. description: |
  6610. **Deprecated**: Tasks don't use `owner` and `member` roles.
  6611. Use [`/api/v2/authorizations`](#tag/Authorizations) to assign user permissions.
  6612. Assigns a task `owner` role to a user.
  6613. Use this endpoint to create a _resource owner_ for the task.
  6614. A _resource owner_ is a user with `role: owner` for a specific resource.
  6615. parameters:
  6616. - $ref: '#/components/parameters/TraceSpan'
  6617. - in: path
  6618. name: taskID
  6619. schema:
  6620. type: string
  6621. required: true
  6622. description: The task ID.
  6623. requestBody:
  6624. description: A user to add as an owner of the task.
  6625. required: true
  6626. content:
  6627. application/json:
  6628. schema:
  6629. $ref: '#/components/schemas/AddResourceMemberRequestBody'
  6630. responses:
  6631. '201':
  6632. description: |
  6633. Created. The task `owner` role is assigned to the user.
  6634. The response body contains the resource owner with
  6635. role and user detail.
  6636. content:
  6637. application/json:
  6638. schema:
  6639. $ref: '#/components/schemas/ResourceOwner'
  6640. examples:
  6641. createdOwner:
  6642. summary: User has the owner role for the resource
  6643. value:
  6644. role: owner
  6645. links:
  6646. logs: /api/v2/users/0772396d1f411000/logs
  6647. self: /api/v2/users/0772396d1f411000
  6648. id: 0772396d1f411000
  6649. name: USER_NAME
  6650. status: active
  6651. '401':
  6652. $ref: '#/components/responses/AuthorizationError'
  6653. '422':
  6654. description: |
  6655. Unprocessable entity.
  6656. The error may indicate one of the following problems:
  6657. - The request body isn't valid--the request is well-formed, but InfluxDB can't process it due to semantic errors.
  6658. - You passed a parameter combination that InfluxDB doesn't support.
  6659. content:
  6660. application/json:
  6661. schema:
  6662. $ref: '#/components/schemas/Error'
  6663. '500':
  6664. $ref: '#/components/responses/InternalServerError'
  6665. default:
  6666. description: Unexpected error
  6667. content:
  6668. application/json:
  6669. schema:
  6670. $ref: '#/components/schemas/Error'
  6671. '/tasks/{taskID}/owners/{userID}':
  6672. delete:
  6673. operationId: DeleteTasksIDOwnersID
  6674. deprecated: true
  6675. tags:
  6676. - Tasks
  6677. summary: Remove an owner from a task
  6678. description: |
  6679. **Deprecated**: Tasks don't use `owner` and `member` roles.
  6680. Use [`/api/v2/authorizations`](#tag/Authorizations) to assign user permissions.
  6681. parameters:
  6682. - $ref: '#/components/parameters/TraceSpan'
  6683. - in: path
  6684. name: userID
  6685. schema:
  6686. type: string
  6687. required: true
  6688. description: The ID of the owner to remove.
  6689. - in: path
  6690. name: taskID
  6691. schema:
  6692. type: string
  6693. required: true
  6694. description: The task ID.
  6695. responses:
  6696. '204':
  6697. description: Owner removed
  6698. default:
  6699. description: Unexpected error
  6700. content:
  6701. application/json:
  6702. schema:
  6703. $ref: '#/components/schemas/Error'
  6704. '/users/{userID}/password':
  6705. post:
  6706. operationId: PostUsersIDPassword
  6707. tags:
  6708. - Security and access endpoints
  6709. - Users
  6710. summary: Update a password
  6711. description: |
  6712. #### InfluxDB Cloud
  6713. InfluxDB Cloud doesn't support changing user passwords through the API.
  6714. Use the InfluxDB Cloud user interface to update your password.
  6715. security:
  6716. - BasicAuthentication: []
  6717. parameters:
  6718. - $ref: '#/components/parameters/TraceSpan'
  6719. - in: path
  6720. name: userID
  6721. schema:
  6722. type: string
  6723. required: true
  6724. description: The user ID.
  6725. requestBody:
  6726. description: New password
  6727. required: true
  6728. content:
  6729. application/json:
  6730. schema:
  6731. $ref: '#/components/schemas/PasswordResetBody'
  6732. responses:
  6733. '204':
  6734. description: Password successfully updated
  6735. '400':
  6736. description: |
  6737. Bad request.
  6738. InfluxDB Cloud doesn't support changing passwords through the API and always responds with this status.
  6739. default:
  6740. description: Unsuccessful authentication
  6741. content:
  6742. application/json:
  6743. schema:
  6744. $ref: '#/components/schemas/Error'
  6745. /checks:
  6746. get:
  6747. operationId: GetChecks
  6748. tags:
  6749. - Checks
  6750. summary: List all checks
  6751. parameters:
  6752. - $ref: '#/components/parameters/TraceSpan'
  6753. - $ref: '#/components/parameters/Offset'
  6754. - $ref: '#/components/parameters/Limit'
  6755. - in: query
  6756. name: orgID
  6757. required: true
  6758. description: Only show checks that belong to a specific organization ID.
  6759. schema:
  6760. type: string
  6761. responses:
  6762. '200':
  6763. description: A list of checks
  6764. content:
  6765. application/json:
  6766. schema:
  6767. $ref: '#/components/schemas/Checks'
  6768. default:
  6769. description: Unexpected error
  6770. content:
  6771. application/json:
  6772. schema:
  6773. $ref: '#/components/schemas/Error'
  6774. post:
  6775. operationId: CreateCheck
  6776. tags:
  6777. - Checks
  6778. summary: Add new check
  6779. requestBody:
  6780. description: Check to create
  6781. required: true
  6782. content:
  6783. application/json:
  6784. schema:
  6785. $ref: '#/components/schemas/PostCheck'
  6786. responses:
  6787. '201':
  6788. description: Check created
  6789. content:
  6790. application/json:
  6791. schema:
  6792. $ref: '#/components/schemas/Check'
  6793. default:
  6794. description: Unexpected error
  6795. content:
  6796. application/json:
  6797. schema:
  6798. $ref: '#/components/schemas/Error'
  6799. '/checks/{checkID}':
  6800. get:
  6801. operationId: GetChecksID
  6802. tags:
  6803. - Checks
  6804. summary: Retrieve a check
  6805. parameters:
  6806. - $ref: '#/components/parameters/TraceSpan'
  6807. - in: path
  6808. name: checkID
  6809. schema:
  6810. type: string
  6811. required: true
  6812. description: The check ID.
  6813. responses:
  6814. '200':
  6815. description: The check requested
  6816. content:
  6817. application/json:
  6818. schema:
  6819. $ref: '#/components/schemas/Check'
  6820. default:
  6821. description: Unexpected error
  6822. content:
  6823. application/json:
  6824. schema:
  6825. $ref: '#/components/schemas/Error'
  6826. put:
  6827. operationId: PutChecksID
  6828. tags:
  6829. - Checks
  6830. summary: Update a check
  6831. requestBody:
  6832. description: Check update to apply
  6833. required: true
  6834. content:
  6835. application/json:
  6836. schema:
  6837. $ref: '#/components/schemas/Check'
  6838. parameters:
  6839. - $ref: '#/components/parameters/TraceSpan'
  6840. - in: path
  6841. name: checkID
  6842. schema:
  6843. type: string
  6844. required: true
  6845. description: The check ID.
  6846. responses:
  6847. '200':
  6848. description: An updated check
  6849. content:
  6850. application/json:
  6851. schema:
  6852. $ref: '#/components/schemas/Check'
  6853. '404':
  6854. description: The check was not found
  6855. content:
  6856. application/json:
  6857. schema:
  6858. $ref: '#/components/schemas/Error'
  6859. default:
  6860. description: Unexpected error
  6861. content:
  6862. application/json:
  6863. schema:
  6864. $ref: '#/components/schemas/Error'
  6865. patch:
  6866. operationId: PatchChecksID
  6867. tags:
  6868. - Checks
  6869. summary: Update a check
  6870. requestBody:
  6871. description: Check update to apply
  6872. required: true
  6873. content:
  6874. application/json:
  6875. schema:
  6876. $ref: '#/components/schemas/CheckPatch'
  6877. parameters:
  6878. - $ref: '#/components/parameters/TraceSpan'
  6879. - in: path
  6880. name: checkID
  6881. schema:
  6882. type: string
  6883. required: true
  6884. description: The check ID.
  6885. responses:
  6886. '200':
  6887. description: An updated check
  6888. content:
  6889. application/json:
  6890. schema:
  6891. $ref: '#/components/schemas/Check'
  6892. '404':
  6893. description: The check was not found
  6894. content:
  6895. application/json:
  6896. schema:
  6897. $ref: '#/components/schemas/Error'
  6898. default:
  6899. description: Unexpected error
  6900. content:
  6901. application/json:
  6902. schema:
  6903. $ref: '#/components/schemas/Error'
  6904. delete:
  6905. operationId: DeleteChecksID
  6906. tags:
  6907. - Checks
  6908. summary: Delete a check
  6909. parameters:
  6910. - $ref: '#/components/parameters/TraceSpan'
  6911. - in: path
  6912. name: checkID
  6913. schema:
  6914. type: string
  6915. required: true
  6916. description: The check ID.
  6917. responses:
  6918. '204':
  6919. description: Delete has been accepted
  6920. '404':
  6921. description: The check was not found
  6922. content:
  6923. application/json:
  6924. schema:
  6925. $ref: '#/components/schemas/Error'
  6926. default:
  6927. description: Unexpected error
  6928. content:
  6929. application/json:
  6930. schema:
  6931. $ref: '#/components/schemas/Error'
  6932. '/checks/{checkID}/labels':
  6933. get:
  6934. operationId: GetChecksIDLabels
  6935. tags:
  6936. - Checks
  6937. summary: List all labels for a check
  6938. parameters:
  6939. - $ref: '#/components/parameters/TraceSpan'
  6940. - in: path
  6941. name: checkID
  6942. schema:
  6943. type: string
  6944. required: true
  6945. description: The check ID.
  6946. responses:
  6947. '200':
  6948. description: A list of all labels for a check
  6949. content:
  6950. application/json:
  6951. schema:
  6952. $ref: '#/components/schemas/LabelsResponse'
  6953. default:
  6954. description: Unexpected error
  6955. content:
  6956. application/json:
  6957. schema:
  6958. $ref: '#/components/schemas/Error'
  6959. post:
  6960. operationId: PostChecksIDLabels
  6961. tags:
  6962. - Checks
  6963. summary: Add a label to a check
  6964. parameters:
  6965. - $ref: '#/components/parameters/TraceSpan'
  6966. - in: path
  6967. name: checkID
  6968. schema:
  6969. type: string
  6970. required: true
  6971. description: The check ID.
  6972. requestBody:
  6973. description: Label to add
  6974. required: true
  6975. content:
  6976. application/json:
  6977. schema:
  6978. $ref: '#/components/schemas/LabelMapping'
  6979. responses:
  6980. '201':
  6981. description: The label was added to the check
  6982. content:
  6983. application/json:
  6984. schema:
  6985. $ref: '#/components/schemas/LabelResponse'
  6986. default:
  6987. description: Unexpected error
  6988. content:
  6989. application/json:
  6990. schema:
  6991. $ref: '#/components/schemas/Error'
  6992. '/checks/{checkID}/labels/{labelID}':
  6993. delete:
  6994. operationId: DeleteChecksIDLabelsID
  6995. tags:
  6996. - Checks
  6997. summary: Delete label from a check
  6998. parameters:
  6999. - $ref: '#/components/parameters/TraceSpan'
  7000. - in: path
  7001. name: checkID
  7002. schema:
  7003. type: string
  7004. required: true
  7005. description: The check ID.
  7006. - in: path
  7007. name: labelID
  7008. schema:
  7009. type: string
  7010. required: true
  7011. description: The ID of the label to delete.
  7012. responses:
  7013. '204':
  7014. description: Delete has been accepted
  7015. '404':
  7016. description: Check or label not found
  7017. content:
  7018. application/json:
  7019. schema:
  7020. $ref: '#/components/schemas/Error'
  7021. default:
  7022. description: Unexpected error
  7023. content:
  7024. application/json:
  7025. schema:
  7026. $ref: '#/components/schemas/Error'
  7027. /notificationRules:
  7028. get:
  7029. operationId: GetNotificationRules
  7030. tags:
  7031. - NotificationRules
  7032. summary: List all notification rules
  7033. parameters:
  7034. - $ref: '#/components/parameters/TraceSpan'
  7035. - $ref: '#/components/parameters/Offset'
  7036. - $ref: '#/components/parameters/Limit'
  7037. - in: query
  7038. name: orgID
  7039. required: true
  7040. description: Only show notification rules that belong to a specific organization ID.
  7041. schema:
  7042. type: string
  7043. - in: query
  7044. name: checkID
  7045. description: Only show notifications that belong to the specific check ID.
  7046. schema:
  7047. type: string
  7048. - in: query
  7049. name: tag
  7050. description: Only return notification rules that "would match" statuses which contain the tag key value pairs provided.
  7051. schema:
  7052. type: string
  7053. pattern: '^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$'
  7054. example: 'env:prod'
  7055. responses:
  7056. '200':
  7057. description: A list of notification rules
  7058. content:
  7059. application/json:
  7060. schema:
  7061. $ref: '#/components/schemas/NotificationRules'
  7062. default:
  7063. description: Unexpected error
  7064. content:
  7065. application/json:
  7066. schema:
  7067. $ref: '#/components/schemas/Error'
  7068. post:
  7069. operationId: CreateNotificationRule
  7070. tags:
  7071. - NotificationRules
  7072. summary: Add a notification rule
  7073. requestBody:
  7074. description: Notification rule to create
  7075. required: true
  7076. content:
  7077. application/json:
  7078. schema:
  7079. $ref: '#/components/schemas/PostNotificationRule'
  7080. responses:
  7081. '201':
  7082. description: Notification rule created
  7083. content:
  7084. application/json:
  7085. schema:
  7086. $ref: '#/components/schemas/NotificationRule'
  7087. default:
  7088. description: Unexpected error
  7089. content:
  7090. application/json:
  7091. schema:
  7092. $ref: '#/components/schemas/Error'
  7093. '/checks/{checkID}/query':
  7094. get:
  7095. operationId: GetChecksIDQuery
  7096. tags:
  7097. - Checks
  7098. summary: Retrieve a check query
  7099. parameters:
  7100. - $ref: '#/components/parameters/TraceSpan'
  7101. - in: path
  7102. name: checkID
  7103. schema:
  7104. type: string
  7105. required: true
  7106. description: The check ID.
  7107. responses:
  7108. '200':
  7109. description: The check query requested
  7110. content:
  7111. application/json:
  7112. schema:
  7113. $ref: '#/components/schemas/FluxResponse'
  7114. '400':
  7115. description: Invalid request
  7116. content:
  7117. application/json:
  7118. schema:
  7119. $ref: '#/components/schemas/Error'
  7120. '404':
  7121. description: Check not found
  7122. content:
  7123. application/json:
  7124. schema:
  7125. $ref: '#/components/schemas/Error'
  7126. default:
  7127. description: Unexpected error
  7128. content:
  7129. application/json:
  7130. schema:
  7131. $ref: '#/components/schemas/Error'
  7132. '/notificationRules/{ruleID}':
  7133. get:
  7134. operationId: GetNotificationRulesID
  7135. tags:
  7136. - NotificationRules
  7137. summary: Retrieve a notification rule
  7138. parameters:
  7139. - $ref: '#/components/parameters/TraceSpan'
  7140. - in: path
  7141. name: ruleID
  7142. schema:
  7143. type: string
  7144. required: true
  7145. description: The notification rule ID.
  7146. responses:
  7147. '200':
  7148. description: The notification rule requested
  7149. content:
  7150. application/json:
  7151. schema:
  7152. $ref: '#/components/schemas/NotificationRule'
  7153. default:
  7154. description: Unexpected error
  7155. content:
  7156. application/json:
  7157. schema:
  7158. $ref: '#/components/schemas/Error'
  7159. put:
  7160. operationId: PutNotificationRulesID
  7161. tags:
  7162. - NotificationRules
  7163. summary: Update a notification rule
  7164. requestBody:
  7165. description: Notification rule update to apply
  7166. required: true
  7167. content:
  7168. application/json:
  7169. schema:
  7170. $ref: '#/components/schemas/NotificationRule'
  7171. parameters:
  7172. - $ref: '#/components/parameters/TraceSpan'
  7173. - in: path
  7174. name: ruleID
  7175. schema:
  7176. type: string
  7177. required: true
  7178. description: The notification rule ID.
  7179. responses:
  7180. '200':
  7181. description: An updated notification rule
  7182. content:
  7183. application/json:
  7184. schema:
  7185. $ref: '#/components/schemas/NotificationRule'
  7186. '404':
  7187. description: The notification rule was not found
  7188. content:
  7189. application/json:
  7190. schema:
  7191. $ref: '#/components/schemas/Error'
  7192. default:
  7193. description: Unexpected error
  7194. content:
  7195. application/json:
  7196. schema:
  7197. $ref: '#/components/schemas/Error'
  7198. patch:
  7199. operationId: PatchNotificationRulesID
  7200. tags:
  7201. - NotificationRules
  7202. summary: Update a notification rule
  7203. requestBody:
  7204. description: Notification rule update to apply
  7205. required: true
  7206. content:
  7207. application/json:
  7208. schema:
  7209. $ref: '#/components/schemas/NotificationRuleUpdate'
  7210. parameters:
  7211. - $ref: '#/components/parameters/TraceSpan'
  7212. - in: path
  7213. name: ruleID
  7214. schema:
  7215. type: string
  7216. required: true
  7217. description: The notification rule ID.
  7218. responses:
  7219. '200':
  7220. description: An updated notification rule
  7221. content:
  7222. application/json:
  7223. schema:
  7224. $ref: '#/components/schemas/NotificationRule'
  7225. '404':
  7226. description: The notification rule was not found
  7227. content:
  7228. application/json:
  7229. schema:
  7230. $ref: '#/components/schemas/Error'
  7231. default:
  7232. description: Unexpected error
  7233. content:
  7234. application/json:
  7235. schema:
  7236. $ref: '#/components/schemas/Error'
  7237. delete:
  7238. operationId: DeleteNotificationRulesID
  7239. tags:
  7240. - NotificationRules
  7241. summary: Delete a notification rule
  7242. parameters:
  7243. - $ref: '#/components/parameters/TraceSpan'
  7244. - in: path
  7245. name: ruleID
  7246. schema:
  7247. type: string
  7248. required: true
  7249. description: The notification rule ID.
  7250. responses:
  7251. '204':
  7252. description: Delete has been accepted
  7253. '404':
  7254. description: The check was not found
  7255. content:
  7256. application/json:
  7257. schema:
  7258. $ref: '#/components/schemas/Error'
  7259. default:
  7260. description: Unexpected error
  7261. content:
  7262. application/json:
  7263. schema:
  7264. $ref: '#/components/schemas/Error'
  7265. '/notificationRules/{ruleID}/labels':
  7266. get:
  7267. operationId: GetNotificationRulesIDLabels
  7268. tags:
  7269. - NotificationRules
  7270. summary: List all labels for a notification rule
  7271. parameters:
  7272. - $ref: '#/components/parameters/TraceSpan'
  7273. - in: path
  7274. name: ruleID
  7275. schema:
  7276. type: string
  7277. required: true
  7278. description: The notification rule ID.
  7279. responses:
  7280. '200':
  7281. description: A list of all labels for a notification rule
  7282. content:
  7283. application/json:
  7284. schema:
  7285. $ref: '#/components/schemas/LabelsResponse'
  7286. default:
  7287. description: Unexpected error
  7288. content:
  7289. application/json:
  7290. schema:
  7291. $ref: '#/components/schemas/Error'
  7292. post:
  7293. operationId: PostNotificationRuleIDLabels
  7294. tags:
  7295. - NotificationRules
  7296. summary: Add a label to a notification rule
  7297. parameters:
  7298. - $ref: '#/components/parameters/TraceSpan'
  7299. - in: path
  7300. name: ruleID
  7301. schema:
  7302. type: string
  7303. required: true
  7304. description: The notification rule ID.
  7305. requestBody:
  7306. description: Label to add
  7307. required: true
  7308. content:
  7309. application/json:
  7310. schema:
  7311. $ref: '#/components/schemas/LabelMapping'
  7312. responses:
  7313. '201':
  7314. description: The label was added to the notification rule
  7315. content:
  7316. application/json:
  7317. schema:
  7318. $ref: '#/components/schemas/LabelResponse'
  7319. default:
  7320. description: Unexpected error
  7321. content:
  7322. application/json:
  7323. schema:
  7324. $ref: '#/components/schemas/Error'
  7325. '/notificationRules/{ruleID}/labels/{labelID}':
  7326. delete:
  7327. operationId: DeleteNotificationRulesIDLabelsID
  7328. tags:
  7329. - NotificationRules
  7330. summary: Delete label from a notification rule
  7331. parameters:
  7332. - $ref: '#/components/parameters/TraceSpan'
  7333. - in: path
  7334. name: ruleID
  7335. schema:
  7336. type: string
  7337. required: true
  7338. description: The notification rule ID.
  7339. - in: path
  7340. name: labelID
  7341. schema:
  7342. type: string
  7343. required: true
  7344. description: The ID of the label to delete.
  7345. responses:
  7346. '204':
  7347. description: Delete has been accepted
  7348. '404':
  7349. description: Rule or label not found
  7350. content:
  7351. application/json:
  7352. schema:
  7353. $ref: '#/components/schemas/Error'
  7354. default:
  7355. description: Unexpected error
  7356. content:
  7357. application/json:
  7358. schema:
  7359. $ref: '#/components/schemas/Error'
  7360. '/notificationRules/{ruleID}/query':
  7361. get:
  7362. operationId: GetNotificationRulesIDQuery
  7363. tags:
  7364. - Rules
  7365. summary: Retrieve a notification rule query
  7366. parameters:
  7367. - $ref: '#/components/parameters/TraceSpan'
  7368. - in: path
  7369. name: ruleID
  7370. schema:
  7371. type: string
  7372. required: true
  7373. description: The notification rule ID.
  7374. responses:
  7375. '200':
  7376. description: The notification rule query requested
  7377. content:
  7378. application/json:
  7379. schema:
  7380. $ref: '#/components/schemas/FluxResponse'
  7381. '400':
  7382. description: Invalid request
  7383. content:
  7384. application/json:
  7385. schema:
  7386. $ref: '#/components/schemas/Error'
  7387. '404':
  7388. description: Notification rule not found
  7389. content:
  7390. application/json:
  7391. schema:
  7392. $ref: '#/components/schemas/Error'
  7393. default:
  7394. description: Unexpected error
  7395. content:
  7396. application/json:
  7397. schema:
  7398. $ref: '#/components/schemas/Error'
  7399. /notificationEndpoints:
  7400. get:
  7401. operationId: GetNotificationEndpoints
  7402. tags:
  7403. - NotificationEndpoints
  7404. summary: List all notification endpoints
  7405. parameters:
  7406. - $ref: '#/components/parameters/TraceSpan'
  7407. - $ref: '#/components/parameters/Offset'
  7408. - $ref: '#/components/parameters/Limit'
  7409. - in: query
  7410. name: orgID
  7411. required: true
  7412. description: Only show notification endpoints that belong to specific organization ID.
  7413. schema:
  7414. type: string
  7415. responses:
  7416. '200':
  7417. description: A list of notification endpoints
  7418. content:
  7419. application/json:
  7420. schema:
  7421. $ref: '#/components/schemas/NotificationEndpoints'
  7422. default:
  7423. description: Unexpected error
  7424. content:
  7425. application/json:
  7426. schema:
  7427. $ref: '#/components/schemas/Error'
  7428. post:
  7429. operationId: CreateNotificationEndpoint
  7430. tags:
  7431. - NotificationEndpoints
  7432. summary: Add a notification endpoint
  7433. requestBody:
  7434. description: Notification endpoint to create
  7435. required: true
  7436. content:
  7437. application/json:
  7438. schema:
  7439. $ref: '#/components/schemas/PostNotificationEndpoint'
  7440. responses:
  7441. '201':
  7442. description: Notification endpoint created
  7443. content:
  7444. application/json:
  7445. schema:
  7446. $ref: '#/components/schemas/NotificationEndpoint'
  7447. default:
  7448. description: Unexpected error
  7449. content:
  7450. application/json:
  7451. schema:
  7452. $ref: '#/components/schemas/Error'
  7453. '/notificationEndpoints/{endpointID}':
  7454. get:
  7455. operationId: GetNotificationEndpointsID
  7456. tags:
  7457. - NotificationEndpoints
  7458. summary: Retrieve a notification endpoint
  7459. parameters:
  7460. - $ref: '#/components/parameters/TraceSpan'
  7461. - in: path
  7462. name: endpointID
  7463. schema:
  7464. type: string
  7465. required: true
  7466. description: The notification endpoint ID.
  7467. responses:
  7468. '200':
  7469. description: The notification endpoint requested
  7470. content:
  7471. application/json:
  7472. schema:
  7473. $ref: '#/components/schemas/NotificationEndpoint'
  7474. default:
  7475. description: Unexpected error
  7476. content:
  7477. application/json:
  7478. schema:
  7479. $ref: '#/components/schemas/Error'
  7480. put:
  7481. operationId: PutNotificationEndpointsID
  7482. tags:
  7483. - NotificationEndpoints
  7484. summary: Update a notification endpoint
  7485. requestBody:
  7486. description: A new notification endpoint to replace the existing endpoint with
  7487. required: true
  7488. content:
  7489. application/json:
  7490. schema:
  7491. $ref: '#/components/schemas/NotificationEndpoint'
  7492. parameters:
  7493. - $ref: '#/components/parameters/TraceSpan'
  7494. - in: path
  7495. name: endpointID
  7496. schema:
  7497. type: string
  7498. required: true
  7499. description: The notification endpoint ID.
  7500. responses:
  7501. '200':
  7502. description: An updated notification endpoint
  7503. content:
  7504. application/json:
  7505. schema:
  7506. $ref: '#/components/schemas/NotificationEndpoint'
  7507. '404':
  7508. description: The notification endpoint was not found
  7509. content:
  7510. application/json:
  7511. schema:
  7512. $ref: '#/components/schemas/Error'
  7513. default:
  7514. description: Unexpected error
  7515. content:
  7516. application/json:
  7517. schema:
  7518. $ref: '#/components/schemas/Error'
  7519. patch:
  7520. operationId: PatchNotificationEndpointsID
  7521. tags:
  7522. - NotificationEndpoints
  7523. summary: Update a notification endpoint
  7524. requestBody:
  7525. description: Check update to apply
  7526. required: true
  7527. content:
  7528. application/json:
  7529. schema:
  7530. $ref: '#/components/schemas/NotificationEndpointUpdate'
  7531. parameters:
  7532. - $ref: '#/components/parameters/TraceSpan'
  7533. - in: path
  7534. name: endpointID
  7535. schema:
  7536. type: string
  7537. required: true
  7538. description: The notification endpoint ID.
  7539. responses:
  7540. '200':
  7541. description: An updated notification endpoint
  7542. content:
  7543. application/json:
  7544. schema:
  7545. $ref: '#/components/schemas/NotificationEndpoint'
  7546. '404':
  7547. description: The notification endpoint was not found
  7548. content:
  7549. application/json:
  7550. schema:
  7551. $ref: '#/components/schemas/Error'
  7552. default:
  7553. description: Unexpected error
  7554. content:
  7555. application/json:
  7556. schema:
  7557. $ref: '#/components/schemas/Error'
  7558. delete:
  7559. operationId: DeleteNotificationEndpointsID
  7560. tags:
  7561. - NotificationEndpoints
  7562. summary: Delete a notification endpoint
  7563. parameters:
  7564. - $ref: '#/components/parameters/TraceSpan'
  7565. - in: path
  7566. name: endpointID
  7567. schema:
  7568. type: string
  7569. required: true
  7570. description: The notification endpoint ID.
  7571. responses:
  7572. '204':
  7573. description: Delete has been accepted
  7574. '404':
  7575. description: The endpoint was not found
  7576. content:
  7577. application/json:
  7578. schema:
  7579. $ref: '#/components/schemas/Error'
  7580. default:
  7581. description: Unexpected error
  7582. content:
  7583. application/json:
  7584. schema:
  7585. $ref: '#/components/schemas/Error'
  7586. '/notificationEndpoints/{endpointID}/labels':
  7587. get:
  7588. operationId: GetNotificationEndpointsIDLabels
  7589. tags:
  7590. - NotificationEndpoints
  7591. summary: List all labels for a notification endpoint
  7592. parameters:
  7593. - $ref: '#/components/parameters/TraceSpan'
  7594. - in: path
  7595. name: endpointID
  7596. schema:
  7597. type: string
  7598. required: true
  7599. description: The notification endpoint ID.
  7600. responses:
  7601. '200':
  7602. description: A list of all labels for a notification endpoint
  7603. content:
  7604. application/json:
  7605. schema:
  7606. $ref: '#/components/schemas/LabelsResponse'
  7607. default:
  7608. description: Unexpected error
  7609. content:
  7610. application/json:
  7611. schema:
  7612. $ref: '#/components/schemas/Error'
  7613. post:
  7614. operationId: PostNotificationEndpointIDLabels
  7615. tags:
  7616. - NotificationEndpoints
  7617. summary: Add a label to a notification endpoint
  7618. parameters:
  7619. - $ref: '#/components/parameters/TraceSpan'
  7620. - in: path
  7621. name: endpointID
  7622. schema:
  7623. type: string
  7624. required: true
  7625. description: The notification endpoint ID.
  7626. requestBody:
  7627. description: Label to add
  7628. required: true
  7629. content:
  7630. application/json:
  7631. schema:
  7632. $ref: '#/components/schemas/LabelMapping'
  7633. responses:
  7634. '201':
  7635. description: The label was added to the notification endpoint
  7636. content:
  7637. application/json:
  7638. schema:
  7639. $ref: '#/components/schemas/LabelResponse'
  7640. default:
  7641. description: Unexpected error
  7642. content:
  7643. application/json:
  7644. schema:
  7645. $ref: '#/components/schemas/Error'
  7646. '/notificationEndpoints/{endpointID}/labels/{labelID}':
  7647. delete:
  7648. operationId: DeleteNotificationEndpointsIDLabelsID
  7649. tags:
  7650. - NotificationEndpoints
  7651. summary: Delete a label from a notification endpoint
  7652. parameters:
  7653. - $ref: '#/components/parameters/TraceSpan'
  7654. - in: path
  7655. name: endpointID
  7656. schema:
  7657. type: string
  7658. required: true
  7659. description: The notification endpoint ID.
  7660. - in: path
  7661. name: labelID
  7662. schema:
  7663. type: string
  7664. required: true
  7665. description: The ID of the label to delete.
  7666. responses:
  7667. '204':
  7668. description: Delete has been accepted
  7669. '404':
  7670. description: Endpoint or label not found
  7671. content:
  7672. application/json:
  7673. schema:
  7674. $ref: '#/components/schemas/Error'
  7675. default:
  7676. description: Unexpected error
  7677. content:
  7678. application/json:
  7679. schema:
  7680. $ref: '#/components/schemas/Error'
  7681. /debug/pprof/all:
  7682. get:
  7683. operationId: GetDebugPprofAllProfiles
  7684. tags:
  7685. - Debug
  7686. - System information endpoints
  7687. summary: Retrieve all runtime profiles
  7688. description: |
  7689. Collects samples and returns reports for the following [Go runtime profiles](https://pkg.go.dev/runtime/pprof):
  7690. - **allocs**: All past memory allocations
  7691. - **block**: Stack traces that led to blocking on synchronization primitives
  7692. - **cpu**: (Optional) Program counters sampled from the executing stack.
  7693. Include by passing the `cpu` query parameter with a [duration](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#duration) value.
  7694. Equivalent to the report from [`GET /debug/pprof/profile?seconds=NUMBER_OF_SECONDS`](#operation/GetDebugPprofProfile).
  7695. - **goroutine**: All current goroutines
  7696. - **heap**: Memory allocations for live objects
  7697. - **mutex**: Holders of contended mutexes
  7698. - **threadcreate**: Stack traces that led to the creation of new OS threads
  7699. x-codeSamples:
  7700. - lang: Shell
  7701. label: 'Shell: Get all profiles'
  7702. source: |
  7703. # Download and extract a `tar.gz` of all profiles after 10 seconds of CPU sampling.
  7704. curl "http://localhost:8086/debug/pprof/all?cpu=10s" | tar -xz
  7705. # x profiles/cpu.pb.gz
  7706. # x profiles/goroutine.pb.gz
  7707. # x profiles/block.pb.gz
  7708. # x profiles/mutex.pb.gz
  7709. # x profiles/heap.pb.gz
  7710. # x profiles/allocs.pb.gz
  7711. # x profiles/threadcreate.pb.gz
  7712. # Analyze a profile.
  7713. go tool pprof profiles/heap.pb.gz
  7714. - lang: Shell
  7715. label: 'Shell: Get all profiles except CPU'
  7716. source: |
  7717. # Download and extract a `tar.gz` of all profiles except CPU.
  7718. curl http://localhost:8086/debug/pprof/all | tar -xz
  7719. # x profiles/goroutine.pb.gz
  7720. # x profiles/block.pb.gz
  7721. # x profiles/mutex.pb.gz
  7722. # x profiles/heap.pb.gz
  7723. # x profiles/allocs.pb.gz
  7724. # x profiles/threadcreate.pb.gz
  7725. # Analyze a profile.
  7726. go tool pprof profiles/heap.pb.gz
  7727. servers:
  7728. - url: ''
  7729. parameters:
  7730. - $ref: '#/components/parameters/TraceSpan'
  7731. - in: query
  7732. name: cpu
  7733. description: |
  7734. Collects and returns CPU profiling data for the specified [duration](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#duration).
  7735. schema:
  7736. type: string
  7737. format: duration
  7738. externalDocs:
  7739. description: InfluxDB duration
  7740. url: 'https://docs.influxdata.com/influxdb/latest/reference/glossary/#duration'
  7741. responses:
  7742. '200':
  7743. description: |
  7744. [Go runtime profile](https://pkg.go.dev/runtime/pprof) reports.
  7745. content:
  7746. application/octet-stream:
  7747. schema:
  7748. description: |
  7749. GZIP compressed TAR file (`.tar.gz`) that contains
  7750. [Go runtime profile](https://pkg.go.dev/runtime/pprof) reports.
  7751. type: string
  7752. format: binary
  7753. externalDocs:
  7754. description: Golang pprof package
  7755. url: 'https://pkg.go.dev/net/http/pprof'
  7756. default:
  7757. description: Unexpected error
  7758. $ref: '#/components/responses/GeneralServerError'
  7759. /debug/pprof/allocs:
  7760. get:
  7761. operationId: GetDebugPprofAllocs
  7762. tags:
  7763. - Debug
  7764. - System information endpoints
  7765. summary: Retrieve the memory allocations runtime profile
  7766. description: |
  7767. Returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof) report of
  7768. all past memory allocations.
  7769. **allocs** is the same as the **heap** profile,
  7770. but changes the default [pprof](https://pkg.go.dev/runtime/pprof)
  7771. display to __-alloc_space__,
  7772. the total number of bytes allocated since the program began (including garbage-collected bytes).
  7773. x-codeSamples:
  7774. - lang: Shell
  7775. label: 'Shell: go tool pprof'
  7776. source: |
  7777. # Analyze the profile in interactive mode.
  7778. go tool pprof http://localhost:8086/debug/pprof/allocs
  7779. # `pprof` returns the following prompt:
  7780. # Entering interactive mode (type "help" for commands, "o" for options)
  7781. # (pprof)
  7782. # At the prompt, get the top N memory allocations.
  7783. (pprof) top10
  7784. servers:
  7785. - url: ''
  7786. parameters:
  7787. - $ref: '#/components/parameters/TraceSpan'
  7788. - in: query
  7789. name: debug
  7790. description: |
  7791. - `0`: (Default) Return the report as a gzip-compressed protocol buffer.
  7792. - `1`: Return a response body with the report formatted as human-readable text.
  7793. The report contains comments that translate addresses to function names and line numbers for debugging.
  7794. `debug=1` is mutually exclusive with the `seconds` query parameter.
  7795. schema:
  7796. type: integer
  7797. format: int64
  7798. enum:
  7799. - 0
  7800. - 1
  7801. - in: query
  7802. name: seconds
  7803. description: |
  7804. Number of seconds to collect statistics.
  7805. `seconds` is mutually exclusive with `debug=1`.
  7806. schema:
  7807. type: string
  7808. format: int64
  7809. responses:
  7810. '200':
  7811. description: |
  7812. [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
  7813. with [pprof](https://github.com/google/pprof) analysis and visualization tools.
  7814. If debug is enabled (`?debug=1`), response body contains a human-readable profile.
  7815. content:
  7816. application/octet-stream:
  7817. schema:
  7818. description: |
  7819. [Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
  7820. type: string
  7821. format: binary
  7822. externalDocs:
  7823. description: Golang pprof package
  7824. url: 'https://pkg.go.dev/net/http/pprof'
  7825. text/plain:
  7826. schema:
  7827. description: |
  7828. Response body contains a report formatted in plain text.
  7829. The report contains comments that translate addresses to
  7830. function names and line numbers for debugging.
  7831. type: string
  7832. format: Go runtime profile
  7833. externalDocs:
  7834. description: Golang pprof package
  7835. url: 'https://pkg.go.dev/net/http/pprof'
  7836. default:
  7837. description: Unexpected error
  7838. $ref: '#/components/responses/GeneralServerError'
  7839. /debug/pprof/block:
  7840. get:
  7841. operationId: GetDebugPprofBlock
  7842. tags:
  7843. - Debug
  7844. - System information endpoints
  7845. summary: Retrieve the block runtime profile
  7846. description: |
  7847. Collects samples and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof)
  7848. report of stack traces that led to blocking on synchronization primitives.
  7849. x-codeSamples:
  7850. - lang: Shell
  7851. label: 'Shell: go tool pprof'
  7852. source: |
  7853. # Analyze the profile in interactive mode.
  7854. go tool pprof http://localhost:8086/debug/pprof/block
  7855. # `pprof` returns the following prompt:
  7856. # Entering interactive mode (type "help" for commands, "o" for options)
  7857. # (pprof)
  7858. # At the prompt, get the top N entries.
  7859. (pprof) top10
  7860. servers:
  7861. - url: ''
  7862. parameters:
  7863. - $ref: '#/components/parameters/TraceSpan'
  7864. - in: query
  7865. name: debug
  7866. description: |
  7867. - `0`: (Default) Return the report as a gzip-compressed protocol buffer.
  7868. - `1`: Return a response body with the report formatted as human-readable text.
  7869. The report contains comments that translate addresses to function names and line numbers for debugging.
  7870. `debug=1` is mutually exclusive with the `seconds` query parameter.
  7871. schema:
  7872. type: integer
  7873. format: int64
  7874. enum:
  7875. - 0
  7876. - 1
  7877. - in: query
  7878. name: seconds
  7879. description: |
  7880. Number of seconds to collect statistics.
  7881. `seconds` is mutually exclusive with `debug=1`.
  7882. schema:
  7883. type: string
  7884. format: int64
  7885. responses:
  7886. '200':
  7887. description: |
  7888. [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
  7889. with [pprof](https://github.com/google/pprof) analysis and visualization tools.
  7890. If debug is enabled (`?debug=1`), response body contains a human-readable profile.
  7891. content:
  7892. application/octet-stream:
  7893. schema:
  7894. description: |
  7895. [Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
  7896. type: string
  7897. format: binary
  7898. externalDocs:
  7899. description: Golang pprof package
  7900. url: 'https://pkg.go.dev/net/http/pprof'
  7901. text/plain:
  7902. schema:
  7903. description: |
  7904. Response body contains a report formatted in plain text.
  7905. The report contains comments that translate addresses to
  7906. function names and line numbers for debugging.
  7907. type: string
  7908. format: Go runtime profile
  7909. externalDocs:
  7910. description: Golang pprof package
  7911. url: 'https://pkg.go.dev/net/http/pprof'
  7912. default:
  7913. description: Unexpected error
  7914. $ref: '#/components/responses/GeneralServerError'
  7915. /debug/pprof/cmdline:
  7916. get:
  7917. operationId: GetDebugPprofCmdline
  7918. tags:
  7919. - Debug
  7920. - System information endpoints
  7921. summary: Retrieve the command line invocation
  7922. description: |
  7923. Returns the command line that invoked InfluxDB.
  7924. servers:
  7925. - url: ''
  7926. parameters:
  7927. - $ref: '#/components/parameters/TraceSpan'
  7928. responses:
  7929. '200':
  7930. description: Command line invocation.
  7931. content:
  7932. text/plain:
  7933. schema:
  7934. type: string
  7935. format: Command line
  7936. default:
  7937. description: Unexpected error
  7938. $ref: '#/components/responses/GeneralServerError'
  7939. /debug/pprof/goroutine:
  7940. get:
  7941. operationId: GetDebugPprofGoroutine
  7942. tags:
  7943. - Debug
  7944. - System information endpoints
  7945. summary: Retrieve the goroutines runtime profile
  7946. description: |
  7947. Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof)
  7948. report of all current goroutines.
  7949. x-codeSamples:
  7950. - lang: Shell
  7951. label: 'Shell: go tool pprof'
  7952. source: |
  7953. # Analyze the profile in interactive mode.
  7954. go tool pprof http://localhost:8086/debug/pprof/goroutine
  7955. # `pprof` returns the following prompt:
  7956. # Entering interactive mode (type "help" for commands, "o" for options)
  7957. # (pprof)
  7958. # At the prompt, get the top N entries.
  7959. (pprof) top10
  7960. servers:
  7961. - url: ''
  7962. parameters:
  7963. - $ref: '#/components/parameters/TraceSpan'
  7964. - in: query
  7965. name: debug
  7966. description: |
  7967. - `0`: (Default) Return the report as a gzip-compressed protocol buffer.
  7968. - `1`: Return a response body with the report formatted as
  7969. human-readable text with comments that translate addresses to
  7970. function names and line numbers for debugging.
  7971. `debug=1` is mutually exclusive with the `seconds` query parameter.
  7972. schema:
  7973. type: integer
  7974. format: int64
  7975. enum:
  7976. - 0
  7977. - 1
  7978. - in: query
  7979. name: seconds
  7980. description: |
  7981. Number of seconds to collect statistics.
  7982. `seconds` is mutually exclusive with `debug=1`.
  7983. schema:
  7984. type: string
  7985. format: int64
  7986. responses:
  7987. '200':
  7988. description: |
  7989. [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
  7990. with [pprof](https://github.com/google/pprof) analysis and visualization tools.
  7991. If debug is enabled (`?debug=1`), response body contains a human-readable profile.
  7992. content:
  7993. application/octet-stream:
  7994. schema:
  7995. description: |
  7996. [Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
  7997. type: string
  7998. format: binary
  7999. externalDocs:
  8000. description: Golang pprof package
  8001. url: 'https://pkg.go.dev/net/http/pprof'
  8002. text/plain:
  8003. schema:
  8004. description: |
  8005. Response body contains a report formatted in plain text.
  8006. The report contains comments that translate addresses to
  8007. function names and line numbers for debugging.
  8008. type: string
  8009. format: Go runtime profile
  8010. externalDocs:
  8011. description: Golang pprof package
  8012. url: 'https://pkg.go.dev/net/http/pprof'
  8013. default:
  8014. description: Unexpected error
  8015. $ref: '#/components/responses/GeneralServerError'
  8016. /debug/pprof/heap:
  8017. get:
  8018. operationId: GetDebugPprofHeap
  8019. tags:
  8020. - Debug
  8021. - System information endpoints
  8022. summary: Retrieve the heap runtime profile
  8023. description: |
  8024. Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof)
  8025. report of memory allocations for live objects.
  8026. To run **garbage collection** before sampling,
  8027. pass the `gc` query parameter with a value of `1`.
  8028. x-codeSamples:
  8029. - lang: Shell
  8030. label: 'Shell: go tool pprof'
  8031. source: |
  8032. # Analyze the profile in interactive mode.
  8033. go tool pprof http://localhost:8086/debug/pprof/heap
  8034. # `pprof` returns the following prompt:
  8035. # Entering interactive mode (type "help" for commands, "o" for options)
  8036. # (pprof)
  8037. # At the prompt, get the top N memory-intensive nodes.
  8038. (pprof) top10
  8039. # pprof displays the list:
  8040. # Showing nodes accounting for 142.46MB, 85.43% of 166.75MB total
  8041. # Dropped 895 nodes (cum <= 0.83MB)
  8042. # Showing top 10 nodes out of 143
  8043. servers:
  8044. - url: ''
  8045. parameters:
  8046. - $ref: '#/components/parameters/TraceSpan'
  8047. - in: query
  8048. name: debug
  8049. description: |
  8050. - `0`: (Default) Return the report as a gzip-compressed protocol buffer.
  8051. - `1`: Return a response body with the report formatted as human-readable text.
  8052. The report contains comments that translate addresses to function names and line numbers for debugging.
  8053. `debug=1` is mutually exclusive with the `seconds` query parameter.
  8054. schema:
  8055. type: integer
  8056. format: int64
  8057. enum:
  8058. - 0
  8059. - 1
  8060. - in: query
  8061. name: seconds
  8062. description: |
  8063. Number of seconds to collect statistics.
  8064. `seconds` is mutually exclusive with `debug=1`.
  8065. schema:
  8066. type: string
  8067. format: int64
  8068. - in: query
  8069. name: gc
  8070. description: |
  8071. - `0`: (Default) don't force garbage collection before sampling.
  8072. - `1`: Force garbage collection before sampling.
  8073. schema:
  8074. type: integer
  8075. format: int64
  8076. enum:
  8077. - 0
  8078. - 1
  8079. responses:
  8080. '200':
  8081. description: |
  8082. [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
  8083. with [pprof](https://github.com/google/pprof) analysis and visualization tools.
  8084. If debug is enabled (`?debug=1`), response body contains a human-readable profile.
  8085. content:
  8086. application/octet-stream:
  8087. schema:
  8088. description: |
  8089. [Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
  8090. type: string
  8091. format: binary
  8092. externalDocs:
  8093. description: Golang pprof package
  8094. url: 'https://pkg.go.dev/net/http/pprof'
  8095. text/plain:
  8096. schema:
  8097. description: |
  8098. Response body contains a report formatted in plain text.
  8099. The report contains comments that translate addresses to
  8100. function names and line numbers for debugging.
  8101. type: string
  8102. format: Go runtime profile
  8103. externalDocs:
  8104. description: Golang pprof package
  8105. url: 'https://pkg.go.dev/net/http/pprof'
  8106. examples:
  8107. profileDebugResponse:
  8108. summary: Profile in plain text
  8109. value: "heap profile: 12431: 137356528 [149885081: 846795139976] @ heap/8192\n23: 17711104 [46: 35422208] @ 0x4c6df65 0x4ce03ec 0x4cdf3c5 0x4c6f4db 0x4c9edbc 0x4bdefb3 0x4bf822a 0x567d158 0x567ced9 0x406c0a1\n#\t0x4c6df64\tgithub.com/influxdata/influxdb/v2/tsdb/engine/tsm1.(*entry).add+0x1a4\t\t\t\t\t/Users/me/github/influxdb/tsdb/engine/tsm1/cache.go:97\n#\t0x4ce03eb\tgithub.com/influxdata/influxdb/v2/tsdb/engine/tsm1.(*partition).write+0x2ab\t\t\t\t/Users/me/github/influxdb/tsdb/engine/tsm1/ring.go:229\n#\t0x4cdf3c4\tgithub.com/influxdata/influxdb/v2/tsdb/engine/tsm1.(*ring).write+0xa4\t\t\t\t\t/Users/me/github/influxdb/tsdb/engine/tsm1/ring.go:95\n#\t0x4c6f4da\tgithub.com/influxdata/influxdb/v2/tsdb/engine/tsm1.(*Cache).WriteMulti+0x31a\t\t\t\t/Users/me/github/influxdb/tsdb/engine/tsm1/cache.go:343\n"
  8110. default:
  8111. description: Unexpected error
  8112. $ref: '#/components/responses/GeneralServerError'
  8113. /debug/pprof/mutex:
  8114. get:
  8115. operationId: GetDebugPprofMutex
  8116. tags:
  8117. - Debug
  8118. - System information endpoints
  8119. summary: Retrieve the mutual exclusion (mutex) runtime profile
  8120. description: |
  8121. Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof) report of
  8122. lock contentions.
  8123. The profile contains stack traces of holders of contended mutual exclusions (mutexes).
  8124. x-codeSamples:
  8125. - lang: Shell
  8126. label: 'Shell: go tool pprof'
  8127. source: |
  8128. # Analyze the profile in interactive mode.
  8129. go tool pprof http://localhost:8086/debug/pprof/mutex
  8130. # `pprof` returns the following prompt:
  8131. # Entering interactive mode (type "help" for commands, "o" for options)
  8132. # (pprof)
  8133. # At the prompt, get the top N entries.
  8134. (pprof) top10
  8135. servers:
  8136. - url: ''
  8137. parameters:
  8138. - $ref: '#/components/parameters/TraceSpan'
  8139. - in: query
  8140. name: debug
  8141. description: |
  8142. - `0`: (Default) Return the report as a gzip-compressed protocol buffer.
  8143. - `1`: Return a response body with the report formatted as human-readable text.
  8144. The report contains comments that translate addresses to function names and line numbers for debugging.
  8145. `debug=1` is mutually exclusive with the `seconds` query parameter.
  8146. schema:
  8147. type: integer
  8148. format: int64
  8149. enum:
  8150. - 0
  8151. - 1
  8152. - in: query
  8153. name: seconds
  8154. description: |
  8155. Number of seconds to collect statistics.
  8156. `seconds` is mutually exclusive with `debug=1`.
  8157. schema:
  8158. type: string
  8159. format: int64
  8160. responses:
  8161. '200':
  8162. description: |
  8163. [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
  8164. with [pprof](https://github.com/google/pprof) analysis and visualization tools.
  8165. If debug is enabled (`?debug=1`), response body contains a human-readable profile.
  8166. content:
  8167. application/octet-stream:
  8168. schema:
  8169. description: |
  8170. [Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
  8171. type: string
  8172. format: binary
  8173. externalDocs:
  8174. description: Golang pprof package
  8175. url: 'https://pkg.go.dev/net/http/pprof'
  8176. text/plain:
  8177. schema:
  8178. description: |
  8179. Response body contains a report formatted in plain text.
  8180. The report contains comments that translate addresses to
  8181. function names and line numbers for debugging.
  8182. type: string
  8183. format: Go runtime profile
  8184. externalDocs:
  8185. description: Golang pprof package
  8186. url: 'https://pkg.go.dev/net/http/pprof'
  8187. default:
  8188. description: Unexpected error
  8189. $ref: '#/components/responses/GeneralServerError'
  8190. /debug/pprof/profile:
  8191. get:
  8192. operationId: GetDebugPprofProfile
  8193. tags:
  8194. - Debug
  8195. - System information endpoints
  8196. summary: Retrieve the CPU runtime profile
  8197. description: |
  8198. Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof)
  8199. report of program counters on the executing stack.
  8200. x-codeSamples:
  8201. - lang: Shell
  8202. label: 'Shell: go tool pprof'
  8203. source: |
  8204. # Download the profile report.
  8205. curl http://localhost:8086/debug/pprof/profile -o cpu
  8206. # Analyze the profile in interactive mode.
  8207. go tool pprof ./cpu
  8208. # At the prompt, get the top N functions most often running
  8209. # or waiting during the sample period.
  8210. (pprof) top10
  8211. servers:
  8212. - url: ''
  8213. parameters:
  8214. - $ref: '#/components/parameters/TraceSpan'
  8215. - in: query
  8216. name: seconds
  8217. description: Number of seconds to collect profile data. Default is `30` seconds.
  8218. schema:
  8219. type: string
  8220. format: int64
  8221. responses:
  8222. '200':
  8223. description: |
  8224. [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
  8225. with [pprof](https://github.com/google/pprof) analysis and visualization tools.
  8226. content:
  8227. application/octet-stream:
  8228. schema:
  8229. description: |
  8230. [Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
  8231. type: string
  8232. format: binary
  8233. externalDocs:
  8234. description: Golang pprof package
  8235. url: 'https://pkg.go.dev/net/http/pprof'
  8236. default:
  8237. description: Unexpected error
  8238. $ref: '#/components/responses/GeneralServerError'
  8239. /debug/pprof/threadcreate:
  8240. get:
  8241. operationId: GetDebugPprofThreadCreate
  8242. tags:
  8243. - Debug
  8244. - System information endpoints
  8245. summary: Retrieve the threadcreate runtime profile
  8246. description: |
  8247. Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof)
  8248. report of stack traces that led to the creation of new OS threads.
  8249. x-codeSamples:
  8250. - lang: Shell
  8251. label: 'Shell: go tool pprof'
  8252. source: |
  8253. # Analyze the profile in interactive mode.
  8254. go tool pprof http://localhost:8086/debug/pprof/threadcreate
  8255. # `pprof` returns the following prompt:
  8256. # Entering interactive mode (type "help" for commands, "o" for options)
  8257. # (pprof)
  8258. # At the prompt, get the top N entries.
  8259. (pprof) top10
  8260. servers:
  8261. - url: ''
  8262. parameters:
  8263. - $ref: '#/components/parameters/TraceSpan'
  8264. - in: query
  8265. name: debug
  8266. description: |
  8267. - `0`: (Default) Return the report as a gzip-compressed protocol buffer.
  8268. - `1`: Return a response body with the report formatted as human-readable text.
  8269. The report contains comments that translate addresses to function names and line numbers for debugging.
  8270. `debug=1` is mutually exclusive with the `seconds` query parameter.
  8271. schema:
  8272. type: integer
  8273. format: int64
  8274. enum:
  8275. - 0
  8276. - 1
  8277. - in: query
  8278. name: seconds
  8279. description: |
  8280. Number of seconds to collect statistics.
  8281. `seconds` is mutually exclusive with `debug=1`.
  8282. schema:
  8283. type: string
  8284. format: int64
  8285. responses:
  8286. '200':
  8287. description: |
  8288. [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
  8289. with [pprof](https://github.com/google/pprof) analysis and visualization tools.
  8290. If debug is enabled (`?debug=1`), response body contains a human-readable profile.
  8291. content:
  8292. application/octet-stream:
  8293. schema:
  8294. description: |
  8295. [Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
  8296. type: string
  8297. format: binary
  8298. externalDocs:
  8299. description: Golang pprof package
  8300. url: 'https://pkg.go.dev/net/http/pprof'
  8301. text/plain:
  8302. schema:
  8303. description: |
  8304. Response body contains a report formatted in plain text.
  8305. The report contains comments that translate addresses to
  8306. function names and line numbers for debugging.
  8307. type: string
  8308. format: Go runtime profile
  8309. externalDocs:
  8310. description: Golang pprof package
  8311. url: 'https://pkg.go.dev/net/http/pprof'
  8312. examples:
  8313. profileDebugResponse:
  8314. summary: Profile in plain text
  8315. value: "threadcreate profile: total 26\n25 @\n#\t0x0\n\n1 @ 0x403dda8 0x403e54b 0x403e810 0x403a90c 0x406c0a1\n#\t0x403dda7\truntime.allocm+0xc7\t\t\t/Users/me/.gvm/gos/go1.17/src/runtime/proc.go:1877\n#\t0x403e54a\truntime.newm+0x2a\t\t\t/Users/me/.gvm/gos/go1.17/src/runtime/proc.go:2201\n#\t0x403e80f\truntime.startTemplateThread+0x8f\t/Users/me/.gvm/gos/go1.17/src/runtime/proc.go:2271\n#\t0x403a90b\truntime.main+0x1cb\t\t\t/Users/me/.gvm/gos/go1.17/src/runtime/proc.go:234\n"
  8316. default:
  8317. description: Unexpected error
  8318. $ref: '#/components/responses/GeneralServerError'
  8319. /debug/pprof/trace:
  8320. get:
  8321. operationId: GetDebugPprofTrace
  8322. tags:
  8323. - Debug
  8324. - System information endpoints
  8325. summary: Retrieve the runtime execution trace
  8326. description: |
  8327. Collects profile data and returns trace execution events for the current program.
  8328. x-codeSamples:
  8329. - lang: Shell
  8330. label: 'Shell: go tool trace'
  8331. source: |
  8332. # Download the trace file.
  8333. curl http://localhost:8086/debug/pprof/trace -o trace
  8334. # Analyze the trace.
  8335. go tool trace ./trace
  8336. servers:
  8337. - url: ''
  8338. parameters:
  8339. - $ref: '#/components/parameters/TraceSpan'
  8340. - in: query
  8341. name: seconds
  8342. description: Number of seconds to collect profile data.
  8343. schema:
  8344. type: string
  8345. format: int64
  8346. responses:
  8347. '200':
  8348. description: |
  8349. [Trace file](https://pkg.go.dev/runtime/trace) compatible
  8350. with the [Golang `trace` command](https://pkg.go.dev/cmd/trace).
  8351. content:
  8352. application/octet-stream:
  8353. schema:
  8354. type: string
  8355. format: binary
  8356. externalDocs:
  8357. description: Golang trace package
  8358. url: 'https://pkg.go.dev/runtime/trace'
  8359. default:
  8360. description: Unexpected error
  8361. $ref: '#/components/responses/GeneralServerError'
  8362. /health:
  8363. get:
  8364. operationId: GetHealth
  8365. tags:
  8366. - Health
  8367. - System information endpoints
  8368. summary: Retrieve the health of the instance
  8369. description: Returns the health of the instance.
  8370. servers:
  8371. - url: ''
  8372. parameters:
  8373. - $ref: '#/components/parameters/TraceSpan'
  8374. responses:
  8375. '200':
  8376. description: |
  8377. The instance is healthy.
  8378. The response body contains the health check items and status.
  8379. content:
  8380. application/json:
  8381. schema:
  8382. $ref: '#/components/schemas/HealthCheck'
  8383. '503':
  8384. description: The instance is unhealthy.
  8385. content:
  8386. application/json:
  8387. schema:
  8388. $ref: '#/components/schemas/HealthCheck'
  8389. default:
  8390. description: Unexpected error
  8391. $ref: '#/components/responses/GeneralServerError'
  8392. /metrics:
  8393. get:
  8394. operationId: GetMetrics
  8395. tags:
  8396. - Metrics
  8397. - System information endpoints
  8398. summary: Retrieve workload performance metrics
  8399. description: |
  8400. Returns metrics about the workload performance of an InfluxDB instance.
  8401. Use this endpoint to get performance, resource, and usage metrics.
  8402. #### Related guides
  8403. - For the list of metrics categories, see [InfluxDB OSS metrics](https://docs.influxdata.com/influxdb/v2.3/reference/internals/metrics/).
  8404. - Learn how to use InfluxDB to [scrape Prometheus metrics](https://docs.influxdata.com/influxdb/v2.3/write-data/developer-tools/scrape-prometheus-metrics/).
  8405. - Learn how InfluxDB [parses the Prometheus exposition format](https://docs.influxdata.com/influxdb/v2.3/reference/prometheus-metrics/).
  8406. servers:
  8407. - url: ''
  8408. parameters:
  8409. - $ref: '#/components/parameters/TraceSpan'
  8410. responses:
  8411. '200':
  8412. description: |
  8413. Success. The response body contains metrics in
  8414. [Prometheus plain-text exposition format](https://prometheus.io/docs/instrumenting/exposition_formats)
  8415. Metrics contain a name, an optional set of key-value pairs, and a value.
  8416. The following descriptors precede each metric:
  8417. - `HELP`: description of the metric
  8418. - `TYPE`: [Prometheus metric type](https://prometheus.io/docs/concepts/metric_types/) (`counter`, `gauge`, `histogram`, or `summary`)
  8419. content:
  8420. text/plain:
  8421. schema:
  8422. type: string
  8423. format: Prometheus text-based exposition
  8424. externalDocs:
  8425. description: Prometheus exposition formats
  8426. url: 'https://prometheus.io/docs/instrumenting/exposition_formats'
  8427. examples:
  8428. expositionResponse:
  8429. summary: Metrics in plain text
  8430. value: |
  8431. # HELP go_threads Number of OS threads created.
  8432. # TYPE go_threads gauge
  8433. go_threads 19
  8434. # HELP http_api_request_duration_seconds Time taken to respond to HTTP request
  8435. # TYPE http_api_request_duration_seconds histogram
  8436. http_api_request_duration_seconds_bucket{handler="platform",method="GET",path="/:fallback_path",response_code="200",status="2XX",user_agent="curl",le="0.005"} 4
  8437. http_api_request_duration_seconds_bucket{handler="platform",method="GET",path="/:fallback_path",response_code="200",status="2XX",user_agent="curl",le="0.01"} 4
  8438. http_api_request_duration_seconds_bucket{handler="platform",method="GET",path="/:fallback_path",response_code="200",status="2XX",user_agent="curl",le="0.025"} 5
  8439. default:
  8440. description: Unexpected error
  8441. $ref: '#/components/responses/GeneralServerError'
  8442. /ready:
  8443. get:
  8444. operationId: GetReady
  8445. tags:
  8446. - Ready
  8447. - System information endpoints
  8448. summary: Get the readiness of an instance at startup
  8449. servers:
  8450. - url: ''
  8451. parameters:
  8452. - $ref: '#/components/parameters/TraceSpan'
  8453. responses:
  8454. '200':
  8455. description: The instance is ready
  8456. content:
  8457. application/json:
  8458. schema:
  8459. $ref: '#/components/schemas/Ready'
  8460. default:
  8461. description: Unexpected error
  8462. $ref: '#/components/responses/GeneralServerError'
  8463. /users:
  8464. get:
  8465. operationId: GetUsers
  8466. tags:
  8467. - Security and access endpoints
  8468. - Users
  8469. summary: List users
  8470. description: |
  8471. Retrieves a list of users. Default limit is `20`.
  8472. To limit which users are returned, pass query parameters in your request.
  8473. #### Required permissions
  8474. - `read-user USER_ID` permission.
  8475. `USER_ID` is the ID of the user that you want to list.
  8476. - InfluxDB OSS requires an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token))_ to list all users.
  8477. parameters:
  8478. - $ref: '#/components/parameters/TraceSpan'
  8479. - $ref: '#/components/parameters/Offset'
  8480. - $ref: '#/components/parameters/Limit'
  8481. - $ref: '#/components/parameters/After'
  8482. - in: query
  8483. name: name
  8484. schema:
  8485. type: string
  8486. - in: query
  8487. name: id
  8488. schema:
  8489. type: string
  8490. responses:
  8491. '200':
  8492. description: Success. The response contains a list of `users`.
  8493. content:
  8494. application/json:
  8495. schema:
  8496. $ref: '#/components/schemas/Users'
  8497. '401':
  8498. description: |
  8499. Unauthorized.
  8500. content:
  8501. application/json:
  8502. schema:
  8503. $ref: '#/components/schemas/Error'
  8504. examples:
  8505. tokenNotAuthorized:
  8506. summary: 'API token doesn''t have `write:users` permission'
  8507. value:
  8508. code: unauthorized
  8509. message: 'write:users/09d8462ce0764000 is unauthorized'
  8510. '422':
  8511. description: |
  8512. Unprocessable entity.
  8513. The error may indicate one of the following problems:
  8514. - The request body isn't valid--the request is well-formed, but InfluxDB can't process it due to semantic errors.
  8515. - You passed a parameter combination that InfluxDB doesn't support.
  8516. content:
  8517. application/json:
  8518. schema:
  8519. $ref: '#/components/schemas/Error'
  8520. '500':
  8521. $ref: '#/components/responses/InternalServerError'
  8522. default:
  8523. description: Unexpected error
  8524. $ref: '#/components/responses/GeneralServerError'
  8525. post:
  8526. operationId: PostUsers
  8527. tags:
  8528. - Users
  8529. summary: Create a user
  8530. description: |
  8531. Creates a user and returns the newly created user.
  8532. #### Required permissions
  8533. - `write-users`. Requires an InfluxDB API **Op** token.
  8534. parameters:
  8535. - $ref: '#/components/parameters/TraceSpan'
  8536. requestBody:
  8537. description: The user to create.
  8538. required: true
  8539. content:
  8540. application/json:
  8541. schema:
  8542. $ref: '#/components/schemas/User'
  8543. responses:
  8544. '201':
  8545. description: |
  8546. Success.
  8547. The response contains the newly created user.
  8548. content:
  8549. application/json:
  8550. schema:
  8551. $ref: '#/components/schemas/UserResponse'
  8552. '401':
  8553. description: |
  8554. Unauthorized.
  8555. content:
  8556. application/json:
  8557. schema:
  8558. $ref: '#/components/schemas/Error'
  8559. examples:
  8560. tokenNotAuthorized:
  8561. summary: 'API token doesn''t have `write:users` permission'
  8562. value:
  8563. code: unauthorized
  8564. message: 'write:users/09d8462ce0764000 is unauthorized'
  8565. '422':
  8566. description: |
  8567. Unprocessable entity.
  8568. The error may indicate one of the following problems:
  8569. - The request body isn't valid--the request is well-formed, but InfluxDB can't process it due to semantic errors.
  8570. - You passed a parameter combination that InfluxDB doesn't support.
  8571. content:
  8572. application/json:
  8573. schema:
  8574. $ref: '#/components/schemas/Error'
  8575. '500':
  8576. $ref: '#/components/responses/InternalServerError'
  8577. default:
  8578. description: Unexpected error
  8579. $ref: '#/components/responses/GeneralServerError'
  8580. x-codeSamples:
  8581. - label: 'cURL: create a user and set a password'
  8582. lang: Shell
  8583. source: |
  8584. # Create the user and assign the user ID to a variable.
  8585. USER_ID=$(curl --request POST \
  8586. "http://localhost:8086/api/v2/users/" \
  8587. --header "Authorization: Token INFLUX_OP_TOKEN" \
  8588. --header 'Content-type: application/json' \
  8589. --data-binary @- << EOF | jq -r '.id'
  8590. {
  8591. "name": "USER_NAME",
  8592. "status": "active"
  8593. }
  8594. EOF
  8595. )
  8596. # Pass the user ID and a password to set the password for the user.
  8597. curl request POST "http://localhost:8086/api/v2/users/$USER_ID/password/" \
  8598. --header "Authorization: Token INFLUX_OP_TOKEN" \
  8599. --header 'Content-type: application/json' \
  8600. --data '{ "password": "USER_PASSWORD" }'
  8601. '/users/{userID}':
  8602. get:
  8603. operationId: GetUsersID
  8604. tags:
  8605. - Security and access endpoints
  8606. - Users
  8607. summary: Retrieve a user
  8608. parameters:
  8609. - $ref: '#/components/parameters/TraceSpan'
  8610. - in: path
  8611. name: userID
  8612. schema:
  8613. type: string
  8614. required: true
  8615. description: The user ID.
  8616. responses:
  8617. '200':
  8618. description: User details
  8619. content:
  8620. application/json:
  8621. schema:
  8622. $ref: '#/components/schemas/UserResponse'
  8623. default:
  8624. description: Unexpected error
  8625. $ref: '#/components/responses/GeneralServerError'
  8626. patch:
  8627. operationId: PatchUsersID
  8628. tags:
  8629. - Users
  8630. summary: Update a user
  8631. requestBody:
  8632. description: User update to apply
  8633. required: true
  8634. content:
  8635. application/json:
  8636. schema:
  8637. $ref: '#/components/schemas/User'
  8638. parameters:
  8639. - $ref: '#/components/parameters/TraceSpan'
  8640. - in: path
  8641. name: userID
  8642. schema:
  8643. type: string
  8644. required: true
  8645. description: The ID of the user to update.
  8646. responses:
  8647. '200':
  8648. description: User updated
  8649. content:
  8650. application/json:
  8651. schema:
  8652. $ref: '#/components/schemas/UserResponse'
  8653. default:
  8654. description: Unexpected error
  8655. $ref: '#/components/responses/GeneralServerError'
  8656. delete:
  8657. operationId: DeleteUsersID
  8658. tags:
  8659. - Users
  8660. summary: Delete a user
  8661. parameters:
  8662. - $ref: '#/components/parameters/TraceSpan'
  8663. - in: path
  8664. name: userID
  8665. schema:
  8666. type: string
  8667. required: true
  8668. description: The ID of the user to delete.
  8669. responses:
  8670. '204':
  8671. description: User deleted
  8672. default:
  8673. description: Unexpected error
  8674. $ref: '#/components/responses/GeneralServerError'
  8675. /setup:
  8676. get:
  8677. operationId: GetSetup
  8678. tags:
  8679. - Setup
  8680. summary: 'Check if database has default user, org, bucket'
  8681. description: 'Returns `true` if no default user, organization, or bucket has been created.'
  8682. parameters:
  8683. - $ref: '#/components/parameters/TraceSpan'
  8684. responses:
  8685. '200':
  8686. description: allowed true or false
  8687. content:
  8688. application/json:
  8689. schema:
  8690. $ref: '#/components/schemas/IsOnboarding'
  8691. post:
  8692. operationId: PostSetup
  8693. tags:
  8694. - Setup
  8695. summary: 'Set up initial user, org and bucket'
  8696. description: 'Post an onboarding request to set up initial user, org and bucket.'
  8697. parameters:
  8698. - $ref: '#/components/parameters/TraceSpan'
  8699. requestBody:
  8700. description: Source to create
  8701. required: true
  8702. content:
  8703. application/json:
  8704. schema:
  8705. $ref: '#/components/schemas/OnboardingRequest'
  8706. responses:
  8707. '201':
  8708. description: 'Created default user, bucket, org'
  8709. content:
  8710. application/json:
  8711. schema:
  8712. $ref: '#/components/schemas/OnboardingResponse'
  8713. default:
  8714. description: Unexpected error
  8715. $ref: '#/components/responses/GeneralServerError'
  8716. /authorizations:
  8717. get:
  8718. operationId: GetAuthorizations
  8719. tags:
  8720. - Authorizations
  8721. - Security and access endpoints
  8722. summary: List authorizations
  8723. description: |
  8724. Retrieves a list of authorizations.
  8725. To limit which authorizations are returned, pass query parameters in your request.
  8726. If no query parameters are passed, InfluxDB returns all authorizations.
  8727. #### InfluxDB Cloud
  8728. - Doesn't expose [API token](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#token) values in `GET /api/v2/authorizations` responses; returns `token: redacted` for all authorizations.
  8729. #### InfluxDB OSS
  8730. - Returns
  8731. [API token](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#token) values in authorizations.
  8732. - Requires an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token))_ to view authorizations.
  8733. #### Related guides
  8734. - [View tokens](https://docs.influxdata.com/influxdb/v2.3/security/tokens/view-tokens/).
  8735. parameters:
  8736. - $ref: '#/components/parameters/TraceSpan'
  8737. - in: query
  8738. name: userID
  8739. schema:
  8740. type: string
  8741. description: |
  8742. A user ID.
  8743. Only returns authorizations scoped to this user.
  8744. - in: query
  8745. name: user
  8746. schema:
  8747. type: string
  8748. description: |
  8749. A user name.
  8750. Only returns authorizations scoped to this user.
  8751. - in: query
  8752. name: orgID
  8753. schema:
  8754. type: string
  8755. description: An organization ID. Only returns authorizations that belong to this organization.
  8756. - in: query
  8757. name: org
  8758. schema:
  8759. type: string
  8760. description: |
  8761. An organization name.
  8762. Only returns authorizations that belong to this organization.
  8763. responses:
  8764. '200':
  8765. description: Success. The response body contains a list of authorizations.
  8766. content:
  8767. application/json:
  8768. schema:
  8769. $ref: '#/components/schemas/Authorizations'
  8770. '400':
  8771. description: Invalid request
  8772. $ref: '#/components/responses/GeneralServerError'
  8773. '401':
  8774. $ref: '#/components/responses/AuthorizationError'
  8775. '500':
  8776. $ref: '#/components/responses/InternalServerError'
  8777. default:
  8778. description: Unexpected error
  8779. $ref: '#/components/responses/GeneralServerError'
  8780. post:
  8781. operationId: PostAuthorizations
  8782. tags:
  8783. - Authorizations
  8784. summary: Create an authorization
  8785. description: |
  8786. Creates an authorization and returns the newly created authorization.
  8787. Use this endpoint to generate an API token with resource permissions.
  8788. A permission sets `read` or `write` access to a `type` of resource.
  8789. Keep the following in mind when creating and updating authorizations:
  8790. - A permission with a resource `id` applies only to the resource specified by the ID.
  8791. - A permission that doesn't have a resource `id` applies to all resources of resource `type`.
  8792. - To scope an authorization to a specific user, provide the `userID` property.
  8793. #### Related guides
  8794. - [Create a token](https://docs.influxdata.com/influxdb/v2.3/security/tokens/create-token/).
  8795. parameters:
  8796. - $ref: '#/components/parameters/TraceSpan'
  8797. requestBody:
  8798. description: The authorization to create.
  8799. required: true
  8800. content:
  8801. application/json:
  8802. schema:
  8803. $ref: '#/components/schemas/AuthorizationPostRequest'
  8804. responses:
  8805. '201':
  8806. description: Created. The response body contains the newly created authorization.
  8807. content:
  8808. application/json:
  8809. schema:
  8810. $ref: '#/components/schemas/Authorization'
  8811. '400':
  8812. description: Invalid request
  8813. $ref: '#/components/responses/GeneralServerError'
  8814. '401':
  8815. $ref: '#/components/responses/AuthorizationError'
  8816. '500':
  8817. $ref: '#/components/responses/InternalServerError'
  8818. default:
  8819. description: Unexpected error
  8820. $ref: '#/components/responses/GeneralServerError'
  8821. x-codeSample:
  8822. - lang: Shell
  8823. label: 'cURL: Create auth to read all buckets'
  8824. source: |
  8825. curl --request POST \
  8826. "http://localhost:8086/api/v2/authorizations" \
  8827. --header "Authorization: Token INFLUX_TOKEN" \
  8828. --header 'Content-Type: application/json' \
  8829. --data @- << EOF
  8830. {
  8831. "orgID": "INFLUX_ORG_ID",
  8832. "description": "iot_users read buckets",
  8833. "permissions": [
  8834. {"action": "read", "resource": {"type": "buckets"}}
  8835. ]
  8836. }
  8837. EOF
  8838. - lang: Shell
  8839. - label: 'cURL: Create auth scoped to a user'
  8840. - source: |
  8841. curl --request POST \
  8842. "http://localhost:8086/api/v2/authorizations" \
  8843. --header "Authorization: Token INFLUX_TOKEN" \
  8844. --header 'Content-Type: application/json' \
  8845. --data @- << EOF
  8846. {
  8847. "orgID": "INFLUX_ORG_ID",
  8848. "userID": "INFLUX_USER_ID",
  8849. "description": "iot_user write to bucket",
  8850. "permissions": [
  8851. {"action": "write", "resource": {"type": "buckets", "id: "INFLUX_BUCKET_ID"}}
  8852. ]
  8853. }
  8854. EOF
  8855. '/authorizations/{authID}':
  8856. get:
  8857. operationId: GetAuthorizationsID
  8858. tags:
  8859. - Authorizations
  8860. - Security and access endpoints
  8861. summary: Retrieve an authorization
  8862. parameters:
  8863. - $ref: '#/components/parameters/TraceSpan'
  8864. - in: path
  8865. name: authID
  8866. schema:
  8867. type: string
  8868. required: true
  8869. description: The ID of the authorization to get.
  8870. responses:
  8871. '200':
  8872. description: Authorization details
  8873. content:
  8874. application/json:
  8875. schema:
  8876. $ref: '#/components/schemas/Authorization'
  8877. default:
  8878. description: Unexpected error
  8879. $ref: '#/components/responses/GeneralServerError'
  8880. patch:
  8881. operationId: PatchAuthorizationsID
  8882. tags:
  8883. - Authorizations
  8884. summary: Update an authorization to be active or inactive
  8885. requestBody:
  8886. description: Authorization to update
  8887. required: true
  8888. content:
  8889. application/json:
  8890. schema:
  8891. $ref: '#/components/schemas/AuthorizationUpdateRequest'
  8892. parameters:
  8893. - $ref: '#/components/parameters/TraceSpan'
  8894. - in: path
  8895. name: authID
  8896. schema:
  8897. type: string
  8898. required: true
  8899. description: The ID of the authorization to update.
  8900. responses:
  8901. '200':
  8902. description: The active or inactive authorization
  8903. content:
  8904. application/json:
  8905. schema:
  8906. $ref: '#/components/schemas/Authorization'
  8907. default:
  8908. description: Unexpected error
  8909. $ref: '#/components/responses/GeneralServerError'
  8910. delete:
  8911. operationId: DeleteAuthorizationsID
  8912. tags:
  8913. - Authorizations
  8914. summary: Delete an authorization
  8915. parameters:
  8916. - $ref: '#/components/parameters/TraceSpan'
  8917. - in: path
  8918. name: authID
  8919. schema:
  8920. type: string
  8921. required: true
  8922. description: The ID of the authorization to delete.
  8923. responses:
  8924. '204':
  8925. description: Authorization deleted
  8926. default:
  8927. description: Unexpected error
  8928. $ref: '#/components/responses/GeneralServerError'
  8929. /variables:
  8930. get:
  8931. operationId: GetVariables
  8932. tags:
  8933. - Variables
  8934. summary: List all variables
  8935. parameters:
  8936. - $ref: '#/components/parameters/TraceSpan'
  8937. - in: query
  8938. name: org
  8939. description: The name of the organization.
  8940. schema:
  8941. type: string
  8942. - in: query
  8943. name: orgID
  8944. description: The organization ID.
  8945. schema:
  8946. type: string
  8947. responses:
  8948. '200':
  8949. description: A list of variables for an organization
  8950. content:
  8951. application/json:
  8952. schema:
  8953. $ref: '#/components/schemas/Variables'
  8954. '400':
  8955. description: Invalid request
  8956. $ref: '#/components/responses/GeneralServerError'
  8957. default:
  8958. description: Internal server error
  8959. $ref: '#/components/responses/GeneralServerError'
  8960. post:
  8961. operationId: PostVariables
  8962. summary: Create a variable
  8963. tags:
  8964. - Variables
  8965. parameters:
  8966. - $ref: '#/components/parameters/TraceSpan'
  8967. requestBody:
  8968. description: Variable to create
  8969. required: true
  8970. content:
  8971. application/json:
  8972. schema:
  8973. $ref: '#/components/schemas/Variable'
  8974. responses:
  8975. '201':
  8976. description: Variable created
  8977. content:
  8978. application/json:
  8979. schema:
  8980. $ref: '#/components/schemas/Variable'
  8981. default:
  8982. description: Internal server error
  8983. $ref: '#/components/responses/GeneralServerError'
  8984. '/variables/{variableID}':
  8985. get:
  8986. operationId: GetVariablesID
  8987. tags:
  8988. - Variables
  8989. summary: Retrieve a variable
  8990. parameters:
  8991. - $ref: '#/components/parameters/TraceSpan'
  8992. - in: path
  8993. name: variableID
  8994. required: true
  8995. schema:
  8996. type: string
  8997. description: The variable ID.
  8998. responses:
  8999. '200':
  9000. description: Variable found
  9001. content:
  9002. application/json:
  9003. schema:
  9004. $ref: '#/components/schemas/Variable'
  9005. '404':
  9006. description: Variable not found
  9007. $ref: '#/components/responses/GeneralServerError'
  9008. default:
  9009. description: Internal server error
  9010. $ref: '#/components/responses/GeneralServerError'
  9011. delete:
  9012. operationId: DeleteVariablesID
  9013. tags:
  9014. - Variables
  9015. summary: Delete a variable
  9016. parameters:
  9017. - $ref: '#/components/parameters/TraceSpan'
  9018. - in: path
  9019. name: variableID
  9020. required: true
  9021. schema:
  9022. type: string
  9023. description: The variable ID.
  9024. responses:
  9025. '204':
  9026. description: Variable deleted
  9027. default:
  9028. description: Internal server error
  9029. $ref: '#/components/responses/GeneralServerError'
  9030. patch:
  9031. operationId: PatchVariablesID
  9032. summary: Update a variable
  9033. tags:
  9034. - Variables
  9035. parameters:
  9036. - $ref: '#/components/parameters/TraceSpan'
  9037. - in: path
  9038. name: variableID
  9039. required: true
  9040. schema:
  9041. type: string
  9042. description: The variable ID.
  9043. requestBody:
  9044. description: Variable update to apply
  9045. required: true
  9046. content:
  9047. application/json:
  9048. schema:
  9049. $ref: '#/components/schemas/Variable'
  9050. responses:
  9051. '200':
  9052. description: Variable updated
  9053. content:
  9054. application/json:
  9055. schema:
  9056. $ref: '#/components/schemas/Variable'
  9057. default:
  9058. description: Internal server error
  9059. $ref: '#/components/responses/GeneralServerError'
  9060. put:
  9061. operationId: PutVariablesID
  9062. summary: Replace a variable
  9063. tags:
  9064. - Variables
  9065. parameters:
  9066. - $ref: '#/components/parameters/TraceSpan'
  9067. - in: path
  9068. name: variableID
  9069. required: true
  9070. schema:
  9071. type: string
  9072. description: The variable ID.
  9073. requestBody:
  9074. description: Variable to replace
  9075. required: true
  9076. content:
  9077. application/json:
  9078. schema:
  9079. $ref: '#/components/schemas/Variable'
  9080. responses:
  9081. '200':
  9082. description: Variable updated
  9083. content:
  9084. application/json:
  9085. schema:
  9086. $ref: '#/components/schemas/Variable'
  9087. default:
  9088. description: Internal server error
  9089. $ref: '#/components/responses/GeneralServerError'
  9090. /sources:
  9091. post:
  9092. operationId: PostSources
  9093. tags:
  9094. - Sources
  9095. summary: Create a source
  9096. parameters:
  9097. - $ref: '#/components/parameters/TraceSpan'
  9098. requestBody:
  9099. description: Source to create
  9100. required: true
  9101. content:
  9102. application/json:
  9103. schema:
  9104. $ref: '#/components/schemas/Source'
  9105. responses:
  9106. '201':
  9107. description: Created Source
  9108. content:
  9109. application/json:
  9110. schema:
  9111. $ref: '#/components/schemas/Source'
  9112. default:
  9113. description: Unexpected error
  9114. content:
  9115. application/json:
  9116. schema:
  9117. $ref: '#/components/schemas/Error'
  9118. get:
  9119. operationId: GetSources
  9120. tags:
  9121. - Sources
  9122. summary: List all sources
  9123. parameters:
  9124. - $ref: '#/components/parameters/TraceSpan'
  9125. - in: query
  9126. name: org
  9127. description: The name of the organization.
  9128. schema:
  9129. type: string
  9130. responses:
  9131. '200':
  9132. description: A list of sources
  9133. content:
  9134. application/json:
  9135. schema:
  9136. $ref: '#/components/schemas/Sources'
  9137. default:
  9138. description: Unexpected error
  9139. content:
  9140. application/json:
  9141. schema:
  9142. $ref: '#/components/schemas/Error'
  9143. '/sources/{sourceID}':
  9144. delete:
  9145. operationId: DeleteSourcesID
  9146. tags:
  9147. - Sources
  9148. summary: Delete a source
  9149. parameters:
  9150. - $ref: '#/components/parameters/TraceSpan'
  9151. - in: path
  9152. name: sourceID
  9153. schema:
  9154. type: string
  9155. required: true
  9156. description: The source ID.
  9157. responses:
  9158. '204':
  9159. description: Delete has been accepted
  9160. '404':
  9161. description: View not found
  9162. content:
  9163. application/json:
  9164. schema:
  9165. $ref: '#/components/schemas/Error'
  9166. default:
  9167. description: Unexpected error
  9168. content:
  9169. application/json:
  9170. schema:
  9171. $ref: '#/components/schemas/Error'
  9172. patch:
  9173. operationId: PatchSourcesID
  9174. tags:
  9175. - Sources
  9176. summary: Update a Source
  9177. parameters:
  9178. - $ref: '#/components/parameters/TraceSpan'
  9179. - in: path
  9180. name: sourceID
  9181. schema:
  9182. type: string
  9183. required: true
  9184. description: The source ID.
  9185. requestBody:
  9186. description: Source update
  9187. required: true
  9188. content:
  9189. application/json:
  9190. schema:
  9191. $ref: '#/components/schemas/Source'
  9192. responses:
  9193. '200':
  9194. description: Created Source
  9195. content:
  9196. application/json:
  9197. schema:
  9198. $ref: '#/components/schemas/Source'
  9199. '404':
  9200. description: Source not found
  9201. content:
  9202. application/json:
  9203. schema:
  9204. $ref: '#/components/schemas/Error'
  9205. default:
  9206. description: Unexpected error
  9207. content:
  9208. application/json:
  9209. schema:
  9210. $ref: '#/components/schemas/Error'
  9211. get:
  9212. operationId: GetSourcesID
  9213. tags:
  9214. - Sources
  9215. summary: Retrieve a source
  9216. parameters:
  9217. - $ref: '#/components/parameters/TraceSpan'
  9218. - in: path
  9219. name: sourceID
  9220. schema:
  9221. type: string
  9222. required: true
  9223. description: The source ID.
  9224. responses:
  9225. '200':
  9226. description: A source
  9227. content:
  9228. application/json:
  9229. schema:
  9230. $ref: '#/components/schemas/Source'
  9231. '404':
  9232. description: Source not found
  9233. content:
  9234. application/json:
  9235. schema:
  9236. $ref: '#/components/schemas/Error'
  9237. default:
  9238. description: Unexpected error
  9239. content:
  9240. application/json:
  9241. schema:
  9242. $ref: '#/components/schemas/Error'
  9243. '/sources/{sourceID}/health':
  9244. get:
  9245. operationId: GetSourcesIDHealth
  9246. tags:
  9247. - Sources
  9248. summary: Get the health of a source
  9249. parameters:
  9250. - $ref: '#/components/parameters/TraceSpan'
  9251. - in: path
  9252. name: sourceID
  9253. schema:
  9254. type: string
  9255. required: true
  9256. description: The source ID.
  9257. responses:
  9258. '200':
  9259. description: The source is healthy
  9260. content:
  9261. application/json:
  9262. schema:
  9263. $ref: '#/components/schemas/HealthCheck'
  9264. '503':
  9265. description: The source is not healthy
  9266. content:
  9267. application/json:
  9268. schema:
  9269. $ref: '#/components/schemas/HealthCheck'
  9270. default:
  9271. description: Unexpected error
  9272. content:
  9273. application/json:
  9274. schema:
  9275. $ref: '#/components/schemas/Error'
  9276. '/sources/{sourceID}/buckets':
  9277. get:
  9278. operationId: GetSourcesIDBuckets
  9279. tags:
  9280. - Sources
  9281. - Buckets
  9282. summary: Get buckets in a source
  9283. parameters:
  9284. - $ref: '#/components/parameters/TraceSpan'
  9285. - in: path
  9286. name: sourceID
  9287. schema:
  9288. type: string
  9289. required: true
  9290. description: The source ID.
  9291. - in: query
  9292. name: org
  9293. description: The name of the organization.
  9294. schema:
  9295. type: string
  9296. responses:
  9297. '200':
  9298. description: A source
  9299. content:
  9300. application/json:
  9301. schema:
  9302. $ref: '#/components/schemas/Buckets'
  9303. '404':
  9304. description: Source not found
  9305. content:
  9306. application/json:
  9307. schema:
  9308. $ref: '#/components/schemas/Error'
  9309. default:
  9310. description: Unexpected error
  9311. content:
  9312. application/json:
  9313. schema:
  9314. $ref: '#/components/schemas/Error'
  9315. /scrapers:
  9316. get:
  9317. operationId: GetScrapers
  9318. tags:
  9319. - Scraper Targets
  9320. summary: List all scraper targets
  9321. parameters:
  9322. - $ref: '#/components/parameters/TraceSpan'
  9323. - in: query
  9324. name: name
  9325. description: Specifies the name of the scraper target.
  9326. schema:
  9327. type: string
  9328. - in: query
  9329. name: id
  9330. description: 'List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used.'
  9331. schema:
  9332. type: array
  9333. items:
  9334. type: string
  9335. - in: query
  9336. name: orgID
  9337. description: Specifies the organization ID of the scraper target.
  9338. schema:
  9339. type: string
  9340. - in: query
  9341. name: org
  9342. description: Specifies the organization name of the scraper target.
  9343. schema:
  9344. type: string
  9345. responses:
  9346. '200':
  9347. description: All scraper targets
  9348. content:
  9349. application/json:
  9350. schema:
  9351. $ref: '#/components/schemas/ScraperTargetResponses'
  9352. post:
  9353. operationId: PostScrapers
  9354. summary: Create a scraper target
  9355. tags:
  9356. - Scraper Targets
  9357. parameters:
  9358. - $ref: '#/components/parameters/TraceSpan'
  9359. requestBody:
  9360. description: Scraper target to create
  9361. required: true
  9362. content:
  9363. application/json:
  9364. schema:
  9365. $ref: '#/components/schemas/ScraperTargetRequest'
  9366. responses:
  9367. '201':
  9368. description: Scraper target created
  9369. content:
  9370. application/json:
  9371. schema:
  9372. $ref: '#/components/schemas/ScraperTargetResponse'
  9373. default:
  9374. description: Internal server error
  9375. content:
  9376. application/json:
  9377. schema:
  9378. $ref: '#/components/schemas/Error'
  9379. '/scrapers/{scraperTargetID}':
  9380. get:
  9381. operationId: GetScrapersID
  9382. tags:
  9383. - Scraper Targets
  9384. summary: Retrieve a scraper target
  9385. parameters:
  9386. - $ref: '#/components/parameters/TraceSpan'
  9387. - in: path
  9388. name: scraperTargetID
  9389. required: true
  9390. schema:
  9391. type: string
  9392. description: The identifier of the scraper target.
  9393. responses:
  9394. '200':
  9395. description: The scraper target
  9396. content:
  9397. application/json:
  9398. schema:
  9399. $ref: '#/components/schemas/ScraperTargetResponse'
  9400. default:
  9401. description: Internal server error
  9402. content:
  9403. application/json:
  9404. schema:
  9405. $ref: '#/components/schemas/Error'
  9406. delete:
  9407. operationId: DeleteScrapersID
  9408. tags:
  9409. - Scraper Targets
  9410. summary: Delete a scraper target
  9411. parameters:
  9412. - $ref: '#/components/parameters/TraceSpan'
  9413. - in: path
  9414. name: scraperTargetID
  9415. required: true
  9416. schema:
  9417. type: string
  9418. description: The identifier of the scraper target.
  9419. responses:
  9420. '204':
  9421. description: Scraper target deleted
  9422. default:
  9423. description: Internal server error
  9424. content:
  9425. application/json:
  9426. schema:
  9427. $ref: '#/components/schemas/Error'
  9428. patch:
  9429. operationId: PatchScrapersID
  9430. summary: Update a scraper target
  9431. tags:
  9432. - Scraper Targets
  9433. parameters:
  9434. - $ref: '#/components/parameters/TraceSpan'
  9435. - in: path
  9436. name: scraperTargetID
  9437. required: true
  9438. schema:
  9439. type: string
  9440. description: The identifier of the scraper target.
  9441. requestBody:
  9442. description: Scraper target update to apply
  9443. required: true
  9444. content:
  9445. application/json:
  9446. schema:
  9447. $ref: '#/components/schemas/ScraperTargetRequest'
  9448. responses:
  9449. '200':
  9450. description: Scraper target updated
  9451. content:
  9452. application/json:
  9453. schema:
  9454. $ref: '#/components/schemas/ScraperTargetResponse'
  9455. default:
  9456. description: Internal server error
  9457. content:
  9458. application/json:
  9459. schema:
  9460. $ref: '#/components/schemas/Error'
  9461. '/scrapers/{scraperTargetID}/labels':
  9462. get:
  9463. operationId: GetScrapersIDLabels
  9464. tags:
  9465. - Scraper Targets
  9466. summary: List all labels for a scraper target
  9467. parameters:
  9468. - $ref: '#/components/parameters/TraceSpan'
  9469. - in: path
  9470. name: scraperTargetID
  9471. schema:
  9472. type: string
  9473. required: true
  9474. description: The scraper target ID.
  9475. responses:
  9476. '200':
  9477. description: A list of labels for a scraper target.
  9478. content:
  9479. application/json:
  9480. schema:
  9481. $ref: '#/components/schemas/LabelsResponse'
  9482. default:
  9483. description: Unexpected error
  9484. content:
  9485. application/json:
  9486. schema:
  9487. $ref: '#/components/schemas/Error'
  9488. post:
  9489. operationId: PostScrapersIDLabels
  9490. tags:
  9491. - Scraper Targets
  9492. summary: Add a label to a scraper target
  9493. parameters:
  9494. - $ref: '#/components/parameters/TraceSpan'
  9495. - in: path
  9496. name: scraperTargetID
  9497. schema:
  9498. type: string
  9499. required: true
  9500. description: The scraper target ID.
  9501. requestBody:
  9502. description: Label to add
  9503. required: true
  9504. content:
  9505. application/json:
  9506. schema:
  9507. $ref: '#/components/schemas/LabelMapping'
  9508. responses:
  9509. '201':
  9510. description: The newly added label
  9511. content:
  9512. application/json:
  9513. schema:
  9514. $ref: '#/components/schemas/LabelResponse'
  9515. default:
  9516. description: Unexpected error
  9517. content:
  9518. application/json:
  9519. schema:
  9520. $ref: '#/components/schemas/Error'
  9521. '/scrapers/{scraperTargetID}/labels/{labelID}':
  9522. delete:
  9523. operationId: DeleteScrapersIDLabelsID
  9524. tags:
  9525. - Scraper Targets
  9526. summary: Delete a label from a scraper target
  9527. parameters:
  9528. - $ref: '#/components/parameters/TraceSpan'
  9529. - in: path
  9530. name: scraperTargetID
  9531. schema:
  9532. type: string
  9533. required: true
  9534. description: The scraper target ID.
  9535. - in: path
  9536. name: labelID
  9537. schema:
  9538. type: string
  9539. required: true
  9540. description: The label ID.
  9541. responses:
  9542. '204':
  9543. description: Delete has been accepted
  9544. '404':
  9545. description: Scraper target not found
  9546. content:
  9547. application/json:
  9548. schema:
  9549. $ref: '#/components/schemas/Error'
  9550. default:
  9551. description: Unexpected error
  9552. content:
  9553. application/json:
  9554. schema:
  9555. $ref: '#/components/schemas/Error'
  9556. '/scrapers/{scraperTargetID}/members':
  9557. get:
  9558. operationId: GetScrapersIDMembers
  9559. tags:
  9560. - Scraper Targets
  9561. summary: List all users with member privileges for a scraper target
  9562. parameters:
  9563. - $ref: '#/components/parameters/TraceSpan'
  9564. - in: path
  9565. name: scraperTargetID
  9566. schema:
  9567. type: string
  9568. required: true
  9569. description: The scraper target ID.
  9570. responses:
  9571. '200':
  9572. description: A list of scraper target members
  9573. content:
  9574. application/json:
  9575. schema:
  9576. $ref: '#/components/schemas/ResourceMembers'
  9577. default:
  9578. description: Unexpected error
  9579. content:
  9580. application/json:
  9581. schema:
  9582. $ref: '#/components/schemas/Error'
  9583. post:
  9584. operationId: PostScrapersIDMembers
  9585. tags:
  9586. - Scraper Targets
  9587. summary: Add a member to a scraper target
  9588. parameters:
  9589. - $ref: '#/components/parameters/TraceSpan'
  9590. - in: path
  9591. name: scraperTargetID
  9592. schema:
  9593. type: string
  9594. required: true
  9595. description: The scraper target ID.
  9596. requestBody:
  9597. description: User to add as member
  9598. required: true
  9599. content:
  9600. application/json:
  9601. schema:
  9602. $ref: '#/components/schemas/AddResourceMemberRequestBody'
  9603. responses:
  9604. '201':
  9605. description: Member added to scraper targets
  9606. content:
  9607. application/json:
  9608. schema:
  9609. $ref: '#/components/schemas/ResourceMember'
  9610. default:
  9611. description: Unexpected error
  9612. content:
  9613. application/json:
  9614. schema:
  9615. $ref: '#/components/schemas/Error'
  9616. '/scrapers/{scraperTargetID}/members/{userID}':
  9617. delete:
  9618. operationId: DeleteScrapersIDMembersID
  9619. tags:
  9620. - Scraper Targets
  9621. summary: Remove a member from a scraper target
  9622. parameters:
  9623. - $ref: '#/components/parameters/TraceSpan'
  9624. - in: path
  9625. name: userID
  9626. schema:
  9627. type: string
  9628. required: true
  9629. description: The ID of member to remove.
  9630. - in: path
  9631. name: scraperTargetID
  9632. schema:
  9633. type: string
  9634. required: true
  9635. description: The scraper target ID.
  9636. responses:
  9637. '204':
  9638. description: Member removed
  9639. default:
  9640. description: Unexpected error
  9641. content:
  9642. application/json:
  9643. schema:
  9644. $ref: '#/components/schemas/Error'
  9645. '/scrapers/{scraperTargetID}/owners':
  9646. get:
  9647. operationId: GetScrapersIDOwners
  9648. tags:
  9649. - Scraper Targets
  9650. summary: List all owners of a scraper target
  9651. parameters:
  9652. - $ref: '#/components/parameters/TraceSpan'
  9653. - in: path
  9654. name: scraperTargetID
  9655. schema:
  9656. type: string
  9657. required: true
  9658. description: The scraper target ID.
  9659. responses:
  9660. '200':
  9661. description: A list of scraper target owners
  9662. content:
  9663. application/json:
  9664. schema:
  9665. $ref: '#/components/schemas/ResourceOwners'
  9666. default:
  9667. description: Unexpected error
  9668. content:
  9669. application/json:
  9670. schema:
  9671. $ref: '#/components/schemas/Error'
  9672. post:
  9673. operationId: PostScrapersIDOwners
  9674. tags:
  9675. - Scraper Targets
  9676. summary: Add an owner to a scraper target
  9677. parameters:
  9678. - $ref: '#/components/parameters/TraceSpan'
  9679. - in: path
  9680. name: scraperTargetID
  9681. schema:
  9682. type: string
  9683. required: true
  9684. description: The scraper target ID.
  9685. requestBody:
  9686. description: User to add as owner
  9687. required: true
  9688. content:
  9689. application/json:
  9690. schema:
  9691. $ref: '#/components/schemas/AddResourceMemberRequestBody'
  9692. responses:
  9693. '201':
  9694. description: Scraper target owner added
  9695. content:
  9696. application/json:
  9697. schema:
  9698. $ref: '#/components/schemas/ResourceOwner'
  9699. default:
  9700. description: Unexpected error
  9701. content:
  9702. application/json:
  9703. schema:
  9704. $ref: '#/components/schemas/Error'
  9705. '/scrapers/{scraperTargetID}/owners/{userID}':
  9706. delete:
  9707. operationId: DeleteScrapersIDOwnersID
  9708. tags:
  9709. - Scraper Targets
  9710. summary: Remove an owner from a scraper target
  9711. parameters:
  9712. - $ref: '#/components/parameters/TraceSpan'
  9713. - in: path
  9714. name: userID
  9715. schema:
  9716. type: string
  9717. required: true
  9718. description: The ID of owner to remove.
  9719. - in: path
  9720. name: scraperTargetID
  9721. schema:
  9722. type: string
  9723. required: true
  9724. description: The scraper target ID.
  9725. responses:
  9726. '204':
  9727. description: Owner removed
  9728. default:
  9729. description: Unexpected error
  9730. content:
  9731. application/json:
  9732. schema:
  9733. $ref: '#/components/schemas/Error'
  9734. /backup/kv:
  9735. get:
  9736. operationId: GetBackupKV
  9737. tags:
  9738. - Backup
  9739. summary: Download snapshot of metadata stored in the server's embedded KV store. Don't use with InfluxDB versions greater than InfluxDB 2.1.x.
  9740. description: |
  9741. Retrieves a snapshot of metadata stored in the server's embedded KV store.
  9742. InfluxDB versions greater than 2.1.x don't include metadata stored in embedded SQL;
  9743. avoid using this endpoint with versions greater than 2.1.x.
  9744. deprecated: true
  9745. parameters:
  9746. - $ref: '#/components/parameters/TraceSpan'
  9747. responses:
  9748. '200':
  9749. description: Success. The response contains a snapshot of KV metadata.
  9750. content:
  9751. application/octet-stream:
  9752. schema:
  9753. type: string
  9754. format: binary
  9755. default:
  9756. description: Unexpected error
  9757. $ref: '#/components/responses/GeneralServerError'
  9758. /backup/metadata:
  9759. get:
  9760. operationId: GetBackupMetadata
  9761. tags:
  9762. - Backup
  9763. summary: Download snapshot of all metadata in the server
  9764. parameters:
  9765. - $ref: '#/components/parameters/TraceSpan'
  9766. - in: header
  9767. name: Accept-Encoding
  9768. description: Indicates the content encoding (usually a compression algorithm) that the client can understand.
  9769. schema:
  9770. type: string
  9771. description: 'The content coding. Use `gzip` for compressed data or `identity` for unmodified, uncompressed data.'
  9772. default: identity
  9773. enum:
  9774. - gzip
  9775. - identity
  9776. responses:
  9777. '200':
  9778. description: Snapshot of metadata
  9779. headers:
  9780. Content-Encoding:
  9781. description: Lists any encodings (usually compression algorithms) that have been applied to the response payload.
  9782. schema:
  9783. type: string
  9784. description: |
  9785. The content coding: `gzip` for compressed data or `identity` for unmodified, uncompressed data.
  9786. default: identity
  9787. enum:
  9788. - gzip
  9789. - identity
  9790. content:
  9791. multipart/mixed:
  9792. schema:
  9793. $ref: '#/components/schemas/MetadataBackup'
  9794. default:
  9795. description: Unexpected error
  9796. $ref: '#/components/responses/GeneralServerError'
  9797. '/backup/shards/{shardID}':
  9798. get:
  9799. operationId: GetBackupShardId
  9800. tags:
  9801. - Backup
  9802. summary: Download snapshot of all TSM data in a shard
  9803. parameters:
  9804. - $ref: '#/components/parameters/TraceSpan'
  9805. - in: header
  9806. name: Accept-Encoding
  9807. description: Indicates the content encoding (usually a compression algorithm) that the client can understand.
  9808. schema:
  9809. type: string
  9810. description: 'The content coding. Use `gzip` for compressed data or `identity` for unmodified, uncompressed data.'
  9811. default: identity
  9812. enum:
  9813. - gzip
  9814. - identity
  9815. - in: path
  9816. name: shardID
  9817. schema:
  9818. type: integer
  9819. format: int64
  9820. required: true
  9821. description: The shard ID.
  9822. - in: query
  9823. name: since
  9824. description: 'The earliest time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp) to include in the snapshot.'
  9825. schema:
  9826. type: string
  9827. format: date-time
  9828. examples:
  9829. RFC3339:
  9830. summary: RFC3339 date/time format
  9831. value: '2006-01-02T15:04:05Z07:00'
  9832. responses:
  9833. '200':
  9834. description: TSM snapshot.
  9835. headers:
  9836. Content-Encoding:
  9837. description: Lists any encodings (usually compression algorithms) that have been applied to the response payload.
  9838. schema:
  9839. type: string
  9840. description: |
  9841. The content coding: `gzip` for compressed data or `identity` for unmodified, uncompressed data.
  9842. default: identity
  9843. enum:
  9844. - gzip
  9845. - identity
  9846. content:
  9847. application/octet-stream:
  9848. schema:
  9849. type: string
  9850. format: binary
  9851. '404':
  9852. description: Shard not found.
  9853. content:
  9854. application/json:
  9855. schema:
  9856. $ref: '#/components/schemas/Error'
  9857. default:
  9858. description: Unexpected error
  9859. $ref: '#/components/responses/GeneralServerError'
  9860. /restore/kv:
  9861. post:
  9862. operationId: PostRestoreKV
  9863. tags:
  9864. - Restore
  9865. summary: Overwrite the embedded KV store on the server with a backed-up snapshot.
  9866. parameters:
  9867. - $ref: '#/components/parameters/TraceSpan'
  9868. - in: header
  9869. name: Content-Encoding
  9870. description: |
  9871. The value tells InfluxDB what compression is applied to the line protocol in the request payload.
  9872. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header.
  9873. schema:
  9874. type: string
  9875. description: 'The content coding. Use `gzip` for compressed data or `identity` for unmodified, uncompressed data.'
  9876. default: identity
  9877. enum:
  9878. - gzip
  9879. - identity
  9880. - in: header
  9881. name: Content-Type
  9882. schema:
  9883. type: string
  9884. default: application/octet-stream
  9885. enum:
  9886. - application/octet-stream
  9887. requestBody:
  9888. description: Full KV snapshot.
  9889. required: true
  9890. content:
  9891. text/plain:
  9892. schema:
  9893. type: string
  9894. format: binary
  9895. responses:
  9896. '200':
  9897. description: KV store successfully overwritten.
  9898. content:
  9899. application/json:
  9900. schema:
  9901. type: object
  9902. properties:
  9903. token:
  9904. description: token is the root token for the instance after restore (this is overwritten during the restore)
  9905. type: string
  9906. '204':
  9907. description: KV store successfully overwritten.
  9908. default:
  9909. description: Unexpected error
  9910. $ref: '#/components/responses/GeneralServerError'
  9911. /restore/sql:
  9912. post:
  9913. operationId: PostRestoreSQL
  9914. tags:
  9915. - Restore
  9916. summary: Overwrite the embedded SQL store on the server with a backed-up snapshot.
  9917. parameters:
  9918. - $ref: '#/components/parameters/TraceSpan'
  9919. - in: header
  9920. name: Content-Encoding
  9921. description: |
  9922. The value tells InfluxDB what compression is applied to the line protocol in the request payload.
  9923. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header.
  9924. schema:
  9925. type: string
  9926. description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity.
  9927. default: identity
  9928. enum:
  9929. - gzip
  9930. - identity
  9931. - in: header
  9932. name: Content-Type
  9933. schema:
  9934. type: string
  9935. default: application/octet-stream
  9936. enum:
  9937. - application/octet-stream
  9938. requestBody:
  9939. description: Full SQL snapshot.
  9940. required: true
  9941. content:
  9942. text/plain:
  9943. schema:
  9944. type: string
  9945. format: binary
  9946. responses:
  9947. '204':
  9948. description: SQL store successfully overwritten.
  9949. default:
  9950. description: Unexpected error
  9951. $ref: '#/components/responses/GeneralServerError'
  9952. '/restore/bucket/{bucketID}':
  9953. post:
  9954. operationId: PostRestoreBucketID
  9955. tags:
  9956. - Restore
  9957. summary: Overwrite storage metadata for a bucket with shard info from a backup.
  9958. deprecated: true
  9959. parameters:
  9960. - $ref: '#/components/parameters/TraceSpan'
  9961. - in: path
  9962. name: bucketID
  9963. schema:
  9964. type: string
  9965. required: true
  9966. description: The bucket ID.
  9967. - in: header
  9968. name: Content-Type
  9969. schema:
  9970. type: string
  9971. default: application/octet-stream
  9972. enum:
  9973. - application/octet-stream
  9974. requestBody:
  9975. description: Database info serialized as protobuf.
  9976. required: true
  9977. content:
  9978. text/plain:
  9979. schema:
  9980. type: string
  9981. format: byte
  9982. responses:
  9983. '200':
  9984. description: ID mappings for shards in bucket.
  9985. content:
  9986. application/json:
  9987. schema:
  9988. type: string
  9989. format: byte
  9990. default:
  9991. description: Unexpected error
  9992. $ref: '#/components/responses/GeneralServerError'
  9993. /restore/bucketMetadata:
  9994. post:
  9995. operationId: PostRestoreBucketMetadata
  9996. tags:
  9997. - Restore
  9998. summary: Create a new bucket pre-seeded with shard info from a backup.
  9999. parameters:
  10000. - $ref: '#/components/parameters/TraceSpan'
  10001. requestBody:
  10002. description: Metadata manifest for a bucket.
  10003. required: true
  10004. content:
  10005. application/json:
  10006. schema:
  10007. $ref: '#/components/schemas/BucketMetadataManifest'
  10008. responses:
  10009. '201':
  10010. description: ID mappings for shards in new bucket.
  10011. content:
  10012. application/json:
  10013. schema:
  10014. $ref: '#/components/schemas/RestoredBucketMappings'
  10015. default:
  10016. description: Unexpected error
  10017. $ref: '#/components/responses/GeneralServerError'
  10018. '/restore/shards/{shardID}':
  10019. post:
  10020. operationId: PostRestoreShardId
  10021. tags:
  10022. - Restore
  10023. summary: Restore a TSM snapshot into a shard.
  10024. parameters:
  10025. - $ref: '#/components/parameters/TraceSpan'
  10026. - in: header
  10027. name: Content-Encoding
  10028. description: |
  10029. The value tells InfluxDB what compression is applied to the line protocol in the request payload.
  10030. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header.
  10031. schema:
  10032. type: string
  10033. description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity.
  10034. default: identity
  10035. enum:
  10036. - gzip
  10037. - identity
  10038. - in: header
  10039. name: Content-Type
  10040. schema:
  10041. type: string
  10042. default: application/octet-stream
  10043. enum:
  10044. - application/octet-stream
  10045. - in: path
  10046. name: shardID
  10047. schema:
  10048. type: string
  10049. required: true
  10050. description: The shard ID.
  10051. requestBody:
  10052. description: TSM snapshot.
  10053. required: true
  10054. content:
  10055. text/plain:
  10056. schema:
  10057. type: string
  10058. format: binary
  10059. responses:
  10060. '204':
  10061. description: TSM snapshot successfully restored.
  10062. default:
  10063. description: Unexpected error
  10064. $ref: '#/components/responses/GeneralServerError'
  10065. /config:
  10066. get:
  10067. operationId: GetConfig
  10068. tags:
  10069. - Config
  10070. - System information endpoints
  10071. summary: Retrieve runtime configuration
  10072. description: |
  10073. Returns the active runtime configuration of the InfluxDB instance.
  10074. In InfluxDB v2.2+, use this endpoint to view your active runtime configuration,
  10075. including flags and environment variables.
  10076. #### Related guides
  10077. - [View your runtime server configuration](https://docs.influxdata.com/influxdb/v2.3/reference/config-options/#view-your-runtime-server-configuration)
  10078. parameters:
  10079. - $ref: '#/components/parameters/TraceSpan'
  10080. responses:
  10081. '200':
  10082. description: |
  10083. Success.
  10084. The response body contains the active runtime configuration of the InfluxDB instance.
  10085. content:
  10086. application/json:
  10087. schema:
  10088. $ref: '#/components/schemas/Config'
  10089. '401':
  10090. $ref: '#/components/responses/GeneralServerError'
  10091. default:
  10092. $ref: '#/components/responses/GeneralServerError'
  10093. /remotes:
  10094. get:
  10095. operationId: GetRemoteConnections
  10096. tags:
  10097. - RemoteConnections
  10098. summary: List all remote connections
  10099. parameters:
  10100. - $ref: '#/components/parameters/TraceSpan'
  10101. - in: query
  10102. name: orgID
  10103. description: The organization ID.
  10104. required: true
  10105. schema:
  10106. type: string
  10107. - in: query
  10108. name: name
  10109. schema:
  10110. type: string
  10111. - in: query
  10112. name: remoteURL
  10113. schema:
  10114. type: string
  10115. format: uri
  10116. responses:
  10117. '200':
  10118. description: List of remote connections
  10119. content:
  10120. application/json:
  10121. schema:
  10122. $ref: '#/components/schemas/RemoteConnections'
  10123. '404':
  10124. $ref: '#/components/responses/GeneralServerError'
  10125. default:
  10126. $ref: '#/components/responses/GeneralServerError'
  10127. post:
  10128. operationId: PostRemoteConnection
  10129. tags:
  10130. - RemoteConnections
  10131. summary: Register a new remote connection
  10132. requestBody:
  10133. required: true
  10134. content:
  10135. application/json:
  10136. schema:
  10137. $ref: '#/components/schemas/RemoteConnectionCreationRequest'
  10138. responses:
  10139. '201':
  10140. description: Remote connection saved
  10141. content:
  10142. application/json:
  10143. schema:
  10144. $ref: '#/components/schemas/RemoteConnection'
  10145. '400':
  10146. $ref: '#/components/responses/GeneralServerError'
  10147. default:
  10148. $ref: '#/components/responses/GeneralServerError'
  10149. '/remotes/{remoteID}':
  10150. get:
  10151. operationId: GetRemoteConnectionByID
  10152. tags:
  10153. - RemoteConnections
  10154. summary: Retrieve a remote connection
  10155. parameters:
  10156. - $ref: '#/components/parameters/TraceSpan'
  10157. - in: path
  10158. name: remoteID
  10159. schema:
  10160. type: string
  10161. required: true
  10162. responses:
  10163. '200':
  10164. description: Remote connection
  10165. content:
  10166. application/json:
  10167. schema:
  10168. $ref: '#/components/schemas/RemoteConnection'
  10169. '404':
  10170. $ref: '#/components/responses/GeneralServerError'
  10171. default:
  10172. $ref: '#/components/responses/GeneralServerError'
  10173. patch:
  10174. operationId: PatchRemoteConnectionByID
  10175. tags:
  10176. - RemoteConnections
  10177. summary: Update a remote connection
  10178. parameters:
  10179. - $ref: '#/components/parameters/TraceSpan'
  10180. - in: path
  10181. name: remoteID
  10182. schema:
  10183. type: string
  10184. required: true
  10185. requestBody:
  10186. required: true
  10187. content:
  10188. application/json:
  10189. schema:
  10190. $ref: '#/components/schemas/RemoteConnectionUpdateRequest'
  10191. responses:
  10192. '200':
  10193. description: Updated information saved
  10194. content:
  10195. application/json:
  10196. schema:
  10197. $ref: '#/components/schemas/RemoteConnection'
  10198. '400':
  10199. $ref: '#/components/responses/GeneralServerError'
  10200. '404':
  10201. $ref: '#/components/responses/GeneralServerError'
  10202. default:
  10203. $ref: '#/components/responses/GeneralServerError'
  10204. delete:
  10205. operationId: DeleteRemoteConnectionByID
  10206. tags:
  10207. - RemoteConnections
  10208. summary: Delete a remote connection
  10209. parameters:
  10210. - $ref: '#/components/parameters/TraceSpan'
  10211. - in: path
  10212. name: remoteID
  10213. schema:
  10214. type: string
  10215. required: true
  10216. responses:
  10217. '204':
  10218. description: Remote connection info deleted.
  10219. '404':
  10220. $ref: '#/components/responses/GeneralServerError'
  10221. default:
  10222. $ref: '#/components/responses/GeneralServerError'
  10223. /replications:
  10224. get:
  10225. operationId: GetReplications
  10226. tags:
  10227. - Replications
  10228. summary: List all replications
  10229. parameters:
  10230. - $ref: '#/components/parameters/TraceSpan'
  10231. - in: query
  10232. name: orgID
  10233. description: The organization ID.
  10234. required: true
  10235. schema:
  10236. type: string
  10237. - in: query
  10238. name: name
  10239. schema:
  10240. type: string
  10241. - in: query
  10242. name: remoteID
  10243. schema:
  10244. type: string
  10245. - in: query
  10246. name: localBucketID
  10247. schema:
  10248. type: string
  10249. responses:
  10250. '200':
  10251. description: List of replications
  10252. content:
  10253. application/json:
  10254. schema:
  10255. $ref: '#/components/schemas/Replications'
  10256. '404':
  10257. $ref: '#/components/responses/GeneralServerError'
  10258. default:
  10259. $ref: '#/components/responses/GeneralServerError'
  10260. post:
  10261. operationId: PostReplication
  10262. tags:
  10263. - Replications
  10264. summary: Register a new replication
  10265. parameters:
  10266. - $ref: '#/components/parameters/TraceSpan'
  10267. - in: query
  10268. name: validate
  10269. description: 'If true, validate the replication, but don''t save it.'
  10270. schema:
  10271. type: boolean
  10272. default: false
  10273. requestBody:
  10274. required: true
  10275. content:
  10276. application/json:
  10277. schema:
  10278. $ref: '#/components/schemas/ReplicationCreationRequest'
  10279. responses:
  10280. '201':
  10281. description: Replication saved
  10282. content:
  10283. application/json:
  10284. schema:
  10285. $ref: '#/components/schemas/Replication'
  10286. '204':
  10287. description: 'Replication validated, but not saved'
  10288. '400':
  10289. $ref: '#/components/responses/GeneralServerError'
  10290. default:
  10291. $ref: '#/components/responses/GeneralServerError'
  10292. '/replications/{replicationID}':
  10293. get:
  10294. operationId: GetReplicationByID
  10295. tags:
  10296. - Replications
  10297. summary: Retrieve a replication
  10298. parameters:
  10299. - $ref: '#/components/parameters/TraceSpan'
  10300. - in: path
  10301. name: replicationID
  10302. schema:
  10303. type: string
  10304. required: true
  10305. responses:
  10306. '200':
  10307. description: Replication
  10308. content:
  10309. application/json:
  10310. schema:
  10311. $ref: '#/components/schemas/Replication'
  10312. '404':
  10313. $ref: '#/components/responses/GeneralServerError'
  10314. default:
  10315. $ref: '#/components/responses/GeneralServerError'
  10316. patch:
  10317. operationId: PatchReplicationByID
  10318. tags:
  10319. - Replications
  10320. summary: Update a replication
  10321. parameters:
  10322. - $ref: '#/components/parameters/TraceSpan'
  10323. - in: path
  10324. name: replicationID
  10325. schema:
  10326. type: string
  10327. required: true
  10328. - in: query
  10329. name: validate
  10330. description: 'If true, validate the updated information, but don''t save it.'
  10331. schema:
  10332. type: boolean
  10333. default: false
  10334. requestBody:
  10335. required: true
  10336. content:
  10337. application/json:
  10338. schema:
  10339. $ref: '#/components/schemas/ReplicationUpdateRequest'
  10340. responses:
  10341. '200':
  10342. description: Updated information saved
  10343. content:
  10344. application/json:
  10345. schema:
  10346. $ref: '#/components/schemas/Replication'
  10347. '204':
  10348. description: 'Updated replication validated, but not saved'
  10349. '400':
  10350. $ref: '#/components/responses/GeneralServerError'
  10351. '404':
  10352. $ref: '#/components/responses/GeneralServerError'
  10353. default:
  10354. $ref: '#/components/responses/GeneralServerError'
  10355. delete:
  10356. operationId: DeleteReplicationByID
  10357. tags:
  10358. - Replications
  10359. summary: Delete a replication
  10360. parameters:
  10361. - $ref: '#/components/parameters/TraceSpan'
  10362. - in: path
  10363. name: replicationID
  10364. schema:
  10365. type: string
  10366. required: true
  10367. responses:
  10368. '204':
  10369. description: Replication deleted.
  10370. '404':
  10371. $ref: '#/components/responses/GeneralServerError'
  10372. default:
  10373. $ref: '#/components/responses/GeneralServerError'
  10374. '/replications/{replicationID}/validate':
  10375. post:
  10376. operationId: PostValidateReplicationByID
  10377. tags:
  10378. - Replications
  10379. summary: Validate a replication
  10380. parameters:
  10381. - $ref: '#/components/parameters/TraceSpan'
  10382. - in: path
  10383. name: replicationID
  10384. schema:
  10385. type: string
  10386. required: true
  10387. responses:
  10388. '204':
  10389. description: Replication is valid
  10390. '400':
  10391. description: Replication failed validation
  10392. $ref: '#/components/responses/GeneralServerError'
  10393. default:
  10394. $ref: '#/components/responses/GeneralServerError'
  10395. /dashboards:
  10396. post:
  10397. operationId: PostDashboards
  10398. tags:
  10399. - Dashboards
  10400. summary: Create a dashboard
  10401. parameters:
  10402. - $ref: '#/components/parameters/TraceSpan'
  10403. requestBody:
  10404. description: Dashboard to create
  10405. required: true
  10406. content:
  10407. application/json:
  10408. schema:
  10409. $ref: '#/components/schemas/CreateDashboardRequest'
  10410. responses:
  10411. '201':
  10412. description: Added dashboard
  10413. content:
  10414. application/json:
  10415. schema:
  10416. oneOf:
  10417. - $ref: '#/components/schemas/Dashboard'
  10418. - $ref: '#/components/schemas/DashboardWithViewProperties'
  10419. default:
  10420. description: Unexpected error
  10421. content:
  10422. application/json:
  10423. schema:
  10424. $ref: '#/components/schemas/Error'
  10425. get:
  10426. operationId: GetDashboards
  10427. tags:
  10428. - Dashboards
  10429. summary: List all dashboards
  10430. parameters:
  10431. - $ref: '#/components/parameters/TraceSpan'
  10432. - $ref: '#/components/parameters/Offset'
  10433. - $ref: '#/components/parameters/Limit'
  10434. - $ref: '#/components/parameters/Descending'
  10435. - in: query
  10436. name: owner
  10437. description: A user identifier. Returns only dashboards where this user has the `owner` role.
  10438. schema:
  10439. type: string
  10440. - in: query
  10441. name: sortBy
  10442. description: The column to sort by.
  10443. schema:
  10444. type: string
  10445. enum:
  10446. - ID
  10447. - CreatedAt
  10448. - UpdatedAt
  10449. - in: query
  10450. name: id
  10451. description: 'A list of dashboard identifiers. Returns only the listed dashboards. If both `id` and `owner` are specified, only `id` is used.'
  10452. schema:
  10453. type: array
  10454. items:
  10455. type: string
  10456. - in: query
  10457. name: orgID
  10458. description: The identifier of the organization.
  10459. schema:
  10460. type: string
  10461. - in: query
  10462. name: org
  10463. description: The name of the organization.
  10464. schema:
  10465. type: string
  10466. responses:
  10467. '200':
  10468. description: All dashboards
  10469. content:
  10470. application/json:
  10471. schema:
  10472. $ref: '#/components/schemas/Dashboards'
  10473. default:
  10474. description: Unexpected error
  10475. content:
  10476. application/json:
  10477. schema:
  10478. $ref: '#/components/schemas/Error'
  10479. /tasks:
  10480. get:
  10481. operationId: GetTasks
  10482. tags:
  10483. - Data I/O endpoints
  10484. - Tasks
  10485. summary: List tasks
  10486. description: |
  10487. Retrieves a list of [tasks](https://docs.influxdata.com/influxdb/v2.3/process-data/).
  10488. To limit which tasks are returned, pass query parameters in your request.
  10489. If no query parameters are passed, InfluxDB returns all tasks up to the default `limit`.
  10490. parameters:
  10491. - $ref: '#/components/parameters/TraceSpan'
  10492. - in: query
  10493. name: name
  10494. description: |
  10495. Task name.
  10496. Only returns tasks with this name.
  10497. Different tasks may have the same name.
  10498. schema:
  10499. type: string
  10500. - in: query
  10501. name: after
  10502. schema:
  10503. type: string
  10504. description: |
  10505. Task ID.
  10506. Only returns tasks created after this task.
  10507. - in: query
  10508. name: user
  10509. schema:
  10510. type: string
  10511. description: |
  10512. User ID.
  10513. Only returns tasks owned by this user.
  10514. - in: query
  10515. name: org
  10516. schema:
  10517. type: string
  10518. description: |
  10519. Organization name.
  10520. Only returns tasks owned by this organization.
  10521. - in: query
  10522. name: orgID
  10523. schema:
  10524. type: string
  10525. description: |
  10526. Organization ID.
  10527. Only returns tasks owned by this organization.
  10528. - in: query
  10529. name: status
  10530. schema:
  10531. type: string
  10532. enum:
  10533. - active
  10534. - inactive
  10535. description: |
  10536. Task status (`active` or `inactive`).
  10537. Only returns tasks with this status.
  10538. - in: query
  10539. name: limit
  10540. schema:
  10541. type: integer
  10542. minimum: 1
  10543. maximum: 500
  10544. default: 100
  10545. description: |
  10546. Limits the number of tasks returned.
  10547. The minimum is `1`, the maximum is `500`, and the default is `100`.
  10548. - in: query
  10549. name: type
  10550. description: |
  10551. Task type (`basic` or `system`).
  10552. The default (`system`) response contains all the metadata properties for tasks.
  10553. To reduce the payload size, pass `basic` to omit some task properties (`flux`, `createdAt`, `updatedAt`) from the response.
  10554. required: false
  10555. schema:
  10556. default: ''
  10557. type: string
  10558. enum:
  10559. - basic
  10560. - system
  10561. responses:
  10562. '200':
  10563. description: |
  10564. Success.
  10565. The response body contains the list of tasks.
  10566. content:
  10567. application/json:
  10568. schema:
  10569. $ref: '#/components/schemas/Tasks'
  10570. examples:
  10571. basicTypeTaskOutput:
  10572. summary: Basic output
  10573. description: Task fields returned with `?type=basic`
  10574. value:
  10575. links:
  10576. self: /api/v2/tasks?limit=100
  10577. tasks:
  10578. - links:
  10579. labels: /api/v2/tasks/09956cbb6d378000/labels
  10580. logs: /api/v2/tasks/09956cbb6d378000/logs
  10581. members: /api/v2/tasks/09956cbb6d378000/members
  10582. owners: /api/v2/tasks/09956cbb6d378000/owners
  10583. runs: /api/v2/tasks/09956cbb6d378000/runs
  10584. self: /api/v2/tasks/09956cbb6d378000
  10585. labels: []
  10586. id: 09956cbb6d378000
  10587. orgID: 48c88459ee424a04
  10588. org: ''
  10589. ownerID: 0772396d1f411000
  10590. name: task1
  10591. status: active
  10592. flux: ''
  10593. every: 30m
  10594. latestCompleted: '2022-06-30T15:00:00Z'
  10595. lastRunStatus: success
  10596. systemTypeTaskOutput:
  10597. summary: System output
  10598. description: Task fields returned with `?type=system`
  10599. value:
  10600. links:
  10601. self: /api/v2/tasks?limit=100
  10602. tasks:
  10603. - links:
  10604. labels: /api/v2/tasks/09956cbb6d378000/labels
  10605. logs: /api/v2/tasks/09956cbb6d378000/logs
  10606. members: /api/v2/tasks/09956cbb6d378000/members
  10607. owners: /api/v2/tasks/09956cbb6d378000/owners
  10608. runs: /api/v2/tasks/09956cbb6d378000/runs
  10609. self: /api/v2/tasks/09956cbb6d378000
  10610. labels: []
  10611. id: 09956cbb6d378000
  10612. orgID: 48c88459ee424a04
  10613. org: my-iot-center
  10614. ownerID: 0772396d1f411000
  10615. name: task1
  10616. description: IoT Center 90-day environment average.
  10617. status: active
  10618. flux: |-
  10619. option task = {name: "task1", every: 30m}
  10620. from(bucket: "iot_center")
  10621. |> range(start: -90d)
  10622. |> filter(fn: (r) => r._measurement == "environment")
  10623. |> aggregateWindow(every: 1h, fn: mean)
  10624. every: 30m
  10625. latestCompleted: '2022-06-30T15:00:00Z'
  10626. lastRunStatus: success
  10627. createdAt: '2022-06-27T15:09:06Z'
  10628. updatedAt: '2022-06-28T18:10:15Z'
  10629. '401':
  10630. $ref: '#/components/responses/AuthorizationError'
  10631. '500':
  10632. $ref: '#/components/responses/InternalServerError'
  10633. default:
  10634. $ref: '#/components/responses/GeneralServerError'
  10635. x-codeSamples:
  10636. - lang: Shell
  10637. label: 'cURL: all tasks, basic output'
  10638. source: |
  10639. curl https://localhost:8086/api/v2/tasks/?limit=-1&type=basic \
  10640. --header 'Content-Type: application/json' \
  10641. --header 'Authorization: Token INFLUX_API_TOKEN'
  10642. post:
  10643. operationId: PostTasks
  10644. tags:
  10645. - Data I/O endpoints
  10646. - Tasks
  10647. summary: Create a task
  10648. description: |
  10649. Creates a [task](https://docs.influxdata.com/influxdb/v2.3/process-data/) and returns the created task.
  10650. #### Related guides
  10651. - [Get started with tasks](https://docs.influxdata.com/influxdb/v2.3/process-data/get-started/)
  10652. - [Create a task](https://docs.influxdata.com/influxdb/v2.3/process-data/manage-tasks/create-task/)
  10653. - [Common tasks](https://docs.influxdata.com/influxdb/v2.3/process-data/common-tasks/)
  10654. - [Task configuration options](https://docs.influxdata.com/influxdb/v2.3/process-data/task-options/)
  10655. parameters:
  10656. - $ref: '#/components/parameters/TraceSpan'
  10657. requestBody:
  10658. description: The task to create.
  10659. required: true
  10660. content:
  10661. application/json:
  10662. schema:
  10663. $ref: '#/components/schemas/TaskCreateRequest'
  10664. responses:
  10665. '201':
  10666. description: Success. The response body contains a `tasks` list with the new task.
  10667. content:
  10668. application/json:
  10669. schema:
  10670. $ref: '#/components/schemas/Task'
  10671. '400':
  10672. description: |
  10673. Bad request.
  10674. The response body contains detail about the error.
  10675. #### InfluxDB OSS
  10676. - Returns this error if an incorrect value is passed for `org` or `orgID`.
  10677. content:
  10678. application/json:
  10679. schema:
  10680. $ref: '#/components/schemas/Error'
  10681. examples:
  10682. orgProvidedNotFound:
  10683. summary: The org or orgID passed doesn't own the token passed in the header
  10684. value:
  10685. code: invalid
  10686. message: 'failed to decode request body: organization not found'
  10687. missingFluxError:
  10688. summary: Task in request body is missing Flux query
  10689. value:
  10690. code: invalid
  10691. message: 'failed to decode request: missing flux'
  10692. '401':
  10693. $ref: '#/components/responses/AuthorizationError'
  10694. '500':
  10695. $ref: '#/components/responses/InternalServerError'
  10696. default:
  10697. description: Unexpected error
  10698. content:
  10699. application/json:
  10700. schema:
  10701. $ref: '#/components/schemas/Error'
  10702. x-codeSamples:
  10703. - lang: Shell
  10704. label: 'cURL: create a task'
  10705. source: |
  10706. curl http://localhost:8086/api/v2/tasks \
  10707. --header "Content-type: application/json" \
  10708. --header "Authorization: Token INFLUX_API_TOKEN" \
  10709. --data-binary @- << EOF
  10710. {
  10711. "orgID": "INFLUX_ORG_ID",
  10712. "description": "IoT Center 30d environment average.",
  10713. "flux": "option task = {name: \"iot-center-task-1\", every: 30m}\
  10714. from(bucket: \"iot_center\")\
  10715. |> range(start: -30d)\
  10716. |> filter(fn: (r) => r._measurement == \"environment\")\
  10717. |> aggregateWindow(every: 1h, fn: mean)"
  10718. }
  10719. EOF
  10720. '/tasks/{taskID}':
  10721. get:
  10722. operationId: GetTasksID
  10723. tags:
  10724. - Data I/O endpoints
  10725. - Tasks
  10726. summary: Retrieve a task
  10727. description: |
  10728. Retrieves a [task](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#task).
  10729. parameters:
  10730. - $ref: '#/components/parameters/TraceSpan'
  10731. - in: path
  10732. name: taskID
  10733. schema:
  10734. type: string
  10735. required: true
  10736. description: The ID of the task to retrieve.
  10737. responses:
  10738. '200':
  10739. description: Success. The response body contains the task.
  10740. content:
  10741. application/json:
  10742. schema:
  10743. $ref: '#/components/schemas/Task'
  10744. '400':
  10745. $ref: '#/components/responses/BadRequestError'
  10746. '401':
  10747. $ref: '#/components/responses/AuthorizationError'
  10748. '404':
  10749. $ref: '#/components/responses/ResourceNotFoundError'
  10750. '500':
  10751. $ref: '#/components/responses/InternalServerError'
  10752. default:
  10753. $ref: '#/components/responses/GeneralServerError'
  10754. patch:
  10755. operationId: PatchTasksID
  10756. tags:
  10757. - Tasks
  10758. summary: Update a task
  10759. description: |
  10760. Updates a task and then cancels all scheduled runs of the task.
  10761. Use this endpoint to set, modify, and clear task properties (for example: `cron`, `name`, `flux`, `status`).
  10762. Once InfluxDB applies the update, it cancels all previously scheduled runs of the task.
  10763. To update a task, pass an object that contains the updated key-value pairs.
  10764. To activate or inactivate a task, set the `status` property.
  10765. _`"status": "inactive"`_ cancels scheduled runs and prevents manual runs of the task.
  10766. requestBody:
  10767. description: An object that contains updated task properties to apply.
  10768. required: true
  10769. content:
  10770. application/json:
  10771. schema:
  10772. $ref: '#/components/schemas/TaskUpdateRequest'
  10773. parameters:
  10774. - $ref: '#/components/parameters/TraceSpan'
  10775. - in: path
  10776. name: taskID
  10777. schema:
  10778. type: string
  10779. required: true
  10780. description: The ID of the task to update.
  10781. responses:
  10782. '200':
  10783. description: Success. The response body contains the updated task.
  10784. content:
  10785. application/json:
  10786. schema:
  10787. $ref: '#/components/schemas/Task'
  10788. '400':
  10789. $ref: '#/components/responses/BadRequestError'
  10790. '401':
  10791. $ref: '#/components/responses/AuthorizationError'
  10792. '404':
  10793. $ref: '#/components/responses/ResourceNotFoundError'
  10794. '500':
  10795. $ref: '#/components/responses/InternalServerError'
  10796. default:
  10797. $ref: '#/components/responses/GeneralServerError'
  10798. delete:
  10799. operationId: DeleteTasksID
  10800. tags:
  10801. - Tasks
  10802. summary: Delete a task
  10803. description: |
  10804. Deletes a task and associated records.
  10805. Use this endpoint to delete a task and all associated records (task runs, logs, and labels).
  10806. Once the task is deleted, InfluxDB cancels all scheduled runs of the task.
  10807. If you want to disable a task instead of delete it, [update the task status to `inactive`](#operation/PatchTasksID).
  10808. parameters:
  10809. - $ref: '#/components/parameters/TraceSpan'
  10810. - in: path
  10811. name: taskID
  10812. schema:
  10813. type: string
  10814. required: true
  10815. description: The ID of the task to delete.
  10816. responses:
  10817. '204':
  10818. description: Success. The task and runs are deleted. Scheduled runs are canceled.
  10819. '400':
  10820. $ref: '#/components/responses/BadRequestError'
  10821. '401':
  10822. $ref: '#/components/responses/AuthorizationError'
  10823. '404':
  10824. $ref: '#/components/responses/ResourceNotFoundError'
  10825. '500':
  10826. $ref: '#/components/responses/InternalServerError'
  10827. default:
  10828. $ref: '#/components/responses/GeneralServerError'
  10829. components:
  10830. parameters:
  10831. TraceSpan:
  10832. in: header
  10833. name: Zap-Trace-Span
  10834. description: OpenTracing span context
  10835. example:
  10836. trace_id: '1'
  10837. span_id: '1'
  10838. baggage:
  10839. key: value
  10840. required: false
  10841. schema:
  10842. type: string
  10843. Offset:
  10844. in: query
  10845. name: offset
  10846. required: false
  10847. description: |
  10848. The offset for pagination.
  10849. The number of records to skip.
  10850. schema:
  10851. type: integer
  10852. minimum: 0
  10853. Limit:
  10854. in: query
  10855. name: limit
  10856. required: false
  10857. description: |
  10858. Limits the number of records returned. Default is `20`.
  10859. schema:
  10860. type: integer
  10861. minimum: 1
  10862. maximum: 100
  10863. default: 20
  10864. Descending:
  10865. in: query
  10866. name: descending
  10867. required: false
  10868. schema:
  10869. type: boolean
  10870. default: false
  10871. SortBy:
  10872. in: query
  10873. name: sortBy
  10874. required: false
  10875. schema:
  10876. type: string
  10877. After:
  10878. in: query
  10879. name: after
  10880. required: false
  10881. schema:
  10882. type: string
  10883. description: |
  10884. Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`.
  10885. schemas:
  10886. LanguageRequest:
  10887. description: Flux query to be analyzed.
  10888. type: object
  10889. required:
  10890. - query
  10891. properties:
  10892. query:
  10893. description: |
  10894. The Flux query script to be analyzed.
  10895. type: string
  10896. Query:
  10897. description: Query InfluxDB with the Flux language
  10898. type: object
  10899. required:
  10900. - query
  10901. properties:
  10902. extern:
  10903. $ref: '#/components/schemas/File'
  10904. query:
  10905. description: The query script to execute.
  10906. type: string
  10907. type:
  10908. description: The type of query. Must be "flux".
  10909. type: string
  10910. enum:
  10911. - flux
  10912. params:
  10913. type: object
  10914. additionalProperties: true
  10915. description: |
  10916. Key-value pairs passed as parameters during query execution.
  10917. To use parameters in your query, pass a _`query`_ with `params` references (in dot notation)--for example:
  10918. ```json
  10919. query: "from(bucket: params.mybucket) |> range(start: params.rangeStart) |> limit(n:1)"
  10920. ```
  10921. and pass _`params`_ with the key-value pairs--for example:
  10922. ```json
  10923. params: {
  10924. "mybucket": "environment",
  10925. "rangeStart": "-30d"
  10926. }
  10927. ```
  10928. During query execution, InfluxDB passes _`params`_ to your script and substitutes the values.
  10929. #### Limitations
  10930. - If you use _`params`_, you can't use _`extern`_.
  10931. dialect:
  10932. $ref: '#/components/schemas/Dialect'
  10933. now:
  10934. description: |
  10935. Specifies the time that should be reported as `now` in the query.
  10936. Default is the server `now` time.
  10937. type: string
  10938. format: date-time
  10939. Package:
  10940. description: Represents a complete package source tree.
  10941. type: object
  10942. properties:
  10943. type:
  10944. $ref: '#/components/schemas/NodeType'
  10945. path:
  10946. description: Package import path
  10947. type: string
  10948. package:
  10949. description: Package name
  10950. type: string
  10951. files:
  10952. description: Package files
  10953. type: array
  10954. items:
  10955. $ref: '#/components/schemas/File'
  10956. File:
  10957. description: Represents a source from a single file
  10958. type: object
  10959. properties:
  10960. type:
  10961. $ref: '#/components/schemas/NodeType'
  10962. name:
  10963. description: The name of the file.
  10964. type: string
  10965. package:
  10966. $ref: '#/components/schemas/PackageClause'
  10967. imports:
  10968. description: A list of package imports
  10969. type: array
  10970. items:
  10971. $ref: '#/components/schemas/ImportDeclaration'
  10972. body:
  10973. description: List of Flux statements
  10974. type: array
  10975. items:
  10976. $ref: '#/components/schemas/Statement'
  10977. PackageClause:
  10978. description: Defines a package identifier
  10979. type: object
  10980. properties:
  10981. type:
  10982. $ref: '#/components/schemas/NodeType'
  10983. name:
  10984. $ref: '#/components/schemas/Identifier'
  10985. ImportDeclaration:
  10986. description: Declares a package import
  10987. type: object
  10988. properties:
  10989. type:
  10990. $ref: '#/components/schemas/NodeType'
  10991. as:
  10992. $ref: '#/components/schemas/Identifier'
  10993. path:
  10994. $ref: '#/components/schemas/StringLiteral'
  10995. DeletePredicateRequest:
  10996. description: The delete predicate request.
  10997. type: object
  10998. required:
  10999. - start
  11000. - stop
  11001. properties:
  11002. start:
  11003. description: |
  11004. A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)).
  11005. The earliest time to delete from.
  11006. type: string
  11007. format: date-time
  11008. stop:
  11009. description: |
  11010. A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)).
  11011. The latest time to delete from.
  11012. type: string
  11013. format: date-time
  11014. predicate:
  11015. description: |
  11016. An expression in [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/delete-predicate/).
  11017. example: tag1="value1" and (tag2="value2" and tag3!="value3")
  11018. type: string
  11019. Node:
  11020. oneOf:
  11021. - $ref: '#/components/schemas/Expression'
  11022. - $ref: '#/components/schemas/Block'
  11023. NodeType:
  11024. description: Type of AST node
  11025. type: string
  11026. Block:
  11027. description: A set of statements
  11028. type: object
  11029. properties:
  11030. type:
  11031. $ref: '#/components/schemas/NodeType'
  11032. body:
  11033. description: Block body
  11034. type: array
  11035. items:
  11036. $ref: '#/components/schemas/Statement'
  11037. Statement:
  11038. oneOf:
  11039. - $ref: '#/components/schemas/BadStatement'
  11040. - $ref: '#/components/schemas/VariableAssignment'
  11041. - $ref: '#/components/schemas/MemberAssignment'
  11042. - $ref: '#/components/schemas/ExpressionStatement'
  11043. - $ref: '#/components/schemas/ReturnStatement'
  11044. - $ref: '#/components/schemas/OptionStatement'
  11045. - $ref: '#/components/schemas/BuiltinStatement'
  11046. - $ref: '#/components/schemas/TestStatement'
  11047. BadStatement:
  11048. description: A placeholder for statements for which no correct statement nodes can be created
  11049. type: object
  11050. properties:
  11051. type:
  11052. $ref: '#/components/schemas/NodeType'
  11053. text:
  11054. description: Raw source text
  11055. type: string
  11056. VariableAssignment:
  11057. description: Represents the declaration of a variable
  11058. type: object
  11059. properties:
  11060. type:
  11061. $ref: '#/components/schemas/NodeType'
  11062. id:
  11063. $ref: '#/components/schemas/Identifier'
  11064. init:
  11065. $ref: '#/components/schemas/Expression'
  11066. MemberAssignment:
  11067. description: Object property assignment
  11068. type: object
  11069. properties:
  11070. type:
  11071. $ref: '#/components/schemas/NodeType'
  11072. member:
  11073. $ref: '#/components/schemas/MemberExpression'
  11074. init:
  11075. $ref: '#/components/schemas/Expression'
  11076. ExpressionStatement:
  11077. description: May consist of an expression that doesn't return a value and is executed solely for its side-effects
  11078. type: object
  11079. properties:
  11080. type:
  11081. $ref: '#/components/schemas/NodeType'
  11082. expression:
  11083. $ref: '#/components/schemas/Expression'
  11084. ReturnStatement:
  11085. description: Defines an expression to return
  11086. type: object
  11087. properties:
  11088. type:
  11089. $ref: '#/components/schemas/NodeType'
  11090. argument:
  11091. $ref: '#/components/schemas/Expression'
  11092. OptionStatement:
  11093. description: A single variable declaration
  11094. type: object
  11095. properties:
  11096. type:
  11097. $ref: '#/components/schemas/NodeType'
  11098. assignment:
  11099. oneOf:
  11100. - $ref: '#/components/schemas/VariableAssignment'
  11101. - $ref: '#/components/schemas/MemberAssignment'
  11102. BuiltinStatement:
  11103. description: Declares a builtin identifier and its type
  11104. type: object
  11105. properties:
  11106. type:
  11107. $ref: '#/components/schemas/NodeType'
  11108. id:
  11109. $ref: '#/components/schemas/Identifier'
  11110. TestStatement:
  11111. description: Declares a Flux test case
  11112. type: object
  11113. properties:
  11114. type:
  11115. $ref: '#/components/schemas/NodeType'
  11116. assignment:
  11117. $ref: '#/components/schemas/VariableAssignment'
  11118. Expression:
  11119. oneOf:
  11120. - $ref: '#/components/schemas/ArrayExpression'
  11121. - $ref: '#/components/schemas/DictExpression'
  11122. - $ref: '#/components/schemas/FunctionExpression'
  11123. - $ref: '#/components/schemas/BinaryExpression'
  11124. - $ref: '#/components/schemas/CallExpression'
  11125. - $ref: '#/components/schemas/ConditionalExpression'
  11126. - $ref: '#/components/schemas/LogicalExpression'
  11127. - $ref: '#/components/schemas/MemberExpression'
  11128. - $ref: '#/components/schemas/IndexExpression'
  11129. - $ref: '#/components/schemas/ObjectExpression'
  11130. - $ref: '#/components/schemas/ParenExpression'
  11131. - $ref: '#/components/schemas/PipeExpression'
  11132. - $ref: '#/components/schemas/UnaryExpression'
  11133. - $ref: '#/components/schemas/BooleanLiteral'
  11134. - $ref: '#/components/schemas/DateTimeLiteral'
  11135. - $ref: '#/components/schemas/DurationLiteral'
  11136. - $ref: '#/components/schemas/FloatLiteral'
  11137. - $ref: '#/components/schemas/IntegerLiteral'
  11138. - $ref: '#/components/schemas/PipeLiteral'
  11139. - $ref: '#/components/schemas/RegexpLiteral'
  11140. - $ref: '#/components/schemas/StringLiteral'
  11141. - $ref: '#/components/schemas/UnsignedIntegerLiteral'
  11142. - $ref: '#/components/schemas/Identifier'
  11143. ArrayExpression:
  11144. description: Used to create and directly specify the elements of an array object
  11145. type: object
  11146. properties:
  11147. type:
  11148. $ref: '#/components/schemas/NodeType'
  11149. elements:
  11150. description: Elements of the array
  11151. type: array
  11152. items:
  11153. $ref: '#/components/schemas/Expression'
  11154. DictExpression:
  11155. description: Used to create and directly specify the elements of a dictionary
  11156. type: object
  11157. properties:
  11158. type:
  11159. $ref: '#/components/schemas/NodeType'
  11160. elements:
  11161. description: Elements of the dictionary
  11162. type: array
  11163. items:
  11164. $ref: '#/components/schemas/DictItem'
  11165. DictItem:
  11166. description: A key-value pair in a dictionary.
  11167. type: object
  11168. properties:
  11169. type:
  11170. $ref: '#/components/schemas/NodeType'
  11171. key:
  11172. $ref: '#/components/schemas/Expression'
  11173. val:
  11174. $ref: '#/components/schemas/Expression'
  11175. FunctionExpression:
  11176. description: Function expression
  11177. type: object
  11178. properties:
  11179. type:
  11180. $ref: '#/components/schemas/NodeType'
  11181. params:
  11182. description: Function parameters
  11183. type: array
  11184. items:
  11185. $ref: '#/components/schemas/Property'
  11186. body:
  11187. $ref: '#/components/schemas/Node'
  11188. BinaryExpression:
  11189. description: uses binary operators to act on two operands in an expression
  11190. type: object
  11191. properties:
  11192. type:
  11193. $ref: '#/components/schemas/NodeType'
  11194. operator:
  11195. type: string
  11196. left:
  11197. $ref: '#/components/schemas/Expression'
  11198. right:
  11199. $ref: '#/components/schemas/Expression'
  11200. CallExpression:
  11201. description: Represents a function call
  11202. type: object
  11203. properties:
  11204. type:
  11205. $ref: '#/components/schemas/NodeType'
  11206. callee:
  11207. $ref: '#/components/schemas/Expression'
  11208. arguments:
  11209. description: Function arguments
  11210. type: array
  11211. items:
  11212. $ref: '#/components/schemas/Expression'
  11213. ConditionalExpression:
  11214. description: 'Selects one of two expressions, `Alternate` or `Consequent`, depending on a third boolean expression, `Test`'
  11215. type: object
  11216. properties:
  11217. type:
  11218. $ref: '#/components/schemas/NodeType'
  11219. test:
  11220. $ref: '#/components/schemas/Expression'
  11221. alternate:
  11222. $ref: '#/components/schemas/Expression'
  11223. consequent:
  11224. $ref: '#/components/schemas/Expression'
  11225. LogicalExpression:
  11226. description: Represents the rule conditions that collectively evaluate to either true or false
  11227. type: object
  11228. properties:
  11229. type:
  11230. $ref: '#/components/schemas/NodeType'
  11231. operator:
  11232. type: string
  11233. left:
  11234. $ref: '#/components/schemas/Expression'
  11235. right:
  11236. $ref: '#/components/schemas/Expression'
  11237. MemberExpression:
  11238. description: Represents accessing a property of an object
  11239. type: object
  11240. properties:
  11241. type:
  11242. $ref: '#/components/schemas/NodeType'
  11243. object:
  11244. $ref: '#/components/schemas/Expression'
  11245. property:
  11246. $ref: '#/components/schemas/PropertyKey'
  11247. IndexExpression:
  11248. description: Represents indexing into an array
  11249. type: object
  11250. properties:
  11251. type:
  11252. $ref: '#/components/schemas/NodeType'
  11253. array:
  11254. $ref: '#/components/schemas/Expression'
  11255. index:
  11256. $ref: '#/components/schemas/Expression'
  11257. ObjectExpression:
  11258. description: Allows the declaration of an anonymous object within a declaration
  11259. type: object
  11260. properties:
  11261. type:
  11262. $ref: '#/components/schemas/NodeType'
  11263. properties:
  11264. description: Object properties
  11265. type: array
  11266. items:
  11267. $ref: '#/components/schemas/Property'
  11268. ParenExpression:
  11269. description: Represents an expression wrapped in parenthesis
  11270. type: object
  11271. properties:
  11272. type:
  11273. $ref: '#/components/schemas/NodeType'
  11274. expression:
  11275. $ref: '#/components/schemas/Expression'
  11276. PipeExpression:
  11277. description: Call expression with pipe argument
  11278. type: object
  11279. properties:
  11280. type:
  11281. $ref: '#/components/schemas/NodeType'
  11282. argument:
  11283. $ref: '#/components/schemas/Expression'
  11284. call:
  11285. $ref: '#/components/schemas/CallExpression'
  11286. UnaryExpression:
  11287. description: Uses operators to act on a single operand in an expression
  11288. type: object
  11289. properties:
  11290. type:
  11291. $ref: '#/components/schemas/NodeType'
  11292. operator:
  11293. type: string
  11294. argument:
  11295. $ref: '#/components/schemas/Expression'
  11296. BooleanLiteral:
  11297. description: Represents boolean values
  11298. type: object
  11299. properties:
  11300. type:
  11301. $ref: '#/components/schemas/NodeType'
  11302. value:
  11303. type: boolean
  11304. DateTimeLiteral:
  11305. description: 'Represents an instant in time with nanosecond precision in [RFC3339Nano date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339nano-timestamp).'
  11306. type: object
  11307. properties:
  11308. type:
  11309. $ref: '#/components/schemas/NodeType'
  11310. value:
  11311. type: string
  11312. format: date-time
  11313. DurationLiteral:
  11314. description: Represents the elapsed time between two instants as an int64 nanosecond count with syntax of golang's time.Duration
  11315. type: object
  11316. properties:
  11317. type:
  11318. $ref: '#/components/schemas/NodeType'
  11319. values:
  11320. description: Duration values
  11321. type: array
  11322. items:
  11323. $ref: '#/components/schemas/Duration'
  11324. FloatLiteral:
  11325. description: Represents floating point numbers according to the double representations defined by the IEEE-754-1985
  11326. type: object
  11327. properties:
  11328. type:
  11329. $ref: '#/components/schemas/NodeType'
  11330. value:
  11331. type: number
  11332. IntegerLiteral:
  11333. description: Represents integer numbers
  11334. type: object
  11335. properties:
  11336. type:
  11337. $ref: '#/components/schemas/NodeType'
  11338. value:
  11339. type: string
  11340. PipeLiteral:
  11341. description: 'Represents a specialized literal value, indicating the left hand value of a pipe expression'
  11342. type: object
  11343. properties:
  11344. type:
  11345. $ref: '#/components/schemas/NodeType'
  11346. RegexpLiteral:
  11347. description: Expressions begin and end with `/` and are regular expressions with syntax accepted by RE2
  11348. type: object
  11349. properties:
  11350. type:
  11351. $ref: '#/components/schemas/NodeType'
  11352. value:
  11353. type: string
  11354. StringLiteral:
  11355. description: Expressions begin and end with double quote marks
  11356. type: object
  11357. properties:
  11358. type:
  11359. $ref: '#/components/schemas/NodeType'
  11360. value:
  11361. type: string
  11362. UnsignedIntegerLiteral:
  11363. description: Represents integer numbers
  11364. type: object
  11365. properties:
  11366. type:
  11367. $ref: '#/components/schemas/NodeType'
  11368. value:
  11369. type: string
  11370. Duration:
  11371. description: A pair consisting of length of time and the unit of time measured. It is the atomic unit from which all duration literals are composed.
  11372. type: object
  11373. properties:
  11374. type:
  11375. $ref: '#/components/schemas/NodeType'
  11376. magnitude:
  11377. type: integer
  11378. unit:
  11379. type: string
  11380. Property:
  11381. description: The value associated with a key
  11382. type: object
  11383. properties:
  11384. type:
  11385. $ref: '#/components/schemas/NodeType'
  11386. key:
  11387. $ref: '#/components/schemas/PropertyKey'
  11388. value:
  11389. $ref: '#/components/schemas/Expression'
  11390. PropertyKey:
  11391. oneOf:
  11392. - $ref: '#/components/schemas/Identifier'
  11393. - $ref: '#/components/schemas/StringLiteral'
  11394. Identifier:
  11395. description: A valid Flux identifier
  11396. type: object
  11397. properties:
  11398. type:
  11399. $ref: '#/components/schemas/NodeType'
  11400. name:
  11401. type: string
  11402. Dialect:
  11403. description: |
  11404. Options for tabular data output.
  11405. Default output is [annotated CSV](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/annotated-csv/#csv-response-format) with headers.
  11406. For more information about tabular data **dialect**,
  11407. see [W3 metadata vocabulary for tabular data](https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions).
  11408. type: object
  11409. properties:
  11410. header:
  11411. description: 'If true, the results contain a header row.'
  11412. type: boolean
  11413. default: true
  11414. delimiter:
  11415. description: 'The separator used between cells. Default is a comma (`,`).'
  11416. type: string
  11417. default: ','
  11418. maxLength: 1
  11419. minLength: 1
  11420. annotations:
  11421. description: |
  11422. Annotation rows to include in the results.
  11423. An _annotation_ is metadata associated with an object (column) in the data model.
  11424. #### Related guides
  11425. - See [Annotated CSV annotations](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/annotated-csv/#annotations) for examples and more information.
  11426. For more information about **annotations** in tabular data,
  11427. see [W3 metadata vocabulary for tabular data](https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns).
  11428. type: array
  11429. uniqueItems: true
  11430. items:
  11431. type: string
  11432. enum:
  11433. - group
  11434. - datatype
  11435. - default
  11436. commentPrefix:
  11437. description: The character prefixed to comment strings. Default is a number sign (`#`).
  11438. type: string
  11439. default: '#'
  11440. maxLength: 1
  11441. minLength: 0
  11442. dateTimeFormat:
  11443. description: |
  11444. The format for timestamps in results.
  11445. Default is [`RFC3339` date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp).
  11446. To include nanoseconds in timestamps, use `RFC3339Nano`.
  11447. #### Example formatted date/time values
  11448. | Format | Value |
  11449. |:------------|:----------------------------|
  11450. | `RFC3339` | `"2006-01-02T15:04:05Z07:00"` |
  11451. | `RFC3339Nano` | `"2006-01-02T15:04:05.999999999Z07:00"` |
  11452. type: string
  11453. default: RFC3339
  11454. enum:
  11455. - RFC3339
  11456. - RFC3339Nano
  11457. AuthorizationUpdateRequest:
  11458. properties:
  11459. status:
  11460. description: 'Status of the token. If `inactive`, requests using the token will be rejected.'
  11461. default: active
  11462. type: string
  11463. enum:
  11464. - active
  11465. - inactive
  11466. description:
  11467. type: string
  11468. description: A description of the token.
  11469. PostBucketRequest:
  11470. properties:
  11471. orgID:
  11472. description: |
  11473. Organization ID.
  11474. The ID of the organization.
  11475. type: string
  11476. name:
  11477. description: |
  11478. The name of the bucket.
  11479. type: string
  11480. description:
  11481. description: |
  11482. A description of the bucket.
  11483. type: string
  11484. rp:
  11485. description: |
  11486. Retention policy is an InfluxDB 1.x concept that represents the duration
  11487. of time that each data point in the retention policy persists. Use `rp`
  11488. for compatibility with InfluxDB 1.x.
  11489. The InfluxDB 2.x and Cloud equivalent is
  11490. [retention period](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#retention-period).
  11491. type: string
  11492. default: '0'
  11493. retentionRules:
  11494. $ref: '#/components/schemas/RetentionRules'
  11495. schemaType:
  11496. description: |
  11497. Schema Type.
  11498. Use `explicit` to enforce column names, tags, fields, and data types for
  11499. your data.
  11500. #### InfluxDB Cloud
  11501. - Default is `implicit`.
  11502. #### InfluxDB OSS
  11503. - Doesn't support `schemaType`.
  11504. $ref: '#/components/schemas/SchemaType'
  11505. default: implicit
  11506. required:
  11507. - orgID
  11508. - name
  11509. Bucket:
  11510. properties:
  11511. links:
  11512. type: object
  11513. readOnly: true
  11514. example:
  11515. labels: /api/v2/buckets/1/labels
  11516. members: /api/v2/buckets/1/members
  11517. org: /api/v2/orgs/2
  11518. owners: /api/v2/buckets/1/owners
  11519. self: /api/v2/buckets/1
  11520. write: /api/v2/write?org=2&bucket=1
  11521. properties:
  11522. labels:
  11523. description: URL to retrieve labels for this bucket.
  11524. $ref: '#/components/schemas/Link'
  11525. members:
  11526. description: URL to retrieve members that can read this bucket.
  11527. $ref: '#/components/schemas/Link'
  11528. org:
  11529. description: URL to retrieve parent organization for this bucket.
  11530. $ref: '#/components/schemas/Link'
  11531. owners:
  11532. description: URL to retrieve owners that can read and write to this bucket.
  11533. $ref: '#/components/schemas/Link'
  11534. self:
  11535. description: URL for this bucket.
  11536. $ref: '#/components/schemas/Link'
  11537. write:
  11538. description: URL to write line protocol to this bucket.
  11539. $ref: '#/components/schemas/Link'
  11540. id:
  11541. readOnly: true
  11542. type: string
  11543. type:
  11544. readOnly: true
  11545. type: string
  11546. default: user
  11547. enum:
  11548. - user
  11549. - system
  11550. name:
  11551. type: string
  11552. description:
  11553. type: string
  11554. orgID:
  11555. type: string
  11556. rp:
  11557. type: string
  11558. schemaType:
  11559. $ref: '#/components/schemas/SchemaType'
  11560. default: implicit
  11561. createdAt:
  11562. type: string
  11563. format: date-time
  11564. readOnly: true
  11565. updatedAt:
  11566. type: string
  11567. format: date-time
  11568. readOnly: true
  11569. retentionRules:
  11570. $ref: '#/components/schemas/RetentionRules'
  11571. labels:
  11572. $ref: '#/components/schemas/Labels'
  11573. required:
  11574. - name
  11575. - retentionRules
  11576. Buckets:
  11577. type: object
  11578. properties:
  11579. links:
  11580. readOnly: true
  11581. $ref: '#/components/schemas/Links'
  11582. buckets:
  11583. type: array
  11584. items:
  11585. $ref: '#/components/schemas/Bucket'
  11586. RetentionRules:
  11587. type: array
  11588. description: |
  11589. Retention rules to expire or retain data.
  11590. #### InfluxDB Cloud
  11591. - `retentionRules` is required.
  11592. #### InfluxDB OSS
  11593. - `retentionRules` isn't required.
  11594. items:
  11595. $ref: '#/components/schemas/RetentionRule'
  11596. PatchBucketRequest:
  11597. type: object
  11598. description: |
  11599. An object that contains updated bucket properties to apply.
  11600. properties:
  11601. name:
  11602. type: string
  11603. description: |
  11604. The name of the bucket.
  11605. description:
  11606. description: |
  11607. A description of the bucket.
  11608. type: string
  11609. retentionRules:
  11610. $ref: '#/components/schemas/PatchRetentionRules'
  11611. PatchRetentionRules:
  11612. type: array
  11613. description: Updates to rules to expire or retain data. No rules means no updates.
  11614. items:
  11615. $ref: '#/components/schemas/PatchRetentionRule'
  11616. PatchRetentionRule:
  11617. type: object
  11618. properties:
  11619. type:
  11620. type: string
  11621. default: expire
  11622. enum:
  11623. - expire
  11624. everySeconds:
  11625. type: integer
  11626. format: int64
  11627. description: |
  11628. The number of seconds to keep data.
  11629. Default duration is `2592000` (30 days).
  11630. `0` represents infinite retention.
  11631. example: 86400
  11632. default: 2592000
  11633. minimum: 0
  11634. shardGroupDurationSeconds:
  11635. type: integer
  11636. format: int64
  11637. description: |
  11638. The [shard group duration](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#shard).
  11639. The number of seconds that each shard group covers.
  11640. #### InfluxDB Cloud
  11641. - Doesn't use `shardGroupDurationsSeconds`.
  11642. #### InfluxDB OSS
  11643. - Default value depends on the [bucket retention period](https://docs.influxdata.com/influxdb/v2.3/reference/internals/shards/#shard-group-duration).
  11644. #### Related guides
  11645. - InfluxDB [shards and shard groups](https://docs.influxdata.com/influxdb/v2.3/reference/internals/shards/)
  11646. required:
  11647. - everySeconds
  11648. RetentionRule:
  11649. type: object
  11650. properties:
  11651. type:
  11652. type: string
  11653. default: expire
  11654. enum:
  11655. - expire
  11656. everySeconds:
  11657. type: integer
  11658. format: int64
  11659. description: |
  11660. The duration in seconds for how long data will be kept in the database.
  11661. The default duration is 2592000 (30 days).
  11662. 0 represents infinite retention.
  11663. example: 86400
  11664. default: 2592000
  11665. minimum: 0
  11666. shardGroupDurationSeconds:
  11667. type: integer
  11668. format: int64
  11669. description: |
  11670. The shard group duration.
  11671. The duration or interval (in seconds) that each shard group covers.
  11672. #### InfluxDB Cloud
  11673. - Does not use `shardGroupDurationsSeconds`.
  11674. #### InfluxDB OSS
  11675. - Default value depends on the
  11676. [bucket retention period](https://docs.influxdata.com/influxdb/v2.3/v2.3/reference/internals/shards/#shard-group-duration).
  11677. required:
  11678. - everySeconds
  11679. Link:
  11680. type: string
  11681. format: uri
  11682. readOnly: true
  11683. description: URI of resource.
  11684. Links:
  11685. type: object
  11686. description: |
  11687. URI pointers for additional paged results.
  11688. properties:
  11689. next:
  11690. $ref: '#/components/schemas/Link'
  11691. self:
  11692. $ref: '#/components/schemas/Link'
  11693. prev:
  11694. $ref: '#/components/schemas/Link'
  11695. required:
  11696. - self
  11697. Logs:
  11698. type: object
  11699. properties:
  11700. events:
  11701. readOnly: true
  11702. type: array
  11703. items:
  11704. $ref: '#/components/schemas/LogEvent'
  11705. LogEvent:
  11706. type: object
  11707. properties:
  11708. time:
  11709. readOnly: true
  11710. description: 'The time ([RFC3339Nano date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339nano-timestamp)) that the event occurred.'
  11711. type: string
  11712. format: date-time
  11713. example: '2006-01-02T15:04:05.999999999Z07:00'
  11714. message:
  11715. readOnly: true
  11716. description: A description of the event that occurred.
  11717. type: string
  11718. example: Halt and catch fire
  11719. runID:
  11720. readOnly: true
  11721. description: The ID of the task run that generated the event.
  11722. type: string
  11723. Organization:
  11724. properties:
  11725. links:
  11726. type: object
  11727. readOnly: true
  11728. example:
  11729. self: /api/v2/orgs/1
  11730. members: /api/v2/orgs/1/members
  11731. owners: /api/v2/orgs/1/owners
  11732. labels: /api/v2/orgs/1/labels
  11733. secrets: /api/v2/orgs/1/secrets
  11734. buckets: /api/v2/buckets?org=myorg
  11735. tasks: /api/v2/tasks?org=myorg
  11736. dashboards: /api/v2/dashboards?org=myorg
  11737. properties:
  11738. self:
  11739. $ref: '#/components/schemas/Link'
  11740. members:
  11741. $ref: '#/components/schemas/Link'
  11742. owners:
  11743. $ref: '#/components/schemas/Link'
  11744. labels:
  11745. $ref: '#/components/schemas/Link'
  11746. secrets:
  11747. $ref: '#/components/schemas/Link'
  11748. buckets:
  11749. $ref: '#/components/schemas/Link'
  11750. tasks:
  11751. $ref: '#/components/schemas/Link'
  11752. dashboards:
  11753. $ref: '#/components/schemas/Link'
  11754. id:
  11755. readOnly: true
  11756. type: string
  11757. name:
  11758. type: string
  11759. description:
  11760. type: string
  11761. createdAt:
  11762. type: string
  11763. format: date-time
  11764. readOnly: true
  11765. updatedAt:
  11766. type: string
  11767. format: date-time
  11768. readOnly: true
  11769. status:
  11770. description: If inactive the organization is inactive.
  11771. default: active
  11772. type: string
  11773. enum:
  11774. - active
  11775. - inactive
  11776. required:
  11777. - name
  11778. Organizations:
  11779. type: object
  11780. properties:
  11781. links:
  11782. $ref: '#/components/schemas/Links'
  11783. orgs:
  11784. type: array
  11785. items:
  11786. $ref: '#/components/schemas/Organization'
  11787. PostOrganizationRequest:
  11788. type: object
  11789. properties:
  11790. name:
  11791. type: string
  11792. description:
  11793. type: string
  11794. required:
  11795. - name
  11796. PatchOrganizationRequest:
  11797. type: object
  11798. properties:
  11799. name:
  11800. type: string
  11801. description: New name to set on the organization
  11802. description:
  11803. type: string
  11804. description: New description to set on the organization
  11805. TemplateApply:
  11806. type: object
  11807. properties:
  11808. dryRun:
  11809. type: boolean
  11810. description: |
  11811. Only applies a dry run of the templates passed in the request.
  11812. - Validates the template and generates a resource diff and summary.
  11813. - Doesn't install templates or make changes to the InfluxDB instance.
  11814. orgID:
  11815. type: string
  11816. description: |
  11817. Organization ID.
  11818. InfluxDB applies templates to this organization.
  11819. The organization owns all resources created by the template.
  11820. To find your organization, see how to
  11821. [view organizations](https://docs.influxdata.com/influxdb/v2.3/organizations/view-orgs/).
  11822. stackID:
  11823. type: string
  11824. description: |
  11825. ID of the stack to update.
  11826. To apply templates to an existing stack in the organization, use the `stackID` parameter.
  11827. If you apply templates without providing a stack ID,
  11828. InfluxDB initializes a new stack with all new resources.
  11829. To find a stack ID, use the InfluxDB [`/api/v2/stacks` API endpoint](#operation/ListStacks) to list stacks.
  11830. #### Related guides
  11831. - [Stacks](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/stacks/)
  11832. - [View stacks](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/stacks/view/)
  11833. template:
  11834. type: object
  11835. description: |
  11836. A template object to apply.
  11837. A template object has a `contents` property
  11838. with an array of InfluxDB resource configurations.
  11839. Pass `template` to apply only one template object.
  11840. If you use `template`, you can't use the `templates` parameter.
  11841. If you want to apply multiple template objects, use `templates` instead.
  11842. properties:
  11843. contentType:
  11844. type: string
  11845. sources:
  11846. type: array
  11847. items:
  11848. type: string
  11849. contents:
  11850. $ref: '#/components/schemas/Template'
  11851. templates:
  11852. type: array
  11853. description: |
  11854. A list of template objects to apply.
  11855. A template object has a `contents` property
  11856. with an array of InfluxDB resource configurations.
  11857. Use the `templates` parameter to apply multiple template objects.
  11858. If you use `templates`, you can't use the `template` parameter.
  11859. items:
  11860. type: object
  11861. properties:
  11862. contentType:
  11863. type: string
  11864. sources:
  11865. type: array
  11866. items:
  11867. type: string
  11868. contents:
  11869. $ref: '#/components/schemas/Template'
  11870. envRefs:
  11871. type: object
  11872. description: |
  11873. An object with key-value pairs that map to **environment references** in templates.
  11874. Environment references in templates are `envRef` objects with an `envRef.key`
  11875. property.
  11876. To substitute a custom environment reference value when applying templates,
  11877. pass `envRefs` with the `envRef.key` and the value.
  11878. When you apply a template, InfluxDB replaces `envRef` objects in the template
  11879. with the values that you provide in the `envRefs` parameter.
  11880. For more examples, see how to [define environment references](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/use/#define-environment-references).
  11881. The following template fields may use environment references:
  11882. - `metadata.name`
  11883. - `spec.endpointName`
  11884. - `spec.associations.name`
  11885. For more information about including environment references in template fields, see how to
  11886. [include user-definable resource names](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/create/#include-user-definable-resource-names).
  11887. additionalProperties:
  11888. oneOf:
  11889. - type: string
  11890. - type: integer
  11891. - type: number
  11892. - type: boolean
  11893. secrets:
  11894. type: object
  11895. description: |
  11896. An object with key-value pairs that map to **secrets** in queries.
  11897. Queries may reference secrets stored in InfluxDB--for example,
  11898. the following Flux script retrieves `POSTGRES_USERNAME` and `POSTGRES_PASSWORD`
  11899. secrets and then uses them to connect to a PostgreSQL database:
  11900. ```js
  11901. import "sql"
  11902. import "influxdata/influxdb/secrets"
  11903. username = secrets.get(key: "POSTGRES_USERNAME")
  11904. password = secrets.get(key: "POSTGRES_PASSWORD")
  11905. sql.from(
  11906. driverName: "postgres",
  11907. dataSourceName: "postgresql://${username}:${password}@localhost:5432",
  11908. query: "SELECT * FROM example_table",
  11909. )
  11910. ```
  11911. To define secret values in your `/api/v2/templates/apply` request,
  11912. pass the `secrets` parameter with key-value pairs--for example:
  11913. ```json
  11914. {
  11915. ...
  11916. "secrets": {
  11917. "POSTGRES_USERNAME": "pguser",
  11918. "POSTGRES_PASSWORD": "foo"
  11919. }
  11920. ...
  11921. }
  11922. ```
  11923. InfluxDB stores the key-value pairs as secrets that you can access with `secrets.get()`.
  11924. Once stored, you can't view secret values in InfluxDB.
  11925. #### Related guides
  11926. - [How to pass secrets when installing a template](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/use/#pass-secrets-when-installing-a-template)
  11927. additionalProperties:
  11928. type: string
  11929. remotes:
  11930. type: array
  11931. description: |
  11932. A list of URLs for template files.
  11933. To apply a template manifest file located at a URL, pass `remotes`
  11934. with an array that contains the URL.
  11935. items:
  11936. type: object
  11937. properties:
  11938. url:
  11939. type: string
  11940. contentType:
  11941. type: string
  11942. required:
  11943. - url
  11944. actions:
  11945. type: array
  11946. description: |
  11947. A list of `action` objects.
  11948. Actions let you customize how InfluxDB applies templates in the request.
  11949. You can use the following actions to prevent creating or updating resources:
  11950. - A `skipKind` action skips template resources of a specified `kind`.
  11951. - A `skipResource` action skips template resources with a specified `metadata.name`
  11952. and `kind`.
  11953. items:
  11954. oneOf:
  11955. - type: object
  11956. properties:
  11957. action:
  11958. type: string
  11959. enum:
  11960. - skipKind
  11961. properties:
  11962. type: object
  11963. properties:
  11964. kind:
  11965. $ref: '#/components/schemas/TemplateKind'
  11966. required:
  11967. - kind
  11968. - type: object
  11969. properties:
  11970. action:
  11971. type: string
  11972. enum:
  11973. - skipResource
  11974. properties:
  11975. type: object
  11976. properties:
  11977. kind:
  11978. $ref: '#/components/schemas/TemplateKind'
  11979. resourceTemplateName:
  11980. type: string
  11981. required:
  11982. - kind
  11983. - resourceTemplateName
  11984. TemplateKind:
  11985. type: string
  11986. enum:
  11987. - Bucket
  11988. - Check
  11989. - CheckDeadman
  11990. - CheckThreshold
  11991. - Dashboard
  11992. - Label
  11993. - NotificationEndpoint
  11994. - NotificationEndpointHTTP
  11995. - NotificationEndpointPagerDuty
  11996. - NotificationEndpointSlack
  11997. - NotificationRule
  11998. - Task
  11999. - Telegraf
  12000. - Variable
  12001. TemplateExportByID:
  12002. type: object
  12003. properties:
  12004. stackID:
  12005. type: string
  12006. orgIDs:
  12007. type: array
  12008. items:
  12009. type: object
  12010. properties:
  12011. orgID:
  12012. type: string
  12013. resourceFilters:
  12014. type: object
  12015. properties:
  12016. byLabel:
  12017. type: array
  12018. items:
  12019. type: string
  12020. byResourceKind:
  12021. type: array
  12022. items:
  12023. $ref: '#/components/schemas/TemplateKind'
  12024. resources:
  12025. type: array
  12026. items:
  12027. type: object
  12028. properties:
  12029. id:
  12030. type: string
  12031. kind:
  12032. $ref: '#/components/schemas/TemplateKind'
  12033. name:
  12034. type: string
  12035. description: 'if defined with id, name is used for resource exported by id. if defined independently, resources strictly matching name are exported'
  12036. required:
  12037. - id
  12038. - kind
  12039. TemplateExportByName:
  12040. type: object
  12041. properties:
  12042. stackID:
  12043. type: string
  12044. orgIDs:
  12045. type: array
  12046. items:
  12047. type: object
  12048. properties:
  12049. orgID:
  12050. type: string
  12051. resourceFilters:
  12052. type: object
  12053. properties:
  12054. byLabel:
  12055. type: array
  12056. items:
  12057. type: string
  12058. byResourceKind:
  12059. type: array
  12060. items:
  12061. $ref: '#/components/schemas/TemplateKind'
  12062. resources:
  12063. type: array
  12064. items:
  12065. type: object
  12066. properties:
  12067. kind:
  12068. $ref: '#/components/schemas/TemplateKind'
  12069. name:
  12070. type: string
  12071. required:
  12072. - name
  12073. - kind
  12074. Template:
  12075. type: array
  12076. items:
  12077. type: object
  12078. description: |
  12079. A template entry.
  12080. Defines an InfluxDB resource in a template.
  12081. properties:
  12082. apiVersion:
  12083. type: string
  12084. example: influxdata.com/v2alpha1
  12085. kind:
  12086. $ref: '#/components/schemas/TemplateKind'
  12087. metadata:
  12088. type: object
  12089. description: |
  12090. Metadata properties used for the resource when the template is applied.
  12091. properties:
  12092. name:
  12093. type: string
  12094. spec:
  12095. type: object
  12096. description: |
  12097. Configuration properties used for the resource when the template is applied.
  12098. Key-value pairs map to the specification for the resource.
  12099. The following code samples show `spec` configurations for template resources:
  12100. - A bucket:
  12101. ```json
  12102. { "spec": {
  12103. "name": "iot_center",
  12104. "retentionRules": [{
  12105. "everySeconds": 2.592e+06,
  12106. "type": "expire"
  12107. }]
  12108. }
  12109. }
  12110. ```
  12111. - A variable:
  12112. ```json
  12113. { "spec": {
  12114. "language": "flux",
  12115. "name": "Node_Service",
  12116. "query": "import \"influxdata/influxdb/v1\"\r\nv1.tagValues(bucket: \"iot_center\",
  12117. tag: \"service\")",
  12118. "type": "query"
  12119. }
  12120. }
  12121. ```
  12122. TemplateEnvReferences:
  12123. type: array
  12124. items:
  12125. type: object
  12126. properties:
  12127. resourceField:
  12128. type: string
  12129. description: Field the environment reference corresponds too
  12130. envRefKey:
  12131. type: string
  12132. description: Key identified as environment reference and is the key identified in the template
  12133. value:
  12134. description: Value provided to fulfill reference
  12135. nullable: true
  12136. oneOf:
  12137. - type: string
  12138. - type: integer
  12139. - type: number
  12140. - type: boolean
  12141. defaultValue:
  12142. description: Default value that will be provided for the reference when no value is provided
  12143. nullable: true
  12144. oneOf:
  12145. - type: string
  12146. - type: integer
  12147. - type: number
  12148. - type: boolean
  12149. required:
  12150. - resourceField
  12151. - envRefKey
  12152. TemplateSummary:
  12153. type: object
  12154. properties:
  12155. sources:
  12156. type: array
  12157. items:
  12158. type: string
  12159. stackID:
  12160. type: string
  12161. summary:
  12162. type: object
  12163. properties:
  12164. buckets:
  12165. type: array
  12166. items:
  12167. type: object
  12168. properties:
  12169. id:
  12170. type: string
  12171. orgID:
  12172. type: string
  12173. kind:
  12174. $ref: '#/components/schemas/TemplateKind'
  12175. templateMetaName:
  12176. type: string
  12177. name:
  12178. type: string
  12179. description:
  12180. type: string
  12181. retentionPeriod:
  12182. type: integer
  12183. labelAssociations:
  12184. type: array
  12185. items:
  12186. $ref: '#/components/schemas/TemplateSummaryLabel'
  12187. envReferences:
  12188. $ref: '#/components/schemas/TemplateEnvReferences'
  12189. checks:
  12190. type: array
  12191. items:
  12192. allOf:
  12193. - $ref: '#/components/schemas/CheckDiscriminator'
  12194. - type: object
  12195. properties:
  12196. kind:
  12197. $ref: '#/components/schemas/TemplateKind'
  12198. templateMetaName:
  12199. type: string
  12200. labelAssociations:
  12201. type: array
  12202. items:
  12203. $ref: '#/components/schemas/TemplateSummaryLabel'
  12204. envReferences:
  12205. $ref: '#/components/schemas/TemplateEnvReferences'
  12206. dashboards:
  12207. type: array
  12208. items:
  12209. type: object
  12210. properties:
  12211. id:
  12212. type: string
  12213. orgID:
  12214. type: string
  12215. kind:
  12216. $ref: '#/components/schemas/TemplateKind'
  12217. templateMetaName:
  12218. type: string
  12219. name:
  12220. type: string
  12221. description:
  12222. type: string
  12223. labelAssociations:
  12224. type: array
  12225. items:
  12226. $ref: '#/components/schemas/TemplateSummaryLabel'
  12227. charts:
  12228. type: array
  12229. items:
  12230. $ref: '#/components/schemas/TemplateChart'
  12231. envReferences:
  12232. $ref: '#/components/schemas/TemplateEnvReferences'
  12233. labels:
  12234. type: array
  12235. items:
  12236. $ref: '#/components/schemas/TemplateSummaryLabel'
  12237. labelMappings:
  12238. type: array
  12239. items:
  12240. type: object
  12241. properties:
  12242. status:
  12243. type: string
  12244. resourceTemplateMetaName:
  12245. type: string
  12246. resourceName:
  12247. type: string
  12248. resourceID:
  12249. type: string
  12250. resourceType:
  12251. type: string
  12252. labelTemplateMetaName:
  12253. type: string
  12254. labelName:
  12255. type: string
  12256. labelID:
  12257. type: string
  12258. missingEnvRefs:
  12259. type: array
  12260. items:
  12261. type: string
  12262. missingSecrets:
  12263. type: array
  12264. items:
  12265. type: string
  12266. notificationEndpoints:
  12267. type: array
  12268. items:
  12269. allOf:
  12270. - $ref: '#/components/schemas/NotificationEndpointDiscriminator'
  12271. - type: object
  12272. properties:
  12273. kind:
  12274. $ref: '#/components/schemas/TemplateKind'
  12275. templateMetaName:
  12276. type: string
  12277. labelAssociations:
  12278. type: array
  12279. items:
  12280. $ref: '#/components/schemas/TemplateSummaryLabel'
  12281. envReferences:
  12282. $ref: '#/components/schemas/TemplateEnvReferences'
  12283. notificationRules:
  12284. type: array
  12285. items:
  12286. type: object
  12287. properties:
  12288. kind:
  12289. $ref: '#/components/schemas/TemplateKind'
  12290. templateMetaName:
  12291. type: string
  12292. name:
  12293. type: string
  12294. description:
  12295. type: string
  12296. endpointTemplateMetaName:
  12297. type: string
  12298. endpointID:
  12299. type: string
  12300. endpointType:
  12301. type: string
  12302. every:
  12303. type: string
  12304. offset:
  12305. type: string
  12306. messageTemplate:
  12307. type: string
  12308. status:
  12309. type: string
  12310. statusRules:
  12311. type: array
  12312. items:
  12313. type: object
  12314. properties:
  12315. currentLevel:
  12316. type: string
  12317. previousLevel:
  12318. type: string
  12319. tagRules:
  12320. type: array
  12321. items:
  12322. type: object
  12323. properties:
  12324. key:
  12325. type: string
  12326. value:
  12327. type: string
  12328. operator:
  12329. type: string
  12330. labelAssociations:
  12331. type: array
  12332. items:
  12333. $ref: '#/components/schemas/TemplateSummaryLabel'
  12334. envReferences:
  12335. $ref: '#/components/schemas/TemplateEnvReferences'
  12336. tasks:
  12337. type: array
  12338. items:
  12339. type: object
  12340. properties:
  12341. kind:
  12342. $ref: '#/components/schemas/TemplateKind'
  12343. templateMetaName:
  12344. type: string
  12345. id:
  12346. type: string
  12347. name:
  12348. type: string
  12349. cron:
  12350. type: string
  12351. description:
  12352. type: string
  12353. every:
  12354. type: string
  12355. offset:
  12356. type: string
  12357. query:
  12358. type: string
  12359. status:
  12360. type: string
  12361. envReferences:
  12362. $ref: '#/components/schemas/TemplateEnvReferences'
  12363. telegrafConfigs:
  12364. type: array
  12365. items:
  12366. allOf:
  12367. - $ref: '#/components/schemas/TelegrafRequest'
  12368. - type: object
  12369. properties:
  12370. kind:
  12371. $ref: '#/components/schemas/TemplateKind'
  12372. templateMetaName:
  12373. type: string
  12374. labelAssociations:
  12375. type: array
  12376. items:
  12377. $ref: '#/components/schemas/TemplateSummaryLabel'
  12378. envReferences:
  12379. $ref: '#/components/schemas/TemplateEnvReferences'
  12380. variables:
  12381. type: array
  12382. items:
  12383. type: object
  12384. properties:
  12385. kind:
  12386. $ref: '#/components/schemas/TemplateKind'
  12387. templateMetaName:
  12388. type: string
  12389. id:
  12390. type: string
  12391. orgID:
  12392. type: string
  12393. name:
  12394. type: string
  12395. description:
  12396. type: string
  12397. arguments:
  12398. $ref: '#/components/schemas/VariableProperties'
  12399. labelAssociations:
  12400. type: array
  12401. items:
  12402. $ref: '#/components/schemas/TemplateSummaryLabel'
  12403. envReferences:
  12404. $ref: '#/components/schemas/TemplateEnvReferences'
  12405. diff:
  12406. type: object
  12407. properties:
  12408. buckets:
  12409. type: array
  12410. items:
  12411. type: object
  12412. properties:
  12413. kind:
  12414. $ref: '#/components/schemas/TemplateKind'
  12415. stateStatus:
  12416. type: string
  12417. id:
  12418. type: string
  12419. templateMetaName:
  12420. type: string
  12421. new:
  12422. type: object
  12423. properties:
  12424. name:
  12425. type: string
  12426. description:
  12427. type: string
  12428. retentionRules:
  12429. $ref: '#/components/schemas/RetentionRules'
  12430. old:
  12431. type: object
  12432. properties:
  12433. name:
  12434. type: string
  12435. description:
  12436. type: string
  12437. retentionRules:
  12438. $ref: '#/components/schemas/RetentionRules'
  12439. checks:
  12440. type: array
  12441. items:
  12442. type: object
  12443. properties:
  12444. kind:
  12445. $ref: '#/components/schemas/TemplateKind'
  12446. stateStatus:
  12447. type: string
  12448. id:
  12449. type: string
  12450. templateMetaName:
  12451. type: string
  12452. new:
  12453. $ref: '#/components/schemas/CheckDiscriminator'
  12454. old:
  12455. $ref: '#/components/schemas/CheckDiscriminator'
  12456. dashboards:
  12457. type: array
  12458. items:
  12459. type: object
  12460. properties:
  12461. stateStatus:
  12462. type: string
  12463. id:
  12464. type: string
  12465. kind:
  12466. $ref: '#/components/schemas/TemplateKind'
  12467. templateMetaName:
  12468. type: string
  12469. new:
  12470. type: object
  12471. properties:
  12472. name:
  12473. type: string
  12474. description:
  12475. type: string
  12476. charts:
  12477. type: array
  12478. items:
  12479. $ref: '#/components/schemas/TemplateChart'
  12480. old:
  12481. type: object
  12482. properties:
  12483. name:
  12484. type: string
  12485. description:
  12486. type: string
  12487. charts:
  12488. type: array
  12489. items:
  12490. $ref: '#/components/schemas/TemplateChart'
  12491. labels:
  12492. type: array
  12493. items:
  12494. type: object
  12495. properties:
  12496. stateStatus:
  12497. type: string
  12498. kind:
  12499. $ref: '#/components/schemas/TemplateKind'
  12500. id:
  12501. type: string
  12502. templateMetaName:
  12503. type: string
  12504. new:
  12505. type: object
  12506. properties:
  12507. name:
  12508. type: string
  12509. color:
  12510. type: string
  12511. description:
  12512. type: string
  12513. old:
  12514. type: object
  12515. properties:
  12516. name:
  12517. type: string
  12518. color:
  12519. type: string
  12520. description:
  12521. type: string
  12522. labelMappings:
  12523. type: array
  12524. items:
  12525. type: object
  12526. properties:
  12527. status:
  12528. type: string
  12529. resourceType:
  12530. type: string
  12531. resourceID:
  12532. type: string
  12533. resourceTemplateMetaName:
  12534. type: string
  12535. resourceName:
  12536. type: string
  12537. labelID:
  12538. type: string
  12539. labelTemplateMetaName:
  12540. type: string
  12541. labelName:
  12542. type: string
  12543. notificationEndpoints:
  12544. type: array
  12545. items:
  12546. type: object
  12547. properties:
  12548. kind:
  12549. $ref: '#/components/schemas/TemplateKind'
  12550. stateStatus:
  12551. type: string
  12552. id:
  12553. type: string
  12554. templateMetaName:
  12555. type: string
  12556. new:
  12557. $ref: '#/components/schemas/NotificationEndpointDiscriminator'
  12558. old:
  12559. $ref: '#/components/schemas/NotificationEndpointDiscriminator'
  12560. notificationRules:
  12561. type: array
  12562. items:
  12563. type: object
  12564. properties:
  12565. kind:
  12566. $ref: '#/components/schemas/TemplateKind'
  12567. stateStatus:
  12568. type: string
  12569. id:
  12570. type: string
  12571. templateMetaName:
  12572. type: string
  12573. new:
  12574. type: object
  12575. properties:
  12576. name:
  12577. type: string
  12578. description:
  12579. type: string
  12580. endpointName:
  12581. type: string
  12582. endpointID:
  12583. type: string
  12584. endpointType:
  12585. type: string
  12586. every:
  12587. type: string
  12588. offset:
  12589. type: string
  12590. messageTemplate:
  12591. type: string
  12592. status:
  12593. type: string
  12594. statusRules:
  12595. type: array
  12596. items:
  12597. type: object
  12598. properties:
  12599. currentLevel:
  12600. type: string
  12601. previousLevel:
  12602. type: string
  12603. tagRules:
  12604. type: array
  12605. items:
  12606. type: object
  12607. properties:
  12608. key:
  12609. type: string
  12610. value:
  12611. type: string
  12612. operator:
  12613. type: string
  12614. old:
  12615. type: object
  12616. properties:
  12617. name:
  12618. type: string
  12619. description:
  12620. type: string
  12621. endpointName:
  12622. type: string
  12623. endpointID:
  12624. type: string
  12625. endpointType:
  12626. type: string
  12627. every:
  12628. type: string
  12629. offset:
  12630. type: string
  12631. messageTemplate:
  12632. type: string
  12633. status:
  12634. type: string
  12635. statusRules:
  12636. type: array
  12637. items:
  12638. type: object
  12639. properties:
  12640. currentLevel:
  12641. type: string
  12642. previousLevel:
  12643. type: string
  12644. tagRules:
  12645. type: array
  12646. items:
  12647. type: object
  12648. properties:
  12649. key:
  12650. type: string
  12651. value:
  12652. type: string
  12653. operator:
  12654. type: string
  12655. tasks:
  12656. type: array
  12657. items:
  12658. type: object
  12659. properties:
  12660. kind:
  12661. $ref: '#/components/schemas/TemplateKind'
  12662. stateStatus:
  12663. type: string
  12664. id:
  12665. type: string
  12666. templateMetaName:
  12667. type: string
  12668. new:
  12669. type: object
  12670. properties:
  12671. name:
  12672. type: string
  12673. cron:
  12674. type: string
  12675. description:
  12676. type: string
  12677. every:
  12678. type: string
  12679. offset:
  12680. type: string
  12681. query:
  12682. type: string
  12683. status:
  12684. type: string
  12685. old:
  12686. type: object
  12687. properties:
  12688. name:
  12689. type: string
  12690. cron:
  12691. type: string
  12692. description:
  12693. type: string
  12694. every:
  12695. type: string
  12696. offset:
  12697. type: string
  12698. query:
  12699. type: string
  12700. status:
  12701. type: string
  12702. telegrafConfigs:
  12703. type: array
  12704. items:
  12705. type: object
  12706. properties:
  12707. kind:
  12708. $ref: '#/components/schemas/TemplateKind'
  12709. stateStatus:
  12710. type: string
  12711. id:
  12712. type: string
  12713. templateMetaName:
  12714. type: string
  12715. new:
  12716. $ref: '#/components/schemas/TelegrafRequest'
  12717. old:
  12718. $ref: '#/components/schemas/TelegrafRequest'
  12719. variables:
  12720. type: array
  12721. items:
  12722. type: object
  12723. properties:
  12724. kind:
  12725. $ref: '#/components/schemas/TemplateKind'
  12726. stateStatus:
  12727. type: string
  12728. id:
  12729. type: string
  12730. templateMetaName:
  12731. type: string
  12732. new:
  12733. type: object
  12734. properties:
  12735. name:
  12736. type: string
  12737. description:
  12738. type: string
  12739. args:
  12740. $ref: '#/components/schemas/VariableProperties'
  12741. old:
  12742. type: object
  12743. properties:
  12744. name:
  12745. type: string
  12746. description:
  12747. type: string
  12748. args:
  12749. $ref: '#/components/schemas/VariableProperties'
  12750. errors:
  12751. type: array
  12752. items:
  12753. type: object
  12754. properties:
  12755. kind:
  12756. $ref: '#/components/schemas/TemplateKind'
  12757. reason:
  12758. type: string
  12759. fields:
  12760. type: array
  12761. items:
  12762. type: string
  12763. indexes:
  12764. type: array
  12765. items:
  12766. type: integer
  12767. TemplateSummaryLabel:
  12768. type: object
  12769. properties:
  12770. id:
  12771. type: string
  12772. orgID:
  12773. type: string
  12774. kind:
  12775. $ref: '#/components/schemas/TemplateKind'
  12776. templateMetaName:
  12777. type: string
  12778. name:
  12779. type: string
  12780. properties:
  12781. type: object
  12782. properties:
  12783. color:
  12784. type: string
  12785. description:
  12786. type: string
  12787. envReferences:
  12788. $ref: '#/components/schemas/TemplateEnvReferences'
  12789. TemplateChart:
  12790. type: object
  12791. properties:
  12792. xPos:
  12793. type: integer
  12794. yPos:
  12795. type: integer
  12796. height:
  12797. type: integer
  12798. width:
  12799. type: integer
  12800. properties:
  12801. $ref: '#/components/schemas/ViewProperties'
  12802. Stack:
  12803. type: object
  12804. properties:
  12805. id:
  12806. type: string
  12807. orgID:
  12808. type: string
  12809. createdAt:
  12810. type: string
  12811. format: date-time
  12812. readOnly: true
  12813. events:
  12814. type: array
  12815. items:
  12816. type: object
  12817. properties:
  12818. eventType:
  12819. type: string
  12820. name:
  12821. type: string
  12822. description:
  12823. type: string
  12824. sources:
  12825. type: array
  12826. items:
  12827. type: string
  12828. resources:
  12829. type: array
  12830. items:
  12831. type: object
  12832. properties:
  12833. apiVersion:
  12834. type: string
  12835. resourceID:
  12836. type: string
  12837. kind:
  12838. $ref: '#/components/schemas/TemplateKind'
  12839. templateMetaName:
  12840. type: string
  12841. associations:
  12842. type: array
  12843. items:
  12844. type: object
  12845. properties:
  12846. kind:
  12847. $ref: '#/components/schemas/TemplateKind'
  12848. metaName:
  12849. type: string
  12850. links:
  12851. type: object
  12852. properties:
  12853. self:
  12854. type: string
  12855. urls:
  12856. type: array
  12857. items:
  12858. type: string
  12859. updatedAt:
  12860. type: string
  12861. format: date-time
  12862. readOnly: true
  12863. Runs:
  12864. type: object
  12865. properties:
  12866. links:
  12867. $ref: '#/components/schemas/Links'
  12868. runs:
  12869. type: array
  12870. items:
  12871. $ref: '#/components/schemas/Run'
  12872. Run:
  12873. properties:
  12874. id:
  12875. readOnly: true
  12876. type: string
  12877. taskID:
  12878. readOnly: true
  12879. type: string
  12880. status:
  12881. readOnly: true
  12882. type: string
  12883. enum:
  12884. - scheduled
  12885. - started
  12886. - failed
  12887. - success
  12888. - canceled
  12889. scheduledFor:
  12890. description: 'The time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp) used for the run''s `now` option.'
  12891. type: string
  12892. format: date-time
  12893. log:
  12894. description: An array of logs associated with the run.
  12895. type: array
  12896. readOnly: true
  12897. items:
  12898. $ref: '#/components/schemas/LogEvent'
  12899. flux:
  12900. description: Flux used for the task
  12901. type: string
  12902. readOnly: true
  12903. startedAt:
  12904. readOnly: true
  12905. description: 'The time ([RFC3339Nano date/time format](https://go.dev/src/time/format.go)) the run started executing.'
  12906. type: string
  12907. format: date-time
  12908. example: '2006-01-02T15:04:05.999999999Z07:00'
  12909. finishedAt:
  12910. readOnly: true
  12911. description: 'The time ([RFC3339Nano date/time format](https://go.dev/src/time/format.go)) the run finished executing.'
  12912. type: string
  12913. format: date-time
  12914. example: '2006-01-02T15:04:05.999999999Z07:00'
  12915. requestedAt:
  12916. readOnly: true
  12917. description: 'The time ([RFC3339Nano date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339nano-timestamp)) the run was manually requested.'
  12918. type: string
  12919. format: date-time
  12920. example: '2006-01-02T15:04:05.999999999Z07:00'
  12921. links:
  12922. type: object
  12923. readOnly: true
  12924. example:
  12925. self: /api/v2/tasks/1/runs/1
  12926. task: /api/v2/tasks/1
  12927. retry: /api/v2/tasks/1/runs/1/retry
  12928. properties:
  12929. self:
  12930. type: string
  12931. format: uri
  12932. task:
  12933. type: string
  12934. format: uri
  12935. retry:
  12936. type: string
  12937. format: uri
  12938. RunManually:
  12939. properties:
  12940. scheduledFor:
  12941. nullable: true
  12942. description: |
  12943. The time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)
  12944. used for the run's `now` option.
  12945. Default is the server _now_ time.
  12946. type: string
  12947. format: date-time
  12948. TaskStatusType:
  12949. type: string
  12950. enum:
  12951. - active
  12952. - inactive
  12953. description: |
  12954. `inactive` cancels scheduled runs and prevents manual runs of the task.
  12955. UserResponse:
  12956. properties:
  12957. id:
  12958. readOnly: true
  12959. type: string
  12960. description: |
  12961. The ID of the user.
  12962. name:
  12963. type: string
  12964. description: |
  12965. The name of the user.
  12966. status:
  12967. description: |
  12968. The status of a user. An inactive user won't have access to resources.
  12969. default: active
  12970. type: string
  12971. enum:
  12972. - active
  12973. - inactive
  12974. links:
  12975. type: object
  12976. readOnly: true
  12977. example:
  12978. self: /api/v2/users/1
  12979. properties:
  12980. self:
  12981. type: string
  12982. format: uri
  12983. required:
  12984. - name
  12985. Flags:
  12986. type: object
  12987. additionalProperties: true
  12988. ResourceMember:
  12989. allOf:
  12990. - $ref: '#/components/schemas/UserResponse'
  12991. - type: object
  12992. properties:
  12993. role:
  12994. type: string
  12995. default: member
  12996. enum:
  12997. - member
  12998. ResourceMembers:
  12999. type: object
  13000. properties:
  13001. links:
  13002. type: object
  13003. properties:
  13004. self:
  13005. type: string
  13006. format: uri
  13007. users:
  13008. type: array
  13009. items:
  13010. $ref: '#/components/schemas/ResourceMember'
  13011. ResourceOwner:
  13012. allOf:
  13013. - $ref: '#/components/schemas/UserResponse'
  13014. - type: object
  13015. properties:
  13016. role:
  13017. type: string
  13018. default: owner
  13019. enum:
  13020. - owner
  13021. ResourceOwners:
  13022. type: object
  13023. properties:
  13024. links:
  13025. type: object
  13026. properties:
  13027. self:
  13028. type: string
  13029. format: uri
  13030. users:
  13031. type: array
  13032. items:
  13033. $ref: '#/components/schemas/ResourceOwner'
  13034. FluxSuggestions:
  13035. type: object
  13036. properties:
  13037. funcs:
  13038. type: array
  13039. items:
  13040. $ref: '#/components/schemas/FluxSuggestion'
  13041. FluxSuggestion:
  13042. type: object
  13043. properties:
  13044. name:
  13045. type: string
  13046. params:
  13047. type: object
  13048. additionalProperties:
  13049. type: string
  13050. Routes:
  13051. properties:
  13052. authorizations:
  13053. type: string
  13054. format: uri
  13055. buckets:
  13056. type: string
  13057. format: uri
  13058. dashboards:
  13059. type: string
  13060. format: uri
  13061. external:
  13062. type: object
  13063. properties:
  13064. statusFeed:
  13065. type: string
  13066. format: uri
  13067. variables:
  13068. type: string
  13069. format: uri
  13070. me:
  13071. type: string
  13072. format: uri
  13073. flags:
  13074. type: string
  13075. format: uri
  13076. orgs:
  13077. type: string
  13078. format: uri
  13079. query:
  13080. type: object
  13081. properties:
  13082. self:
  13083. type: string
  13084. format: uri
  13085. ast:
  13086. type: string
  13087. format: uri
  13088. analyze:
  13089. type: string
  13090. format: uri
  13091. suggestions:
  13092. type: string
  13093. format: uri
  13094. setup:
  13095. type: string
  13096. format: uri
  13097. signin:
  13098. type: string
  13099. format: uri
  13100. signout:
  13101. type: string
  13102. format: uri
  13103. sources:
  13104. type: string
  13105. format: uri
  13106. system:
  13107. type: object
  13108. properties:
  13109. metrics:
  13110. type: string
  13111. format: uri
  13112. debug:
  13113. type: string
  13114. format: uri
  13115. health:
  13116. type: string
  13117. format: uri
  13118. tasks:
  13119. type: string
  13120. format: uri
  13121. telegrafs:
  13122. type: string
  13123. format: uri
  13124. users:
  13125. type: string
  13126. format: uri
  13127. write:
  13128. type: string
  13129. format: uri
  13130. Error:
  13131. properties:
  13132. code:
  13133. description: code is the machine-readable error code.
  13134. readOnly: true
  13135. type: string
  13136. enum:
  13137. - internal error
  13138. - not found
  13139. - conflict
  13140. - invalid
  13141. - unprocessable entity
  13142. - empty value
  13143. - unavailable
  13144. - forbidden
  13145. - too many requests
  13146. - unauthorized
  13147. - method not allowed
  13148. - request too large
  13149. - unsupported media type
  13150. message:
  13151. readOnly: true
  13152. description: Human-readable message.
  13153. type: string
  13154. op:
  13155. readOnly: true
  13156. description: Describes the logical code operation when the error occurred. Useful for debugging.
  13157. type: string
  13158. err:
  13159. readOnly: true
  13160. description: Stack of errors that occurred during processing of the request. Useful for debugging.
  13161. type: string
  13162. required:
  13163. - code
  13164. LineProtocolError:
  13165. properties:
  13166. code:
  13167. description: Code is the machine-readable error code.
  13168. readOnly: true
  13169. type: string
  13170. enum:
  13171. - internal error
  13172. - not found
  13173. - conflict
  13174. - invalid
  13175. - empty value
  13176. - unavailable
  13177. message:
  13178. readOnly: true
  13179. description: Human-readable message.
  13180. type: string
  13181. op:
  13182. readOnly: true
  13183. description: Describes the logical code operation when the error occurred. Useful for debugging.
  13184. type: string
  13185. err:
  13186. readOnly: true
  13187. description: Stack of errors that occurred during processing of the request. Useful for debugging.
  13188. type: string
  13189. line:
  13190. readOnly: true
  13191. description: First line in the request body that contains malformed data.
  13192. type: integer
  13193. format: int32
  13194. required:
  13195. - code
  13196. LineProtocolLengthError:
  13197. properties:
  13198. code:
  13199. description: Code is the machine-readable error code.
  13200. readOnly: true
  13201. type: string
  13202. enum:
  13203. - invalid
  13204. message:
  13205. readOnly: true
  13206. description: Human-readable message.
  13207. type: string
  13208. required:
  13209. - code
  13210. - message
  13211. Field:
  13212. type: object
  13213. properties:
  13214. value:
  13215. description: value is the value of the field. Meaning of the value is implied by the `type` key
  13216. type: string
  13217. type:
  13218. description: '`type` describes the field type. `func` is a function. `field` is a field reference.'
  13219. type: string
  13220. enum:
  13221. - func
  13222. - field
  13223. - integer
  13224. - number
  13225. - regex
  13226. - wildcard
  13227. alias:
  13228. description: Alias overrides the field name in the returned response. Applies only if type is `func`
  13229. type: string
  13230. args:
  13231. description: Args are the arguments to the function
  13232. type: array
  13233. items:
  13234. $ref: '#/components/schemas/Field'
  13235. BuilderConfig:
  13236. type: object
  13237. properties:
  13238. buckets:
  13239. type: array
  13240. items:
  13241. type: string
  13242. tags:
  13243. type: array
  13244. items:
  13245. $ref: '#/components/schemas/BuilderTagsType'
  13246. functions:
  13247. type: array
  13248. items:
  13249. $ref: '#/components/schemas/BuilderFunctionsType'
  13250. aggregateWindow:
  13251. type: object
  13252. properties:
  13253. period:
  13254. type: string
  13255. fillValues:
  13256. type: boolean
  13257. BuilderTagsType:
  13258. type: object
  13259. properties:
  13260. key:
  13261. type: string
  13262. values:
  13263. type: array
  13264. items:
  13265. type: string
  13266. aggregateFunctionType:
  13267. $ref: '#/components/schemas/BuilderAggregateFunctionType'
  13268. BuilderAggregateFunctionType:
  13269. type: string
  13270. enum:
  13271. - filter
  13272. - group
  13273. BuilderFunctionsType:
  13274. type: object
  13275. properties:
  13276. name:
  13277. type: string
  13278. DashboardQuery:
  13279. type: object
  13280. properties:
  13281. text:
  13282. type: string
  13283. description: The text of the Flux query.
  13284. editMode:
  13285. $ref: '#/components/schemas/QueryEditMode'
  13286. name:
  13287. type: string
  13288. builderConfig:
  13289. $ref: '#/components/schemas/BuilderConfig'
  13290. QueryEditMode:
  13291. type: string
  13292. enum:
  13293. - builder
  13294. - advanced
  13295. Axis:
  13296. type: object
  13297. description: Axis used in a visualization.
  13298. properties:
  13299. bounds:
  13300. type: array
  13301. minItems: 0
  13302. maxItems: 2
  13303. description: 'The extents of the axis in the form [lower, upper]. Clients determine whether bounds are inclusive or exclusive of their limits.'
  13304. items:
  13305. type: string
  13306. label:
  13307. description: Description of the axis.
  13308. type: string
  13309. prefix:
  13310. description: Label prefix for formatting axis values.
  13311. type: string
  13312. suffix:
  13313. description: Label suffix for formatting axis values.
  13314. type: string
  13315. base:
  13316. description: Radix for formatting axis values.
  13317. type: string
  13318. enum:
  13319. - ''
  13320. - '2'
  13321. - '10'
  13322. scale:
  13323. $ref: '#/components/schemas/AxisScale'
  13324. AxisScale:
  13325. description: 'Scale is the axis formatting scale. Supported: "log", "linear"'
  13326. type: string
  13327. enum:
  13328. - log
  13329. - linear
  13330. DashboardColor:
  13331. type: object
  13332. description: Defines an encoding of data value into color space.
  13333. required:
  13334. - id
  13335. - type
  13336. - hex
  13337. - name
  13338. - value
  13339. properties:
  13340. id:
  13341. description: The unique ID of the view color.
  13342. type: string
  13343. type:
  13344. description: Type is how the color is used.
  13345. type: string
  13346. enum:
  13347. - min
  13348. - max
  13349. - threshold
  13350. - scale
  13351. - text
  13352. - background
  13353. hex:
  13354. description: The hex number of the color
  13355. type: string
  13356. maxLength: 7
  13357. minLength: 7
  13358. name:
  13359. description: The user-facing name of the hex color.
  13360. type: string
  13361. value:
  13362. description: The data value mapped to this color.
  13363. type: number
  13364. format: float
  13365. RenamableField:
  13366. description: Describes a field that can be renamed and made visible or invisible.
  13367. type: object
  13368. properties:
  13369. internalName:
  13370. description: The calculated name of a field.
  13371. readOnly: true
  13372. type: string
  13373. displayName:
  13374. description: The name that a field is renamed to by the user.
  13375. type: string
  13376. visible:
  13377. description: Indicates whether this field should be visible on the table.
  13378. type: boolean
  13379. XYViewProperties:
  13380. type: object
  13381. required:
  13382. - type
  13383. - geom
  13384. - queries
  13385. - shape
  13386. - axes
  13387. - colors
  13388. - note
  13389. - showNoteWhenEmpty
  13390. - position
  13391. properties:
  13392. adaptiveZoomHide:
  13393. type: boolean
  13394. timeFormat:
  13395. type: string
  13396. type:
  13397. type: string
  13398. enum:
  13399. - xy
  13400. queries:
  13401. type: array
  13402. items:
  13403. $ref: '#/components/schemas/DashboardQuery'
  13404. colors:
  13405. description: Colors define color encoding of data into a visualization
  13406. type: array
  13407. items:
  13408. $ref: '#/components/schemas/DashboardColor'
  13409. colorMapping:
  13410. description: An object that contains information about the color mapping
  13411. $ref: '#/components/schemas/ColorMapping'
  13412. shape:
  13413. type: string
  13414. enum:
  13415. - chronograf-v2
  13416. note:
  13417. type: string
  13418. showNoteWhenEmpty:
  13419. description: 'If true, will display note when empty'
  13420. type: boolean
  13421. axes:
  13422. $ref: '#/components/schemas/Axes'
  13423. staticLegend:
  13424. $ref: '#/components/schemas/StaticLegend'
  13425. xColumn:
  13426. type: string
  13427. generateXAxisTicks:
  13428. type: array
  13429. items:
  13430. type: string
  13431. xTotalTicks:
  13432. type: integer
  13433. xTickStart:
  13434. type: number
  13435. format: float
  13436. xTickStep:
  13437. type: number
  13438. format: float
  13439. yColumn:
  13440. type: string
  13441. generateYAxisTicks:
  13442. type: array
  13443. items:
  13444. type: string
  13445. yTotalTicks:
  13446. type: integer
  13447. yTickStart:
  13448. type: number
  13449. format: float
  13450. yTickStep:
  13451. type: number
  13452. format: float
  13453. shadeBelow:
  13454. type: boolean
  13455. hoverDimension:
  13456. type: string
  13457. enum:
  13458. - auto
  13459. - x
  13460. - 'y'
  13461. - xy
  13462. position:
  13463. type: string
  13464. enum:
  13465. - overlaid
  13466. - stacked
  13467. geom:
  13468. $ref: '#/components/schemas/XYGeom'
  13469. legendColorizeRows:
  13470. type: boolean
  13471. legendHide:
  13472. type: boolean
  13473. legendOpacity:
  13474. type: number
  13475. format: float
  13476. legendOrientationThreshold:
  13477. type: integer
  13478. XYGeom:
  13479. type: string
  13480. enum:
  13481. - line
  13482. - step
  13483. - stacked
  13484. - bar
  13485. - monotoneX
  13486. - stepBefore
  13487. - stepAfter
  13488. BandViewProperties:
  13489. type: object
  13490. required:
  13491. - type
  13492. - geom
  13493. - queries
  13494. - shape
  13495. - axes
  13496. - colors
  13497. - note
  13498. - showNoteWhenEmpty
  13499. properties:
  13500. adaptiveZoomHide:
  13501. type: boolean
  13502. timeFormat:
  13503. type: string
  13504. type:
  13505. type: string
  13506. enum:
  13507. - band
  13508. queries:
  13509. type: array
  13510. items:
  13511. $ref: '#/components/schemas/DashboardQuery'
  13512. colors:
  13513. description: Colors define color encoding of data into a visualization
  13514. type: array
  13515. items:
  13516. $ref: '#/components/schemas/DashboardColor'
  13517. shape:
  13518. type: string
  13519. enum:
  13520. - chronograf-v2
  13521. note:
  13522. type: string
  13523. showNoteWhenEmpty:
  13524. description: 'If true, will display note when empty'
  13525. type: boolean
  13526. axes:
  13527. $ref: '#/components/schemas/Axes'
  13528. staticLegend:
  13529. $ref: '#/components/schemas/StaticLegend'
  13530. xColumn:
  13531. type: string
  13532. generateXAxisTicks:
  13533. type: array
  13534. items:
  13535. type: string
  13536. xTotalTicks:
  13537. type: integer
  13538. xTickStart:
  13539. type: number
  13540. format: float
  13541. xTickStep:
  13542. type: number
  13543. format: float
  13544. yColumn:
  13545. type: string
  13546. generateYAxisTicks:
  13547. type: array
  13548. items:
  13549. type: string
  13550. yTotalTicks:
  13551. type: integer
  13552. yTickStart:
  13553. type: number
  13554. format: float
  13555. yTickStep:
  13556. type: number
  13557. format: float
  13558. upperColumn:
  13559. type: string
  13560. mainColumn:
  13561. type: string
  13562. lowerColumn:
  13563. type: string
  13564. hoverDimension:
  13565. type: string
  13566. enum:
  13567. - auto
  13568. - x
  13569. - 'y'
  13570. - xy
  13571. geom:
  13572. $ref: '#/components/schemas/XYGeom'
  13573. legendColorizeRows:
  13574. type: boolean
  13575. legendHide:
  13576. type: boolean
  13577. legendOpacity:
  13578. type: number
  13579. format: float
  13580. legendOrientationThreshold:
  13581. type: integer
  13582. LinePlusSingleStatProperties:
  13583. type: object
  13584. required:
  13585. - type
  13586. - queries
  13587. - shape
  13588. - axes
  13589. - colors
  13590. - note
  13591. - showNoteWhenEmpty
  13592. - prefix
  13593. - suffix
  13594. - decimalPlaces
  13595. - position
  13596. properties:
  13597. adaptiveZoomHide:
  13598. type: boolean
  13599. timeFormat:
  13600. type: string
  13601. type:
  13602. type: string
  13603. enum:
  13604. - line-plus-single-stat
  13605. queries:
  13606. type: array
  13607. items:
  13608. $ref: '#/components/schemas/DashboardQuery'
  13609. colors:
  13610. description: Colors define color encoding of data into a visualization
  13611. type: array
  13612. items:
  13613. $ref: '#/components/schemas/DashboardColor'
  13614. shape:
  13615. type: string
  13616. enum:
  13617. - chronograf-v2
  13618. note:
  13619. type: string
  13620. showNoteWhenEmpty:
  13621. description: 'If true, will display note when empty'
  13622. type: boolean
  13623. axes:
  13624. $ref: '#/components/schemas/Axes'
  13625. staticLegend:
  13626. $ref: '#/components/schemas/StaticLegend'
  13627. xColumn:
  13628. type: string
  13629. generateXAxisTicks:
  13630. type: array
  13631. items:
  13632. type: string
  13633. xTotalTicks:
  13634. type: integer
  13635. xTickStart:
  13636. type: number
  13637. format: float
  13638. xTickStep:
  13639. type: number
  13640. format: float
  13641. yColumn:
  13642. type: string
  13643. generateYAxisTicks:
  13644. type: array
  13645. items:
  13646. type: string
  13647. yTotalTicks:
  13648. type: integer
  13649. yTickStart:
  13650. type: number
  13651. format: float
  13652. yTickStep:
  13653. type: number
  13654. format: float
  13655. shadeBelow:
  13656. type: boolean
  13657. hoverDimension:
  13658. type: string
  13659. enum:
  13660. - auto
  13661. - x
  13662. - 'y'
  13663. - xy
  13664. position:
  13665. type: string
  13666. enum:
  13667. - overlaid
  13668. - stacked
  13669. prefix:
  13670. type: string
  13671. suffix:
  13672. type: string
  13673. decimalPlaces:
  13674. $ref: '#/components/schemas/DecimalPlaces'
  13675. legendColorizeRows:
  13676. type: boolean
  13677. legendHide:
  13678. type: boolean
  13679. legendOpacity:
  13680. type: number
  13681. format: float
  13682. legendOrientationThreshold:
  13683. type: integer
  13684. MosaicViewProperties:
  13685. type: object
  13686. required:
  13687. - type
  13688. - queries
  13689. - colors
  13690. - shape
  13691. - note
  13692. - showNoteWhenEmpty
  13693. - xColumn
  13694. - ySeriesColumns
  13695. - fillColumns
  13696. - xDomain
  13697. - yDomain
  13698. - xAxisLabel
  13699. - yAxisLabel
  13700. - xPrefix
  13701. - yPrefix
  13702. - xSuffix
  13703. - ySuffix
  13704. properties:
  13705. timeFormat:
  13706. type: string
  13707. type:
  13708. type: string
  13709. enum:
  13710. - mosaic
  13711. queries:
  13712. type: array
  13713. items:
  13714. $ref: '#/components/schemas/DashboardQuery'
  13715. colors:
  13716. description: Colors define color encoding of data into a visualization
  13717. type: array
  13718. items:
  13719. type: string
  13720. shape:
  13721. type: string
  13722. enum:
  13723. - chronograf-v2
  13724. note:
  13725. type: string
  13726. showNoteWhenEmpty:
  13727. description: 'If true, will display note when empty'
  13728. type: boolean
  13729. xColumn:
  13730. type: string
  13731. generateXAxisTicks:
  13732. type: array
  13733. items:
  13734. type: string
  13735. xTotalTicks:
  13736. type: integer
  13737. xTickStart:
  13738. type: number
  13739. format: float
  13740. xTickStep:
  13741. type: number
  13742. format: float
  13743. yLabelColumnSeparator:
  13744. type: string
  13745. yLabelColumns:
  13746. type: array
  13747. items:
  13748. type: string
  13749. ySeriesColumns:
  13750. type: array
  13751. items:
  13752. type: string
  13753. fillColumns:
  13754. type: array
  13755. items:
  13756. type: string
  13757. xDomain:
  13758. type: array
  13759. items:
  13760. type: number
  13761. maxItems: 2
  13762. yDomain:
  13763. type: array
  13764. items:
  13765. type: number
  13766. maxItems: 2
  13767. xAxisLabel:
  13768. type: string
  13769. yAxisLabel:
  13770. type: string
  13771. xPrefix:
  13772. type: string
  13773. xSuffix:
  13774. type: string
  13775. yPrefix:
  13776. type: string
  13777. ySuffix:
  13778. type: string
  13779. hoverDimension:
  13780. type: string
  13781. enum:
  13782. - auto
  13783. - x
  13784. - 'y'
  13785. - xy
  13786. legendColorizeRows:
  13787. type: boolean
  13788. legendHide:
  13789. type: boolean
  13790. legendOpacity:
  13791. type: number
  13792. format: float
  13793. legendOrientationThreshold:
  13794. type: integer
  13795. ScatterViewProperties:
  13796. type: object
  13797. required:
  13798. - type
  13799. - queries
  13800. - colors
  13801. - shape
  13802. - note
  13803. - showNoteWhenEmpty
  13804. - xColumn
  13805. - yColumn
  13806. - fillColumns
  13807. - symbolColumns
  13808. - xDomain
  13809. - yDomain
  13810. - xAxisLabel
  13811. - yAxisLabel
  13812. - xPrefix
  13813. - yPrefix
  13814. - xSuffix
  13815. - ySuffix
  13816. properties:
  13817. adaptiveZoomHide:
  13818. type: boolean
  13819. timeFormat:
  13820. type: string
  13821. type:
  13822. type: string
  13823. enum:
  13824. - scatter
  13825. queries:
  13826. type: array
  13827. items:
  13828. $ref: '#/components/schemas/DashboardQuery'
  13829. colors:
  13830. description: Colors define color encoding of data into a visualization
  13831. type: array
  13832. items:
  13833. type: string
  13834. shape:
  13835. type: string
  13836. enum:
  13837. - chronograf-v2
  13838. note:
  13839. type: string
  13840. showNoteWhenEmpty:
  13841. description: 'If true, will display note when empty'
  13842. type: boolean
  13843. xColumn:
  13844. type: string
  13845. generateXAxisTicks:
  13846. type: array
  13847. items:
  13848. type: string
  13849. xTotalTicks:
  13850. type: integer
  13851. xTickStart:
  13852. type: number
  13853. format: float
  13854. xTickStep:
  13855. type: number
  13856. format: float
  13857. yColumn:
  13858. type: string
  13859. generateYAxisTicks:
  13860. type: array
  13861. items:
  13862. type: string
  13863. yTotalTicks:
  13864. type: integer
  13865. yTickStart:
  13866. type: number
  13867. format: float
  13868. yTickStep:
  13869. type: number
  13870. format: float
  13871. fillColumns:
  13872. type: array
  13873. items:
  13874. type: string
  13875. symbolColumns:
  13876. type: array
  13877. items:
  13878. type: string
  13879. xDomain:
  13880. type: array
  13881. items:
  13882. type: number
  13883. maxItems: 2
  13884. yDomain:
  13885. type: array
  13886. items:
  13887. type: number
  13888. maxItems: 2
  13889. xAxisLabel:
  13890. type: string
  13891. yAxisLabel:
  13892. type: string
  13893. xPrefix:
  13894. type: string
  13895. xSuffix:
  13896. type: string
  13897. yPrefix:
  13898. type: string
  13899. ySuffix:
  13900. type: string
  13901. legendColorizeRows:
  13902. type: boolean
  13903. legendHide:
  13904. type: boolean
  13905. legendOpacity:
  13906. type: number
  13907. format: float
  13908. legendOrientationThreshold:
  13909. type: integer
  13910. HeatmapViewProperties:
  13911. type: object
  13912. required:
  13913. - type
  13914. - queries
  13915. - colors
  13916. - shape
  13917. - note
  13918. - showNoteWhenEmpty
  13919. - xColumn
  13920. - yColumn
  13921. - xDomain
  13922. - yDomain
  13923. - xAxisLabel
  13924. - yAxisLabel
  13925. - xPrefix
  13926. - yPrefix
  13927. - xSuffix
  13928. - ySuffix
  13929. - binSize
  13930. properties:
  13931. adaptiveZoomHide:
  13932. type: boolean
  13933. timeFormat:
  13934. type: string
  13935. type:
  13936. type: string
  13937. enum:
  13938. - heatmap
  13939. queries:
  13940. type: array
  13941. items:
  13942. $ref: '#/components/schemas/DashboardQuery'
  13943. colors:
  13944. description: Colors define color encoding of data into a visualization
  13945. type: array
  13946. items:
  13947. type: string
  13948. shape:
  13949. type: string
  13950. enum:
  13951. - chronograf-v2
  13952. note:
  13953. type: string
  13954. showNoteWhenEmpty:
  13955. description: 'If true, will display note when empty'
  13956. type: boolean
  13957. xColumn:
  13958. type: string
  13959. generateXAxisTicks:
  13960. type: array
  13961. items:
  13962. type: string
  13963. xTotalTicks:
  13964. type: integer
  13965. xTickStart:
  13966. type: number
  13967. format: float
  13968. xTickStep:
  13969. type: number
  13970. format: float
  13971. yColumn:
  13972. type: string
  13973. generateYAxisTicks:
  13974. type: array
  13975. items:
  13976. type: string
  13977. yTotalTicks:
  13978. type: integer
  13979. yTickStart:
  13980. type: number
  13981. format: float
  13982. yTickStep:
  13983. type: number
  13984. format: float
  13985. xDomain:
  13986. type: array
  13987. items:
  13988. type: number
  13989. maxItems: 2
  13990. yDomain:
  13991. type: array
  13992. items:
  13993. type: number
  13994. maxItems: 2
  13995. xAxisLabel:
  13996. type: string
  13997. yAxisLabel:
  13998. type: string
  13999. xPrefix:
  14000. type: string
  14001. xSuffix:
  14002. type: string
  14003. yPrefix:
  14004. type: string
  14005. ySuffix:
  14006. type: string
  14007. binSize:
  14008. type: number
  14009. legendColorizeRows:
  14010. type: boolean
  14011. legendHide:
  14012. type: boolean
  14013. legendOpacity:
  14014. type: number
  14015. format: float
  14016. legendOrientationThreshold:
  14017. type: integer
  14018. SingleStatViewProperties:
  14019. type: object
  14020. required:
  14021. - type
  14022. - queries
  14023. - colors
  14024. - shape
  14025. - note
  14026. - showNoteWhenEmpty
  14027. - prefix
  14028. - tickPrefix
  14029. - suffix
  14030. - tickSuffix
  14031. - decimalPlaces
  14032. properties:
  14033. type:
  14034. type: string
  14035. enum:
  14036. - single-stat
  14037. queries:
  14038. type: array
  14039. items:
  14040. $ref: '#/components/schemas/DashboardQuery'
  14041. colors:
  14042. description: Colors define color encoding of data into a visualization
  14043. type: array
  14044. items:
  14045. $ref: '#/components/schemas/DashboardColor'
  14046. shape:
  14047. type: string
  14048. enum:
  14049. - chronograf-v2
  14050. note:
  14051. type: string
  14052. showNoteWhenEmpty:
  14053. description: 'If true, will display note when empty'
  14054. type: boolean
  14055. prefix:
  14056. type: string
  14057. tickPrefix:
  14058. type: string
  14059. suffix:
  14060. type: string
  14061. tickSuffix:
  14062. type: string
  14063. staticLegend:
  14064. $ref: '#/components/schemas/StaticLegend'
  14065. decimalPlaces:
  14066. $ref: '#/components/schemas/DecimalPlaces'
  14067. HistogramViewProperties:
  14068. type: object
  14069. required:
  14070. - type
  14071. - queries
  14072. - colors
  14073. - shape
  14074. - note
  14075. - showNoteWhenEmpty
  14076. - xColumn
  14077. - fillColumns
  14078. - xDomain
  14079. - xAxisLabel
  14080. - position
  14081. - binCount
  14082. properties:
  14083. type:
  14084. type: string
  14085. enum:
  14086. - histogram
  14087. queries:
  14088. type: array
  14089. items:
  14090. $ref: '#/components/schemas/DashboardQuery'
  14091. colors:
  14092. description: Colors define color encoding of data into a visualization
  14093. type: array
  14094. items:
  14095. $ref: '#/components/schemas/DashboardColor'
  14096. shape:
  14097. type: string
  14098. enum:
  14099. - chronograf-v2
  14100. note:
  14101. type: string
  14102. showNoteWhenEmpty:
  14103. description: 'If true, will display note when empty'
  14104. type: boolean
  14105. xColumn:
  14106. type: string
  14107. fillColumns:
  14108. type: array
  14109. items:
  14110. type: string
  14111. xDomain:
  14112. type: array
  14113. items:
  14114. type: number
  14115. format: float
  14116. xAxisLabel:
  14117. type: string
  14118. position:
  14119. type: string
  14120. enum:
  14121. - overlaid
  14122. - stacked
  14123. binCount:
  14124. type: integer
  14125. legendColorizeRows:
  14126. type: boolean
  14127. legendHide:
  14128. type: boolean
  14129. legendOpacity:
  14130. type: number
  14131. format: float
  14132. legendOrientationThreshold:
  14133. type: integer
  14134. GaugeViewProperties:
  14135. type: object
  14136. required:
  14137. - type
  14138. - queries
  14139. - colors
  14140. - shape
  14141. - note
  14142. - showNoteWhenEmpty
  14143. - prefix
  14144. - tickPrefix
  14145. - suffix
  14146. - tickSuffix
  14147. - decimalPlaces
  14148. properties:
  14149. type:
  14150. type: string
  14151. enum:
  14152. - gauge
  14153. queries:
  14154. type: array
  14155. items:
  14156. $ref: '#/components/schemas/DashboardQuery'
  14157. colors:
  14158. description: Colors define color encoding of data into a visualization
  14159. type: array
  14160. items:
  14161. $ref: '#/components/schemas/DashboardColor'
  14162. shape:
  14163. type: string
  14164. enum:
  14165. - chronograf-v2
  14166. note:
  14167. type: string
  14168. showNoteWhenEmpty:
  14169. description: 'If true, will display note when empty'
  14170. type: boolean
  14171. prefix:
  14172. type: string
  14173. tickPrefix:
  14174. type: string
  14175. suffix:
  14176. type: string
  14177. tickSuffix:
  14178. type: string
  14179. decimalPlaces:
  14180. $ref: '#/components/schemas/DecimalPlaces'
  14181. TableViewProperties:
  14182. type: object
  14183. required:
  14184. - type
  14185. - queries
  14186. - colors
  14187. - shape
  14188. - note
  14189. - showNoteWhenEmpty
  14190. - tableOptions
  14191. - fieldOptions
  14192. - timeFormat
  14193. - decimalPlaces
  14194. properties:
  14195. type:
  14196. type: string
  14197. enum:
  14198. - table
  14199. queries:
  14200. type: array
  14201. items:
  14202. $ref: '#/components/schemas/DashboardQuery'
  14203. colors:
  14204. description: Colors define color encoding of data into a visualization
  14205. type: array
  14206. items:
  14207. $ref: '#/components/schemas/DashboardColor'
  14208. shape:
  14209. type: string
  14210. enum:
  14211. - chronograf-v2
  14212. note:
  14213. type: string
  14214. showNoteWhenEmpty:
  14215. description: 'If true, will display note when empty'
  14216. type: boolean
  14217. tableOptions:
  14218. type: object
  14219. properties:
  14220. verticalTimeAxis:
  14221. description: verticalTimeAxis describes the orientation of the table by indicating whether the time axis will be displayed vertically
  14222. type: boolean
  14223. sortBy:
  14224. $ref: '#/components/schemas/RenamableField'
  14225. wrapping:
  14226. description: Wrapping describes the text wrapping style to be used in table views
  14227. type: string
  14228. enum:
  14229. - truncate
  14230. - wrap
  14231. - single-line
  14232. fixFirstColumn:
  14233. description: fixFirstColumn indicates whether the first column of the table should be locked
  14234. type: boolean
  14235. fieldOptions:
  14236. description: fieldOptions represent the fields retrieved by the query with customization options
  14237. type: array
  14238. items:
  14239. $ref: '#/components/schemas/RenamableField'
  14240. timeFormat:
  14241. description: timeFormat describes the display format for time values according to moment.js date formatting
  14242. type: string
  14243. decimalPlaces:
  14244. $ref: '#/components/schemas/DecimalPlaces'
  14245. SimpleTableViewProperties:
  14246. type: object
  14247. required:
  14248. - type
  14249. - showAll
  14250. - queries
  14251. - shape
  14252. - note
  14253. - showNoteWhenEmpty
  14254. properties:
  14255. type:
  14256. type: string
  14257. enum:
  14258. - simple-table
  14259. showAll:
  14260. type: boolean
  14261. queries:
  14262. type: array
  14263. items:
  14264. $ref: '#/components/schemas/DashboardQuery'
  14265. shape:
  14266. type: string
  14267. enum:
  14268. - chronograf-v2
  14269. note:
  14270. type: string
  14271. showNoteWhenEmpty:
  14272. description: 'If true, will display note when empty'
  14273. type: boolean
  14274. MarkdownViewProperties:
  14275. type: object
  14276. required:
  14277. - type
  14278. - shape
  14279. - note
  14280. properties:
  14281. type:
  14282. type: string
  14283. enum:
  14284. - markdown
  14285. shape:
  14286. type: string
  14287. enum:
  14288. - chronograf-v2
  14289. note:
  14290. type: string
  14291. CheckViewProperties:
  14292. type: object
  14293. required:
  14294. - type
  14295. - shape
  14296. - checkID
  14297. - queries
  14298. - colors
  14299. properties:
  14300. adaptiveZoomHide:
  14301. type: boolean
  14302. type:
  14303. type: string
  14304. enum:
  14305. - check
  14306. shape:
  14307. type: string
  14308. enum:
  14309. - chronograf-v2
  14310. checkID:
  14311. type: string
  14312. check:
  14313. $ref: '#/components/schemas/Check'
  14314. queries:
  14315. type: array
  14316. items:
  14317. $ref: '#/components/schemas/DashboardQuery'
  14318. colors:
  14319. description: Colors define color encoding of data into a visualization
  14320. type: array
  14321. items:
  14322. $ref: '#/components/schemas/DashboardColor'
  14323. legendColorizeRows:
  14324. type: boolean
  14325. legendHide:
  14326. type: boolean
  14327. legendOpacity:
  14328. type: number
  14329. format: float
  14330. legendOrientationThreshold:
  14331. type: integer
  14332. GeoViewLayer:
  14333. type: object
  14334. oneOf:
  14335. - $ref: '#/components/schemas/GeoCircleViewLayer'
  14336. - $ref: '#/components/schemas/GeoHeatMapViewLayer'
  14337. - $ref: '#/components/schemas/GeoPointMapViewLayer'
  14338. - $ref: '#/components/schemas/GeoTrackMapViewLayer'
  14339. GeoViewLayerProperties:
  14340. type: object
  14341. required:
  14342. - type
  14343. properties:
  14344. type:
  14345. type: string
  14346. enum:
  14347. - heatmap
  14348. - circleMap
  14349. - pointMap
  14350. - trackMap
  14351. GeoCircleViewLayer:
  14352. allOf:
  14353. - $ref: '#/components/schemas/GeoViewLayerProperties'
  14354. - type: object
  14355. required:
  14356. - radiusField
  14357. - radiusDimension
  14358. - colorField
  14359. - colorDimension
  14360. - colors
  14361. properties:
  14362. radiusField:
  14363. type: string
  14364. description: Radius field
  14365. radiusDimension:
  14366. $ref: '#/components/schemas/Axis'
  14367. colorField:
  14368. type: string
  14369. description: Circle color field
  14370. colorDimension:
  14371. $ref: '#/components/schemas/Axis'
  14372. colors:
  14373. description: Colors define color encoding of data into a visualization
  14374. type: array
  14375. items:
  14376. $ref: '#/components/schemas/DashboardColor'
  14377. radius:
  14378. description: Maximum radius size in pixels
  14379. type: integer
  14380. interpolateColors:
  14381. description: Interpolate circle color based on displayed value
  14382. type: boolean
  14383. GeoPointMapViewLayer:
  14384. allOf:
  14385. - $ref: '#/components/schemas/GeoViewLayerProperties'
  14386. - type: object
  14387. required:
  14388. - colorField
  14389. - colorDimension
  14390. - colors
  14391. properties:
  14392. colorField:
  14393. type: string
  14394. description: Marker color field
  14395. colorDimension:
  14396. $ref: '#/components/schemas/Axis'
  14397. colors:
  14398. description: Colors define color encoding of data into a visualization
  14399. type: array
  14400. items:
  14401. $ref: '#/components/schemas/DashboardColor'
  14402. isClustered:
  14403. description: Cluster close markers together
  14404. type: boolean
  14405. tooltipColumns:
  14406. description: An array for which columns to display in tooltip
  14407. type: array
  14408. items:
  14409. type: string
  14410. GeoTrackMapViewLayer:
  14411. allOf:
  14412. - $ref: '#/components/schemas/GeoViewLayerProperties'
  14413. - type: object
  14414. required:
  14415. - trackWidth
  14416. - speed
  14417. - randomColors
  14418. - trackPointVisualization
  14419. properties:
  14420. trackWidth:
  14421. description: Width of the track
  14422. type: integer
  14423. speed:
  14424. description: Speed of the track animation
  14425. type: integer
  14426. randomColors:
  14427. description: Assign different colors to different tracks
  14428. type: boolean
  14429. colors:
  14430. description: Colors define color encoding of data into a visualization
  14431. type: array
  14432. items:
  14433. $ref: '#/components/schemas/DashboardColor'
  14434. GeoHeatMapViewLayer:
  14435. allOf:
  14436. - $ref: '#/components/schemas/GeoViewLayerProperties'
  14437. - type: object
  14438. required:
  14439. - intensityField
  14440. - intensityDimension
  14441. - radius
  14442. - blur
  14443. - colors
  14444. properties:
  14445. intensityField:
  14446. type: string
  14447. description: Intensity field
  14448. intensityDimension:
  14449. $ref: '#/components/schemas/Axis'
  14450. radius:
  14451. description: Radius size in pixels
  14452. type: integer
  14453. blur:
  14454. description: Blur for heatmap points
  14455. type: integer
  14456. colors:
  14457. description: Colors define color encoding of data into a visualization
  14458. type: array
  14459. items:
  14460. $ref: '#/components/schemas/DashboardColor'
  14461. GeoViewProperties:
  14462. type: object
  14463. required:
  14464. - type
  14465. - shape
  14466. - queries
  14467. - note
  14468. - showNoteWhenEmpty
  14469. - center
  14470. - zoom
  14471. - allowPanAndZoom
  14472. - detectCoordinateFields
  14473. - layers
  14474. properties:
  14475. type:
  14476. type: string
  14477. enum:
  14478. - geo
  14479. queries:
  14480. type: array
  14481. items:
  14482. $ref: '#/components/schemas/DashboardQuery'
  14483. shape:
  14484. type: string
  14485. enum:
  14486. - chronograf-v2
  14487. center:
  14488. description: Coordinates of the center of the map
  14489. type: object
  14490. required:
  14491. - lat
  14492. - lon
  14493. properties:
  14494. lat:
  14495. description: Latitude of the center of the map
  14496. type: number
  14497. format: double
  14498. lon:
  14499. description: Longitude of the center of the map
  14500. type: number
  14501. format: double
  14502. zoom:
  14503. description: Zoom level used for initial display of the map
  14504. type: number
  14505. format: double
  14506. minimum: 1
  14507. maximum: 28
  14508. allowPanAndZoom:
  14509. description: 'If true, map zoom and pan controls are enabled on the dashboard view'
  14510. type: boolean
  14511. default: true
  14512. detectCoordinateFields:
  14513. description: 'If true, search results get automatically regroupped so that lon,lat and value are treated as columns'
  14514. type: boolean
  14515. default: true
  14516. useS2CellID:
  14517. description: 'If true, S2 column is used to calculate lat/lon'
  14518. type: boolean
  14519. s2Column:
  14520. description: String to define the column
  14521. type: string
  14522. latLonColumns:
  14523. $ref: '#/components/schemas/LatLonColumns'
  14524. mapStyle:
  14525. description: 'Define map type - regular, satellite etc.'
  14526. type: string
  14527. note:
  14528. type: string
  14529. showNoteWhenEmpty:
  14530. description: 'If true, will display note when empty'
  14531. type: boolean
  14532. colors:
  14533. description: Colors define color encoding of data into a visualization
  14534. type: array
  14535. items:
  14536. $ref: '#/components/schemas/DashboardColor'
  14537. layers:
  14538. description: List of individual layers shown in the map
  14539. type: array
  14540. items:
  14541. $ref: '#/components/schemas/GeoViewLayer'
  14542. LatLonColumns:
  14543. description: Object type to define lat/lon columns
  14544. type: object
  14545. required:
  14546. - lat
  14547. - lon
  14548. properties:
  14549. lat:
  14550. $ref: '#/components/schemas/LatLonColumn'
  14551. lon:
  14552. $ref: '#/components/schemas/LatLonColumn'
  14553. LatLonColumn:
  14554. description: Object type for key and column definitions
  14555. type: object
  14556. required:
  14557. - key
  14558. - column
  14559. properties:
  14560. key:
  14561. description: Key to determine whether the column is tag/field
  14562. type: string
  14563. column:
  14564. description: Column to look up Lat/Lon
  14565. type: string
  14566. Axes:
  14567. description: The viewport for a View's visualizations
  14568. type: object
  14569. required:
  14570. - x
  14571. - 'y'
  14572. properties:
  14573. x:
  14574. $ref: '#/components/schemas/Axis'
  14575. 'y':
  14576. $ref: '#/components/schemas/Axis'
  14577. StaticLegend:
  14578. description: StaticLegend represents the options specific to the static legend
  14579. type: object
  14580. properties:
  14581. colorizeRows:
  14582. type: boolean
  14583. heightRatio:
  14584. type: number
  14585. format: float
  14586. show:
  14587. type: boolean
  14588. opacity:
  14589. type: number
  14590. format: float
  14591. orientationThreshold:
  14592. type: integer
  14593. valueAxis:
  14594. type: string
  14595. widthRatio:
  14596. type: number
  14597. format: float
  14598. DecimalPlaces:
  14599. description: 'Indicates whether decimal places should be enforced, and how many digits it should show.'
  14600. type: object
  14601. properties:
  14602. isEnforced:
  14603. description: Indicates whether decimal point setting should be enforced
  14604. type: boolean
  14605. digits:
  14606. description: The number of digits after decimal to display
  14607. type: integer
  14608. format: int32
  14609. ConstantVariableProperties:
  14610. properties:
  14611. type:
  14612. type: string
  14613. enum:
  14614. - constant
  14615. values:
  14616. type: array
  14617. items:
  14618. type: string
  14619. MapVariableProperties:
  14620. properties:
  14621. type:
  14622. type: string
  14623. enum:
  14624. - map
  14625. values:
  14626. type: object
  14627. additionalProperties:
  14628. type: string
  14629. QueryVariableProperties:
  14630. properties:
  14631. type:
  14632. type: string
  14633. enum:
  14634. - query
  14635. values:
  14636. type: object
  14637. properties:
  14638. query:
  14639. type: string
  14640. language:
  14641. type: string
  14642. VariableProperties:
  14643. type: object
  14644. oneOf:
  14645. - $ref: '#/components/schemas/QueryVariableProperties'
  14646. - $ref: '#/components/schemas/ConstantVariableProperties'
  14647. - $ref: '#/components/schemas/MapVariableProperties'
  14648. ViewProperties:
  14649. oneOf:
  14650. - $ref: '#/components/schemas/LinePlusSingleStatProperties'
  14651. - $ref: '#/components/schemas/XYViewProperties'
  14652. - $ref: '#/components/schemas/SingleStatViewProperties'
  14653. - $ref: '#/components/schemas/HistogramViewProperties'
  14654. - $ref: '#/components/schemas/GaugeViewProperties'
  14655. - $ref: '#/components/schemas/TableViewProperties'
  14656. - $ref: '#/components/schemas/SimpleTableViewProperties'
  14657. - $ref: '#/components/schemas/MarkdownViewProperties'
  14658. - $ref: '#/components/schemas/CheckViewProperties'
  14659. - $ref: '#/components/schemas/ScatterViewProperties'
  14660. - $ref: '#/components/schemas/HeatmapViewProperties'
  14661. - $ref: '#/components/schemas/MosaicViewProperties'
  14662. - $ref: '#/components/schemas/BandViewProperties'
  14663. - $ref: '#/components/schemas/GeoViewProperties'
  14664. View:
  14665. required:
  14666. - name
  14667. - properties
  14668. properties:
  14669. links:
  14670. type: object
  14671. readOnly: true
  14672. properties:
  14673. self:
  14674. type: string
  14675. id:
  14676. readOnly: true
  14677. type: string
  14678. name:
  14679. type: string
  14680. properties:
  14681. $ref: '#/components/schemas/ViewProperties'
  14682. Views:
  14683. type: object
  14684. properties:
  14685. links:
  14686. type: object
  14687. properties:
  14688. self:
  14689. type: string
  14690. views:
  14691. type: array
  14692. items:
  14693. $ref: '#/components/schemas/View'
  14694. CellUpdate:
  14695. type: object
  14696. properties:
  14697. x:
  14698. type: integer
  14699. format: int32
  14700. 'y':
  14701. type: integer
  14702. format: int32
  14703. w:
  14704. type: integer
  14705. format: int32
  14706. h:
  14707. type: integer
  14708. format: int32
  14709. CreateCell:
  14710. type: object
  14711. properties:
  14712. name:
  14713. type: string
  14714. x:
  14715. type: integer
  14716. format: int32
  14717. 'y':
  14718. type: integer
  14719. format: int32
  14720. w:
  14721. type: integer
  14722. format: int32
  14723. h:
  14724. type: integer
  14725. format: int32
  14726. usingView:
  14727. type: string
  14728. description: Makes a copy of the provided view.
  14729. AnalyzeQueryResponse:
  14730. type: object
  14731. properties:
  14732. errors:
  14733. type: array
  14734. items:
  14735. type: object
  14736. properties:
  14737. line:
  14738. type: integer
  14739. column:
  14740. type: integer
  14741. character:
  14742. type: integer
  14743. message:
  14744. type: string
  14745. CellWithViewProperties:
  14746. type: object
  14747. allOf:
  14748. - $ref: '#/components/schemas/Cell'
  14749. - type: object
  14750. properties:
  14751. name:
  14752. type: string
  14753. properties:
  14754. $ref: '#/components/schemas/ViewProperties'
  14755. Cell:
  14756. type: object
  14757. properties:
  14758. id:
  14759. type: string
  14760. links:
  14761. type: object
  14762. properties:
  14763. self:
  14764. type: string
  14765. view:
  14766. type: string
  14767. x:
  14768. type: integer
  14769. format: int32
  14770. 'y':
  14771. type: integer
  14772. format: int32
  14773. w:
  14774. type: integer
  14775. format: int32
  14776. h:
  14777. type: integer
  14778. format: int32
  14779. viewID:
  14780. type: string
  14781. description: The reference to a view from the views API.
  14782. CellsWithViewProperties:
  14783. type: array
  14784. items:
  14785. $ref: '#/components/schemas/CellWithViewProperties'
  14786. Cells:
  14787. type: array
  14788. items:
  14789. $ref: '#/components/schemas/Cell'
  14790. Secrets:
  14791. additionalProperties:
  14792. type: string
  14793. example:
  14794. apikey: abc123xyz
  14795. SecretKeys:
  14796. type: object
  14797. properties:
  14798. secrets:
  14799. type: array
  14800. items:
  14801. type: string
  14802. SecretKeysResponse:
  14803. allOf:
  14804. - $ref: '#/components/schemas/SecretKeys'
  14805. - type: object
  14806. properties:
  14807. links:
  14808. readOnly: true
  14809. type: object
  14810. properties:
  14811. self:
  14812. type: string
  14813. org:
  14814. type: string
  14815. CreateDashboardRequest:
  14816. properties:
  14817. orgID:
  14818. type: string
  14819. description: The ID of the organization that owns the dashboard.
  14820. name:
  14821. type: string
  14822. description: The user-facing name of the dashboard.
  14823. description:
  14824. type: string
  14825. description: The user-facing description of the dashboard.
  14826. required:
  14827. - orgID
  14828. - name
  14829. DashboardWithViewProperties:
  14830. type: object
  14831. allOf:
  14832. - $ref: '#/components/schemas/CreateDashboardRequest'
  14833. - type: object
  14834. properties:
  14835. links:
  14836. type: object
  14837. example:
  14838. self: /api/v2/dashboards/1
  14839. cells: /api/v2/dashboards/1/cells
  14840. owners: /api/v2/dashboards/1/owners
  14841. members: /api/v2/dashboards/1/members
  14842. labels: /api/v2/dashboards/1/labels
  14843. org: /api/v2/labels/1
  14844. properties:
  14845. self:
  14846. $ref: '#/components/schemas/Link'
  14847. cells:
  14848. $ref: '#/components/schemas/Link'
  14849. members:
  14850. $ref: '#/components/schemas/Link'
  14851. owners:
  14852. $ref: '#/components/schemas/Link'
  14853. labels:
  14854. $ref: '#/components/schemas/Link'
  14855. org:
  14856. $ref: '#/components/schemas/Link'
  14857. id:
  14858. readOnly: true
  14859. type: string
  14860. meta:
  14861. type: object
  14862. properties:
  14863. createdAt:
  14864. type: string
  14865. format: date-time
  14866. updatedAt:
  14867. type: string
  14868. format: date-time
  14869. cells:
  14870. $ref: '#/components/schemas/CellsWithViewProperties'
  14871. labels:
  14872. $ref: '#/components/schemas/Labels'
  14873. Dashboard:
  14874. type: object
  14875. allOf:
  14876. - $ref: '#/components/schemas/CreateDashboardRequest'
  14877. - type: object
  14878. properties:
  14879. links:
  14880. type: object
  14881. example:
  14882. self: /api/v2/dashboards/1
  14883. cells: /api/v2/dashboards/1/cells
  14884. owners: /api/v2/dashboards/1/owners
  14885. members: /api/v2/dashboards/1/members
  14886. labels: /api/v2/dashboards/1/labels
  14887. org: /api/v2/labels/1
  14888. properties:
  14889. self:
  14890. $ref: '#/components/schemas/Link'
  14891. cells:
  14892. $ref: '#/components/schemas/Link'
  14893. members:
  14894. $ref: '#/components/schemas/Link'
  14895. owners:
  14896. $ref: '#/components/schemas/Link'
  14897. labels:
  14898. $ref: '#/components/schemas/Link'
  14899. org:
  14900. $ref: '#/components/schemas/Link'
  14901. id:
  14902. readOnly: true
  14903. type: string
  14904. meta:
  14905. type: object
  14906. properties:
  14907. createdAt:
  14908. type: string
  14909. format: date-time
  14910. updatedAt:
  14911. type: string
  14912. format: date-time
  14913. cells:
  14914. $ref: '#/components/schemas/Cells'
  14915. labels:
  14916. $ref: '#/components/schemas/Labels'
  14917. Dashboards:
  14918. type: object
  14919. properties:
  14920. links:
  14921. $ref: '#/components/schemas/Links'
  14922. dashboards:
  14923. type: array
  14924. items:
  14925. $ref: '#/components/schemas/Dashboard'
  14926. TelegrafRequest:
  14927. type: object
  14928. properties:
  14929. name:
  14930. type: string
  14931. description:
  14932. type: string
  14933. metadata:
  14934. type: object
  14935. properties:
  14936. buckets:
  14937. type: array
  14938. items:
  14939. type: string
  14940. config:
  14941. type: string
  14942. orgID:
  14943. type: string
  14944. TelegrafPluginRequest:
  14945. type: object
  14946. properties:
  14947. name:
  14948. type: string
  14949. description:
  14950. type: string
  14951. plugins:
  14952. type: array
  14953. items:
  14954. type: object
  14955. properties:
  14956. type:
  14957. type: string
  14958. name:
  14959. type: string
  14960. alias:
  14961. type: string
  14962. description:
  14963. type: string
  14964. config:
  14965. type: string
  14966. metadata:
  14967. type: object
  14968. properties:
  14969. buckets:
  14970. type: array
  14971. items:
  14972. type: string
  14973. config:
  14974. type: string
  14975. orgID:
  14976. type: string
  14977. Telegraf:
  14978. type: object
  14979. allOf:
  14980. - $ref: '#/components/schemas/TelegrafRequest'
  14981. - type: object
  14982. properties:
  14983. id:
  14984. type: string
  14985. readOnly: true
  14986. links:
  14987. type: object
  14988. readOnly: true
  14989. example:
  14990. self: /api/v2/telegrafs/1
  14991. lables: /api/v2/telegrafs/1/labels
  14992. owners: /api/v2/telegrafs/1/owners
  14993. members: /api/v2/telegrafs/1/members
  14994. properties:
  14995. self:
  14996. $ref: '#/components/schemas/Link'
  14997. labels:
  14998. $ref: '#/components/schemas/Link'
  14999. members:
  15000. $ref: '#/components/schemas/Link'
  15001. owners:
  15002. $ref: '#/components/schemas/Link'
  15003. labels:
  15004. readOnly: true
  15005. $ref: '#/components/schemas/Labels'
  15006. Telegrafs:
  15007. type: object
  15008. properties:
  15009. configurations:
  15010. type: array
  15011. items:
  15012. $ref: '#/components/schemas/Telegraf'
  15013. TelegrafPlugin:
  15014. type: object
  15015. properties:
  15016. type:
  15017. type: string
  15018. name:
  15019. type: string
  15020. description:
  15021. type: string
  15022. config:
  15023. type: string
  15024. TelegrafPlugins:
  15025. type: object
  15026. properties:
  15027. version:
  15028. type: string
  15029. os:
  15030. type: string
  15031. plugins:
  15032. type: array
  15033. items:
  15034. $ref: '#/components/schemas/TelegrafPlugin'
  15035. IsOnboarding:
  15036. type: object
  15037. properties:
  15038. allowed:
  15039. description: |
  15040. If `true`, the InfluxDB instance hasn't had initial setup;
  15041. `false` otherwise.
  15042. type: boolean
  15043. PasswordResetBody:
  15044. properties:
  15045. password:
  15046. type: string
  15047. required:
  15048. - password
  15049. AddResourceMemberRequestBody:
  15050. type: object
  15051. properties:
  15052. id:
  15053. type: string
  15054. description: |
  15055. The ID of the user to add to the resource.
  15056. name:
  15057. type: string
  15058. description: |
  15059. The name of the user to add to the resource.
  15060. required:
  15061. - id
  15062. Ready:
  15063. type: object
  15064. properties:
  15065. status:
  15066. type: string
  15067. enum:
  15068. - ready
  15069. started:
  15070. type: string
  15071. format: date-time
  15072. example: '2019-03-13T10:09:33.891196-04:00'
  15073. up:
  15074. type: string
  15075. example: 14m45.911966424s
  15076. HealthCheck:
  15077. type: object
  15078. required:
  15079. - name
  15080. - status
  15081. properties:
  15082. name:
  15083. type: string
  15084. message:
  15085. type: string
  15086. checks:
  15087. type: array
  15088. items:
  15089. $ref: '#/components/schemas/HealthCheck'
  15090. status:
  15091. type: string
  15092. enum:
  15093. - pass
  15094. - fail
  15095. version:
  15096. type: string
  15097. commit:
  15098. type: string
  15099. Labels:
  15100. type: array
  15101. items:
  15102. $ref: '#/components/schemas/Label'
  15103. Label:
  15104. type: object
  15105. properties:
  15106. id:
  15107. readOnly: true
  15108. type: string
  15109. orgID:
  15110. readOnly: true
  15111. type: string
  15112. name:
  15113. type: string
  15114. properties:
  15115. type: object
  15116. additionalProperties:
  15117. type: string
  15118. description: |
  15119. Key-value pairs associated with this label.
  15120. To remove a property, send an update with an empty value (`""`) for the key.
  15121. example:
  15122. color: ffb3b3
  15123. description: this is a description
  15124. LabelCreateRequest:
  15125. type: object
  15126. required:
  15127. - orgID
  15128. - name
  15129. properties:
  15130. orgID:
  15131. type: string
  15132. name:
  15133. type: string
  15134. properties:
  15135. type: object
  15136. additionalProperties:
  15137. type: string
  15138. description: |
  15139. Key-value pairs associated with this label.
  15140. To remove a property, send an update with an empty value (`""`) for the key.
  15141. example:
  15142. color: ffb3b3
  15143. description: this is a description
  15144. LabelUpdate:
  15145. type: object
  15146. properties:
  15147. name:
  15148. type: string
  15149. properties:
  15150. type: object
  15151. additionalProperties:
  15152. type: string
  15153. description: |
  15154. Key-value pairs associated with this label.
  15155. To remove a property, send an update with an empty value (`""`) for the key.
  15156. example:
  15157. color: ffb3b3
  15158. description: this is a description
  15159. LabelMapping:
  15160. type: object
  15161. properties:
  15162. labelID:
  15163. description: |
  15164. Label ID.
  15165. The ID of the label to attach.
  15166. type: string
  15167. LabelsResponse:
  15168. type: object
  15169. properties:
  15170. labels:
  15171. $ref: '#/components/schemas/Labels'
  15172. links:
  15173. $ref: '#/components/schemas/Links'
  15174. LabelResponse:
  15175. type: object
  15176. properties:
  15177. label:
  15178. $ref: '#/components/schemas/Label'
  15179. links:
  15180. $ref: '#/components/schemas/Links'
  15181. ASTResponse:
  15182. description: Contains the AST for the supplied Flux query
  15183. type: object
  15184. properties:
  15185. ast:
  15186. $ref: '#/components/schemas/Package'
  15187. WritePrecision:
  15188. type: string
  15189. enum:
  15190. - ms
  15191. - s
  15192. - us
  15193. - ns
  15194. FluxResponse:
  15195. description: Rendered flux that backs the check or notification.
  15196. properties:
  15197. flux:
  15198. type: string
  15199. CheckPatch:
  15200. type: object
  15201. properties:
  15202. name:
  15203. type: string
  15204. description:
  15205. type: string
  15206. status:
  15207. type: string
  15208. enum:
  15209. - active
  15210. - inactive
  15211. CheckDiscriminator:
  15212. oneOf:
  15213. - $ref: '#/components/schemas/DeadmanCheck'
  15214. - $ref: '#/components/schemas/ThresholdCheck'
  15215. - $ref: '#/components/schemas/CustomCheck'
  15216. discriminator:
  15217. propertyName: type
  15218. mapping:
  15219. deadman: '#/components/schemas/DeadmanCheck'
  15220. threshold: '#/components/schemas/ThresholdCheck'
  15221. custom: '#/components/schemas/CustomCheck'
  15222. Check:
  15223. allOf:
  15224. - $ref: '#/components/schemas/CheckDiscriminator'
  15225. PostCheck:
  15226. allOf:
  15227. - $ref: '#/components/schemas/CheckDiscriminator'
  15228. Checks:
  15229. properties:
  15230. checks:
  15231. type: array
  15232. items:
  15233. $ref: '#/components/schemas/Check'
  15234. links:
  15235. $ref: '#/components/schemas/Links'
  15236. CheckBase:
  15237. properties:
  15238. id:
  15239. readOnly: true
  15240. type: string
  15241. name:
  15242. type: string
  15243. orgID:
  15244. description: The ID of the organization that owns this check.
  15245. type: string
  15246. taskID:
  15247. description: The ID of the task associated with this check.
  15248. type: string
  15249. ownerID:
  15250. description: The ID of creator used to create this check.
  15251. type: string
  15252. readOnly: true
  15253. createdAt:
  15254. type: string
  15255. format: date-time
  15256. readOnly: true
  15257. updatedAt:
  15258. type: string
  15259. format: date-time
  15260. readOnly: true
  15261. query:
  15262. $ref: '#/components/schemas/DashboardQuery'
  15263. status:
  15264. $ref: '#/components/schemas/TaskStatusType'
  15265. description:
  15266. description: An optional description of the check.
  15267. type: string
  15268. latestCompleted:
  15269. type: string
  15270. description: 'A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run.'
  15271. format: date-time
  15272. readOnly: true
  15273. lastRunStatus:
  15274. readOnly: true
  15275. type: string
  15276. enum:
  15277. - failed
  15278. - success
  15279. - canceled
  15280. lastRunError:
  15281. readOnly: true
  15282. type: string
  15283. labels:
  15284. $ref: '#/components/schemas/Labels'
  15285. links:
  15286. type: object
  15287. readOnly: true
  15288. example:
  15289. self: /api/v2/checks/1
  15290. labels: /api/v2/checks/1/labels
  15291. members: /api/v2/checks/1/members
  15292. owners: /api/v2/checks/1/owners
  15293. query: /api/v2/checks/1/query
  15294. properties:
  15295. self:
  15296. description: URL for this check
  15297. $ref: '#/components/schemas/Link'
  15298. labels:
  15299. description: URL to retrieve labels for this check
  15300. $ref: '#/components/schemas/Link'
  15301. members:
  15302. description: URL to retrieve members for this check
  15303. $ref: '#/components/schemas/Link'
  15304. owners:
  15305. description: URL to retrieve owners for this check
  15306. $ref: '#/components/schemas/Link'
  15307. query:
  15308. description: URL to retrieve flux script for this check
  15309. $ref: '#/components/schemas/Link'
  15310. required:
  15311. - name
  15312. - orgID
  15313. - query
  15314. ThresholdCheck:
  15315. allOf:
  15316. - $ref: '#/components/schemas/CheckBase'
  15317. - type: object
  15318. required:
  15319. - type
  15320. properties:
  15321. type:
  15322. type: string
  15323. enum:
  15324. - threshold
  15325. thresholds:
  15326. type: array
  15327. items:
  15328. $ref: '#/components/schemas/Threshold'
  15329. every:
  15330. description: Check repetition interval.
  15331. type: string
  15332. offset:
  15333. description: 'Duration to delay after the schedule, before executing check.'
  15334. type: string
  15335. tags:
  15336. description: List of tags to write to each status.
  15337. type: array
  15338. items:
  15339. type: object
  15340. properties:
  15341. key:
  15342. type: string
  15343. value:
  15344. type: string
  15345. statusMessageTemplate:
  15346. description: The template used to generate and write a status message.
  15347. type: string
  15348. Threshold:
  15349. oneOf:
  15350. - $ref: '#/components/schemas/GreaterThreshold'
  15351. - $ref: '#/components/schemas/LesserThreshold'
  15352. - $ref: '#/components/schemas/RangeThreshold'
  15353. discriminator:
  15354. propertyName: type
  15355. mapping:
  15356. greater: '#/components/schemas/GreaterThreshold'
  15357. lesser: '#/components/schemas/LesserThreshold'
  15358. range: '#/components/schemas/RangeThreshold'
  15359. DeadmanCheck:
  15360. allOf:
  15361. - $ref: '#/components/schemas/CheckBase'
  15362. - type: object
  15363. required:
  15364. - type
  15365. properties:
  15366. type:
  15367. type: string
  15368. enum:
  15369. - deadman
  15370. timeSince:
  15371. description: String duration before deadman triggers.
  15372. type: string
  15373. staleTime:
  15374. description: String duration for time that a series is considered stale and should not trigger deadman.
  15375. type: string
  15376. reportZero:
  15377. description: 'If only zero values reported since time, trigger an alert'
  15378. type: boolean
  15379. level:
  15380. $ref: '#/components/schemas/CheckStatusLevel'
  15381. every:
  15382. description: Check repetition interval.
  15383. type: string
  15384. offset:
  15385. description: 'Duration to delay after the schedule, before executing check.'
  15386. type: string
  15387. tags:
  15388. description: List of tags to write to each status.
  15389. type: array
  15390. items:
  15391. type: object
  15392. properties:
  15393. key:
  15394. type: string
  15395. value:
  15396. type: string
  15397. statusMessageTemplate:
  15398. description: The template used to generate and write a status message.
  15399. type: string
  15400. CustomCheck:
  15401. allOf:
  15402. - $ref: '#/components/schemas/CheckBase'
  15403. - type: object
  15404. properties:
  15405. type:
  15406. type: string
  15407. enum:
  15408. - custom
  15409. required:
  15410. - type
  15411. ThresholdBase:
  15412. properties:
  15413. level:
  15414. $ref: '#/components/schemas/CheckStatusLevel'
  15415. allValues:
  15416. description: 'If true, only alert if all values meet threshold.'
  15417. type: boolean
  15418. GreaterThreshold:
  15419. allOf:
  15420. - $ref: '#/components/schemas/ThresholdBase'
  15421. - type: object
  15422. required:
  15423. - type
  15424. - value
  15425. properties:
  15426. type:
  15427. type: string
  15428. enum:
  15429. - greater
  15430. value:
  15431. type: number
  15432. format: float
  15433. LesserThreshold:
  15434. allOf:
  15435. - $ref: '#/components/schemas/ThresholdBase'
  15436. - type: object
  15437. required:
  15438. - type
  15439. - value
  15440. properties:
  15441. type:
  15442. type: string
  15443. enum:
  15444. - lesser
  15445. value:
  15446. type: number
  15447. format: float
  15448. RangeThreshold:
  15449. allOf:
  15450. - $ref: '#/components/schemas/ThresholdBase'
  15451. - type: object
  15452. required:
  15453. - type
  15454. - min
  15455. - max
  15456. - within
  15457. properties:
  15458. type:
  15459. type: string
  15460. enum:
  15461. - range
  15462. min:
  15463. type: number
  15464. format: float
  15465. max:
  15466. type: number
  15467. format: float
  15468. within:
  15469. type: boolean
  15470. CheckStatusLevel:
  15471. description: The state to record if check matches a criteria.
  15472. type: string
  15473. enum:
  15474. - UNKNOWN
  15475. - OK
  15476. - INFO
  15477. - CRIT
  15478. - WARN
  15479. RuleStatusLevel:
  15480. description: The state to record if check matches a criteria.
  15481. type: string
  15482. enum:
  15483. - UNKNOWN
  15484. - OK
  15485. - INFO
  15486. - CRIT
  15487. - WARN
  15488. - ANY
  15489. NotificationRuleUpdate:
  15490. type: object
  15491. properties:
  15492. name:
  15493. type: string
  15494. description:
  15495. type: string
  15496. status:
  15497. type: string
  15498. enum:
  15499. - active
  15500. - inactive
  15501. NotificationRuleDiscriminator:
  15502. oneOf:
  15503. - $ref: '#/components/schemas/SlackNotificationRule'
  15504. - $ref: '#/components/schemas/SMTPNotificationRule'
  15505. - $ref: '#/components/schemas/PagerDutyNotificationRule'
  15506. - $ref: '#/components/schemas/HTTPNotificationRule'
  15507. - $ref: '#/components/schemas/TelegramNotificationRule'
  15508. discriminator:
  15509. propertyName: type
  15510. mapping:
  15511. slack: '#/components/schemas/SlackNotificationRule'
  15512. smtp: '#/components/schemas/SMTPNotificationRule'
  15513. pagerduty: '#/components/schemas/PagerDutyNotificationRule'
  15514. http: '#/components/schemas/HTTPNotificationRule'
  15515. telegram: '#/components/schemas/TelegramNotificationRule'
  15516. NotificationRule:
  15517. allOf:
  15518. - $ref: '#/components/schemas/NotificationRuleDiscriminator'
  15519. PostNotificationRule:
  15520. allOf:
  15521. - $ref: '#/components/schemas/NotificationRuleDiscriminator'
  15522. NotificationRules:
  15523. properties:
  15524. notificationRules:
  15525. type: array
  15526. items:
  15527. $ref: '#/components/schemas/NotificationRule'
  15528. links:
  15529. $ref: '#/components/schemas/Links'
  15530. NotificationRuleBase:
  15531. type: object
  15532. required:
  15533. - orgID
  15534. - status
  15535. - name
  15536. - statusRules
  15537. - endpointID
  15538. properties:
  15539. latestCompleted:
  15540. description: 'A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run.'
  15541. type: string
  15542. format: date-time
  15543. readOnly: true
  15544. lastRunStatus:
  15545. readOnly: true
  15546. type: string
  15547. enum:
  15548. - failed
  15549. - success
  15550. - canceled
  15551. lastRunError:
  15552. readOnly: true
  15553. type: string
  15554. id:
  15555. readOnly: true
  15556. type: string
  15557. endpointID:
  15558. type: string
  15559. orgID:
  15560. description: The ID of the organization that owns this notification rule.
  15561. type: string
  15562. taskID:
  15563. description: The ID of the task associated with this notification rule.
  15564. type: string
  15565. ownerID:
  15566. description: The ID of creator used to create this notification rule.
  15567. type: string
  15568. readOnly: true
  15569. createdAt:
  15570. type: string
  15571. format: date-time
  15572. readOnly: true
  15573. updatedAt:
  15574. type: string
  15575. format: date-time
  15576. readOnly: true
  15577. status:
  15578. $ref: '#/components/schemas/TaskStatusType'
  15579. name:
  15580. description: Human-readable name describing the notification rule.
  15581. type: string
  15582. sleepUntil:
  15583. type: string
  15584. every:
  15585. description: The notification repetition interval.
  15586. type: string
  15587. offset:
  15588. description: 'Duration to delay after the schedule, before executing check.'
  15589. type: string
  15590. runbookLink:
  15591. type: string
  15592. limitEvery:
  15593. description: 'Don''t notify me more than <limit> times every <limitEvery> seconds. If set, limit cannot be empty.'
  15594. type: integer
  15595. limit:
  15596. description: 'Don''t notify me more than <limit> times every <limitEvery> seconds. If set, limitEvery cannot be empty.'
  15597. type: integer
  15598. tagRules:
  15599. description: List of tag rules the notification rule attempts to match.
  15600. type: array
  15601. items:
  15602. $ref: '#/components/schemas/TagRule'
  15603. description:
  15604. description: An optional description of the notification rule.
  15605. type: string
  15606. statusRules:
  15607. description: List of status rules the notification rule attempts to match.
  15608. type: array
  15609. minItems: 1
  15610. items:
  15611. $ref: '#/components/schemas/StatusRule'
  15612. labels:
  15613. $ref: '#/components/schemas/Labels'
  15614. links:
  15615. type: object
  15616. readOnly: true
  15617. example:
  15618. self: /api/v2/notificationRules/1
  15619. labels: /api/v2/notificationRules/1/labels
  15620. members: /api/v2/notificationRules/1/members
  15621. owners: /api/v2/notificationRules/1/owners
  15622. query: /api/v2/notificationRules/1/query
  15623. properties:
  15624. self:
  15625. description: URL for this endpoint.
  15626. $ref: '#/components/schemas/Link'
  15627. labels:
  15628. description: URL to retrieve labels for this notification rule.
  15629. $ref: '#/components/schemas/Link'
  15630. members:
  15631. description: URL to retrieve members for this notification rule.
  15632. $ref: '#/components/schemas/Link'
  15633. owners:
  15634. description: URL to retrieve owners for this notification rule.
  15635. $ref: '#/components/schemas/Link'
  15636. query:
  15637. description: URL to retrieve flux script for this notification rule.
  15638. $ref: '#/components/schemas/Link'
  15639. TagRule:
  15640. type: object
  15641. properties:
  15642. key:
  15643. type: string
  15644. value:
  15645. type: string
  15646. operator:
  15647. type: string
  15648. enum:
  15649. - equal
  15650. - notequal
  15651. - equalregex
  15652. - notequalregex
  15653. StatusRule:
  15654. type: object
  15655. properties:
  15656. currentLevel:
  15657. $ref: '#/components/schemas/RuleStatusLevel'
  15658. previousLevel:
  15659. $ref: '#/components/schemas/RuleStatusLevel'
  15660. count:
  15661. type: integer
  15662. period:
  15663. type: string
  15664. HTTPNotificationRuleBase:
  15665. type: object
  15666. required:
  15667. - type
  15668. properties:
  15669. type:
  15670. type: string
  15671. enum:
  15672. - http
  15673. url:
  15674. type: string
  15675. HTTPNotificationRule:
  15676. allOf:
  15677. - $ref: '#/components/schemas/NotificationRuleBase'
  15678. - $ref: '#/components/schemas/HTTPNotificationRuleBase'
  15679. SlackNotificationRuleBase:
  15680. type: object
  15681. required:
  15682. - type
  15683. - messageTemplate
  15684. properties:
  15685. type:
  15686. type: string
  15687. enum:
  15688. - slack
  15689. channel:
  15690. type: string
  15691. messageTemplate:
  15692. type: string
  15693. SlackNotificationRule:
  15694. allOf:
  15695. - $ref: '#/components/schemas/NotificationRuleBase'
  15696. - $ref: '#/components/schemas/SlackNotificationRuleBase'
  15697. SMTPNotificationRule:
  15698. allOf:
  15699. - $ref: '#/components/schemas/NotificationRuleBase'
  15700. - $ref: '#/components/schemas/SMTPNotificationRuleBase'
  15701. SMTPNotificationRuleBase:
  15702. type: object
  15703. required:
  15704. - type
  15705. - subjectTemplate
  15706. - to
  15707. properties:
  15708. type:
  15709. type: string
  15710. enum:
  15711. - smtp
  15712. subjectTemplate:
  15713. type: string
  15714. bodyTemplate:
  15715. type: string
  15716. to:
  15717. type: string
  15718. PagerDutyNotificationRule:
  15719. allOf:
  15720. - $ref: '#/components/schemas/NotificationRuleBase'
  15721. - $ref: '#/components/schemas/PagerDutyNotificationRuleBase'
  15722. PagerDutyNotificationRuleBase:
  15723. type: object
  15724. required:
  15725. - type
  15726. - messageTemplate
  15727. properties:
  15728. type:
  15729. type: string
  15730. enum:
  15731. - pagerduty
  15732. messageTemplate:
  15733. type: string
  15734. TelegramNotificationRule:
  15735. allOf:
  15736. - $ref: '#/components/schemas/NotificationRuleBase'
  15737. - $ref: '#/components/schemas/TelegramNotificationRuleBase'
  15738. TelegramNotificationRuleBase:
  15739. type: object
  15740. required:
  15741. - type
  15742. - messageTemplate
  15743. - channel
  15744. properties:
  15745. type:
  15746. description: The discriminator between other types of notification rules is "telegram".
  15747. type: string
  15748. enum:
  15749. - telegram
  15750. messageTemplate:
  15751. description: The message template as a flux interpolated string.
  15752. type: string
  15753. parseMode:
  15754. description: 'Parse mode of the message text per https://core.telegram.org/bots/api#formatting-options. Defaults to "MarkdownV2".'
  15755. type: string
  15756. enum:
  15757. - MarkdownV2
  15758. - HTML
  15759. - Markdown
  15760. disableWebPagePreview:
  15761. description: Disables preview of web links in the sent messages when "true". Defaults to "false".
  15762. type: boolean
  15763. NotificationEndpointUpdate:
  15764. type: object
  15765. properties:
  15766. name:
  15767. type: string
  15768. description:
  15769. type: string
  15770. status:
  15771. type: string
  15772. enum:
  15773. - active
  15774. - inactive
  15775. NotificationEndpointDiscriminator:
  15776. oneOf:
  15777. - $ref: '#/components/schemas/SlackNotificationEndpoint'
  15778. - $ref: '#/components/schemas/PagerDutyNotificationEndpoint'
  15779. - $ref: '#/components/schemas/HTTPNotificationEndpoint'
  15780. - $ref: '#/components/schemas/TelegramNotificationEndpoint'
  15781. discriminator:
  15782. propertyName: type
  15783. mapping:
  15784. slack: '#/components/schemas/SlackNotificationEndpoint'
  15785. pagerduty: '#/components/schemas/PagerDutyNotificationEndpoint'
  15786. http: '#/components/schemas/HTTPNotificationEndpoint'
  15787. telegram: '#/components/schemas/TelegramNotificationEndpoint'
  15788. NotificationEndpoint:
  15789. allOf:
  15790. - $ref: '#/components/schemas/NotificationEndpointDiscriminator'
  15791. PostNotificationEndpoint:
  15792. allOf:
  15793. - $ref: '#/components/schemas/NotificationEndpointDiscriminator'
  15794. NotificationEndpoints:
  15795. properties:
  15796. notificationEndpoints:
  15797. type: array
  15798. items:
  15799. $ref: '#/components/schemas/NotificationEndpoint'
  15800. links:
  15801. $ref: '#/components/schemas/Links'
  15802. NotificationEndpointBase:
  15803. type: object
  15804. required:
  15805. - type
  15806. - name
  15807. properties:
  15808. id:
  15809. type: string
  15810. orgID:
  15811. type: string
  15812. userID:
  15813. type: string
  15814. createdAt:
  15815. type: string
  15816. format: date-time
  15817. readOnly: true
  15818. updatedAt:
  15819. type: string
  15820. format: date-time
  15821. readOnly: true
  15822. description:
  15823. description: An optional description of the notification endpoint.
  15824. type: string
  15825. name:
  15826. type: string
  15827. status:
  15828. description: The status of the endpoint.
  15829. default: active
  15830. type: string
  15831. enum:
  15832. - active
  15833. - inactive
  15834. labels:
  15835. $ref: '#/components/schemas/Labels'
  15836. links:
  15837. type: object
  15838. readOnly: true
  15839. example:
  15840. self: /api/v2/notificationEndpoints/1
  15841. labels: /api/v2/notificationEndpoints/1/labels
  15842. members: /api/v2/notificationEndpoints/1/members
  15843. owners: /api/v2/notificationEndpoints/1/owners
  15844. properties:
  15845. self:
  15846. description: URL for this endpoint.
  15847. $ref: '#/components/schemas/Link'
  15848. labels:
  15849. description: URL to retrieve labels for this endpoint.
  15850. $ref: '#/components/schemas/Link'
  15851. members:
  15852. description: URL to retrieve members for this endpoint.
  15853. $ref: '#/components/schemas/Link'
  15854. owners:
  15855. description: URL to retrieve owners for this endpoint.
  15856. $ref: '#/components/schemas/Link'
  15857. type:
  15858. $ref: '#/components/schemas/NotificationEndpointType'
  15859. SlackNotificationEndpoint:
  15860. type: object
  15861. allOf:
  15862. - $ref: '#/components/schemas/NotificationEndpointBase'
  15863. - type: object
  15864. properties:
  15865. url:
  15866. description: Specifies the URL of the Slack endpoint. Specify either `URL` or `Token`.
  15867. type: string
  15868. token:
  15869. description: Specifies the API token string. Specify either `URL` or `Token`.
  15870. type: string
  15871. PagerDutyNotificationEndpoint:
  15872. type: object
  15873. allOf:
  15874. - $ref: '#/components/schemas/NotificationEndpointBase'
  15875. - type: object
  15876. required:
  15877. - routingKey
  15878. properties:
  15879. clientURL:
  15880. type: string
  15881. routingKey:
  15882. type: string
  15883. HTTPNotificationEndpoint:
  15884. type: object
  15885. allOf:
  15886. - $ref: '#/components/schemas/NotificationEndpointBase'
  15887. - type: object
  15888. required:
  15889. - url
  15890. - authMethod
  15891. - method
  15892. properties:
  15893. url:
  15894. type: string
  15895. username:
  15896. type: string
  15897. password:
  15898. type: string
  15899. token:
  15900. type: string
  15901. method:
  15902. type: string
  15903. enum:
  15904. - POST
  15905. - GET
  15906. - PUT
  15907. authMethod:
  15908. type: string
  15909. enum:
  15910. - none
  15911. - basic
  15912. - bearer
  15913. contentTemplate:
  15914. type: string
  15915. headers:
  15916. type: object
  15917. description: Customized headers.
  15918. additionalProperties:
  15919. type: string
  15920. TelegramNotificationEndpoint:
  15921. type: object
  15922. allOf:
  15923. - $ref: '#/components/schemas/NotificationEndpointBase'
  15924. - type: object
  15925. required:
  15926. - token
  15927. - channel
  15928. properties:
  15929. token:
  15930. description: 'Specifies the Telegram bot token. See https://core.telegram.org/bots#creating-a-new-bot .'
  15931. type: string
  15932. channel:
  15933. description: 'The ID of the telegram channel; a chat_id in https://core.telegram.org/bots/api#sendmessage .'
  15934. type: string
  15935. NotificationEndpointType:
  15936. type: string
  15937. enum:
  15938. - slack
  15939. - pagerduty
  15940. - http
  15941. - telegram
  15942. DBRP:
  15943. type: object
  15944. properties:
  15945. id:
  15946. type: string
  15947. description: The ID of the DBRP mapping.
  15948. readOnly: true
  15949. orgID:
  15950. type: string
  15951. description: The ID of the organization.
  15952. bucketID:
  15953. type: string
  15954. description: The ID of the bucket used as the target for the translation.
  15955. database:
  15956. type: string
  15957. description: InfluxDB v1 database
  15958. retention_policy:
  15959. type: string
  15960. description: InfluxDB v1 retention policy
  15961. default:
  15962. type: boolean
  15963. description: Mapping represents the default retention policy for the database specified.
  15964. virtual:
  15965. type: boolean
  15966. description: 'Indicates an autogenerated, virtual mapping based on the bucket name. Currently only available in OSS.'
  15967. links:
  15968. $ref: '#/components/schemas/Links'
  15969. required:
  15970. - id
  15971. - orgID
  15972. - bucketID
  15973. - database
  15974. - retention_policy
  15975. - default
  15976. DBRPs:
  15977. properties:
  15978. content:
  15979. type: array
  15980. items:
  15981. $ref: '#/components/schemas/DBRP'
  15982. DBRPUpdate:
  15983. properties:
  15984. retention_policy:
  15985. type: string
  15986. description: InfluxDB v1 retention policy
  15987. default:
  15988. type: boolean
  15989. DBRPCreate:
  15990. type: object
  15991. properties:
  15992. orgID:
  15993. type: string
  15994. description: The ID of the organization.
  15995. org:
  15996. type: string
  15997. description: The name of the organization that owns this mapping.
  15998. bucketID:
  15999. type: string
  16000. description: The ID of the bucket used as the target for the translation.
  16001. database:
  16002. type: string
  16003. description: InfluxDB v1 database
  16004. retention_policy:
  16005. type: string
  16006. description: InfluxDB v1 retention policy
  16007. default:
  16008. type: boolean
  16009. description: Mapping represents the default retention policy for the database specified.
  16010. required:
  16011. - bucketID
  16012. - database
  16013. - retention_policy
  16014. DBRPGet:
  16015. type: object
  16016. properties:
  16017. content:
  16018. $ref: '#/components/schemas/DBRP'
  16019. required: true
  16020. SchemaType:
  16021. type: string
  16022. enum:
  16023. - implicit
  16024. - explicit
  16025. ColorMapping:
  16026. type: object
  16027. description: A color mapping is an object that maps time series data to a UI color scheme to allow the UI to render graphs consistent colors across reloads.
  16028. additionalProperties:
  16029. type: string
  16030. example:
  16031. series_id_1: '#edf529'
  16032. series_id_2: '#edf529'
  16033. measurement_birdmigration_europe: '#663cd0'
  16034. configcat_deployments-autopromotionblocker: '#663cd0'
  16035. Authorization:
  16036. required:
  16037. - orgID
  16038. - permissions
  16039. allOf:
  16040. - $ref: '#/components/schemas/AuthorizationUpdateRequest'
  16041. - type: object
  16042. properties:
  16043. createdAt:
  16044. type: string
  16045. format: date-time
  16046. readOnly: true
  16047. updatedAt:
  16048. type: string
  16049. format: date-time
  16050. readOnly: true
  16051. orgID:
  16052. type: string
  16053. description: The ID of the organization.
  16054. permissions:
  16055. type: array
  16056. minItems: 1
  16057. description: |
  16058. A list of permissions for an authorization.
  16059. An authorization must have at least one permission.
  16060. items:
  16061. $ref: '#/components/schemas/Permission'
  16062. id:
  16063. readOnly: true
  16064. type: string
  16065. token:
  16066. readOnly: true
  16067. type: string
  16068. description: |
  16069. The API token for authenticating InfluxDB API and CLI requests.
  16070. userID:
  16071. readOnly: true
  16072. type: string
  16073. description: The ID of the user that created and owns the token.
  16074. user:
  16075. readOnly: true
  16076. type: string
  16077. description: The name of the user that created and owns the token.
  16078. org:
  16079. readOnly: true
  16080. type: string
  16081. description: The name of the organization that the token is scoped to.
  16082. links:
  16083. type: object
  16084. readOnly: true
  16085. example:
  16086. self: /api/v2/authorizations/1
  16087. user: /api/v2/users/12
  16088. properties:
  16089. self:
  16090. readOnly: true
  16091. $ref: '#/components/schemas/Link'
  16092. user:
  16093. readOnly: true
  16094. $ref: '#/components/schemas/Link'
  16095. Authorizations:
  16096. type: object
  16097. properties:
  16098. links:
  16099. readOnly: true
  16100. $ref: '#/components/schemas/Links'
  16101. authorizations:
  16102. type: array
  16103. items:
  16104. $ref: '#/components/schemas/Authorization'
  16105. AuthorizationPostRequest:
  16106. required:
  16107. - orgID
  16108. - permissions
  16109. allOf:
  16110. - $ref: '#/components/schemas/AuthorizationUpdateRequest'
  16111. - type: object
  16112. properties:
  16113. orgID:
  16114. type: string
  16115. description: |
  16116. The ID of the organization that owns the authorization.
  16117. userID:
  16118. type: string
  16119. description: |
  16120. The ID of the user that the authorization is scoped to.
  16121. permissions:
  16122. type: array
  16123. minItems: 1
  16124. description: |
  16125. A list of permissions for an authorization.
  16126. An authorization must have at least one permission.
  16127. items:
  16128. $ref: '#/components/schemas/Permission'
  16129. Permission:
  16130. required:
  16131. - action
  16132. - resource
  16133. properties:
  16134. action:
  16135. type: string
  16136. enum:
  16137. - read
  16138. - write
  16139. resource:
  16140. $ref: '#/components/schemas/Resource'
  16141. Resource:
  16142. type: object
  16143. required:
  16144. - type
  16145. properties:
  16146. type:
  16147. type: string
  16148. enum:
  16149. - authorizations
  16150. - buckets
  16151. - dashboards
  16152. - orgs
  16153. - sources
  16154. - tasks
  16155. - telegrafs
  16156. - users
  16157. - variables
  16158. - scrapers
  16159. - secrets
  16160. - labels
  16161. - views
  16162. - documents
  16163. - notificationRules
  16164. - notificationEndpoints
  16165. - checks
  16166. - dbrp
  16167. - notebooks
  16168. - annotations
  16169. - remotes
  16170. - replications
  16171. - instance
  16172. description: |
  16173. The type of resource.
  16174. In a `permission`, applies the permission to all resources of this type.
  16175. id:
  16176. type: string
  16177. description: |
  16178. The ID of a specific resource.
  16179. In a `permission`, applies the permission to only the resource with this ID.
  16180. name:
  16181. type: string
  16182. description: |
  16183. Optional: A name for the resource.
  16184. Not all resource types have a name field.
  16185. orgID:
  16186. type: string
  16187. description: |
  16188. The ID of the organization that owns the resource.
  16189. In a `permission`, applies the permission to all resources of `type` owned by this organization.
  16190. org:
  16191. type: string
  16192. description: |
  16193. Optional: The name of the organization with `orgID`.
  16194. User:
  16195. properties:
  16196. id:
  16197. readOnly: true
  16198. type: string
  16199. oauthID:
  16200. type: string
  16201. name:
  16202. type: string
  16203. status:
  16204. description: If inactive the user is inactive.
  16205. default: active
  16206. type: string
  16207. enum:
  16208. - active
  16209. - inactive
  16210. required:
  16211. - name
  16212. Users:
  16213. type: object
  16214. properties:
  16215. links:
  16216. type: object
  16217. properties:
  16218. self:
  16219. type: string
  16220. format: uri
  16221. users:
  16222. type: array
  16223. items:
  16224. $ref: '#/components/schemas/UserResponse'
  16225. OnboardingRequest:
  16226. type: object
  16227. properties:
  16228. username:
  16229. type: string
  16230. password:
  16231. type: string
  16232. org:
  16233. type: string
  16234. bucket:
  16235. type: string
  16236. retentionPeriodSeconds:
  16237. type: integer
  16238. format: int64
  16239. retentionPeriodHrs:
  16240. type: integer
  16241. deprecated: true
  16242. description: |
  16243. Retention period *in nanoseconds* for the new bucket. This key's name has been misleading since OSS 2.0 GA, please transition to use `retentionPeriodSeconds`
  16244. token:
  16245. type: string
  16246. description: |
  16247. Authentication token to set on the initial user. If not specified, the server will generate a token.
  16248. required:
  16249. - username
  16250. - org
  16251. - bucket
  16252. OnboardingResponse:
  16253. type: object
  16254. properties:
  16255. user:
  16256. $ref: '#/components/schemas/UserResponse'
  16257. org:
  16258. $ref: '#/components/schemas/Organization'
  16259. bucket:
  16260. $ref: '#/components/schemas/Bucket'
  16261. auth:
  16262. $ref: '#/components/schemas/Authorization'
  16263. Variable:
  16264. type: object
  16265. required:
  16266. - name
  16267. - orgID
  16268. - arguments
  16269. properties:
  16270. links:
  16271. type: object
  16272. readOnly: true
  16273. properties:
  16274. self:
  16275. type: string
  16276. format: uri
  16277. org:
  16278. type: string
  16279. format: uri
  16280. labels:
  16281. type: string
  16282. format: uri
  16283. id:
  16284. readOnly: true
  16285. type: string
  16286. orgID:
  16287. type: string
  16288. name:
  16289. type: string
  16290. description:
  16291. type: string
  16292. selected:
  16293. type: array
  16294. items:
  16295. type: string
  16296. labels:
  16297. $ref: '#/components/schemas/Labels'
  16298. arguments:
  16299. $ref: '#/components/schemas/VariableProperties'
  16300. createdAt:
  16301. type: string
  16302. format: date-time
  16303. updatedAt:
  16304. type: string
  16305. format: date-time
  16306. Variables:
  16307. type: object
  16308. example:
  16309. variables:
  16310. - id: '1221432'
  16311. name: ':ok:'
  16312. selected:
  16313. - hello
  16314. arguments:
  16315. type: constant
  16316. values:
  16317. - howdy
  16318. - hello
  16319. - hi
  16320. - yo
  16321. - oy
  16322. - id: '1221432'
  16323. name: ':ok:'
  16324. selected:
  16325. - c
  16326. arguments:
  16327. type: map
  16328. values:
  16329. a: fdjaklfdjkldsfjlkjdsa
  16330. b: dfaksjfkljekfajekdljfas
  16331. c: fdjksajfdkfeawfeea
  16332. - id: '1221432'
  16333. name: ':ok:'
  16334. selected:
  16335. - host
  16336. arguments:
  16337. type: query
  16338. query: 'from(bucket: "foo") |> showMeasurements()'
  16339. language: flux
  16340. properties:
  16341. variables:
  16342. type: array
  16343. items:
  16344. $ref: '#/components/schemas/Variable'
  16345. Source:
  16346. type: object
  16347. properties:
  16348. links:
  16349. type: object
  16350. properties:
  16351. self:
  16352. type: string
  16353. query:
  16354. type: string
  16355. health:
  16356. type: string
  16357. buckets:
  16358. type: string
  16359. id:
  16360. type: string
  16361. orgID:
  16362. type: string
  16363. default:
  16364. type: boolean
  16365. name:
  16366. type: string
  16367. type:
  16368. type: string
  16369. enum:
  16370. - v1
  16371. - v2
  16372. - self
  16373. url:
  16374. type: string
  16375. format: uri
  16376. insecureSkipVerify:
  16377. type: boolean
  16378. telegraf:
  16379. type: string
  16380. token:
  16381. type: string
  16382. username:
  16383. type: string
  16384. password:
  16385. type: string
  16386. sharedSecret:
  16387. type: string
  16388. metaUrl:
  16389. type: string
  16390. format: uri
  16391. defaultRP:
  16392. type: string
  16393. languages:
  16394. type: array
  16395. readOnly: true
  16396. items:
  16397. type: string
  16398. enum:
  16399. - flux
  16400. - influxql
  16401. Sources:
  16402. type: object
  16403. properties:
  16404. links:
  16405. type: object
  16406. properties:
  16407. self:
  16408. type: string
  16409. format: uri
  16410. sources:
  16411. type: array
  16412. items:
  16413. $ref: '#/components/schemas/Source'
  16414. ScraperTargetRequest:
  16415. type: object
  16416. properties:
  16417. name:
  16418. type: string
  16419. description: The name of the scraper target.
  16420. type:
  16421. type: string
  16422. description: The type of the metrics to be parsed.
  16423. enum:
  16424. - prometheus
  16425. url:
  16426. type: string
  16427. description: The URL of the metrics endpoint.
  16428. example: 'http://localhost:9090/metrics'
  16429. orgID:
  16430. type: string
  16431. description: The organization ID.
  16432. bucketID:
  16433. type: string
  16434. description: The ID of the bucket to write to.
  16435. allowInsecure:
  16436. type: boolean
  16437. description: Skip TLS verification on endpoint.
  16438. default: false
  16439. ScraperTargetResponse:
  16440. type: object
  16441. allOf:
  16442. - $ref: '#/components/schemas/ScraperTargetRequest'
  16443. - type: object
  16444. properties:
  16445. id:
  16446. type: string
  16447. readOnly: true
  16448. org:
  16449. type: string
  16450. description: The name of the organization.
  16451. bucket:
  16452. type: string
  16453. description: The bucket name.
  16454. links:
  16455. type: object
  16456. readOnly: true
  16457. example:
  16458. self: /api/v2/scrapers/1
  16459. owners: /api/v2/scrapers/1/owners
  16460. members: /api/v2/scrapers/1/members
  16461. bucket: /api/v2/buckets/1
  16462. organization: /api/v2/orgs/1
  16463. properties:
  16464. self:
  16465. $ref: '#/components/schemas/Link'
  16466. members:
  16467. $ref: '#/components/schemas/Link'
  16468. owners:
  16469. $ref: '#/components/schemas/Link'
  16470. bucket:
  16471. $ref: '#/components/schemas/Link'
  16472. organization:
  16473. $ref: '#/components/schemas/Link'
  16474. ScraperTargetResponses:
  16475. type: object
  16476. properties:
  16477. configurations:
  16478. type: array
  16479. items:
  16480. $ref: '#/components/schemas/ScraperTargetResponse'
  16481. MetadataBackup:
  16482. type: object
  16483. properties:
  16484. kv:
  16485. type: string
  16486. format: binary
  16487. sql:
  16488. type: string
  16489. format: binary
  16490. buckets:
  16491. $ref: '#/components/schemas/BucketMetadataManifests'
  16492. required:
  16493. - kv
  16494. - sql
  16495. - buckets
  16496. BucketMetadataManifests:
  16497. type: array
  16498. items:
  16499. $ref: '#/components/schemas/BucketMetadataManifest'
  16500. BucketMetadataManifest:
  16501. type: object
  16502. properties:
  16503. organizationID:
  16504. type: string
  16505. organizationName:
  16506. type: string
  16507. bucketID:
  16508. type: string
  16509. bucketName:
  16510. type: string
  16511. description:
  16512. type: string
  16513. defaultRetentionPolicy:
  16514. type: string
  16515. retentionPolicies:
  16516. $ref: '#/components/schemas/RetentionPolicyManifests'
  16517. required:
  16518. - organizationID
  16519. - organizationName
  16520. - bucketID
  16521. - bucketName
  16522. - defaultRetentionPolicy
  16523. - retentionPolicies
  16524. RetentionPolicyManifests:
  16525. type: array
  16526. items:
  16527. $ref: '#/components/schemas/RetentionPolicyManifest'
  16528. RetentionPolicyManifest:
  16529. type: object
  16530. properties:
  16531. name:
  16532. type: string
  16533. replicaN:
  16534. type: integer
  16535. duration:
  16536. type: integer
  16537. format: int64
  16538. shardGroupDuration:
  16539. type: integer
  16540. format: int64
  16541. shardGroups:
  16542. $ref: '#/components/schemas/ShardGroupManifests'
  16543. subscriptions:
  16544. $ref: '#/components/schemas/SubscriptionManifests'
  16545. required:
  16546. - name
  16547. - replicaN
  16548. - duration
  16549. - shardGroupDuration
  16550. - shardGroups
  16551. - subscriptions
  16552. ShardGroupManifests:
  16553. type: array
  16554. items:
  16555. $ref: '#/components/schemas/ShardGroupManifest'
  16556. ShardGroupManifest:
  16557. type: object
  16558. properties:
  16559. id:
  16560. type: integer
  16561. format: int64
  16562. startTime:
  16563. type: string
  16564. format: date-time
  16565. endTime:
  16566. type: string
  16567. format: date-time
  16568. deletedAt:
  16569. type: string
  16570. format: date-time
  16571. truncatedAt:
  16572. type: string
  16573. format: date-time
  16574. shards:
  16575. $ref: '#/components/schemas/ShardManifests'
  16576. required:
  16577. - id
  16578. - startTime
  16579. - endTime
  16580. - shards
  16581. ShardManifests:
  16582. type: array
  16583. items:
  16584. $ref: '#/components/schemas/ShardManifest'
  16585. ShardManifest:
  16586. type: object
  16587. properties:
  16588. id:
  16589. type: integer
  16590. format: int64
  16591. shardOwners:
  16592. $ref: '#/components/schemas/ShardOwners'
  16593. required:
  16594. - id
  16595. - shardOwners
  16596. ShardOwners:
  16597. type: array
  16598. items:
  16599. $ref: '#/components/schemas/ShardOwner'
  16600. ShardOwner:
  16601. type: object
  16602. properties:
  16603. nodeID:
  16604. type: integer
  16605. format: int64
  16606. description: The ID of the node that owns the shard.
  16607. required:
  16608. - nodeID
  16609. SubscriptionManifests:
  16610. type: array
  16611. items:
  16612. $ref: '#/components/schemas/SubscriptionManifest'
  16613. SubscriptionManifest:
  16614. type: object
  16615. properties:
  16616. name:
  16617. type: string
  16618. mode:
  16619. type: string
  16620. destinations:
  16621. type: array
  16622. items:
  16623. type: string
  16624. required:
  16625. - name
  16626. - mode
  16627. - destinations
  16628. RestoredBucketMappings:
  16629. type: object
  16630. properties:
  16631. id:
  16632. description: New ID of the restored bucket
  16633. type: string
  16634. name:
  16635. type: string
  16636. shardMappings:
  16637. $ref: '#/components/schemas/BucketShardMappings'
  16638. required:
  16639. - id
  16640. - name
  16641. - shardMappings
  16642. BucketShardMappings:
  16643. type: array
  16644. items:
  16645. $ref: '#/components/schemas/BucketShardMapping'
  16646. BucketShardMapping:
  16647. type: object
  16648. properties:
  16649. oldId:
  16650. type: integer
  16651. format: int64
  16652. newId:
  16653. type: integer
  16654. format: int64
  16655. required:
  16656. - oldId
  16657. - newId
  16658. Config:
  16659. type: object
  16660. properties:
  16661. config:
  16662. type: object
  16663. RemoteConnection:
  16664. type: object
  16665. properties:
  16666. id:
  16667. type: string
  16668. name:
  16669. type: string
  16670. orgID:
  16671. type: string
  16672. description:
  16673. type: string
  16674. remoteURL:
  16675. type: string
  16676. format: uri
  16677. remoteOrgID:
  16678. type: string
  16679. allowInsecureTLS:
  16680. type: boolean
  16681. default: false
  16682. required:
  16683. - id
  16684. - name
  16685. - orgID
  16686. - remoteURL
  16687. - remoteOrgID
  16688. - allowInsecureTLS
  16689. RemoteConnections:
  16690. type: object
  16691. properties:
  16692. remotes:
  16693. type: array
  16694. items:
  16695. $ref: '#/components/schemas/RemoteConnection'
  16696. RemoteConnectionCreationRequest:
  16697. type: object
  16698. properties:
  16699. name:
  16700. type: string
  16701. description:
  16702. type: string
  16703. orgID:
  16704. type: string
  16705. remoteURL:
  16706. type: string
  16707. format: uri
  16708. remoteAPIToken:
  16709. type: string
  16710. remoteOrgID:
  16711. type: string
  16712. allowInsecureTLS:
  16713. type: boolean
  16714. default: false
  16715. required:
  16716. - name
  16717. - orgID
  16718. - remoteURL
  16719. - remoteAPIToken
  16720. - remoteOrgID
  16721. - allowInsecureTLS
  16722. RemoteConnectionUpdateRequest:
  16723. type: object
  16724. properties:
  16725. name:
  16726. type: string
  16727. description:
  16728. type: string
  16729. remoteURL:
  16730. type: string
  16731. format: uri
  16732. remoteAPIToken:
  16733. type: string
  16734. remoteOrgID:
  16735. type: string
  16736. allowInsecureTLS:
  16737. type: boolean
  16738. default: false
  16739. Replication:
  16740. type: object
  16741. properties:
  16742. id:
  16743. type: string
  16744. name:
  16745. type: string
  16746. description:
  16747. type: string
  16748. orgID:
  16749. type: string
  16750. remoteID:
  16751. type: string
  16752. localBucketID:
  16753. type: string
  16754. remoteBucketID:
  16755. type: string
  16756. remoteBucketName:
  16757. type: string
  16758. maxQueueSizeBytes:
  16759. type: integer
  16760. format: int64
  16761. currentQueueSizeBytes:
  16762. type: integer
  16763. format: int64
  16764. latestResponseCode:
  16765. type: integer
  16766. latestErrorMessage:
  16767. type: string
  16768. dropNonRetryableData:
  16769. type: boolean
  16770. required:
  16771. - id
  16772. - name
  16773. - remoteID
  16774. - orgID
  16775. - localBucketID
  16776. - maxQueueSizeBytes
  16777. - currentQueueSizeBytes
  16778. Replications:
  16779. type: object
  16780. properties:
  16781. replications:
  16782. type: array
  16783. items:
  16784. $ref: '#/components/schemas/Replication'
  16785. ReplicationCreationRequest:
  16786. type: object
  16787. properties:
  16788. name:
  16789. type: string
  16790. description:
  16791. type: string
  16792. orgID:
  16793. type: string
  16794. remoteID:
  16795. type: string
  16796. localBucketID:
  16797. type: string
  16798. remoteBucketID:
  16799. type: string
  16800. remoteBucketName:
  16801. type: string
  16802. maxQueueSizeBytes:
  16803. type: integer
  16804. format: int64
  16805. minimum: 33554430
  16806. default: 67108860
  16807. dropNonRetryableData:
  16808. type: boolean
  16809. default: false
  16810. maxAgeSeconds:
  16811. type: integer
  16812. format: int64
  16813. minimum: 0
  16814. default: 604800
  16815. required:
  16816. - name
  16817. - orgID
  16818. - remoteID
  16819. - localBucketID
  16820. - maxQueueSizeBytes
  16821. - maxAgeSeconds
  16822. ReplicationUpdateRequest:
  16823. type: object
  16824. properties:
  16825. name:
  16826. type: string
  16827. description:
  16828. type: string
  16829. remoteID:
  16830. type: string
  16831. remoteBucketID:
  16832. type: string
  16833. remoteBucketName:
  16834. type: string
  16835. maxQueueSizeBytes:
  16836. type: integer
  16837. format: int64
  16838. minimum: 33554430
  16839. dropNonRetryableData:
  16840. type: boolean
  16841. maxAgeSeconds:
  16842. type: integer
  16843. format: int64
  16844. minimum: 0
  16845. Tasks:
  16846. type: object
  16847. properties:
  16848. links:
  16849. readOnly: true
  16850. $ref: '#/components/schemas/Links'
  16851. tasks:
  16852. type: array
  16853. items:
  16854. $ref: '#/components/schemas/Task'
  16855. Task:
  16856. type: object
  16857. properties:
  16858. id:
  16859. readOnly: true
  16860. type: string
  16861. orgID:
  16862. description: The ID of the organization that owns the task.
  16863. type: string
  16864. org:
  16865. description: The name of the organization that owns the task.
  16866. type: string
  16867. name:
  16868. description: The name of the task.
  16869. type: string
  16870. ownerID:
  16871. description: The ID of the user who owns the Task.
  16872. type: string
  16873. description:
  16874. description: The description of the task.
  16875. type: string
  16876. status:
  16877. $ref: '#/components/schemas/TaskStatusType'
  16878. labels:
  16879. $ref: '#/components/schemas/Labels'
  16880. authorizationID:
  16881. description: The ID of the authorization used when the task communicates with the query engine.
  16882. type: string
  16883. flux:
  16884. description: The Flux script that the task runs.
  16885. type: string
  16886. every:
  16887. description: 'An interval ([duration literal](https://docs.influxdata.com/flux/v0.x/spec/lexical-elements/#duration-literals))) at which the task runs. `every` also determines when the task first runs, depending on the specified time.'
  16888. type: string
  16889. format: duration
  16890. cron:
  16891. description: '[Cron expression](https://en.wikipedia.org/wiki/Cron#Overview) that defines the schedule on which the task runs. InfluxDB bases cron runs on the system time.'
  16892. type: string
  16893. offset:
  16894. description: 'A [duration](https://docs.influxdata.com/flux/v0.x/spec/lexical-elements/#duration-literals) to delay execution of the task after the scheduled time has elapsed. `0` removes the offset.'
  16895. type: string
  16896. format: duration
  16897. latestCompleted:
  16898. description: 'A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/flux/v0.x/data-types/basic/time/#time-syntax)) of the latest scheduled and completed run.'
  16899. type: string
  16900. format: date-time
  16901. readOnly: true
  16902. lastRunStatus:
  16903. readOnly: true
  16904. type: string
  16905. enum:
  16906. - failed
  16907. - success
  16908. - canceled
  16909. lastRunError:
  16910. readOnly: true
  16911. type: string
  16912. createdAt:
  16913. type: string
  16914. format: date-time
  16915. readOnly: true
  16916. updatedAt:
  16917. type: string
  16918. format: date-time
  16919. readOnly: true
  16920. links:
  16921. type: object
  16922. readOnly: true
  16923. example:
  16924. self: /api/v2/tasks/1
  16925. owners: /api/v2/tasks/1/owners
  16926. members: /api/v2/tasks/1/members
  16927. labels: /api/v2/tasks/1/labels
  16928. runs: /api/v2/tasks/1/runs
  16929. logs: /api/v2/tasks/1/logs
  16930. properties:
  16931. self:
  16932. $ref: '#/components/schemas/Link'
  16933. owners:
  16934. $ref: '#/components/schemas/Link'
  16935. members:
  16936. $ref: '#/components/schemas/Link'
  16937. runs:
  16938. $ref: '#/components/schemas/Link'
  16939. logs:
  16940. $ref: '#/components/schemas/Link'
  16941. labels:
  16942. $ref: '#/components/schemas/Link'
  16943. required:
  16944. - id
  16945. - name
  16946. - orgID
  16947. - flux
  16948. TaskCreateRequest:
  16949. type: object
  16950. properties:
  16951. orgID:
  16952. description: The ID of the organization that owns this Task.
  16953. type: string
  16954. org:
  16955. description: The name of the organization that owns this Task.
  16956. type: string
  16957. status:
  16958. $ref: '#/components/schemas/TaskStatusType'
  16959. flux:
  16960. description: The Flux script to run for this task.
  16961. type: string
  16962. description:
  16963. description: An optional description of the task.
  16964. type: string
  16965. required:
  16966. - flux
  16967. TaskUpdateRequest:
  16968. type: object
  16969. properties:
  16970. status:
  16971. $ref: '#/components/schemas/TaskStatusType'
  16972. flux:
  16973. description: The Flux script that the task runs.
  16974. type: string
  16975. name:
  16976. description: Update the 'name' option in the flux script.
  16977. type: string
  16978. every:
  16979. description: Update the 'every' option in the flux script.
  16980. type: string
  16981. cron:
  16982. description: Update the 'cron' option in the flux script.
  16983. type: string
  16984. offset:
  16985. description: Update the 'offset' option in the flux script.
  16986. type: string
  16987. description:
  16988. description: Update the description of the task.
  16989. type: string
  16990. responses:
  16991. AuthorizationError:
  16992. description: |
  16993. Unauthorized. The error may indicate one of the following:
  16994. * The `Authorization: Token` header is missing or malformed.
  16995. * The API token value is missing from the header.
  16996. * The token doesn't have sufficient permissions to write to this organization and bucket.
  16997. content:
  16998. application/json:
  16999. schema:
  17000. properties:
  17001. code:
  17002. description: |
  17003. The HTTP status code description. Default is `unauthorized`.
  17004. readOnly: true
  17005. type: string
  17006. enum:
  17007. - unauthorized
  17008. message:
  17009. readOnly: true
  17010. description: A human-readable message that may contain detail about the error.
  17011. type: string
  17012. examples:
  17013. tokenNotAuthorized:
  17014. summary: Token is not authorized to access a resource
  17015. value:
  17016. code: unauthorized
  17017. message: unauthorized access
  17018. BadRequestError:
  17019. description: |
  17020. Bad request.
  17021. The response body contains detail about the error.
  17022. #### InfluxDB OSS
  17023. - Returns this error if an incorrect value is passed for `org` or `orgID`.
  17024. content:
  17025. application/json:
  17026. schema:
  17027. $ref: '#/components/schemas/Error'
  17028. examples:
  17029. orgProvidedNotFound:
  17030. summary: The org or orgID passed doesn't own the token passed in the header
  17031. value:
  17032. code: invalid
  17033. message: 'failed to decode request body: organization not found'
  17034. GeneralServerError:
  17035. description: Non 2XX error response from server.
  17036. content:
  17037. application/json:
  17038. schema:
  17039. $ref: '#/components/schemas/Error'
  17040. InternalServerError:
  17041. description: |
  17042. Internal server error.
  17043. The server encountered an unexpected situation.
  17044. content:
  17045. application/json:
  17046. schema:
  17047. $ref: '#/components/schemas/Error'
  17048. ResourceNotFoundError:
  17049. description: |
  17050. Not found.
  17051. A requested resource was not found.
  17052. The response body contains the requested resource type and the name value
  17053. (if you passed it)--for example:
  17054. - `"organization name \"my-org\" not found"`
  17055. - `"organization not found"`: indicates you passed an ID that did not match
  17056. an organization.
  17057. content:
  17058. application/json:
  17059. schema:
  17060. $ref: '#/components/schemas/Error'
  17061. examples:
  17062. org-not-found:
  17063. summary: Organization name not found
  17064. value:
  17065. code: not found
  17066. message: organization name "my-org" not found
  17067. bucket-not-found:
  17068. summary: Bucket name not found
  17069. value:
  17070. code: not found
  17071. message: bucket "air_sensor" not found
  17072. orgID-not-found:
  17073. summary: Organization ID not found
  17074. value:
  17075. code: not found
  17076. message: organization not found
  17077. securitySchemes:
  17078. TokenAuthentication:
  17079. type: apiKey
  17080. name: Authorization
  17081. in: header
  17082. description: |
  17083. Use the [Token authentication](#section/Authentication/TokenAuthentication)
  17084. scheme to authenticate to the InfluxDB API.
  17085. In your API requests, send an `Authorization` header.
  17086. For the header value, provide the word `Token` followed by a space and an InfluxDB API token.
  17087. The word `Token` is case-sensitive.
  17088. ### Syntax
  17089. `Authorization: Token YOUR_INFLUX_API_TOKEN`
  17090. For more information and examples, see the following:
  17091. - [`/authorizations`](#tag/Authorizations) endpoint.
  17092. - [Authorize API requests](https://docs.influxdata.com/influxdb/v2.3/api-guide/api_intro/#authentication).
  17093. - [Manage API tokens](https://docs.influxdata.com/influxdb/v2.3/security/tokens/).
  17094. BasicAuthentication:
  17095. type: http
  17096. scheme: basic
  17097. description: |
  17098. Use the HTTP Basic authentication scheme for InfluxDB `/api/v2` API operations that support it.
  17099. Username and password schemes require the following credentials:
  17100. - **username**
  17101. - **password**
  17102. security:
  17103. - TokenAuthentication: []