1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582 |
- openapi: 3.0.0
- info:
- title: InfluxDB OSS API Service
- version: 2.0.0
- description: |
- The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
- servers:
- - url: /api/v2
- tags:
- - name: Authorizations
- description: |
- Create and manage _API tokens_.
- An _authorization_ contains a list of `read` and `write`
- permissions for organization resources and provides an API token for authentication.
- An authorization belongs to an organization and only contains permissions for that organization.
- An authorization is only visible to the user that created it.
- Optionally, when creating an authorization, you can scope it to a specific user.
- A _user session_ carries all the permissions granted by all the user's authorizations.
- To create a user session, use the [`POST /api/v2/signin`](#operation/PostSignin) endpoint.
- ### Related endpoints
- - [Signin](#tag/Signin)
- - [Signout](#tag/Signout)
- ### Related guides
- - [Authorize API requests](https://docs.influxdata.com/influxdb/v2.3/api-guide/api_intro/#authentication).
- - [Manage API tokens](https://docs.influxdata.com/influxdb/v2.3/security/tokens/).
- - [Assign a token to a specific user](https://docs.influxdata.com/influxdb/v2.3/security/tokens/create-token/).
- - name: Buckets
- description: |
- Store your data in InfluxDB [buckets](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#bucket).
- A bucket is a named location where time series data is stored. All buckets
- have a [retention period](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#retention-period),
- a duration of time that each data point persists. InfluxDB drops all
- points with timestamps older than the bucket’s retention period.
- A bucket belongs to an organization.
- ### Related guides
- - [Manage buckets](https://docs.influxdata.com/influxdb/v2.3/organizations/buckets/)
- - name: Debug
- description: |
- Generate profiling and trace reports.
- Use routes under `/debug/pprof` to analyze the Go runtime of InfluxDB.
- These endpoints generate [Go runtime profiles](https://pkg.go.dev/runtime/pprof)
- and **trace** reports.
- **Profiles** are collections of stack traces that show call sequences
- leading to instances of a particular event, such as allocation.
- For more information about **pprof profile** and **trace** reports,
- see the following resources:
- - [Google pprof tool](https://github.com/google/pprof)
- - [Golang diagnostics](https://go.dev/doc/diagnostics)
- - name: Delete
- description: |
- Delete data from an InfluxDB bucket.
- - name: Query
- description: |
- Retrieve data, analyze queries, and get query suggestions.
- - name: Tasks
- description: |
- Process and analyze your data with tasks in the InfluxDB task engine.
- With tasks, you can schedule Flux scripts to query, analyze, modify, and act on data.
- Use the `/api/v2/tasks` endpoints to create and manage tasks, retry task runs, and retrieve run logs.
- #### Related guides
- - [Get started with tasks](https://docs.influxdata.com/influxdb/v2.3/process-data/get-started/)
- - [Common data processing tasks](https://docs.influxdata.com/influxdb/v2.3/process-data/common-tasks/)
- - name: Templates
- description: |
- Export and apply InfluxDB **templates**.
- Manage **stacks** of templated InfluxDB resources.
- InfluxDB templates are prepackaged configurations for
- everything from dashboards and Telegraf to notifications and alerts.
- Use InfluxDB templates to quickly configure a fresh instance of InfluxDB,
- back up your dashboard configuration, or share your configuration with the
- InfluxData community.
- Use the `/api/v2/templates` endpoints to export templates and apply templates.
- **InfluxDB stacks** are stateful InfluxDB templates that let you
- add, update, and remove installed template resources over time, avoid duplicating
- resources when applying the same or similar templates more than once, and
- apply changes to distributed instances of InfluxDB OSS or InfluxDB Cloud.
- Use the `/api/v2/stacks` endpoints to manage installed template resources.
- #### Related guides
- - [InfluxDB stacks](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/stacks/)
- - [InfluxDB templates](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/)
- - name: Write
- description: |
- Write time series data to buckets.
- - name: Authentication
- description: |
- Use one of the following schemes to authenticate to the InfluxDB API:
- - [Token authentication](#section/Authentication/TokenAuthentication)
- - [Basic authentication](#section/Authentication/BasicAuthentication)
- - [Querystring authentication](#section/Authentication/QuerystringAuthentication)
- <!-- ReDoc-Inject: <security-definitions> -->
- x-traitTag: true
- - name: Quick start
- x-traitTag: true
- description: |
- See the [**API Quick Start**](https://docs.influxdata.com/influxdb/v2.3/api-guide/api_intro/)
- to get up and running authenticating with tokens, writing to buckets, and querying data.
- [**InfluxDB API client libraries**](https://docs.influxdata.com/influxdb/v2.3/api-guide/client-libraries/)
- are available for popular languages and ready to import into your application.
- - name: Common parameters
- x-traitTag: true
- description: |
- Many InfluxDB API endpoints require parameters to specify resources--for example,
- writing to a **bucket** in an **organization**.
- ### Common query parameters
- | Query parameter | Value type | Description |
- |:------------------------ |:--------------------- |:-------------------------------------------|
- | `bucket` | string | The bucket name or ID ([find your bucket](https://docs.influxdata.com/influxdb/v2.3/organizations/buckets/view-buckets/). |
- | `bucketID` | string | The bucket ID ([find your bucket](https://docs.influxdata.com/influxdb/v2.3/organizations/buckets/view-buckets/). |
- | `org` | string | The organization name or ID ([find your organization](https://docs.influxdata.com/influxdb/v2.3/organizations/view-orgs/). |
- | `orgID` | 16-byte string | The organization ID ([find your organization](https://docs.influxdata.com/influxdb/v2.3/organizations/view-orgs/). |
- - name: Headers
- x-traitTag: true
- description: |
- InfluxDB API endpoints use standard HTTP request and response headers.
- **Note**: Not all operations support all headers.
- ### Request headers
- | Header | Value type | Description |
- |:------------------------ |:--------------------- |:-------------------------------------------|
- | `Accept` | string | The content type that the client can understand. |
- | `Authorization` | string | The authorization scheme and credential. |
- | `Content-Encoding` | string | The compression applied to the line protocol in the request payload. |
- | `Content-Length` | integer | The size of the entity-body, in bytes, sent to the database. |
- | `Content-Type` | string | The format of the data in the request body. |
- - name: Response codes
- x-traitTag: true
- description: |
- InfluxDB API endpoints use standard HTTP status codes for success and failure responses.
- The response body may include additional details.
- For details about a specific operation's response,
- see **Responses** and **Response Samples** for that operation.
- API operations may return the following HTTP status codes:
- | Code | Status | Description |
- |:-----------:|:------------------------ |:--------------------- |
- | `200` | Success | |
- | `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. |
- | `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> |
- | `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> |
- | `404` | Not found | Requested resource was not found. `message` in the response body provides details about the requested resource. |
- | `413` | Request entity too large | Request payload exceeds the size limit. |
- | `422` | Unprocessable entity | Request data is invalid. `code` and `message` in the response body provide details about the problem. |
- | `429` | Too many requests | API token is temporarily over the request quota. The `Retry-After` header describes when to try the request again. |
- | `500` | Internal server error | |
- | `503` | Service unavailable | Server is temporarily unavailable to process the request. The `Retry-After` header describes when to try the request again. |
- x-tagGroups:
- - name: Overview
- tags:
- - Quick start
- - Authentication
- - Headers
- - Response codes
- - name: Popular endpoints
- tags:
- - Data I/O endpoints
- - Security and access endpoints
- - System information endpoints
- - name: All endpoints
- tags: []
- paths:
- /signin:
- post:
- operationId: PostSignin
- summary: Create a user session.
- description: 'Authenticates ***Basic Auth*** credentials for a user. If successful, creates a new UI session for the user.'
- tags:
- - Signin
- security:
- - BasicAuthentication: []
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- responses:
- '204':
- description: Success. User authenticated.
- '401':
- description: Unauthorized access.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '403':
- description: User account is disabled.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unsuccessful authentication.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /signout:
- post:
- operationId: PostSignout
- summary: Expire the current UI session
- tags:
- - Signout
- description: Expires the current UI session for the user.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- responses:
- '204':
- description: Session successfully expired
- '401':
- description: Unauthorized access
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unsuccessful session expiry
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /ping:
- get:
- operationId: GetPing
- summary: Get the status and version of the instance
- description: Returns the status and InfluxDB version of the instance.
- servers:
- - url: ''
- tags:
- - Ping
- - System information endpoints
- responses:
- '204':
- description: |
- OK.
- Headers contain InfluxDB version information.
- headers:
- X-Influxdb-Build:
- schema:
- type: string
- description: The type of InfluxDB build.
- X-Influxdb-Version:
- schema:
- type: integer
- description: The version of InfluxDB.
- head:
- operationId: HeadPing
- summary: Get the status and version of the instance
- description: Returns the status and InfluxDB version of the instance.
- servers:
- - url: ''
- tags:
- - Ping
- responses:
- '204':
- description: |
- OK.
- Headers contain InfluxDB version information.
- headers:
- X-Influxdb-Build:
- schema:
- type: string
- description: The type of InfluxDB build.
- X-Influxdb-Version:
- schema:
- type: integer
- description: The version of InfluxDB.
- /:
- get:
- operationId: GetRoutes
- summary: List all top level routes
- tags:
- - Routes
- - System information endpoints
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- responses:
- default:
- description: All routes
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Routes'
- /dbrps:
- get:
- operationId: GetDBRPs
- tags:
- - DBRPs
- summary: List database retention policy mappings
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: orgID
- description: Specifies the organization ID to filter on
- schema:
- type: string
- - in: query
- name: org
- description: Specifies the organization name to filter on
- schema:
- type: string
- - in: query
- name: id
- description: Specifies the mapping ID to filter on
- schema:
- type: string
- - in: query
- name: bucketID
- description: Specifies the bucket ID to filter on
- schema:
- type: string
- - in: query
- name: default
- description: Specifies filtering on default
- schema:
- type: boolean
- - in: query
- name: db
- description: Specifies the database to filter on
- schema:
- type: string
- - in: query
- name: rp
- description: Specifies the retention policy to filter on
- schema:
- type: string
- responses:
- '200':
- description: Success. Returns a list of database retention policy mappings.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DBRPs'
- '400':
- description: Bad request. The request has one or more invalid parameters.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostDBRP
- tags:
- - DBRPs
- summary: Add a database retention policy mapping
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- requestBody:
- description: The database retention policy mapping to add
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DBRPCreate'
- responses:
- '201':
- description: Created. Returns the created database retention policy mapping.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DBRP'
- '400':
- description: Bad request. The mapping in the request has one or more invalid IDs.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/dbrps/{dbrpID}':
- get:
- operationId: GetDBRPsID
- tags:
- - DBRPs
- summary: Retrieve a database retention policy mapping
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: orgID
- description: Specifies the organization ID of the mapping
- schema:
- type: string
- - in: query
- name: org
- description: Specifies the organization name of the mapping
- schema:
- type: string
- - in: path
- name: dbrpID
- schema:
- type: string
- required: true
- description: The database retention policy mapping ID
- responses:
- '200':
- description: The database retention policy requested
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DBRPGet'
- '400':
- description: if any of the IDs passed is invalid
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- operationId: PatchDBRPID
- tags:
- - DBRPs
- summary: Update a database retention policy mapping
- requestBody:
- description: Database retention policy update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DBRPUpdate'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: orgID
- description: Specifies the organization ID of the mapping
- schema:
- type: string
- - in: query
- name: org
- description: Specifies the organization name of the mapping
- schema:
- type: string
- - in: path
- name: dbrpID
- schema:
- type: string
- required: true
- description: The database retention policy mapping.
- responses:
- '200':
- description: An updated mapping
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DBRPGet'
- '400':
- description: if any of the IDs passed is invalid
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '404':
- description: The mapping was not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- operationId: DeleteDBRPID
- tags:
- - DBRPs
- summary: Delete a database retention policy
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: orgID
- description: Specifies the organization ID of the mapping
- schema:
- type: string
- - in: query
- name: org
- description: Specifies the organization name of the mapping
- schema:
- type: string
- - in: path
- name: dbrpID
- schema:
- type: string
- required: true
- description: The database retention policy mapping
- responses:
- '204':
- description: Delete has been accepted
- '400':
- description: if any of the IDs passed is invalid
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /telegraf/plugins:
- get:
- operationId: GetTelegrafPlugins
- tags:
- - Telegraf Plugins
- summary: List all Telegraf plugins
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: type
- description: The type of plugin desired.
- schema:
- type: string
- responses:
- '200':
- description: A list of Telegraf plugins.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TelegrafPlugins'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /telegrafs:
- get:
- operationId: GetTelegrafs
- tags:
- - Telegrafs
- summary: List all Telegraf configurations
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: orgID
- description: The organization ID the Telegraf config belongs to.
- schema:
- type: string
- responses:
- '200':
- description: A list of Telegraf configurations
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Telegrafs'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostTelegrafs
- tags:
- - Telegrafs
- summary: Create a Telegraf configuration
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- requestBody:
- description: Telegraf configuration to create
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TelegrafPluginRequest'
- responses:
- '201':
- description: Telegraf configuration created
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Telegraf'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/telegrafs/{telegrafID}':
- get:
- operationId: GetTelegrafsID
- tags:
- - Telegrafs
- summary: Retrieve a Telegraf configuration
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf configuration ID.
- - in: header
- name: Accept
- required: false
- schema:
- type: string
- default: application/toml
- enum:
- - application/toml
- - application/json
- - application/octet-stream
- responses:
- '200':
- description: Telegraf configuration details
- content:
- application/toml:
- example: |-
- [agent]
- interval = "10s"
- schema:
- type: string
- application/json:
- schema:
- $ref: '#/components/schemas/Telegraf'
- application/octet-stream:
- example: |-
- [agent]
- interval = "10s"
- schema:
- type: string
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- put:
- operationId: PutTelegrafsID
- tags:
- - Telegrafs
- summary: Update a Telegraf configuration
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- requestBody:
- description: Telegraf configuration update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TelegrafPluginRequest'
- responses:
- '200':
- description: An updated Telegraf configurations
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Telegraf'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- operationId: DeleteTelegrafsID
- tags:
- - Telegrafs
- summary: Delete a Telegraf configuration
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf configuration ID.
- responses:
- '204':
- description: Delete has been accepted
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/telegrafs/{telegrafID}/labels':
- get:
- operationId: GetTelegrafsIDLabels
- tags:
- - Telegrafs
- summary: List all labels for a Telegraf config
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- responses:
- '200':
- description: A list of all labels for a Telegraf config
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelsResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostTelegrafsIDLabels
- tags:
- - Telegrafs
- summary: Add a label to a Telegraf config
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelMapping'
- responses:
- '201':
- description: The label added to the Telegraf config
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/telegrafs/{telegrafID}/labels/{labelID}':
- delete:
- operationId: DeleteTelegrafsIDLabelsID
- tags:
- - Telegrafs
- summary: Delete a label from a Telegraf config
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The label ID.
- responses:
- '204':
- description: Delete has been accepted
- '404':
- description: Telegraf config not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/telegrafs/{telegrafID}/members':
- get:
- operationId: GetTelegrafsIDMembers
- tags:
- - Telegrafs
- summary: List all users with member privileges for a Telegraf config
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- responses:
- '200':
- description: A list of Telegraf config members
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceMembers'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostTelegrafsIDMembers
- tags:
- - Telegrafs
- summary: Add a member to a Telegraf config
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- requestBody:
- description: User to add as member
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AddResourceMemberRequestBody'
- responses:
- '201':
- description: Member added to Telegraf config
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceMember'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/telegrafs/{telegrafID}/members/{userID}':
- delete:
- operationId: DeleteTelegrafsIDMembersID
- tags:
- - Telegrafs
- summary: Remove a member from a Telegraf config
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the member to remove.
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- responses:
- '204':
- description: Member removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/telegrafs/{telegrafID}/owners':
- get:
- operationId: GetTelegrafsIDOwners
- tags:
- - Telegrafs
- summary: List all owners of a Telegraf configuration
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf configuration ID.
- responses:
- '200':
- description: Returns Telegraf configuration owners as a ResourceOwners list
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceOwners'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostTelegrafsIDOwners
- tags:
- - Telegrafs
- summary: Add an owner to a Telegraf configuration
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf configuration ID.
- requestBody:
- description: User to add as owner
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AddResourceMemberRequestBody'
- responses:
- '201':
- description: Telegraf configuration owner was added. Returns a ResourceOwner that references the User.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceOwner'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/telegrafs/{telegrafID}/owners/{userID}':
- delete:
- operationId: DeleteTelegrafsIDOwnersID
- tags:
- - Telegrafs
- summary: Remove an owner from a Telegraf config
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the owner to remove.
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- responses:
- '204':
- description: Owner removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/variables/{variableID}/labels':
- get:
- operationId: GetVariablesIDLabels
- tags:
- - Variables
- summary: List all labels for a variable
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: variableID
- schema:
- type: string
- required: true
- description: The variable ID.
- responses:
- '200':
- description: A list of all labels for a variable
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelsResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostVariablesIDLabels
- tags:
- - Variables
- summary: Add a label to a variable
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: variableID
- schema:
- type: string
- required: true
- description: The variable ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelMapping'
- responses:
- '201':
- description: The newly added label
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/variables/{variableID}/labels/{labelID}':
- delete:
- operationId: DeleteVariablesIDLabelsID
- tags:
- - Variables
- summary: Delete a label from a variable
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: variableID
- schema:
- type: string
- required: true
- description: The variable ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The label ID to delete.
- responses:
- '204':
- description: Delete has been accepted
- '404':
- description: Variable not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /write:
- post:
- operationId: PostWrite
- tags:
- - Data I/O endpoints
- - Write
- summary: Write data
- description: |
- Writes data to a bucket.
- Use this endpoint to send data in [line protocol](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/line-protocol/) format to InfluxDB.
- #### InfluxDB Cloud
- - Takes the following steps when you send a write request:
- 1. Validates the request and queues the write.
- 2. If the write is queued, responds with an HTTP `204` status code.
- 3. Handles the write asynchronously and reaches eventual consistency.
- An HTTP `2xx` status code acknowledges that the write or delete is queued.
- To ensure that InfluxDB Cloud handles writes and deletes in the order you request them,
- wait for a response before you send the next request.
- Because writes are asynchronous, data might not yet be written
- when you receive the response.
- #### InfluxDB OSS
- - Validates the request, handles the write synchronously,
- and then responds with success or failure.
- - If all points were written successfully, responds with HTTP `204` status code;
- otherwise, returns the first line that failed.
- #### Required permissions
- - `write-buckets` or `write-bucket BUCKET_ID`.
- `BUCKET_ID` is the ID of the destination bucket.
- #### Rate limits (with InfluxDB Cloud)
- `write` rate limits apply.
- For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/).
- #### Related guides
- - [Write data with the InfluxDB API](https://docs.influxdata.com/influxdb/v2.3/write-data/developer-tools/api).
- - [Optimize writes to InfluxDB](https://docs.influxdata.com/influxdb/v2.3/write-data/best-practices/optimize-writes/).
- - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/v2.3/write-data/troubleshoot/)
- requestBody:
- description: |
- Data in line protocol format.
- To send compressed data, do the following:
- 1. Use [GZIP](https://www.gzip.org/) to compress the line protocol data.
- 2. In your request, send the compressed data and the
- `Content-Encoding: gzip` header.
- #### Related guides
- - [Best practices for optimizing writes](https://docs.influxdata.com/influxdb/v2.3/write-data/best-practices/optimize-writes/).
- required: true
- content:
- text/plain:
- schema:
- type: string
- format: byte
- examples:
- plain-utf8:
- value: |
- airSensors,sensor_id=TLM0201 temperature=73.97038159354763,humidity=35.23103248356096,co=0.48445310567793615 1630424257000000000
- airSensors,sensor_id=TLM0202 temperature=75.30007505999716,humidity=35.651929918691714,co=0.5141876544505826 1630424257000000000
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: header
- name: Content-Encoding
- description: |
- The compression applied to the line protocol in the request payload.
- To send a GZIP payload, pass `Content-Encoding: gzip` header.
- schema:
- type: string
- description: |
- Content coding.
- Use `gzip` for compressed data or `identity` for unmodified, uncompressed data.
- default: identity
- enum:
- - gzip
- - identity
- - in: header
- name: Content-Type
- description: |
- The format of the data in the request body.
- To send a line protocol payload, pass `Content-Type: text/plain; charset=utf-8`.
- schema:
- type: string
- description: |
- `text/plain` is the content type for line protocol. `UTF-8` is the default character set.
- default: text/plain; charset=utf-8
- enum:
- - text/plain
- - text/plain; charset=utf-8
- - in: header
- name: Content-Length
- description: |
- The size of the entity-body, in bytes, sent to InfluxDB.
- If the length is greater than the `max body` configuration option,
- the server responds with status code `413`.
- schema:
- type: integer
- description: The length in decimal number of octets.
- - in: header
- name: Accept
- description: |
- The content type that the client can understand.
- Writes only return a response body if they fail--for example,
- due to a formatting problem or quota limit.
- #### InfluxDB Cloud
- - Returns only `application/json` for format and limit errors.
- - Returns only `text/html` for some quota limit errors.
- #### InfluxDB OSS
- - Returns only `application/json` for format and limit errors.
- #### Related guides
- - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/v2.3/write-data/troubleshoot/).
- schema:
- type: string
- description: Error content type.
- default: application/json
- enum:
- - application/json
- - in: query
- name: org
- description: |
- The destination organization for writes.
- InfluxDB writes all points in the batch to this organization.
- If you pass both `orgID` and `org`, they must both be valid.
- #### InfluxDB Cloud
- - Doesn't require `org` or `orgID`.
- - Writes to the bucket in the organization associated with the authorization (API token).
- #### InfluxDB OSS
- - Requires either `org` or `orgID`.
- - InfluxDB writes all points in the batch to this organization.
- required: true
- schema:
- type: string
- description: The organization name or ID.
- - in: query
- name: orgID
- description: |
- The ID of the destination organization for writes.
- If you pass both `orgID` and `org`, they must both be valid.
- #### InfluxDB Cloud
- - Doesn't require `org` or `orgID`.
- - Writes to the bucket in the organization associated with the authorization (API token).
- #### InfluxDB OSS
- - Requires either `org` or `orgID`.
- - InfluxDB writes all points in the batch to this organization.
- schema:
- type: string
- - in: query
- name: bucket
- description: |
- The destination bucket for writes.
- InfluxDB writes all points in the batch to this bucket.
- required: true
- schema:
- type: string
- description: The bucket name or ID.
- - in: query
- name: precision
- description: The precision for unix timestamps in the line protocol batch.
- schema:
- $ref: '#/components/schemas/WritePrecision'
- responses:
- '204':
- description: |
- Success.
- #### InfluxDB Cloud
- - Validated and queued the request.
- - Handles the write asynchronously - the write might not have completed yet.
- #### InfluxDB OSS
- - Successfully wrote all points in the batch.
- #### Related guides
- - [How to check for write errors](https://docs.influxdata.com/influxdb/v2.3/write-data/troubleshoot/).
- '400':
- description: |
- Bad request. The response body contains detail about the error.
- InfluxDB returns this error if the line protocol data in the request 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.
- #### InfluxDB Cloud
- - Returns this error for bucket schema conflicts.
- #### InfluxDB OSS
- - Returns this error if `org` or `orgID` doesn't match an organization.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LineProtocolError'
- examples:
- measurementSchemaFieldTypeConflict:
- summary: (Cloud) field type conflict thrown by an explicit bucket schema
- value:
- code: invalid
- 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'
- orgNotFound:
- summary: (OSS) organization not found
- value:
- code: invalid
- message: 'failed to decode request body: organization not found'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '413':
- description: |
- The request payload is too large.
- InfluxDB rejected the batch and did not write any data.
- #### InfluxDB Cloud:
- - Returns this error if the payload exceeds the 50MB size limit.
- - Returns `Content-Type: text/html` for this error.
- #### InfluxDB OSS:
- - Returns this error only if the [Go (golang) `ioutil.ReadAll()`](https://pkg.go.dev/io/ioutil#ReadAll) function raises an error.
- - Returns `Content-Type: application/json` for this error.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LineProtocolLengthError'
- examples:
- dataExceedsSizeLimitOSS:
- summary: InfluxDB OSS response
- value: |
- {"code":"request too large","message":"unable to read data: points batch is too large"}
- text/html:
- schema:
- type: string
- examples:
- dataExceedsSizeLimit:
- summary: InfluxDB Cloud response
- value: |
- <html>
- <head><title>413 Request Entity Too Large</title></head>
- <body>
- <center><h1>413 Request Entity Too Large</h1></center>
- <hr>
- <center>nginx</center>
- </body>
- </html>
- '429':
- description: |
- Too many requests.
- #### InfluxDB Cloud
- - 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)
- or if a **delete** request exceeds the maximum [global limit](https://docs.influxdata.com/influxdb/cloud/account-management/limits/#global-limits).
- - For rate limits that reset automatically, returns a `Retry-After` header that describes when to try the write again.
- - For limits that can't reset (for example, **cardinality limit**), doesn't return a `Retry-After` header.
- Rates (data-in (writes), queries (reads), and deletes) accrue within a fixed five-minute window.
- Once a rate limit is exceeded, InfluxDB returns an error response until the current five-minute window resets.
- #### InfluxDB OSS
- - Doesn't return this error.
- headers:
- Retry-After:
- description: Non-negative decimal integer indicating seconds to wait before retrying the request.
- schema:
- type: integer
- format: int32
- '500':
- $ref: '#/components/responses/InternalServerError'
- '503':
- description: |
- Service unavailable.
- - Returns this error if
- the server is temporarily unavailable to accept writes.
- - Returns a `Retry-After` header that describes when to try the write again.
- headers:
- Retry-After:
- description: Non-negative decimal integer indicating seconds to wait before retrying the request.
- schema:
- type: integer
- format: int32
- default:
- $ref: '#/components/responses/GeneralServerError'
- /delete:
- post:
- operationId: PostDelete
- tags:
- - Data I/O endpoints
- - Delete
- summary: Delete data
- description: |
- Deletes data from a bucket.
- Use this endpoint to delete points from a bucket in a specified time range.
- #### InfluxDB Cloud
- - Does the following when you send a delete request:
- 1. Validates the request and queues the delete.
- 2. Returns _success_ if queued; _error_ otherwise.
- 3. Handles the delete asynchronously.
- #### InfluxDB OSS
- - Validates the request, handles the delete synchronously,
- and then responds with success or failure.
- #### Required permissions
- - `write-buckets` or `write-bucket BUCKET_ID`.
- `BUCKET_ID` is the ID of the destination bucket.
- #### Rate limits (with InfluxDB Cloud)
- `write` rate limits apply.
- For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/).
- #### Related guides
- - [Delete data](https://docs.influxdata.com/influxdb/v2.3/write-data/delete-data/).
- - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/delete-predicate/).
- - Learn how InfluxDB handles [deleted tags](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys/)
- and [deleted fields](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys/).
- x-codeSamples:
- - lang: Shell
- label: cURL
- source: |
- curl --request POST INFLUX_URL/api/v2/delete?org=INFLUX_ORG&bucket=INFLUX_BUCKET \
- --header 'Authorization: Token INFLUX_API_TOKEN' \
- --header 'Content-Type: application/json' \
- --data '{
- "start": "2020-03-01T00:00:00Z",
- "stop": "2020-11-14T00:00:00Z",
- "predicate": "tag1=\"value1\" and (tag2=\"value2\" and tag3!=\"value3\")"
- }'
- requestBody:
- description: |
- Time range parameters and an optional **delete predicate expression**.
- To select points to delete within the specified time range, pass a
- **delete predicate expression** in the `predicate` property of the request body.
- If you don't pass a `predicate`, InfluxDB deletes all data with timestamps
- in the specified time range.
- #### Related guides
- - [Delete data](https://docs.influxdata.com/influxdb/v2.3/write-data/delete-data/).
- - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/delete-predicate/).
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DeletePredicateRequest'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: org
- description: |
- The organization to delete data from.
- If you pass both `orgID` and `org`, they must both be valid.
- #### InfluxDB Cloud
- - Doesn't require `org` or `orgID`.
- - Deletes data from the bucket in the organization associated with the authorization (API token).
- #### InfluxDB OSS
- - Requires either `org` or `orgID`.
- schema:
- type: string
- description: The organization name or ID.
- - in: query
- name: bucket
- description: |
- The name or ID of the bucket to delete data from.
- If you pass both `bucket` and `bucketID`, `bucketID` takes precedence.
- schema:
- type: string
- description: The bucket name or ID.
- - in: query
- name: orgID
- description: |
- The ID of the organization to delete data from.
- If you pass both `orgID` and `org`, they must both be valid.
- #### InfluxDB Cloud
- - Doesn't require `org` or `orgID`.
- - Deletes data from the bucket in the organization associated with the authorization (API token).
- #### InfluxDB OSS
- - Requires either `org` or `orgID`.
- schema:
- type: string
- description: The organization ID.
- - in: query
- name: bucketID
- description: |
- The ID of the bucket to delete data from.
- If you pass both `bucket` and `bucketID`, `bucketID` takes precedence.
- schema:
- type: string
- description: The bucket ID.
- responses:
- '204':
- description: |
- Success.
- #### InfluxDB Cloud
- - Validated and queued the request.
- - Handles the delete asynchronously - the deletion might not have completed yet.
- An HTTP `2xx` status code acknowledges that the write or delete is queued.
- To ensure that InfluxDB Cloud handles writes and deletes in the order you request them,
- wait for a response before you send the next request.
- Because writes are asynchronous, data might not yet be written
- when you receive the response.
- #### InfluxDB OSS
- - Deleted the data.
- '400':
- description: |
- Bad request.
- The response body contains detail about the error.
- #### InfluxDB OSS
- - Returns this error if `org` or `orgID` doesn't match an organization.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- orgNotFound:
- summary: Organization not found
- value:
- code: invalid
- message: 'failed to decode request body: organization not found'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- /labels:
- post:
- operationId: PostLabels
- tags:
- - Labels
- summary: Create a label
- requestBody:
- description: The label to create.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelCreateRequest'
- responses:
- '201':
- description: Success. The label was created.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelResponse'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- get:
- operationId: GetLabels
- tags:
- - Labels
- summary: List all labels
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: orgID
- description: The organization ID.
- schema:
- type: string
- responses:
- '200':
- description: Success. The response body contains a list of labels.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelsResponse'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- '/labels/{labelID}':
- get:
- operationId: GetLabelsID
- tags:
- - Labels
- summary: Retrieve a label
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to update.
- responses:
- '200':
- description: Success. The response body contains the label.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelResponse'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- patch:
- operationId: PatchLabelsID
- tags:
- - Labels
- summary: Update a label
- requestBody:
- description: A label update.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelUpdate'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to update.
- responses:
- '200':
- description: Success. The response body contains the updated label.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelResponse'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- delete:
- operationId: DeleteLabelsID
- tags:
- - Labels
- summary: Delete a label
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to delete.
- responses:
- '204':
- description: Success. The delete was accepted.
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- '/dashboards/{dashboardID}':
- get:
- operationId: GetDashboardsID
- tags:
- - Dashboards
- summary: Retrieve a dashboard
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The ID of the dashboard to update.
- - in: query
- name: include
- required: false
- schema:
- type: string
- enum:
- - properties
- description: 'If `properties`, includes the cell view properties in the response.'
- responses:
- '200':
- description: Retrieve a single dashboard
- content:
- application/json:
- schema:
- oneOf:
- - $ref: '#/components/schemas/Dashboard'
- - $ref: '#/components/schemas/DashboardWithViewProperties'
- '404':
- description: Dashboard not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- operationId: PatchDashboardsID
- tags:
- - Dashboards
- summary: Update a dashboard
- requestBody:
- description: Patching of a dashboard
- required: true
- content:
- application/json:
- schema:
- type: object
- title: PatchDashboardRequest
- properties:
- name:
- description: 'optional, when provided will replace the name'
- type: string
- description:
- description: 'optional, when provided will replace the description'
- type: string
- cells:
- description: 'optional, when provided will replace all existing cells with the cells provided'
- $ref: '#/components/schemas/CellWithViewProperties'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The ID of the dashboard to update.
- responses:
- '200':
- description: Updated dashboard
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Dashboard'
- '404':
- description: Dashboard not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- operationId: DeleteDashboardsID
- tags:
- - Dashboards
- summary: Delete a dashboard
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The ID of the dashboard to update.
- responses:
- '204':
- description: Delete has been accepted
- '404':
- description: Dashboard not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/dashboards/{dashboardID}/cells':
- put:
- operationId: PutDashboardsIDCells
- tags:
- - Cells
- - Dashboards
- summary: Replace cells in a dashboard
- description: Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Cells'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The ID of the dashboard to update.
- responses:
- '201':
- description: Replaced dashboard cells
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Dashboard'
- '404':
- description: Dashboard not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostDashboardsIDCells
- tags:
- - Cells
- - Dashboards
- summary: Create a dashboard cell
- requestBody:
- description: Cell that will be added
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateCell'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The ID of the dashboard to update.
- responses:
- '201':
- description: Cell successfully added
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Cell'
- '404':
- description: Dashboard not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/dashboards/{dashboardID}/cells/{cellID}':
- patch:
- operationId: PatchDashboardsIDCellsID
- tags:
- - Cells
- - Dashboards
- summary: Update the non-positional information related to a cell
- description: Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CellUpdate'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The ID of the dashboard to update.
- - in: path
- name: cellID
- schema:
- type: string
- required: true
- description: The ID of the cell to update.
- responses:
- '200':
- description: Updated dashboard cell
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Cell'
- '404':
- description: Cell or dashboard not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- operationId: DeleteDashboardsIDCellsID
- tags:
- - Cells
- - Dashboards
- summary: Delete a dashboard cell
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The ID of the dashboard to delete.
- - in: path
- name: cellID
- schema:
- type: string
- required: true
- description: The ID of the cell to delete.
- responses:
- '204':
- description: Cell successfully deleted
- '404':
- description: Cell or dashboard not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/dashboards/{dashboardID}/cells/{cellID}/view':
- get:
- operationId: GetDashboardsIDCellsIDView
- tags:
- - Cells
- - Dashboards
- - Views
- summary: Retrieve the view for a cell
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- - in: path
- name: cellID
- schema:
- type: string
- required: true
- description: The cell ID.
- responses:
- '200':
- description: A dashboard cells view
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/View'
- '404':
- description: Cell or dashboard not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- operationId: PatchDashboardsIDCellsIDView
- tags:
- - Cells
- - Dashboards
- - Views
- summary: Update the view for a cell
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/View'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The ID of the dashboard to update.
- - in: path
- name: cellID
- schema:
- type: string
- required: true
- description: The ID of the cell to update.
- responses:
- '200':
- description: Updated cell view
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/View'
- '404':
- description: Cell or dashboard not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/dashboards/{dashboardID}/labels':
- get:
- operationId: GetDashboardsIDLabels
- tags:
- - Dashboards
- summary: List all labels for a dashboard
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- responses:
- '200':
- description: A list of all labels for a dashboard
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelsResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostDashboardsIDLabels
- tags:
- - Dashboards
- summary: Add a label to a dashboard
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelMapping'
- responses:
- '201':
- description: The label added to the dashboard
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/dashboards/{dashboardID}/labels/{labelID}':
- delete:
- operationId: DeleteDashboardsIDLabelsID
- tags:
- - Dashboards
- summary: Delete a label from a dashboard
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to delete.
- responses:
- '204':
- description: Delete has been accepted
- '404':
- description: Dashboard not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/dashboards/{dashboardID}/members':
- get:
- operationId: GetDashboardsIDMembers
- tags:
- - Dashboards
- summary: List all dashboard members
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- responses:
- '200':
- description: A list of users who have member privileges for a dashboard
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceMembers'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostDashboardsIDMembers
- tags:
- - Dashboards
- summary: Add a member to a dashboard
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- requestBody:
- description: User to add as member
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AddResourceMemberRequestBody'
- responses:
- '201':
- description: Added to dashboard members
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceMember'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/dashboards/{dashboardID}/members/{userID}':
- delete:
- operationId: DeleteDashboardsIDMembersID
- tags:
- - Dashboards
- summary: Remove a member from a dashboard
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the member to remove.
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- responses:
- '204':
- description: Member removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/dashboards/{dashboardID}/owners':
- get:
- operationId: GetDashboardsIDOwners
- tags:
- - Dashboards
- summary: List all dashboard owners
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- responses:
- '200':
- description: A list of users who have owner privileges for a dashboard
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceOwners'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostDashboardsIDOwners
- tags:
- - Dashboards
- summary: Add an owner to a dashboard
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- requestBody:
- description: User to add as owner
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AddResourceMemberRequestBody'
- responses:
- '201':
- description: Added to dashboard owners
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceOwner'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/dashboards/{dashboardID}/owners/{userID}':
- delete:
- operationId: DeleteDashboardsIDOwnersID
- tags:
- - Dashboards
- summary: Remove an owner from a dashboard
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the owner to remove.
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- responses:
- '204':
- description: Owner removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /query/ast:
- post:
- operationId: PostQueryAst
- tags:
- - Query
- summary: Generate a query Abstract Syntax Tree (AST)
- description: |
- Analyzes a Flux query and returns a complete package source [Abstract Syntax
- Tree (AST)](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#abstract-syntax-tree-ast)
- for the query.
- Use this endpoint for deep query analysis such as debugging unexpected query
- results.
- A Flux query AST provides a semantic, tree-like representation with contextual
- information about the query. The AST illustrates how the query is distributed
- into different components for execution.
- #### Limitations
- - The endpoint doesn't validate values in the query--for example:
- The following sample Flux query has correct syntax, but contains an incorrect `from()` property key:
- ```js
- from(foo: "iot_center")
- |> range(start: -90d)
- |> filter(fn: (r) => r._measurement == "environment")
- ```
- The following sample JSON shows how to pass the query in the request body:
- ```js
- from(foo: "iot_center")
- |> range(start: -90d)
- |> filter(fn: (r) => r._measurement == "environment")
- ```
- The following code sample shows how to pass the query as JSON in the request body:
- ```json
- { "query": "from(foo: \"iot_center\")\
- |> range(start: -90d)\
- |> filter(fn: (r) => r._measurement == \"environment\")"
- }
- ```
- Passing this to `/api/v2/query/ast` will return a successful response
- with a generated AST.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: header
- name: Content-Type
- schema:
- type: string
- enum:
- - application/json
- requestBody:
- description: The Flux query to analyze.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LanguageRequest'
- x-codeSamples:
- - lang: Shell
- label: 'cURL: Analyze and generate AST for the query'
- source: |
- curl --request POST "http://localhost:8086/api/v2/query/ast" \
- --header 'Content-Type: application/json' \
- --header 'Accept: application/json' \
- --header "Authorization: Token INFLUX_TOKEN" \
- --data-binary @- << EOL
- {
- "query": "from(bucket: \"INFLUX_BUCKET_NAME\")\
- |> range(start: -5m)\
- |> filter(fn: (r) => r._measurement == \"example-measurement\")"
- }
- EOL
- responses:
- '200':
- description: |
- Success.
- The response body contains an Abstract Syntax Tree (AST) of the Flux query.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ASTResponse'
- examples:
- successResponse:
- value:
- ast:
- type: Package
- package: main
- files:
- - type: File
- location:
- start:
- line: 1
- column: 1
- end:
- line: 1
- column: 109
- source: 'from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "example-measurement")'
- metadata: parser-type=rust
- package: null
- imports: null
- body:
- - type: ExpressionStatement
- location:
- start:
- line: 1
- column: 1
- end:
- line: 1
- column: 109
- source: 'from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "example-measurement")'
- expression:
- type: PipeExpression
- location:
- start:
- line: 1
- column: 1
- end:
- line: 1
- column: 109
- source: 'from(bucket: "example-bucket") |> range(start: -5m) |> filter(fn: (r) => r._measurement == "example-measurement")'
- argument:
- type: PipeExpression
- location:
- start:
- line: 1
- column: 1
- end:
- line: 1
- column: 47
- source: 'from(bucket: "example-bucket") |> range(start: -5m)'
- argument:
- type: CallExpression
- location:
- start:
- line: 1
- column: 1
- end:
- line: 1
- column: 26
- source: 'from(bucket: "example-bucket")'
- callee:
- type: Identifier
- location:
- start:
- line: 1
- column: 1
- end:
- line: 1
- column: 5
- source: from
- name: from
- arguments:
- - type: ObjectExpression
- location:
- start:
- line: 1
- column: 6
- end:
- line: 1
- column: 25
- source: 'bucket: "example-bucket"'
- properties:
- - type: Property
- location:
- start:
- line: 1
- column: 6
- end:
- line: 1
- column: 25
- source: 'bucket: "example-bucket"'
- key:
- type: Identifier
- location:
- start:
- line: 1
- column: 6
- end:
- line: 1
- column: 12
- source: bucket
- name: bucket
- value:
- type: StringLiteral
- location:
- start:
- line: 1
- column: 14
- end:
- line: 1
- column: 25
- source: '"example-bucket"'
- value: example-bucket
- call:
- type: CallExpression
- location:
- start:
- line: 1
- column: 30
- end:
- line: 1
- column: 47
- source: 'range(start: -5m)'
- callee:
- type: Identifier
- location:
- start:
- line: 1
- column: 30
- end:
- line: 1
- column: 35
- source: range
- name: range
- arguments:
- - type: ObjectExpression
- location:
- start:
- line: 1
- column: 36
- end:
- line: 1
- column: 46
- source: 'start: -5m'
- properties:
- - type: Property
- location:
- start:
- line: 1
- column: 36
- end:
- line: 1
- column: 46
- source: 'start: -5m'
- key:
- type: Identifier
- location:
- start:
- line: 1
- column: 36
- end:
- line: 1
- column: 41
- source: start
- name: start
- value:
- type: UnaryExpression
- location:
- start:
- line: 1
- column: 43
- end:
- line: 1
- column: 46
- source: '-5m'
- operator: '-'
- argument:
- type: DurationLiteral
- location:
- start:
- line: 1
- column: 44
- end:
- line: 1
- column: 46
- source: 5m
- values:
- - magnitude: 5
- unit: m
- call:
- type: CallExpression
- location:
- start:
- line: 1
- column: 51
- end:
- line: 1
- column: 109
- source: 'filter(fn: (r) => r._measurement == "example-measurement")'
- callee:
- type: Identifier
- location:
- start:
- line: 1
- column: 51
- end:
- line: 1
- column: 57
- source: filter
- name: filter
- arguments:
- - type: ObjectExpression
- location:
- start:
- line: 1
- column: 58
- end:
- line: 1
- column: 108
- source: 'fn: (r) => r._measurement == "example-measurement"'
- properties:
- - type: Property
- location:
- start:
- line: 1
- column: 58
- end:
- line: 1
- column: 108
- source: 'fn: (r) => r._measurement == "example-measurement"'
- key:
- type: Identifier
- location:
- start:
- line: 1
- column: 58
- end:
- line: 1
- column: 60
- source: fn
- name: fn
- value:
- type: FunctionExpression
- location:
- start:
- line: 1
- column: 62
- end:
- line: 1
- column: 108
- source: (r) => r._measurement == "example-measurement"
- params:
- - type: Property
- location:
- start:
- line: 1
- column: 63
- end:
- line: 1
- column: 64
- source: r
- key:
- type: Identifier
- location:
- start:
- line: 1
- column: 63
- end:
- line: 1
- column: 64
- source: r
- name: r
- value: null
- body:
- type: BinaryExpression
- location:
- start:
- line: 1
- column: 69
- end:
- line: 1
- column: 108
- source: r._measurement == "example-measurement"
- operator: '=='
- left:
- type: MemberExpression
- location:
- start:
- line: 1
- column: 69
- end:
- line: 1
- column: 83
- source: r._measurement
- object:
- type: Identifier
- location:
- start:
- line: 1
- column: 69
- end:
- line: 1
- column: 70
- source: r
- name: r
- property:
- type: Identifier
- location:
- start:
- line: 1
- column: 71
- end:
- line: 1
- column: 83
- source: _measurement
- name: _measurement
- right:
- type: StringLiteral
- location:
- start:
- line: 1
- column: 87
- end:
- line: 1
- column: 108
- source: '"example-measurement"'
- value: example-measurement
- '400':
- description: |
- Bad request.
- InfluxDB is unable to parse the request.
- The response body contains detail about the problem.
- headers:
- X-Platform-Error-Code:
- description: |
- The reason for the error.
- schema:
- type: string
- example: invalid
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- invalidASTValue:
- summary: Invalid AST
- description: |
- If the request body contains a missing property key in `from()`,
- returns `invalid` and problem detail.
- value:
- code: invalid
- message: 'invalid AST: loc 1:6-1:19: missing property key'
- default:
- description: Internal server error.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /query/suggestions:
- get:
- operationId: GetQuerySuggestions
- tags:
- - Query
- summary: Retrieve Flux query suggestions
- description: |
- Retrieves a list of Flux query suggestions. Each suggestion contains a
- [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/)
- name and parameters.
- Use this endpoint to retrieve a list of Flux query suggestions used in the
- InfluxDB Flux Query Builder. Helper function names have an underscore (`_`)
- prefix and aren't meant to be used directly in queries--for example:
- - **Recommended**: Use `top(n, columns=["_value"], tables=<-)` to sort
- on a column and keep the top n records instead of `_sortLimit_`.
- `top` uses the `_sortLimit` helper function.
- #### Limitations
- - Using `/api/v2/query/suggestions/` (note the trailing slash) with cURL
- will result in a HTTP `301 Moved Permanently` status code. Please use
- `/api/v2/query/suggestions` without a trailing slash.
- - When writing a query, avoid using `_functionName()` helper functions
- exposed by this endpoint.
- #### Related Guides
- - [List of all Flux functions](https://docs.influxdata.com/influxdb/v2.3/flux/v0.x/stdlib/all-functions/).
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- responses:
- '200':
- description: |
- Success.
- The response body contains a list of Flux query suggestions--function
- names used in the Flux Query Builder autocomplete suggestions.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/FluxSuggestions'
- examples:
- successResponse:
- value:
- funcs:
- - name: _fillEmpty
- params:
- createEmpty: bool
- tables: stream
- - name: _highestOrLowest
- params:
- _sortLimit: function
- column: invalid
- groupColumns: array
- 'n': invalid
- reducer: function
- tables: stream
- - name: _hourSelection
- params:
- location: object
- start: int
- stop: int
- tables: stream
- timeColumn: string
- - name: _sortLimit
- params:
- columns: array
- desc: bool
- 'n': int
- tables: stream
- - name: _window
- params:
- createEmpty: bool
- every: duration
- location: object
- offset: duration
- period: duration
- startColumn: string
- stopColumn: string
- tables: stream
- timeColumn: string
- - name: aggregateWindow
- params:
- column: invalid
- createEmpty: bool
- every: duration
- fn: function
- location: object
- offset: duration
- period: duration
- tables: stream
- timeDst: string
- timeSrc: string
- - name: bool
- params:
- v: invalid
- - name: bottom
- params:
- columns: array
- 'n': int
- tables: stream
- - name: buckets
- params:
- host: string
- org: string
- orgID: string
- token: string
- - name: bytes
- params:
- v: invalid
- - name: cardinality
- params:
- bucket: string
- bucketID: string
- host: string
- org: string
- orgID: string
- predicate: function
- start: invalid
- stop: invalid
- token: string
- - name: chandeMomentumOscillator
- params:
- columns: array
- 'n': int
- tables: stream
- - name: columns
- params:
- column: string
- tables: stream
- - name: contains
- params:
- set: array
- value: invalid
- - name: count
- params:
- column: string
- tables: stream
- - name: cov
- params:
- 'on': array
- pearsonr: bool
- x: invalid
- 'y': invalid
- - name: covariance
- params:
- columns: array
- pearsonr: bool
- tables: stream
- valueDst: string
- - name: cumulativeSum
- params:
- columns: array
- tables: stream
- - name: derivative
- params:
- columns: array
- initialZero: bool
- nonNegative: bool
- tables: stream
- timeColumn: string
- unit: duration
- - name: die
- params:
- msg: string
- - name: difference
- params:
- columns: array
- initialZero: bool
- keepFirst: bool
- nonNegative: bool
- tables: stream
- - name: display
- params:
- v: invalid
- - name: distinct
- params:
- column: string
- tables: stream
- - name: doubleEMA
- params:
- 'n': int
- tables: stream
- - name: drop
- params:
- columns: array
- fn: function
- tables: stream
- - name: duplicate
- params:
- as: string
- column: string
- tables: stream
- - name: duration
- params:
- v: invalid
- - name: elapsed
- params:
- columnName: string
- tables: stream
- timeColumn: string
- unit: duration
- - name: exponentialMovingAverage
- params:
- 'n': int
- tables: stream
- - name: fill
- params:
- column: string
- tables: stream
- usePrevious: bool
- value: invalid
- - name: filter
- params:
- fn: function
- onEmpty: string
- tables: stream
- - name: findColumn
- params:
- column: string
- fn: function
- tables: stream
- - name: findRecord
- params:
- fn: function
- idx: int
- tables: stream
- - name: first
- params:
- column: string
- tables: stream
- - name: float
- params:
- v: invalid
- - name: from
- params:
- bucket: string
- bucketID: string
- host: string
- org: string
- orgID: string
- token: string
- - name: getColumn
- params:
- column: string
- - name: getRecord
- params:
- idx: int
- - name: group
- params:
- columns: array
- mode: string
- tables: stream
- - name: highestAverage
- params:
- column: string
- groupColumns: array
- 'n': int
- tables: stream
- - name: highestCurrent
- params:
- column: string
- groupColumns: array
- 'n': int
- tables: stream
- - name: highestMax
- params:
- column: string
- groupColumns: array
- 'n': int
- tables: stream
- - name: histogram
- params:
- bins: array
- column: string
- countColumn: string
- normalize: bool
- tables: stream
- upperBoundColumn: string
- - name: histogramQuantile
- params:
- countColumn: string
- minValue: float
- quantile: float
- tables: stream
- upperBoundColumn: string
- valueColumn: string
- - name: holtWinters
- params:
- column: string
- interval: duration
- 'n': int
- seasonality: int
- tables: stream
- timeColumn: string
- withFit: bool
- - name: hourSelection
- params:
- location: object
- start: int
- stop: int
- tables: stream
- timeColumn: string
- - name: increase
- params:
- columns: array
- tables: stream
- - name: int
- params:
- v: invalid
- - name: integral
- params:
- column: string
- interpolate: string
- tables: stream
- timeColumn: string
- unit: duration
- - name: join
- params:
- method: string
- 'on': array
- tables: invalid
- - name: kaufmansAMA
- params:
- column: string
- 'n': int
- tables: stream
- - name: kaufmansER
- params:
- 'n': int
- tables: stream
- - name: keep
- params:
- columns: array
- fn: function
- tables: stream
- - name: keyValues
- params:
- keyColumns: array
- tables: stream
- - name: keys
- params:
- column: string
- tables: stream
- - name: last
- params:
- column: string
- tables: stream
- - name: length
- params:
- arr: array
- - name: limit
- params:
- 'n': int
- offset: int
- tables: stream
- - name: linearBins
- params:
- count: int
- infinity: bool
- start: float
- width: float
- - name: logarithmicBins
- params:
- count: int
- factor: float
- infinity: bool
- start: float
- - name: lowestAverage
- params:
- column: string
- groupColumns: array
- 'n': int
- tables: stream
- - name: lowestCurrent
- params:
- column: string
- groupColumns: array
- 'n': int
- tables: stream
- - name: lowestMin
- params:
- column: string
- groupColumns: array
- 'n': int
- tables: stream
- - name: map
- params:
- fn: function
- mergeKey: bool
- tables: stream
- - name: max
- params:
- column: string
- tables: stream
- - name: mean
- params:
- column: string
- tables: stream
- - name: median
- params:
- column: string
- compression: float
- method: string
- tables: stream
- - name: min
- params:
- column: string
- tables: stream
- - name: mode
- params:
- column: string
- tables: stream
- - name: movingAverage
- params:
- 'n': int
- tables: stream
- - name: now
- params: {}
- - name: pearsonr
- params:
- 'on': array
- x: invalid
- 'y': invalid
- - name: pivot
- params:
- columnKey: array
- rowKey: array
- tables: stream
- valueColumn: string
- - name: quantile
- params:
- column: string
- compression: float
- method: string
- q: float
- tables: stream
- - name: range
- params:
- start: invalid
- stop: invalid
- tables: stream
- - name: reduce
- params:
- fn: function
- identity: invalid
- tables: stream
- - name: relativeStrengthIndex
- params:
- columns: array
- 'n': int
- tables: stream
- - name: rename
- params:
- columns: invalid
- fn: function
- tables: stream
- - name: sample
- params:
- column: string
- 'n': int
- pos: int
- tables: stream
- - name: set
- params:
- key: string
- tables: stream
- value: string
- - name: skew
- params:
- column: string
- tables: stream
- - name: sort
- params:
- columns: array
- desc: bool
- tables: stream
- - name: spread
- params:
- column: string
- tables: stream
- - name: stateCount
- params:
- column: string
- fn: function
- tables: stream
- - name: stateDuration
- params:
- column: string
- fn: function
- tables: stream
- timeColumn: string
- unit: duration
- - name: stateTracking
- params:
- countColumn: string
- durationColumn: string
- durationUnit: duration
- fn: function
- tables: stream
- timeColumn: string
- - name: stddev
- params:
- column: string
- mode: string
- tables: stream
- - name: string
- params:
- v: invalid
- - name: sum
- params:
- column: string
- tables: stream
- - name: tableFind
- params:
- fn: function
- tables: stream
- - name: tail
- params:
- 'n': int
- offset: int
- tables: stream
- - name: time
- params:
- v: invalid
- - name: timeShift
- params:
- columns: array
- duration: duration
- tables: stream
- - name: timeWeightedAvg
- params:
- tables: stream
- unit: duration
- - name: timedMovingAverage
- params:
- column: string
- every: duration
- period: duration
- tables: stream
- - name: to
- params:
- bucket: string
- bucketID: string
- fieldFn: function
- host: string
- measurementColumn: string
- org: string
- orgID: string
- tables: stream
- tagColumns: array
- timeColumn: string
- token: string
- - name: toBool
- params:
- tables: stream
- - name: toFloat
- params:
- tables: stream
- - name: toInt
- params:
- tables: stream
- - name: toString
- params:
- tables: stream
- - name: toTime
- params:
- tables: stream
- - name: toUInt
- params:
- tables: stream
- - name: today
- params: {}
- - name: top
- params:
- columns: array
- 'n': int
- tables: stream
- - name: tripleEMA
- params:
- 'n': int
- tables: stream
- - name: tripleExponentialDerivative
- params:
- 'n': int
- tables: stream
- - name: truncateTimeColumn
- params:
- tables: stream
- timeColumn: invalid
- unit: duration
- - name: uint
- params:
- v: invalid
- - name: union
- params:
- tables: array
- - name: unique
- params:
- column: string
- tables: stream
- - name: wideTo
- params:
- bucket: string
- bucketID: string
- host: string
- org: string
- orgID: string
- tables: stream
- token: string
- - name: window
- params:
- createEmpty: bool
- every: duration
- location: object
- offset: duration
- period: duration
- startColumn: string
- stopColumn: string
- tables: stream
- timeColumn: string
- - name: yield
- params:
- name: string
- tables: stream
- '301':
- description: |
- Moved Permanently.
- InfluxData has moved the URL of the endpoint.
- Use `/api/v2/query/suggestions`.
- content:
- text/html:
- schema:
- properties:
- body:
- readOnly: true
- description: Response message with URL of requested resource.
- type: string
- examples:
- movedPermanently:
- summary: Invalid URL
- description: |
- The URL has been permanently moved. Use `/api/v2/query/suggestions`.
- value: |
- <a href="/api/v2/query/suggestions?orgID=INFLUX_ORG_ID">Moved Permanently</a>
- default:
- description: Internal server error.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- x-codeSamples:
- - lang: Shell
- label: cURL
- source: |
- curl --request GET "https://cloud2.influxdata.com/api/v2/query/suggestions" \
- --header "Accept: application/json" \
- --header "Authorization: Token INFLUX_API_TOKEN"
- '/query/suggestions/{name}':
- get:
- operationId: GetQuerySuggestionsName
- tags:
- - Query
- summary: Retrieve a query suggestion for a branching suggestion
- description: |
- Retrieves a query suggestion that contains the name and parameters of the
- requested function.
- Use this endpoint to pass a branching suggestion (a Flux function name) and
- retrieve the parameters of the requested function.
- #### Limitations
- - Use `/api/v2/query/suggestions/{name}` (without a trailing slash).
- `/api/v2/query/suggestions/{name}/` (note the trailing slash) results in a
- HTTP `301 Moved Permanently` status.
- - The function `name` must exist and must be spelled correctly.
- #### Related Guides
- - [List of all Flux functions](https://docs.influxdata.com/influxdb/v2.3/flux/v0.x/stdlib/all-functions/).
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: name
- schema:
- type: string
- required: true
- description: |
- A Flux Function name.
- Only returns functions with this name.
- responses:
- '200':
- description: |
- Success.
- The response body contains the function name and parameters.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/FluxSuggestion'
- examples:
- successResponse:
- value:
- name: sum
- params:
- column: string
- tables: stream
- '500':
- description: |
- Internal server error.
- The value passed for _`name`_ may have been misspelled.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- internalError:
- summary: Invalid function
- description: |
- The requested function doesn't exist.
- value:
- code: internal error
- message: An internal error has occurred
- x-codeSamples:
- - lang: Shell
- label: cURL
- source: |
- curl --request GET "https://cloud2.influxdata.com/api/v2/query/suggestions/sum/" \
- --header "Accept: application/json" \
- --header "Authorization: Token INFLUX_API_TOKEN"
- /query/analyze:
- post:
- operationId: PostQueryAnalyze
- tags:
- - Query
- summary: Analyze a Flux query
- description: |
- Analyzes a [Flux query](https://docs.influxdata.com/flux/v0.x/) for syntax
- errors and returns the list of errors.
- In the following sample query, `from()` is missing the property key.
- ```json
- { "query": "from(: \"iot_center\")\
- |> range(start: -90d)\
- |> filter(fn: (r) => r._measurement == \"environment\")",
- "type": "flux"
- }
- ```
- If you pass this in a request to the `/api/v2/analyze` endpoint,
- InfluxDB returns an `errors` list that contains an error object for the missing key.
- #### Limitations
- - The endpoint doesn't validate values in the query--for example:
- - The following sample query has correct syntax, but contains an incorrect `from()` property key:
- ```json
- { "query": "from(foo: \"iot_center\")\
- |> range(start: -90d)\
- |> filter(fn: (r) => r._measurement == \"environment\")",
- "type": "flux"
- }
- ```
- If you pass this in a request to the `/api/v2/analyze` endpoint,
- InfluxDB returns an empty `errors` list.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: header
- name: Content-Type
- schema:
- type: string
- enum:
- - application/json
- requestBody:
- description: Flux query to analyze
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Query'
- responses:
- '200':
- description: |
- Success.
- The response body contains the list of `errors`.
- If the query syntax is valid, the endpoint returns an empty `errors` list.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AnalyzeQueryResponse'
- examples:
- missingQueryPropertyKey:
- summary: Missing property key error
- description: |
- Returns an error object if the Flux query is missing a property key.
- The following sample query is missing the _`bucket`_ property key:
- ```json
- {
- "query": "from(: \"iot_center\")\
- ...
- }
- ```
- value:
- errors:
- - line: 1
- column: 6
- character: 0
- message: missing property key
- '400':
- description: |
- Bad request.
- InfluxDB is unable to parse the request.
- The response body contains detail about the problem.
- headers:
- X-Platform-Error-Code:
- description: |
- The reason for the error.
- schema:
- type: string
- example: invalid
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- invalidJSONStringValue:
- summary: Invalid JSON
- description: 'If the request body contains invalid JSON, returns `invalid` and problem detail.'
- value:
- code: invalid
- message: 'invalid json: invalid character ''\'''' looking for beginning of value'
- default:
- description: Internal server error
- headers:
- X-Platform-Error-Code:
- description: The reason for the error.
- schema:
- type: string
- example: internal error
- X-Influx-Error:
- description: A string that describes the problem.
- schema:
- type: string
- X-Influx-Reference:
- description: The numeric reference code for the error type.
- schema:
- type: integer
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- emptyJSONObject:
- summary: Empty JSON object in request body
- description: |
- If the request body contains an empty JSON object, returns `internal error`.
- value:
- code: internal error
- message: An internal error has occurred - check server logs
- x-codeSamples:
- - lang: Shell
- label: 'cURL: Analyze a Flux query'
- source: |
- curl -v --request POST \
- "http://localhost:8086/api/v2/query/analyze" \
- --header "Authorization: Token INFLUX_API_TOKEN" \
- --header 'Content-type: application/json' \
- --header 'Accept: application/json' \
- --data-binary @- << EOF
- { "query": "from(bucket: \"iot_center\")\
- |> range(start: -90d)\
- |> filter(fn: (r) => r._measurement == \"environment\")",
- "type": "flux"
- }
- EOF
- /query:
- post:
- operationId: PostQuery
- tags:
- - Data I/O endpoints
- - Query
- summary: Query data
- description: |
- Retrieves data from buckets.
- Use this endpoint to send a Flux query request and retrieve data from a bucket.
- #### Rate limits (with InfluxDB Cloud)
- `read` rate limits apply.
- For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/).
- #### Related guides
- - [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/v2.3/query-data/execute-queries/influx-api/).
- - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/)
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: header
- name: Accept-Encoding
- description: The content encoding (usually a compression algorithm) that the client can understand.
- schema:
- type: string
- description: 'The content coding. Use `gzip` for compressed data or `identity` for unmodified, uncompressed data.'
- default: identity
- enum:
- - gzip
- - identity
- - in: header
- name: Content-Type
- schema:
- type: string
- enum:
- - application/json
- - application/vnd.flux
- - in: query
- name: org
- description: |
- The name or ID of the organization executing the query.
- #### InfluxDB Cloud
- - Doesn't use `org` or `orgID`.
- - Queries the bucket in the organization associated with the authorization (API token).
- #### InfluxDB OSS
- - Requires either `org` or `orgID`.
- schema:
- type: string
- - in: query
- name: orgID
- description: |
- The ID of the organization executing the query.
- #### InfluxDB Cloud
- - Doesn't use `org` or `orgID`.
- - Queries the bucket in the organization associated with the authorization (API token).
- #### InfluxDB OSS
- - Requires either `org` or `orgID`.
- schema:
- type: string
- x-codeSamples:
- - lang: Shell
- label: cURL
- source: |
- curl --request POST 'INFLUX_URL/api/v2/query?org=INFLUX_ORG' \
- --header 'Content-Type: application/vnd.flux' \
- --header 'Accept: application/csv \
- --header 'Authorization: Token INFLUX_API_TOKEN' \
- --data 'from(bucket: "example-bucket")
- |> range(start: -5m)
- |> filter(fn: (r) => r._measurement == "example-measurement")'
- requestBody:
- description: Flux query or specification to execute
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Query'
- application/vnd.flux:
- schema:
- type: string
- example: |
- from(bucket: "example-bucket")
- |> range(start: -5m)
- |> filter(fn: (r) => r._measurement == "example-measurement")
- responses:
- '200':
- description: Success. The response body contains query results.
- headers:
- Content-Encoding:
- description: Lists encodings (usually compression algorithms) that have been applied to the response payload.
- schema:
- type: string
- description: |
- The content coding: `gzip` for compressed data or `identity` for unmodified, uncompressed data.
- default: identity
- enum:
- - gzip
- - identity
- Trace-Id:
- description: 'The trace ID, if generated, of the request.'
- schema:
- type: string
- description: Trace ID of a request.
- content:
- application/csv:
- schema:
- type: string
- example: |
- result,table,_start,_stop,_time,region,host,_value
- mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43
- mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25
- mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62
- '400':
- description: |
- Bad request.
- The response body contains detail about the error.
- #### InfluxDB OSS
- - Returns this error if `org` or `orgID` doesn't match an organization.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- orgNotFound:
- summary: Organization not found
- value:
- code: invalid
- message: 'failed to decode request body: organization not found'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '429':
- description: |
- #### InfluxDB Cloud:
- - returns this error if a **read** or **write** request exceeds your
- plan's [adjustable service quotas](https://docs.influxdata.com/influxdb/v2.3/account-management/limits/#adjustable-service-quotas)
- or if a **delete** request exceeds the maximum
- [global limit](https://docs.influxdata.com/influxdb/v2.3/account-management/limits/#global-limits)
- - returns `Retry-After` header that describes when to try the write again.
- #### InfluxDB OSS:
- - doesn't return this error.
- headers:
- Retry-After:
- description: Non-negative decimal integer indicating seconds to wait before retrying the request.
- schema:
- type: integer
- format: int32
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- /buckets:
- get:
- operationId: GetBuckets
- tags:
- - Buckets
- summary: List buckets
- description: |
- Retrieves a list of [buckets](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#bucket).
- To limit which buckets are returned, pass query parameters in your request.
- If no query parameters are passed, InfluxDB returns all buckets up to the
- default `limit`.
- #### Limitations
- - Paging with an `offset` greater than the number of records will result in
- an empty list of buckets--for example:
- The following request is paging to the 50th record, but the user only has
- 10 buckets.
- ```sh
- $ curl --request GET "INFLUX_URL/api/v2/scripts?limit=1&offset=50"
- $ {
- "links": {
- "prev": "/api/v2/buckets?descending=false\u0026limit=1\u0026offset=49\u0026orgID=ORG_ID",
- "self": "/api/v2/buckets?descending=false\u0026limit=1\u0026offset=50\u0026orgID=ORG_ID"
- },
- "buckets": []
- }
- ```
- #### Related Guides
- - [Manage buckets](https://docs.influxdata.com/influxdb/v2.3/organizations/buckets/)
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - $ref: '#/components/parameters/Offset'
- - $ref: '#/components/parameters/Limit'
- - $ref: '#/components/parameters/After'
- - in: query
- name: org
- description: |
- Organization name.
- The name of the organization.
- #### InfluxDB Cloud
- - Doesn't use `org` or `orgID`.
- - Creates a bucket in the organization associated with the authorization (API token).
- #### InfluxDB OSS
- - Accepts either `org` or `orgID`.
- - InfluxDB creates the bucket within this organization.
- schema:
- type: string
- - in: query
- name: orgID
- description: |
- Organization ID.
- The organization ID.
- #### InfluxDB Cloud
- - Doesn't use `org` or `orgID`.
- - Creates a bucket in the organization associated with the authorization (API token).
- #### InfluxDB OSS
- - Accepts either `org` or `orgID`.
- - InfluxDB creates the bucket within this organization.
- schema:
- type: string
- - in: query
- name: name
- description: |
- Bucket name.
- Only returns buckets with this specific name.
- schema:
- type: string
- - in: query
- name: id
- description: |
- Bucket ID.
- Only returns the bucket with this ID.
- schema:
- type: string
- responses:
- '200':
- description: |
- Success.
- The response body contains a list of buckets.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Buckets'
- examples:
- successResponse:
- value:
- links:
- self: /api/v2/buckets?descending=false&limit=20&name=_monitoring&offset=0&orgID=ORG_ID
- buckets:
- - id: 77ca9dace40a9bfc
- orgID: INFLUX_ORG_ID
- type: system
- schemaType: implicit
- description: System bucket for monitoring logs
- name: _monitoring
- retentionRules:
- - type: expire
- everySeconds: 604800
- createdAt: '2022-03-15T17:22:33.72617939Z'
- updatedAt: '2022-03-15T17:22:33.726179487Z'
- links:
- labels: /api/v2/buckets/77ca9dace40a9bfc/labels
- members: /api/v2/buckets/77ca9dace40a9bfc/members
- org: /api/v2/orgs/INFLUX_ORG_ID
- owners: /api/v2/buckets/77ca9dace40a9bfc/owners
- self: /api/v2/buckets/77ca9dace40a9bfc
- write: /api/v2/write?org=ORG_ID&bucket=77ca9dace40a9bfc
- labels: []
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- x-codeSamples:
- - lang: Shell
- label: cURL
- source: |
- curl --request GET "http://localhost:8086/api/v2/buckets?name=_monitoring" \
- --header "Authorization: Token INFLUX_TOKEN" \
- --header "Accept: application/json" \
- --header "Content-Type: application/json"
- post:
- operationId: PostBuckets
- tags:
- - Buckets
- summary: Create a bucket
- description: |
- Creates a [bucket](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#bucket)
- and returns the created bucket along with metadata. The default data
- [retention period](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#retention-period)
- is 30 days.
- #### InfluxDB OSS
- - A single InfluxDB OSS instance supports active writes or queries for
- approximately 20 buckets across all organizations at a given time. Reading
- or writing to more than 20 buckets at a time can adversely affect
- performance.
- #### Limitations
- - InfluxDB Cloud Free Plan allows users to create up to two buckets.
- Exceeding the bucket quota will result in an HTTP `403` status code.
- For additional information regarding InfluxDB Cloud offerings, see
- [InfluxDB Cloud Pricing](https://www.influxdata.com/influxdb-cloud-pricing/).
- #### Related Guides
- - [Create bucket](https://docs.influxdata.com/influxdb/v2.3/organizations/buckets/create-bucket/)
- - [Create bucket CLI reference](https://docs.influxdata.com/influxdb/v2.3/reference/cli/influx/bucket/create)
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- requestBody:
- description: Bucket to create
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PostBucketRequest'
- responses:
- '201':
- description: |
- Success.
- The bucket was created.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Bucket'
- examples:
- successResponse:
- value:
- id: 37407e232b3911d8
- orgID: INFLUX_ORG_ID
- type: user
- schemaType: implicit
- description: bucket holding air sensor data
- name: air_sensor
- retentionRules:
- - type: expire
- everySeconds: 2592000
- createdAt: '2022-08-03T23:04:41.073704121Z'
- updatedAt: '2022-08-03T23:04:41.073704228Z'
- links:
- labels: /api/v2/buckets/37407e232b3911d8/labels
- members: /api/v2/buckets/37407e232b3911d8/members
- org: /api/v2/orgs/INFLUX_ORG_ID
- owners: /api/v2/buckets/37407e232b3911d8/owners
- self: /api/v2/buckets/37407e232b3911d8
- write: /api/v2/write?org=INFLUX_ORG_ID&bucket=37407e232b3911d8
- labels: []
- '400':
- description: |
- Bad request.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '403':
- description: |
- Forbidden.
- The bucket quota is exceeded.
- headers:
- X-Platform-Error-Code:
- description: |
- The reason for the error.
- schema:
- type: string
- example: forbidden
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- quotaExceeded:
- summary: Bucket quota exceeded
- value:
- code: forbidden
- message: creating bucket would exceed quota
- '422':
- description: |
- Unprocessable Entity.
- The request body failed validation.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- x-codeSamples:
- - lang: Shell
- label: cURL
- source: |
- curl --request POST "http://localhost:8086/api/v2/buckets \
- --header "Authorization: Token INFLUX_TOKEN" \
- --header "Accept: application/json" \
- --header "Content-Type: application/json" \
- --data '{
- "name": "air_sensor",
- "description": "bucket holding air sensor data",
- "orgID": "INFLUX_ORG_ID",
- "retentionRules": [
- {
- "type": "expire",
- "everySeconds": 2592000,
- }
- ]
- }'
- '/buckets/{bucketID}':
- get:
- operationId: GetBucketsID
- tags:
- - Buckets
- summary: Retrieve a bucket
- description: |
- Retrieves a bucket.
- Use this endpoint to retrieve information for a specific bucket.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: |
- The ID of the bucket to retrieve.
- responses:
- '200':
- description: |
- Success.
- The response body contains the bucket information.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Bucket'
- examples:
- successResponse:
- value:
- id: 37407e232b3911d8
- orgID: bea7ea952287f70d
- type: user
- schemaType: implicit
- description: bucket for air sensor data
- name: air-sensor
- retentionRules:
- - type: expire
- everySeconds: 2592000
- createdAt: '2022-08-03T23:04:41.073704121Z'
- updatedAt: '2022-08-03T23:04:41.073704228Z'
- links:
- labels: /api/v2/buckets/37407e232b3911d8/labels
- members: /api/v2/buckets/37407e232b3911d8/members
- org: /api/v2/orgs/INFLUX_ORG_ID
- owners: /api/v2/buckets/37407e232b3911d8/owners
- self: /api/v2/buckets/37407e232b3911d8
- write: /api/v2/write?org=INFLUX_ORG_ID&bucket=37407e232b3911d8
- labels: []
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- description: |
- Not found.
- Bucket not found.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- notFound:
- summary: |
- The requested bucket wasn't found.
- value:
- code: not found
- message: bucket not found
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- operationId: PatchBucketsID
- tags:
- - Buckets
- summary: Update a bucket
- description: |
- Updates a bucket.
- Use this endpoint to update properties
- (`name`, `description`, and `retentionRules`) of a bucket.
- #### InfluxDB Cloud
- - Requires the `retentionRules` property in the request body. If you don't
- provide `retentionRules`, InfluxDB responds with an HTTP `403` status code.
- #### InfluxDB OSS
- - Doesn't require `retentionRules`.
- #### Related Guides
- - [Update a bucket](https://docs.influxdata.com/influxdb/v2.3/organizations/buckets/update-bucket/)
- requestBody:
- description: The bucket update to apply.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PatchBucketRequest'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- responses:
- '200':
- description: An updated bucket
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Bucket'
- examples:
- successResponse:
- value:
- id: 37407e232b3911d8
- orgID: INFLUX_ORG_ID
- type: user
- schemaType: implicit
- description: bucket holding air sensor data
- name: air_sensor
- retentionRules:
- - type: expire
- everySeconds: 2592000
- createdAt: '2022-08-03T23:04:41.073704121Z'
- updatedAt: '2022-08-07T22:49:49.422962913Z'
- links:
- labels: /api/v2/buckets/37407e232b3911d8/labels
- members: /api/v2/buckets/37407e232b3911d8/members
- org: /api/v2/orgs/INFLUX_ORG_ID
- owners: /api/v2/buckets/37407e232b3911d8/owners
- self: /api/v2/buckets/37407e232b3911d8
- write: /api/v2/write?org=INFLUX_ORG_ID&bucket=37407e232b3911d8
- labels: []
- '400':
- description: |
- Bad Request.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- invalidJSONStringValue:
- summary: Invalid JSON
- description: |
- If the request body contains invalid JSON, InfluxDB returns `invalid`
- with detail about the problem.
- value:
- code: invalid
- message: 'invalid json: invalid character ''\'''' looking for beginning of value'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '403':
- description: |
- Forbidden.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- invalidRetention:
- summary: |
- The retention policy provided exceeds the max retention for the
- organization.
- value:
- code: forbidden
- message: provided retention exceeds orgs maximum retention duration
- '404':
- description: |
- Not found.
- Bucket not found.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- notFound:
- summary: |
- The requested bucket wasn't found.
- value:
- code: not found
- message: bucket not found
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- x-codeSamples:
- - lang: Shell
- label: cURL
- source: |
- curl --request PATCH "http://localhost:8086/api/v2/buckets/BUCKET_ID \
- --header "Authorization: Token INFLUX_TOKEN" \
- --header "Accept: application/json" \
- --header "Content-Type: application/json" \
- --data '{
- "name": "air_sensor",
- "description": "bucket holding air sensor data",
- "retentionRules": [
- {
- "type": "expire",
- "everySeconds": 2592000
- }
- ]
- }'
- delete:
- operationId: DeleteBucketsID
- tags:
- - Buckets
- summary: Delete a bucket
- description: |
- Deletes a bucket and all associated records.
- #### InfluxDB Cloud
- - Does the following when you send a delete request:
- 1. Validates the request and queues the delete.
- 2. Returns an HTTP `204` status code if queued; _error_ otherwise.
- 3. Handles the delete asynchronously.
- #### InfluxDB OSS
- - Validates the request, handles the delete synchronously,
- and then responds with success or failure.
- #### Limitations
- - Only one bucket can be deleted per request.
- #### Related Guides
- - [Delete a bucket](https://docs.influxdata.com/influxdb/v2.3/organizations/buckets/delete-bucket/#delete-a-bucket-in-the-influxdb-ui)
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: |
- Bucket ID.
- The ID of the bucket to delete.
- responses:
- '204':
- description: |
- Success.
- #### InfluxDB Cloud
- - The bucket is queued for deletion.
- #### InfluxDB OSS
- - The bucket is deleted.
- '400':
- description: |
- Bad Request.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- invalidID:
- summary: |
- Invalid ID.
- value:
- code: invalid
- message: id must have a length of 16 bytes
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- description: |
- Not found.
- Bucket not found.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- notFound:
- summary: |
- The requested bucket was not found.
- value:
- code: not found
- message: bucket not found
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- x-codeSamples:
- - lang: Shell
- label: cURL
- source: |
- curl --request DELETE "http://localhost:8086/api/v2/buckets/BUCKET_ID" \
- --header "Authorization: Token INFLUX_TOKEN" \
- --header 'Accept: application/json'
- '/buckets/{bucketID}/labels':
- get:
- operationId: GetBucketsIDLabels
- tags:
- - Buckets
- summary: List all labels for a bucket
- description: |
- Retrieves a list of all labels for a bucket.
- Labels are objects that contain `labelID`, `name`, `description`, and `color`
- key-value pairs. They may be used for grouping and filtering InfluxDB
- resources.
- Labels are also capable of grouping across different resources--for example,
- you can apply a label named `air_sensor` to a bucket and a task to quickly
- organize resources.
- #### Related guides
- - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels.
- - [Manage labels in the InfluxDB UI](https://docs.influxdata.com/influxdb/v2.3/visualize-data/labels/)
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: |
- The ID of the bucket to retrieve labels for.
- responses:
- '200':
- description: |
- Success.
- The response body contains a list of all labels for the bucket.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelsResponse'
- examples:
- successResponse:
- value:
- links:
- self: /api/v2/labels
- labels:
- - id: 09cbd068e7ebb000
- orgID: INFLUX_ORG_ID
- name: production_buckets
- '400':
- $ref: '#/components/responses/BadRequestError'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostBucketsIDLabels
- tags:
- - Buckets
- summary: Add a label to a bucket
- description: |
- Adds a label to a bucket and returns the new label information.
- Labels are objects that contain `labelID`, `name`, `description`, and `color`
- key-value pairs. They may be used for grouping and filtering across one or
- more kinds of **resources**--for example, you can apply a label named
- `air_sensor` to a bucket and a task to quickly organize resources.
- #### Limitations
- - Before adding a label to a bucket, you must create the label if you
- haven't already. To create a label with the InfluxDB API, send a `POST`
- request to the [`/api/v2/labels` endpoint](#operation/PostLabels)).
- #### Related guides
- - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels.
- - [Manage labels in the InfluxDB UI](https://docs.influxdata.com/influxdb/v2.3/visualize-data/labels/)
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: |
- Bucket ID.
- The ID of the bucket to label.
- requestBody:
- description: An object that contains a _`labelID`_ to add to the bucket.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelMapping'
- responses:
- '201':
- description: |
- Success.
- The response body contains the label information.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelResponse'
- examples:
- successResponse:
- value:
- links:
- self: /api/v2/labels
- label:
- id: 09cbd068e7ebb000
- orgID: INFLUX_ORG_ID
- name: production_buckets
- '400':
- $ref: '#/components/responses/BadRequestError'
- examples:
- invalidRequest:
- summary: The `labelID` is missing from the request body.
- value:
- code: invalid
- message: label id is required
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '422':
- description: |
- Unprocessable entity.
- Label already exists on the resource.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- conflictingResource:
- summary: |
- Label already exists on the resource.
- value:
- code: conflict
- message: 'Cannot add label, label already exists on resource'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- x-codeSamples:
- - lang: Shell
- label: cURL
- source: |
- curl --request POST "http://localhost:8086/api/v2/buckets/BUCKETS_ID/labels \
- --header "Authorization: Token INFLUX_TOKEN" \
- --header "Accept: application/json" \
- --header "Content-Type: application/json" \
- --data '{
- "labelID": "09cbd068e7ebb000"
- }'
- '/buckets/{bucketID}/labels/{labelID}':
- delete:
- operationId: DeleteBucketsIDLabelsID
- tags:
- - Buckets
- summary: Delete a label from a bucket
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to delete.
- responses:
- '204':
- description: Delete has been accepted
- '404':
- description: Bucket not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/buckets/{bucketID}/members':
- get:
- operationId: GetBucketsIDMembers
- tags:
- - Buckets
- summary: List all users with member privileges for a bucket
- description: |
- Retrieves a list of all users for a bucket.
- InfluxDB [users](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#user) have
- permission to access InfluxDB.
- [Members](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#member) are users in
- an organization with access to the specified resource.
- Use this endpoint to retrieve all users with access to a bucket.
- #### Related guides
- - [Manage users](https://docs.influxdata.com/influxdb/v2.3/users/)
- - [Manage members](https://docs.influxdata.com/influxdb/v2.3/organizations/members/)
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: |
- The ID of the bucket to retrieve users for.
- responses:
- '200':
- description: |
- Success.
- The response body contains a list of all users for the bucket.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceMembers'
- examples:
- successResponse:
- value:
- links:
- self: /api/v2/buckets/37407e232b3911d8/members
- users:
- - role: member
- links:
- self: /api/v2/users/791df274afd48a83
- id: 791df274afd48a83
- name: example_user_1
- status: active
- - role: owner
- links:
- self: /api/v2/users/09cfb87051cbe000
- id: 09cfb87051cbe000
- name: example_user_2
- status: active
- '400':
- $ref: '#/components/responses/BadRequestError'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostBucketsIDMembers
- tags:
- - Buckets
- summary: Add a member to a bucket
- description: |
- Add a user to a bucket and return the new user information.
- InfluxDB [users](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#user) have
- permission to access InfluxDB.
- [Members](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#member) are users in
- an organization.
- Use this endpoint to give a user member privileges to a bucket.
- #### Related guides
- - [Manage users](https://docs.influxdata.com/influxdb/v2.3/users/)
- - [Manage members](https://docs.influxdata.com/influxdb/v2.3/organizations/members/)
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: |
- The ID of the bucket to retrieve users for.
- requestBody:
- description: A user to add as a member to the bucket.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AddResourceMemberRequestBody'
- responses:
- '201':
- description: |
- Success.
- The response body contains the user information.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceMember'
- examples:
- successResponse:
- value:
- role: member
- links:
- self: /api/v2/users/09cfb87051cbe000
- id: 09cfb87051cbe000
- name: example_user_1
- status: active
- '400':
- $ref: '#/components/responses/BadRequestError'
- examples:
- invalidRequest:
- summary: The `userID` is missing from the request body.
- value:
- code: invalid
- message: user id missing or invalid
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- x-codeSamples:
- - lang: Shell
- label: cURL
- source: |
- curl --request POST "http://localhost:8086/api/v2/buckets/BUCKET_ID/members \
- --header "Authorization: Token INFLUX_TOKEN" \
- --header "Accept: application/json" \
- --header "Content-Type: application/json" \
- --data '{
- "id": "09cfb87051cbe000"
- }
- '/buckets/{bucketID}/members/{userID}':
- delete:
- operationId: DeleteBucketsIDMembersID
- tags:
- - Buckets
- summary: Remove a member from a bucket
- description: |
- Removes a member from a bucket.
- Use this endpoint to remove a user's member privileges from a bucket. This
- removes the user's `read` and `write` permissions for the bucket.
- #### Related guides
- - [Manage users](https://docs.influxdata.com/influxdb/v2.3/users/)
- - [Manage members](https://docs.influxdata.com/influxdb/v2.3/organizations/members/)
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: |
- The ID of the user to remove.
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: |
- The ID of the bucket to remove a user from.
- responses:
- '204':
- description: |
- Success.
- The user is no longer a member of the bucket.
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/buckets/{bucketID}/owners':
- get:
- operationId: GetBucketsIDOwners
- tags:
- - Buckets
- summary: List all owners of a bucket
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- responses:
- '200':
- description: A list of bucket owners
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceOwners'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostBucketsIDOwners
- tags:
- - Buckets
- summary: Add an owner to a bucket
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- requestBody:
- description: User to add as owner
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AddResourceMemberRequestBody'
- responses:
- '201':
- description: Success. The user is an owner of the bucket
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceOwner'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/buckets/{bucketID}/owners/{userID}':
- delete:
- operationId: DeleteBucketsIDOwnersID
- tags:
- - Buckets
- summary: Remove an owner from a bucket
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the owner to remove.
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- responses:
- '204':
- description: Owner removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /orgs:
- get:
- operationId: GetOrgs
- tags:
- - Organizations
- - Security and access endpoints
- summary: List organizations
- description: |
- Retrieves a list of [organizations](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#organization/).
- To limit which organizations are returned, pass query parameters in your request.
- If no query parameters are passed, InfluxDB returns all organizations up to the default `limit`.
- #### InfluxDB Cloud
- - Only returns the organization that owns the token passed in the request.
- #### Related guides
- - [View organizations](https://docs.influxdata.com/influxdb/v2.3/organizations/view-orgs/).
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - $ref: '#/components/parameters/Offset'
- - $ref: '#/components/parameters/Limit'
- - $ref: '#/components/parameters/Descending'
- - in: query
- name: org
- schema:
- type: string
- description: |
- An organization name.
- Only returns organizations with this name.
- - in: query
- name: orgID
- schema:
- type: string
- description: |
- An organization ID.
- Only returns the organization with this ID.
- - in: query
- name: userID
- schema:
- type: string
- description: |
- A user ID.
- Only returns organizations where this user is a member or owner.
- responses:
- '200':
- description: Success. The response body contains a list of organizations.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Organizations'
- '400':
- $ref: '#/components/responses/BadRequestError'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- post:
- operationId: PostOrgs
- tags:
- - Organizations
- summary: Create an organization
- description: |
- Creates an organization and returns the newly created organization.
- #### InfluxDB Cloud
- - Doesn't allow you to use this endpoint to create organizations.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- requestBody:
- description: The organization to create.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PostOrganizationRequest'
- responses:
- '201':
- description: |
- Success. The organization is created.
- The response body contains the new organization.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Organization'
- '400':
- $ref: '#/components/responses/BadRequestError'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- '/orgs/{orgID}':
- get:
- operationId: GetOrgsID
- tags:
- - Organizations
- - Security and access endpoints
- summary: Retrieve an organization
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The ID of the organization to get.
- responses:
- '200':
- description: Organization details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Organization'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- operationId: PatchOrgsID
- tags:
- - Organizations
- summary: Update an organization
- requestBody:
- description: Organization update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PatchOrganizationRequest'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The ID of the organization to get.
- responses:
- '200':
- description: Organization updated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Organization'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- operationId: DeleteOrgsID
- tags:
- - Organizations
- summary: Delete an organization
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The ID of the organization to delete.
- responses:
- '204':
- description: Delete has been accepted
- '404':
- description: Organization not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/orgs/{orgID}/secrets':
- get:
- operationId: GetOrgsIDSecrets
- tags:
- - Secrets
- - Security and access endpoints
- summary: List all secret keys for an organization
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- responses:
- '200':
- description: A list of all secret keys
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SecretKeysResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- operationId: PatchOrgsIDSecrets
- tags:
- - Secrets
- summary: Update secrets in an organization
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- requestBody:
- description: Secret key value pairs to update/add
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Secrets'
- responses:
- '204':
- description: Keys successfully patched
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/orgs/{orgID}/members':
- get:
- operationId: GetOrgsIDMembers
- tags:
- - Organizations
- - Security and access endpoints
- summary: List all members of an organization
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- responses:
- '200':
- description: A list of organization members
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceMembers'
- '404':
- description: Organization not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostOrgsIDMembers
- tags:
- - Organizations
- summary: Add a member to an organization
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- requestBody:
- description: User to add as member
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AddResourceMemberRequestBody'
- responses:
- '201':
- description: Added to organization created
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceMember'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/orgs/{orgID}/members/{userID}':
- delete:
- operationId: DeleteOrgsIDMembersID
- tags:
- - Organizations
- - Security and access endpoints
- summary: Remove a member from an organization
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the member to remove.
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- responses:
- '204':
- description: Member removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/orgs/{orgID}/owners':
- get:
- operationId: GetOrgsIDOwners
- tags:
- - Organizations
- - Security and access endpoints
- summary: List all owners of an organization
- description: |
- Retrieves a list of all owners of an organization.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: |
- The ID of the organization to list owners for.
- responses:
- '200':
- description: A list of organization owners
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceOwners'
- '404':
- description: Organization not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostOrgsIDOwners
- tags:
- - Organizations
- summary: Add an owner to an organization
- description: |
- Adds an owner to an organization.
- Use this endpoint to assign the organization `owner` role to a user.
- #### InfluxDB Cloud
- - Doesn't use `owner` and `member` roles.
- Use [`/api/v2/authorizations`](#tag/Authorizations) to assign user permissions.
- #### Required permissions
- - `write-orgs INFLUX_ORG_ID`
- `INFLUX_ORG_ID` is the ID of the organization that you want add an owner for.
- #### Related endpoints
- - [Authorizations](#tag/Authorizations)
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The ID of the organization that you want to add an owner for.
- requestBody:
- description: The user to add as an owner of the organization.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AddResourceMemberRequestBody'
- responses:
- '201':
- description: |
- Success. The user is an owner of the organization.
- The response body contains the owner with role and user detail.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceOwner'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/orgs/{orgID}/owners/{userID}':
- delete:
- operationId: DeleteOrgsIDOwnersID
- tags:
- - Organizations
- - Security and access endpoints
- summary: Remove an owner from an organization
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the owner to remove.
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- responses:
- '204':
- description: Owner removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/orgs/{orgID}/secrets/delete':
- post:
- deprecated: true
- operationId: PostOrgsIDSecrets
- tags:
- - Secrets
- - Security and access endpoints
- summary: Delete secrets from an organization
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- requestBody:
- description: Secret key to delete
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SecretKeys'
- responses:
- '204':
- description: Keys successfully patched
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/orgs/{orgID}/secrets/{secretID}':
- delete:
- operationId: DeleteOrgsIDSecretsID
- tags:
- - Secrets
- - Security and access endpoints
- summary: Delete a secret from an organization
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- - in: path
- name: secretID
- schema:
- type: string
- required: true
- description: The secret ID.
- responses:
- '204':
- description: Keys successfully deleted
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /resources:
- get:
- operationId: GetResources
- tags:
- - Resources
- - System information endpoints
- summary: List all known resources
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- responses:
- '200':
- description: All resources targets
- content:
- application/json:
- schema:
- type: array
- items:
- type: string
- default:
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /stacks:
- get:
- operationId: ListStacks
- tags:
- - Templates
- summary: List installed stacks
- description: |
- Retrieves a list of installed InfluxDB stacks.
- To limit stacks in the response, pass query parameters in your request.
- If no query parameters are passed, InfluxDB returns all installed stacks
- for the organization.
- parameters:
- - in: query
- name: orgID
- required: true
- schema:
- type: string
- description: |
- The ID of the organization that owns the stacks.
- Only returns stacks owned by this organization.
- #### InfluxDB Cloud
- - Doesn't require this parameter;
- InfluxDB only returns resources allowed by the API token.
- - in: query
- name: name
- schema:
- type: string
- description: |
- The stack name.
- Finds stack `events` with this name and returns the stacks.
- Repeatable.
- To filter for more than one stack name,
- repeat this parameter with each name--for example:
- - `http://localhost:8086/api/v2/stacks?&orgID=INFLUX_ORG_ID&name=project-stack-0&name=project-stack-1`
- examples:
- findStackByName:
- summary: Find stacks with the event name
- value: project-stack-0
- - in: query
- name: stackID
- schema:
- type: string
- description: |
- The stack ID.
- Only returns stacks with this ID.
- Repeatable.
- To filter for more than one stack ID,
- repeat this parameter with each ID--for example:
- - `http://localhost:8086/api/v2/stacks?&orgID=INFLUX_ORG_ID&stackID=09bd87cd33be3000&stackID=09bef35081fe3000`
- examples:
- findStackByID:
- summary: Find a stack with the ID
- value: 09bd87cd33be3000
- responses:
- '200':
- description: Success. The response body contains the list of stacks.
- content:
- application/json:
- schema:
- type: object
- properties:
- stacks:
- type: array
- items:
- $ref: '#/components/schemas/Stack'
- '400':
- description: |
- Bad request.
- The response body contains detail about the error.
- #### InfluxDB OSS
- - Returns this error if an incorrect value is passed for `org` or `orgID`.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- orgIdMissing:
- summary: The orgID query parameter is missing
- value:
- code: invalid
- message: 'organization id[""] is invalid: id must have a length of 16 bytes'
- orgProvidedNotFound:
- summary: The org or orgID passed doesn't own the token passed in the header
- value:
- code: invalid
- message: 'failed to decode request body: organization not found'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: CreateStack
- tags:
- - Templates
- summary: Create a stack
- description: |
- Creates or initializes a stack.
- Use this endpoint to _manually_ initialize a new stack with the following
- optional information:
- - Stack name
- - Stack description
- - URLs for template manifest files
- To automatically create a stack when applying templates,
- use the [/api/v2/templates/apply endpoint](#operation/ApplyTemplate).
- #### Required permissions
- - `write` permission for the organization
- #### Related guides
- - [InfluxDB stacks](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/stacks/)
- - [Use InfluxDB templates](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/use/#apply-templates-to-an-influxdb-instance)
- requestBody:
- description: The stack to create.
- required: true
- content:
- application/json:
- schema:
- type: object
- title: PostStackRequest
- properties:
- orgID:
- type: string
- name:
- type: string
- description:
- type: string
- urls:
- type: array
- items:
- type: string
- responses:
- '201':
- description: Success. Returns the newly created stack.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Stack'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '422':
- description: |
- Unprocessable entity.
- The error may indicate one of the following problems:
- - The request body isn't valid--the request is well-formed, but InfluxDB can't process it due to semantic errors.
- - You passed a parameter combination that InfluxDB doesn't support.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/stacks/{stack_id}':
- get:
- operationId: ReadStack
- tags:
- - Templates
- summary: Retrieve a stack
- parameters:
- - in: path
- name: stack_id
- required: true
- schema:
- type: string
- description: The identifier of the stack.
- responses:
- '200':
- description: Returns the stack.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Stack'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- operationId: UpdateStack
- tags:
- - Templates
- summary: Update a stack
- parameters:
- - in: path
- name: stack_id
- required: true
- schema:
- type: string
- description: The identifier of the stack.
- requestBody:
- description: The stack to update.
- required: true
- content:
- application/json:
- schema:
- type: object
- title: PatchStackRequest
- properties:
- name:
- type: string
- nullable: true
- description:
- type: string
- nullable: true
- templateURLs:
- type: array
- items:
- type: string
- nullable: true
- additionalResources:
- type: array
- items:
- type: object
- properties:
- resourceID:
- type: string
- kind:
- type: string
- templateMetaName:
- type: string
- required:
- - kind
- - resourceID
- responses:
- '200':
- description: Returns the updated stack.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Stack'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- operationId: DeleteStack
- tags:
- - Templates
- summary: Delete a stack and associated resources
- parameters:
- - in: path
- name: stack_id
- required: true
- schema:
- type: string
- description: The identifier of the stack.
- - in: query
- name: orgID
- required: true
- schema:
- type: string
- description: The identifier of the organization.
- responses:
- '204':
- description: The stack and its associated resources were deleted.
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/stacks/{stack_id}/uninstall':
- post:
- operationId: UninstallStack
- tags:
- - Templates
- summary: Uninstall a stack
- parameters:
- - in: path
- name: stack_id
- required: true
- schema:
- type: string
- description: The identifier of the stack.
- responses:
- '200':
- description: Returns the uninstalled stack.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Stack'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /templates/apply:
- post:
- operationId: ApplyTemplate
- tags:
- - Templates
- summary: Apply or dry-run a template
- description: |
- Applies a template to
- create or update a [stack](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/stacks/) of InfluxDB
- [resources](https://docs.influxdata.com/influxdb/v2.3/reference/cli/influx/export/all/#resources).
- The response contains the diff of changes and the stack ID.
- Use this endpoint to install an InfluxDB template to an organization.
- Provide template URLs or template objects in your request.
- To customize which template resources are installed, use the `actions`
- parameter.
- By default, when you apply a template, InfluxDB installs the template to
- create and update stack resources and then generates a diff of the changes.
- If you pass `dryRun: true` in the request body, InfluxDB validates the
- template and generates the resource diff, but doesn’t make any
- changes to your instance.
- #### Custom values for templates
- - Some templates may contain [environment references](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/create/#include-user-definable-resource-names) for custom metadata.
- To provide custom values for environment references, pass the _`envRefs`_
- property in the request body.
- For more information and examples, see how to
- [define environment references](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/use/#define-environment-references).
- - Some templates may contain queries that use
- [secrets](https://docs.influxdata.com/influxdb/v2.3/security/secrets/).
- To provide custom secret values, pass the _`secrets`_ property
- in the request body.
- Don't expose secret values in templates.
- 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).
- #### Required permissions
- - `write` permissions for resource types in the template.
- #### Rate limits (with InfluxDB Cloud)
- - Adjustable service quotas apply.
- For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/).
- #### Related guides
- - [Use templates](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/use/)
- - [Stacks](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/stacks/)
- requestBody:
- required: true
- description: |
- Parameters for applying templates.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TemplateApply'
- examples:
- skipKindAction:
- summary: Skip all bucket and task resources in the provided templates
- value:
- orgID: INFLUX_ORG_ID
- actions:
- - action: skipKind
- properties:
- kind: Bucket
- - action: skipKind
- properties:
- kind: Task
- templates:
- - contents:
- - '[object Object]': null
- skipResourceAction:
- summary: Skip specific resources in the provided templates
- value:
- orgID: INFLUX_ORG_ID
- actions:
- - action: skipResource
- properties:
- kind: Label
- resourceTemplateName: foo-001
- - action: skipResource
- properties:
- kind: Bucket
- resourceTemplateName: bar-020
- - action: skipResource
- properties:
- kind: Bucket
- resourceTemplateName: baz-500
- templates:
- - contents:
- - apiVersion: influxdata.com/v2alpha1
- kind: Bucket
- metadata:
- name: baz-500
- templateObjectEnvRefs:
- summary: envRefs for template objects
- value:
- orgID: INFLUX_ORG_ID
- envRefs:
- linux-cpu-label: MY_CPU_LABEL
- docker-bucket: MY_DOCKER_BUCKET
- docker-spec-1: MY_DOCKER_SPEC
- templates:
- - contents:
- - apiVersion: influxdata.com/v2alpha1
- kind: Label
- metadata:
- name:
- envRef:
- key: linux-cpu-label
- spec:
- color: '#326BBA'
- name: inputs.cpu
- - contents:
- - apiVersion: influxdata.com/v2alpha1
- kind: Bucket
- metadata:
- name:
- envRef:
- key: docker-bucket
- application/x-jsonnet:
- schema:
- $ref: '#/components/schemas/TemplateApply'
- text/yml:
- schema:
- $ref: '#/components/schemas/TemplateApply'
- x-codeSamples:
- - lang: Shell
- label: 'cURL: Dry run with a remote template'
- source: |
- curl --request POST "http://localhost:8086/api/v2/templates/apply" \
- --header "Authorization: Token INFLUX_API_TOKEN" \
- --data @- << EOF
- {
- "dryRun": true,
- "orgID": "INFLUX_ORG_ID",
- "remotes": [
- {
- "url": "https://raw.githubusercontent.com/influxdata/community-templates/master/linux_system/linux_system.yml"
- }
- ]
- }
- EOF
- - lang: Shell
- label: 'cURL: Apply with secret values'
- source: |
- curl "http://localhost:8086/api/v2/templates/apply" \
- --header "Authorization: Token INFLUX_API_TOKEN" \
- --data @- << EOF | jq .
- {
- "orgID": "INFLUX_ORG_ID",
- "secrets": {
- "SLACK_WEBHOOK": "YOUR_SECRET_WEBHOOK_URL"
- },
- "remotes": [
- {
- "url": "https://raw.githubusercontent.com/influxdata/community-templates/master/fortnite/fn-template.yml"
- }
- ]
- }
- EOF
- - lang: Shell
- label: 'cURL: Apply template objects with environment references'
- source: |
- curl --request POST "http://localhost:8086/api/v2/templates/apply" \
- --header "Authorization: Token INFLUX_API_TOKEN" \
- --data @- << EOF
- { "orgID": "INFLUX_ORG_ID",
- "envRefs": {
- "linux-cpu-label": "MY_CPU_LABEL",
- "docker-bucket": "MY_DOCKER_BUCKET",
- "docker-spec-1": "MY_DOCKER_SPEC"
- },
- "templates": [
- { "contents": [{
- "apiVersion": "influxdata.com/v2alpha1",
- "kind": "Label",
- "metadata": {
- "name": {
- "envRef": {
- "key": "linux-cpu-label"
- }
- }
- },
- "spec": {
- "color": "#326BBA",
- "name": "inputs.cpu"
- }
- }]
- },
- "templates": [
- { "contents": [{
- "apiVersion": "influxdata.com/v2alpha1",
- "kind": "Label",
- "metadata": {
- "name": {
- "envRef": {
- "key": "linux-cpu-label"
- }
- }
- },
- "spec": {
- "color": "#326BBA",
- "name": "inputs.cpu"
- }
- }]
- },
- { "contents": [{
- "apiVersion": "influxdata.com/v2alpha1",
- "kind": "Bucket",
- "metadata": {
- "name": {
- "envRef": {
- "key": "docker-bucket"
- }
- }
- }
- }]
- }
- ]
- }
- EOF
- responses:
- '200':
- description: |
- Success.
- The template dry run succeeded.
- The response body contains a resource diff of changes that the
- template would have made if installed.
- No resources were created or updated.
- The diff and summary won't contain IDs for resources
- that didn't exist at the time of the dry run.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TemplateSummary'
- '201':
- description: |
- Success.
- The template applied successfully.
- The response body contains the stack ID, a diff, and a summary.
- The diff compares the initial state to the state after the template installation.
- The summary contains newly created resources.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TemplateSummary'
- '422':
- description: |
- Unprocessable entity.
- The error may indicate one of the following problems:
- - The template failed validation.
- - You passed a parameter combination that InfluxDB doesn't support.
- content:
- application/json:
- schema:
- allOf:
- - $ref: '#/components/schemas/TemplateSummary'
- - type: object
- required:
- - message
- - code
- properties:
- message:
- type: string
- code:
- type: string
- '500':
- description: |
- Internal server error.
- #### InfluxDB Cloud
- - Returns this error if creating one of the template
- resources (bucket, dashboard, task, user) exceeds your plan’s
- adjustable service quotas.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- createExceedsQuota:
- summary: 'InfluxDB Cloud: Creating resource would exceed quota.'
- value:
- code: internal error
- 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\""
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /templates/export:
- post:
- operationId: ExportTemplate
- tags:
- - Templates
- summary: Export a new template
- requestBody:
- description: Export resources as an InfluxDB template.
- required: false
- content:
- application/json:
- schema:
- oneOf:
- - $ref: '#/components/schemas/TemplateExportByID'
- - $ref: '#/components/schemas/TemplateExportByName'
- responses:
- '200':
- description: The template was created successfully. Returns the newly created template.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Template'
- application/x-yaml:
- schema:
- $ref: '#/components/schemas/Template'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/tasks/{taskID}/runs':
- get:
- operationId: GetTasksIDRuns
- tags:
- - Tasks
- summary: List runs for a task
- description: |
- Retrieves a list of runs for a [task](https://docs.influxdata.com/influxdb/v2.3/process-data/).
- To limit which task runs are returned, pass query parameters in your request.
- If no query parameters are passed, InfluxDB returns all task runs up to the default `limit`.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: |
- The ID of the task to get runs for.
- Only returns runs for this task.
- - in: query
- name: after
- schema:
- type: string
- description: A task run ID. Only returns runs created after this run.
- - in: query
- name: limit
- schema:
- type: integer
- minimum: 1
- maximum: 500
- default: 100
- description: |
- Limits the number of task runs returned. Default is `100`.
- - in: query
- name: afterTime
- schema:
- type: string
- format: date-time
- description: |
- A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)).
- Only returns runs scheduled after this time.
- - in: query
- name: beforeTime
- schema:
- type: string
- format: date-time
- description: |
- A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)).
- Only returns runs scheduled before this time.
- responses:
- '200':
- description: Success. The response body contains the list of task runs.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Runs'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- post:
- operationId: PostTasksIDRuns
- tags:
- - Data I/O endpoints
- - Tasks
- summary: 'Start a task run, overriding the schedule'
- description: |
- Schedules a task run to start immediately, ignoring scheduled runs.
- Use this endpoint to manually start a task run.
- Scheduled runs will continue to run as scheduled.
- This may result in concurrently running tasks.
- To _retry_ a previous run (and avoid creating a new run),
- use the [`POST /api/v2/tasks/{taskID}/runs/{runID}/retry`](#operation/PostTasksIDRunsIDRetry) endpoint.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RunManually'
- responses:
- '201':
- description: Success. The run is scheduled to start.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Run'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- '/tasks/{taskID}/runs/{runID}':
- get:
- operationId: GetTasksIDRunsID
- tags:
- - Tasks
- summary: Retrieve a run for a task.
- description: |
- Retrieves a specific run for a [task](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#task).
- Use this endpoint to retrieve detail and logs for a specific task run.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The ID of the task to retrieve runs for.
- - in: path
- name: runID
- schema:
- type: string
- required: true
- description: The ID of the run to retrieve.
- responses:
- '200':
- description: Success. The response body contains the task run.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Run'
- examples:
- runSuccess:
- summary: A successful task run.
- value:
- links:
- logs: /api/v2/tasks/0996e56b2f378000/runs/09b070dadaa7d000/logs
- retry: /api/v2/tasks/0996e56b2f378000/runs/09b070dadaa7d000/retry
- self: /api/v2/tasks/0996e56b2f378000/runs/09b070dadaa7d000
- task: /api/v2/tasks/0996e56b2f378000
- id: 09b070dadaa7d000
- taskID: 0996e56b2f378000
- status: success
- scheduledFor: '2022-07-18T14:46:06Z'
- startedAt: '2022-07-18T14:46:07.16222Z'
- finishedAt: '2022-07-18T14:46:07.308254Z'
- requestedAt: '2022-07-18T14:46:06Z'
- log:
- - runID: 09b070dadaa7d000
- time: '2022-07-18T14:46:07.101231Z'
- 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)"'
- - runID: 09b070dadaa7d000
- time: '2022-07-18T14:46:07.242859Z'
- message: Completed(success)
- '400':
- $ref: '#/components/responses/BadRequestError'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- delete:
- operationId: DeleteTasksIDRunsID
- tags:
- - Tasks
- summary: Cancel a running task
- description: |
- Cancels a running [task](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#task).
- Use this endpoint with InfluxDB OSS to cancel a running task.
- #### InfluxDB Cloud
- - Doesn't support this operation.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The ID of the task to cancel.
- - in: path
- name: runID
- schema:
- type: string
- required: true
- description: The ID of the task run to cancel.
- responses:
- '204':
- description: |
- Success. The `DELETE` is accepted and the run will be cancelled.
- #### InfluxDB Cloud
- - Doesn't support this operation.
- - Doesn't return this status.
- '400':
- $ref: '#/components/responses/BadRequestError'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '405':
- description: |
- Method not allowed.
- #### InfluxDB Cloud
- - Always returns this error; doesn't support cancelling tasks.
- #### InfluxDB OSS
- - Doesn't return this error.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- '/tasks/{taskID}/runs/{runID}/retry':
- post:
- operationId: PostTasksIDRunsIDRetry
- tags:
- - Tasks
- summary: Retry a task run
- description: |
- Queues a task run to retry and returns the newly scheduled run.
- To manually start a _new_ task run, use the [`POST /api/v2/tasks/{taskID}/runs`](#operation/PostTasksIDRuns) endpoint.
- #### Limitations
- - The task must be _active_ (`status: "active"`).
- requestBody:
- content:
- application/json; charset=utf-8:
- schema:
- type: object
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The ID of the task to retry.
- - in: path
- name: runID
- schema:
- type: string
- required: true
- description: The ID of the task run to retry.
- responses:
- '200':
- description: Success. The response body contains the queued run.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Run'
- examples:
- retryTaskRun:
- summary: A task run scheduled to retry
- value:
- links:
- logs: /api/v2/tasks/09a776832f381000/runs/09d60ffe08738000/logs
- retry: /api/v2/tasks/09a776832f381000/runs/09d60ffe08738000/retry
- self: /api/v2/tasks/09a776832f381000/runs/09d60ffe08738000
- task: /api/v2/tasks/09a776832f381000
- id: 09d60ffe08738000
- taskID: 09a776832f381000
- status: scheduled
- scheduledFor: '2022-08-15T00:00:00Z'
- requestedAt: '2022-08-16T20:05:11.84145Z'
- '400':
- description: |
- Bad request.
- The response body contains detail about the error.
- InfluxDB may return this error for the following reasons:
- - The task has `status: inactive`.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- inactiveTask:
- summary: Can't retry an inactive task
- value:
- code: invalid
- message: 'failed to retry run: inactive task'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- '/tasks/{taskID}/logs':
- get:
- operationId: GetTasksIDLogs
- tags:
- - Tasks
- summary: Retrieve all logs for a task
- description: |
- Retrieves a list of all logs for a [task](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#task).
- When an InfluxDB task runs, a “run” record is created in the task’s history.
- Logs associated with each run provide relevant log messages, timestamps, and the exit status of the run attempt.
- Use this endpoint to retrieve only the log events for a task,
- without additional task metadata.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- responses:
- '200':
- description: |
- Success. The response body contains an `events` list with logs for the task.
- Each log event `message` contains detail about the event.
- If a task run fails, InfluxDB logs an event with the reason for the failure.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Logs'
- examples:
- taskSuccess:
- summary: Events for a successful task run.
- value:
- events:
- - runID: 09b070dadaa7d000
- time: '2022-07-18T14:46:07.101231Z'
- 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)"'
- - runID: 09b070dadaa7d000
- time: '2022-07-18T14:46:07.242859Z'
- message: Completed(success)
- taskFailure:
- summary: Events for a failed task run.
- value:
- events:
- - runID: 09a946fc3167d000
- time: '2022-07-13T07:06:54.198167Z'
- message: 'Started task from script: "option task = {name: \"test task\", every: 3d, offset: 0s}"'
- - runID: 09a946fc3167d000
- time: '2022-07-13T07:07:13.104037Z'
- message: Completed(failed)
- - runID: 09a946fc3167d000
- time: '2022-07-13T08:24:37.115323Z'
- 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'
- '400':
- $ref: '#/components/responses/BadRequestError'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- '/tasks/{taskID}/runs/{runID}/logs':
- get:
- operationId: GetTasksIDRunsIDLogs
- tags:
- - Tasks
- summary: Retrieve all logs for a run
- description: |
- Retrieves all logs for a task run.
- A log is a list of run events with `runID`, `time`, and `message` properties.
- Use this endpoint to help analyze task performance and troubleshoot failed task runs.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The ID of the task to get logs for.
- - in: path
- name: runID
- schema:
- type: string
- required: true
- description: The ID of the run to get logs for.
- responses:
- '200':
- description: |
- Success. The response body contains an `events` list with logs for the task run.
- Each log event `message` contains detail about the event.
- If a run fails, InfluxDB logs an event with the reason for the failure.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Logs'
- examples:
- taskSuccess:
- summary: Events for a successful task run.
- value:
- events:
- - runID: 09b070dadaa7d000
- time: '2022-07-18T14:46:07.101231Z'
- 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)"'
- - runID: 09b070dadaa7d000
- time: '2022-07-18T14:46:07.242859Z'
- message: Completed(success)
- taskFailure:
- summary: Events for a failed task.
- value:
- events:
- - runID: 09a946fc3167d000
- time: '2022-07-13T07:06:54.198167Z'
- message: 'Started task from script: "option task = {name: \"test task\", every: 3d, offset: 0s}"'
- - runID: 09a946fc3167d000
- time: '2022-07-13T07:07:13.104037Z'
- message: Completed(failed)
- - runID: 09a946fc3167d000
- time: '2022-07-13T08:24:37.115323Z'
- 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'
- '400':
- $ref: '#/components/responses/BadRequestError'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- '/tasks/{taskID}/labels':
- get:
- operationId: GetTasksIDLabels
- tags:
- - Tasks
- summary: List labels for a task
- description: |
- Retrieves a list of all labels for a task.
- Labels may be used for grouping and filtering tasks.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The ID of the task to retrieve labels for.
- responses:
- '200':
- description: Success. The response body contains a list of all labels for the task.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelsResponse'
- '400':
- $ref: '#/components/responses/BadRequestError'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- post:
- operationId: PostTasksIDLabels
- tags:
- - Tasks
- summary: Add a label to a task
- description: |
- Adds a label to a task.
- Use this endpoint to add a label that you can use to filter tasks in the InfluxDB UI.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The ID of the task to label.
- requestBody:
- description: An object that contains a _`labelID`_ to add to the task.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelMapping'
- responses:
- '201':
- description: Success. The response body contains a list of all labels for the task.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelResponse'
- '400':
- $ref: '#/components/responses/BadRequestError'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- '/tasks/{taskID}/labels/{labelID}':
- delete:
- operationId: DeleteTasksIDLabelsID
- tags:
- - Tasks
- summary: Delete a label from a task
- description: |
- Deletes a label from a task.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The ID of the task to delete the label from.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to delete.
- responses:
- '204':
- description: Success. The label is deleted.
- '400':
- $ref: '#/components/responses/BadRequestError'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- /flags:
- get:
- operationId: GetFlags
- tags:
- - Users
- summary: Return the feature flags for the currently authenticated user
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- responses:
- '200':
- description: Feature flags for the currently authenticated user
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Flags'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /me:
- get:
- operationId: GetMe
- tags:
- - Users
- summary: Retrieve the currently authenticated user
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- responses:
- '200':
- description: Success. The response body contains the currently authenticated user.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UserResponse'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- /me/password:
- put:
- operationId: PutMePassword
- tags:
- - Users
- summary: Update a password
- description: |
- #### InfluxDB Cloud
- InfluxDB Cloud doesn't support changing user passwords through the API.
- Use the InfluxDB Cloud user interface to update your password.
- security:
- - BasicAuthentication: []
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- requestBody:
- description: The new password.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PasswordResetBody'
- responses:
- '204':
- description: Success. The password was updated.
- '400':
- description: |
- Bad request.
- InfluxDB Cloud doesn't support changing passwords through the API and always responds with this status.
- default:
- description: Unsuccessful authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/tasks/{taskID}/members':
- get:
- operationId: GetTasksIDMembers
- deprecated: true
- tags:
- - Tasks
- summary: List all task members
- description: |
- **Deprecated**: Tasks don't use `owner` and `member` roles.
- Use [`/api/v2/authorizations`](#tag/Authorizations) to assign user permissions.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- responses:
- '200':
- description: |
- Success. The response body contains a list of `users` that have
- the `member` role for a task.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceMembers'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostTasksIDMembers
- deprecated: true
- tags:
- - Tasks
- summary: Add a member to a task
- description: |
- **Deprecated**: Tasks don't use `owner` and `member` roles.
- Use [`/api/v2/authorizations`](#tag/Authorizations) to assign user permissions.
- Adds a user to members of a task and returns the newly created member with
- role and user detail.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- requestBody:
- description: A user to add as a member of the task.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AddResourceMemberRequestBody'
- responses:
- '201':
- description: Created. The user is added to task members.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceMember'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/tasks/{taskID}/members/{userID}':
- delete:
- operationId: DeleteTasksIDMembersID
- deprecated: true
- tags:
- - Tasks
- summary: Remove a member from a task
- description: |
- **Deprecated**: Tasks don't use `owner` and `member` roles.
- Use [`/api/v2/authorizations`](#tag/Authorizations) to assign user permissions.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the member to remove.
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- responses:
- '204':
- description: Member removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/tasks/{taskID}/owners':
- get:
- operationId: GetTasksIDOwners
- deprecated: true
- tags:
- - Tasks
- summary: List all owners of a task
- description: |
- **Deprecated**: Tasks don't use `owner` and `member` roles.
- Use [`/api/v2/authorizations`](#tag/Authorizations) to assign user permissions.
- Retrieves all users that have owner permission for a task.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The ID of the task to retrieve owners for.
- responses:
- '200':
- description: |
- Success.
- The response contains a list of `users` that have the `owner` role for the task.
- If the task has no owners, the response contains an empty `users` array.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceOwners'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '422':
- description: |
- Unprocessable entity.
- The error may indicate one of the following problems:
- - The request body isn't valid--the request is well-formed, but InfluxDB can't process it due to semantic errors.
- - You passed a parameter combination that InfluxDB doesn't support.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostTasksIDOwners
- deprecated: true
- tags:
- - Tasks
- summary: Add an owner for a task
- description: |
- **Deprecated**: Tasks don't use `owner` and `member` roles.
- Use [`/api/v2/authorizations`](#tag/Authorizations) to assign user permissions.
- Assigns a task `owner` role to a user.
- Use this endpoint to create a _resource owner_ for the task.
- A _resource owner_ is a user with `role: owner` for a specific resource.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- requestBody:
- description: A user to add as an owner of the task.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AddResourceMemberRequestBody'
- responses:
- '201':
- description: |
- Created. The task `owner` role is assigned to the user.
- The response body contains the resource owner with
- role and user detail.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceOwner'
- examples:
- createdOwner:
- summary: User has the owner role for the resource
- value:
- role: owner
- links:
- logs: /api/v2/users/0772396d1f411000/logs
- self: /api/v2/users/0772396d1f411000
- id: 0772396d1f411000
- name: USER_NAME
- status: active
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '422':
- description: |
- Unprocessable entity.
- The error may indicate one of the following problems:
- - The request body isn't valid--the request is well-formed, but InfluxDB can't process it due to semantic errors.
- - You passed a parameter combination that InfluxDB doesn't support.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/tasks/{taskID}/owners/{userID}':
- delete:
- operationId: DeleteTasksIDOwnersID
- deprecated: true
- tags:
- - Tasks
- summary: Remove an owner from a task
- description: |
- **Deprecated**: Tasks don't use `owner` and `member` roles.
- Use [`/api/v2/authorizations`](#tag/Authorizations) to assign user permissions.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the owner to remove.
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- responses:
- '204':
- description: Owner removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/users/{userID}/password':
- post:
- operationId: PostUsersIDPassword
- tags:
- - Security and access endpoints
- - Users
- summary: Update a password
- description: |
- #### InfluxDB Cloud
- InfluxDB Cloud doesn't support changing user passwords through the API.
- Use the InfluxDB Cloud user interface to update your password.
- security:
- - BasicAuthentication: []
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The user ID.
- requestBody:
- description: New password
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PasswordResetBody'
- responses:
- '204':
- description: Password successfully updated
- '400':
- description: |
- Bad request.
- InfluxDB Cloud doesn't support changing passwords through the API and always responds with this status.
- default:
- description: Unsuccessful authentication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /checks:
- get:
- operationId: GetChecks
- tags:
- - Checks
- summary: List all checks
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - $ref: '#/components/parameters/Offset'
- - $ref: '#/components/parameters/Limit'
- - in: query
- name: orgID
- required: true
- description: Only show checks that belong to a specific organization ID.
- schema:
- type: string
- responses:
- '200':
- description: A list of checks
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Checks'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: CreateCheck
- tags:
- - Checks
- summary: Add new check
- requestBody:
- description: Check to create
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PostCheck'
- responses:
- '201':
- description: Check created
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Check'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/checks/{checkID}':
- get:
- operationId: GetChecksID
- tags:
- - Checks
- summary: Retrieve a check
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: checkID
- schema:
- type: string
- required: true
- description: The check ID.
- responses:
- '200':
- description: The check requested
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Check'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- put:
- operationId: PutChecksID
- tags:
- - Checks
- summary: Update a check
- requestBody:
- description: Check update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Check'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: checkID
- schema:
- type: string
- required: true
- description: The check ID.
- responses:
- '200':
- description: An updated check
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Check'
- '404':
- description: The check was not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- operationId: PatchChecksID
- tags:
- - Checks
- summary: Update a check
- requestBody:
- description: Check update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CheckPatch'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: checkID
- schema:
- type: string
- required: true
- description: The check ID.
- responses:
- '200':
- description: An updated check
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Check'
- '404':
- description: The check was not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- operationId: DeleteChecksID
- tags:
- - Checks
- summary: Delete a check
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: checkID
- schema:
- type: string
- required: true
- description: The check ID.
- responses:
- '204':
- description: Delete has been accepted
- '404':
- description: The check was not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/checks/{checkID}/labels':
- get:
- operationId: GetChecksIDLabels
- tags:
- - Checks
- summary: List all labels for a check
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: checkID
- schema:
- type: string
- required: true
- description: The check ID.
- responses:
- '200':
- description: A list of all labels for a check
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelsResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostChecksIDLabels
- tags:
- - Checks
- summary: Add a label to a check
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: checkID
- schema:
- type: string
- required: true
- description: The check ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelMapping'
- responses:
- '201':
- description: The label was added to the check
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/checks/{checkID}/labels/{labelID}':
- delete:
- operationId: DeleteChecksIDLabelsID
- tags:
- - Checks
- summary: Delete label from a check
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: checkID
- schema:
- type: string
- required: true
- description: The check ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to delete.
- responses:
- '204':
- description: Delete has been accepted
- '404':
- description: Check or label not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /notificationRules:
- get:
- operationId: GetNotificationRules
- tags:
- - NotificationRules
- summary: List all notification rules
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - $ref: '#/components/parameters/Offset'
- - $ref: '#/components/parameters/Limit'
- - in: query
- name: orgID
- required: true
- description: Only show notification rules that belong to a specific organization ID.
- schema:
- type: string
- - in: query
- name: checkID
- description: Only show notifications that belong to the specific check ID.
- schema:
- type: string
- - in: query
- name: tag
- description: Only return notification rules that "would match" statuses which contain the tag key value pairs provided.
- schema:
- type: string
- pattern: '^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$'
- example: 'env:prod'
- responses:
- '200':
- description: A list of notification rules
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotificationRules'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: CreateNotificationRule
- tags:
- - NotificationRules
- summary: Add a notification rule
- requestBody:
- description: Notification rule to create
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PostNotificationRule'
- responses:
- '201':
- description: Notification rule created
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotificationRule'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/checks/{checkID}/query':
- get:
- operationId: GetChecksIDQuery
- tags:
- - Checks
- summary: Retrieve a check query
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: checkID
- schema:
- type: string
- required: true
- description: The check ID.
- responses:
- '200':
- description: The check query requested
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/FluxResponse'
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '404':
- description: Check not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/notificationRules/{ruleID}':
- get:
- operationId: GetNotificationRulesID
- tags:
- - NotificationRules
- summary: Retrieve a notification rule
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: ruleID
- schema:
- type: string
- required: true
- description: The notification rule ID.
- responses:
- '200':
- description: The notification rule requested
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotificationRule'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- put:
- operationId: PutNotificationRulesID
- tags:
- - NotificationRules
- summary: Update a notification rule
- requestBody:
- description: Notification rule update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotificationRule'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: ruleID
- schema:
- type: string
- required: true
- description: The notification rule ID.
- responses:
- '200':
- description: An updated notification rule
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotificationRule'
- '404':
- description: The notification rule was not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- operationId: PatchNotificationRulesID
- tags:
- - NotificationRules
- summary: Update a notification rule
- requestBody:
- description: Notification rule update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotificationRuleUpdate'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: ruleID
- schema:
- type: string
- required: true
- description: The notification rule ID.
- responses:
- '200':
- description: An updated notification rule
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotificationRule'
- '404':
- description: The notification rule was not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- operationId: DeleteNotificationRulesID
- tags:
- - NotificationRules
- summary: Delete a notification rule
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: ruleID
- schema:
- type: string
- required: true
- description: The notification rule ID.
- responses:
- '204':
- description: Delete has been accepted
- '404':
- description: The check was not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/notificationRules/{ruleID}/labels':
- get:
- operationId: GetNotificationRulesIDLabels
- tags:
- - NotificationRules
- summary: List all labels for a notification rule
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: ruleID
- schema:
- type: string
- required: true
- description: The notification rule ID.
- responses:
- '200':
- description: A list of all labels for a notification rule
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelsResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostNotificationRuleIDLabels
- tags:
- - NotificationRules
- summary: Add a label to a notification rule
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: ruleID
- schema:
- type: string
- required: true
- description: The notification rule ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelMapping'
- responses:
- '201':
- description: The label was added to the notification rule
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/notificationRules/{ruleID}/labels/{labelID}':
- delete:
- operationId: DeleteNotificationRulesIDLabelsID
- tags:
- - NotificationRules
- summary: Delete label from a notification rule
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: ruleID
- schema:
- type: string
- required: true
- description: The notification rule ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to delete.
- responses:
- '204':
- description: Delete has been accepted
- '404':
- description: Rule or label not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/notificationRules/{ruleID}/query':
- get:
- operationId: GetNotificationRulesIDQuery
- tags:
- - Rules
- summary: Retrieve a notification rule query
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: ruleID
- schema:
- type: string
- required: true
- description: The notification rule ID.
- responses:
- '200':
- description: The notification rule query requested
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/FluxResponse'
- '400':
- description: Invalid request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '404':
- description: Notification rule not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /notificationEndpoints:
- get:
- operationId: GetNotificationEndpoints
- tags:
- - NotificationEndpoints
- summary: List all notification endpoints
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - $ref: '#/components/parameters/Offset'
- - $ref: '#/components/parameters/Limit'
- - in: query
- name: orgID
- required: true
- description: Only show notification endpoints that belong to specific organization ID.
- schema:
- type: string
- responses:
- '200':
- description: A list of notification endpoints
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotificationEndpoints'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: CreateNotificationEndpoint
- tags:
- - NotificationEndpoints
- summary: Add a notification endpoint
- requestBody:
- description: Notification endpoint to create
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PostNotificationEndpoint'
- responses:
- '201':
- description: Notification endpoint created
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotificationEndpoint'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/notificationEndpoints/{endpointID}':
- get:
- operationId: GetNotificationEndpointsID
- tags:
- - NotificationEndpoints
- summary: Retrieve a notification endpoint
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: endpointID
- schema:
- type: string
- required: true
- description: The notification endpoint ID.
- responses:
- '200':
- description: The notification endpoint requested
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotificationEndpoint'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- put:
- operationId: PutNotificationEndpointsID
- tags:
- - NotificationEndpoints
- summary: Update a notification endpoint
- requestBody:
- description: A new notification endpoint to replace the existing endpoint with
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotificationEndpoint'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: endpointID
- schema:
- type: string
- required: true
- description: The notification endpoint ID.
- responses:
- '200':
- description: An updated notification endpoint
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotificationEndpoint'
- '404':
- description: The notification endpoint was not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- operationId: PatchNotificationEndpointsID
- tags:
- - NotificationEndpoints
- summary: Update a notification endpoint
- requestBody:
- description: Check update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotificationEndpointUpdate'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: endpointID
- schema:
- type: string
- required: true
- description: The notification endpoint ID.
- responses:
- '200':
- description: An updated notification endpoint
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotificationEndpoint'
- '404':
- description: The notification endpoint was not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- operationId: DeleteNotificationEndpointsID
- tags:
- - NotificationEndpoints
- summary: Delete a notification endpoint
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: endpointID
- schema:
- type: string
- required: true
- description: The notification endpoint ID.
- responses:
- '204':
- description: Delete has been accepted
- '404':
- description: The endpoint was not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/notificationEndpoints/{endpointID}/labels':
- get:
- operationId: GetNotificationEndpointsIDLabels
- tags:
- - NotificationEndpoints
- summary: List all labels for a notification endpoint
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: endpointID
- schema:
- type: string
- required: true
- description: The notification endpoint ID.
- responses:
- '200':
- description: A list of all labels for a notification endpoint
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelsResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostNotificationEndpointIDLabels
- tags:
- - NotificationEndpoints
- summary: Add a label to a notification endpoint
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: endpointID
- schema:
- type: string
- required: true
- description: The notification endpoint ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelMapping'
- responses:
- '201':
- description: The label was added to the notification endpoint
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/notificationEndpoints/{endpointID}/labels/{labelID}':
- delete:
- operationId: DeleteNotificationEndpointsIDLabelsID
- tags:
- - NotificationEndpoints
- summary: Delete a label from a notification endpoint
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: endpointID
- schema:
- type: string
- required: true
- description: The notification endpoint ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to delete.
- responses:
- '204':
- description: Delete has been accepted
- '404':
- description: Endpoint or label not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /debug/pprof/all:
- get:
- operationId: GetDebugPprofAllProfiles
- tags:
- - Debug
- - System information endpoints
- summary: Retrieve all runtime profiles
- description: |
- Collects samples and returns reports for the following [Go runtime profiles](https://pkg.go.dev/runtime/pprof):
- - **allocs**: All past memory allocations
- - **block**: Stack traces that led to blocking on synchronization primitives
- - **cpu**: (Optional) Program counters sampled from the executing stack.
- Include by passing the `cpu` query parameter with a [duration](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#duration) value.
- Equivalent to the report from [`GET /debug/pprof/profile?seconds=NUMBER_OF_SECONDS`](#operation/GetDebugPprofProfile).
- - **goroutine**: All current goroutines
- - **heap**: Memory allocations for live objects
- - **mutex**: Holders of contended mutexes
- - **threadcreate**: Stack traces that led to the creation of new OS threads
- x-codeSamples:
- - lang: Shell
- label: 'Shell: Get all profiles'
- source: |
- # Download and extract a `tar.gz` of all profiles after 10 seconds of CPU sampling.
- curl "http://localhost:8086/debug/pprof/all?cpu=10s" | tar -xz
- # x profiles/cpu.pb.gz
- # x profiles/goroutine.pb.gz
- # x profiles/block.pb.gz
- # x profiles/mutex.pb.gz
- # x profiles/heap.pb.gz
- # x profiles/allocs.pb.gz
- # x profiles/threadcreate.pb.gz
- # Analyze a profile.
- go tool pprof profiles/heap.pb.gz
- - lang: Shell
- label: 'Shell: Get all profiles except CPU'
- source: |
- # Download and extract a `tar.gz` of all profiles except CPU.
- curl http://localhost:8086/debug/pprof/all | tar -xz
- # x profiles/goroutine.pb.gz
- # x profiles/block.pb.gz
- # x profiles/mutex.pb.gz
- # x profiles/heap.pb.gz
- # x profiles/allocs.pb.gz
- # x profiles/threadcreate.pb.gz
- # Analyze a profile.
- go tool pprof profiles/heap.pb.gz
- servers:
- - url: ''
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: cpu
- description: |
- Collects and returns CPU profiling data for the specified [duration](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#duration).
- schema:
- type: string
- format: duration
- externalDocs:
- description: InfluxDB duration
- url: 'https://docs.influxdata.com/influxdb/latest/reference/glossary/#duration'
- responses:
- '200':
- description: |
- [Go runtime profile](https://pkg.go.dev/runtime/pprof) reports.
- content:
- application/octet-stream:
- schema:
- description: |
- GZIP compressed TAR file (`.tar.gz`) that contains
- [Go runtime profile](https://pkg.go.dev/runtime/pprof) reports.
- type: string
- format: binary
- externalDocs:
- description: Golang pprof package
- url: 'https://pkg.go.dev/net/http/pprof'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /debug/pprof/allocs:
- get:
- operationId: GetDebugPprofAllocs
- tags:
- - Debug
- - System information endpoints
- summary: Retrieve the memory allocations runtime profile
- description: |
- Returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof) report of
- all past memory allocations.
- **allocs** is the same as the **heap** profile,
- but changes the default [pprof](https://pkg.go.dev/runtime/pprof)
- display to __-alloc_space__,
- the total number of bytes allocated since the program began (including garbage-collected bytes).
- x-codeSamples:
- - lang: Shell
- label: 'Shell: go tool pprof'
- source: |
- # Analyze the profile in interactive mode.
- go tool pprof http://localhost:8086/debug/pprof/allocs
- # `pprof` returns the following prompt:
- # Entering interactive mode (type "help" for commands, "o" for options)
- # (pprof)
- # At the prompt, get the top N memory allocations.
- (pprof) top10
- servers:
- - url: ''
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: debug
- description: |
- - `0`: (Default) Return the report as a gzip-compressed protocol buffer.
- - `1`: Return a response body with the report formatted as human-readable text.
- The report contains comments that translate addresses to function names and line numbers for debugging.
- `debug=1` is mutually exclusive with the `seconds` query parameter.
- schema:
- type: integer
- format: int64
- enum:
- - 0
- - 1
- - in: query
- name: seconds
- description: |
- Number of seconds to collect statistics.
- `seconds` is mutually exclusive with `debug=1`.
- schema:
- type: string
- format: int64
- responses:
- '200':
- description: |
- [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
- with [pprof](https://github.com/google/pprof) analysis and visualization tools.
- If debug is enabled (`?debug=1`), response body contains a human-readable profile.
- content:
- application/octet-stream:
- schema:
- description: |
- [Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
- type: string
- format: binary
- externalDocs:
- description: Golang pprof package
- url: 'https://pkg.go.dev/net/http/pprof'
- text/plain:
- schema:
- description: |
- Response body contains a report formatted in plain text.
- The report contains comments that translate addresses to
- function names and line numbers for debugging.
- type: string
- format: Go runtime profile
- externalDocs:
- description: Golang pprof package
- url: 'https://pkg.go.dev/net/http/pprof'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /debug/pprof/block:
- get:
- operationId: GetDebugPprofBlock
- tags:
- - Debug
- - System information endpoints
- summary: Retrieve the block runtime profile
- description: |
- Collects samples and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof)
- report of stack traces that led to blocking on synchronization primitives.
- x-codeSamples:
- - lang: Shell
- label: 'Shell: go tool pprof'
- source: |
- # Analyze the profile in interactive mode.
- go tool pprof http://localhost:8086/debug/pprof/block
- # `pprof` returns the following prompt:
- # Entering interactive mode (type "help" for commands, "o" for options)
- # (pprof)
- # At the prompt, get the top N entries.
- (pprof) top10
- servers:
- - url: ''
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: debug
- description: |
- - `0`: (Default) Return the report as a gzip-compressed protocol buffer.
- - `1`: Return a response body with the report formatted as human-readable text.
- The report contains comments that translate addresses to function names and line numbers for debugging.
- `debug=1` is mutually exclusive with the `seconds` query parameter.
- schema:
- type: integer
- format: int64
- enum:
- - 0
- - 1
- - in: query
- name: seconds
- description: |
- Number of seconds to collect statistics.
- `seconds` is mutually exclusive with `debug=1`.
- schema:
- type: string
- format: int64
- responses:
- '200':
- description: |
- [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
- with [pprof](https://github.com/google/pprof) analysis and visualization tools.
- If debug is enabled (`?debug=1`), response body contains a human-readable profile.
- content:
- application/octet-stream:
- schema:
- description: |
- [Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
- type: string
- format: binary
- externalDocs:
- description: Golang pprof package
- url: 'https://pkg.go.dev/net/http/pprof'
- text/plain:
- schema:
- description: |
- Response body contains a report formatted in plain text.
- The report contains comments that translate addresses to
- function names and line numbers for debugging.
- type: string
- format: Go runtime profile
- externalDocs:
- description: Golang pprof package
- url: 'https://pkg.go.dev/net/http/pprof'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /debug/pprof/cmdline:
- get:
- operationId: GetDebugPprofCmdline
- tags:
- - Debug
- - System information endpoints
- summary: Retrieve the command line invocation
- description: |
- Returns the command line that invoked InfluxDB.
- servers:
- - url: ''
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- responses:
- '200':
- description: Command line invocation.
- content:
- text/plain:
- schema:
- type: string
- format: Command line
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /debug/pprof/goroutine:
- get:
- operationId: GetDebugPprofGoroutine
- tags:
- - Debug
- - System information endpoints
- summary: Retrieve the goroutines runtime profile
- description: |
- Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof)
- report of all current goroutines.
- x-codeSamples:
- - lang: Shell
- label: 'Shell: go tool pprof'
- source: |
- # Analyze the profile in interactive mode.
- go tool pprof http://localhost:8086/debug/pprof/goroutine
- # `pprof` returns the following prompt:
- # Entering interactive mode (type "help" for commands, "o" for options)
- # (pprof)
- # At the prompt, get the top N entries.
- (pprof) top10
- servers:
- - url: ''
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: debug
- description: |
- - `0`: (Default) Return the report as a gzip-compressed protocol buffer.
- - `1`: Return a response body with the report formatted as
- human-readable text with comments that translate addresses to
- function names and line numbers for debugging.
- `debug=1` is mutually exclusive with the `seconds` query parameter.
- schema:
- type: integer
- format: int64
- enum:
- - 0
- - 1
- - in: query
- name: seconds
- description: |
- Number of seconds to collect statistics.
- `seconds` is mutually exclusive with `debug=1`.
- schema:
- type: string
- format: int64
- responses:
- '200':
- description: |
- [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
- with [pprof](https://github.com/google/pprof) analysis and visualization tools.
- If debug is enabled (`?debug=1`), response body contains a human-readable profile.
- content:
- application/octet-stream:
- schema:
- description: |
- [Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
- type: string
- format: binary
- externalDocs:
- description: Golang pprof package
- url: 'https://pkg.go.dev/net/http/pprof'
- text/plain:
- schema:
- description: |
- Response body contains a report formatted in plain text.
- The report contains comments that translate addresses to
- function names and line numbers for debugging.
- type: string
- format: Go runtime profile
- externalDocs:
- description: Golang pprof package
- url: 'https://pkg.go.dev/net/http/pprof'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /debug/pprof/heap:
- get:
- operationId: GetDebugPprofHeap
- tags:
- - Debug
- - System information endpoints
- summary: Retrieve the heap runtime profile
- description: |
- Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof)
- report of memory allocations for live objects.
- To run **garbage collection** before sampling,
- pass the `gc` query parameter with a value of `1`.
- x-codeSamples:
- - lang: Shell
- label: 'Shell: go tool pprof'
- source: |
- # Analyze the profile in interactive mode.
- go tool pprof http://localhost:8086/debug/pprof/heap
- # `pprof` returns the following prompt:
- # Entering interactive mode (type "help" for commands, "o" for options)
- # (pprof)
- # At the prompt, get the top N memory-intensive nodes.
- (pprof) top10
- # pprof displays the list:
- # Showing nodes accounting for 142.46MB, 85.43% of 166.75MB total
- # Dropped 895 nodes (cum <= 0.83MB)
- # Showing top 10 nodes out of 143
- servers:
- - url: ''
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: debug
- description: |
- - `0`: (Default) Return the report as a gzip-compressed protocol buffer.
- - `1`: Return a response body with the report formatted as human-readable text.
- The report contains comments that translate addresses to function names and line numbers for debugging.
- `debug=1` is mutually exclusive with the `seconds` query parameter.
- schema:
- type: integer
- format: int64
- enum:
- - 0
- - 1
- - in: query
- name: seconds
- description: |
- Number of seconds to collect statistics.
- `seconds` is mutually exclusive with `debug=1`.
- schema:
- type: string
- format: int64
- - in: query
- name: gc
- description: |
- - `0`: (Default) don't force garbage collection before sampling.
- - `1`: Force garbage collection before sampling.
- schema:
- type: integer
- format: int64
- enum:
- - 0
- - 1
- responses:
- '200':
- description: |
- [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
- with [pprof](https://github.com/google/pprof) analysis and visualization tools.
- If debug is enabled (`?debug=1`), response body contains a human-readable profile.
- content:
- application/octet-stream:
- schema:
- description: |
- [Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
- type: string
- format: binary
- externalDocs:
- description: Golang pprof package
- url: 'https://pkg.go.dev/net/http/pprof'
- text/plain:
- schema:
- description: |
- Response body contains a report formatted in plain text.
- The report contains comments that translate addresses to
- function names and line numbers for debugging.
- type: string
- format: Go runtime profile
- externalDocs:
- description: Golang pprof package
- url: 'https://pkg.go.dev/net/http/pprof'
- examples:
- profileDebugResponse:
- summary: Profile in plain text
- 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"
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /debug/pprof/mutex:
- get:
- operationId: GetDebugPprofMutex
- tags:
- - Debug
- - System information endpoints
- summary: Retrieve the mutual exclusion (mutex) runtime profile
- description: |
- Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof) report of
- lock contentions.
- The profile contains stack traces of holders of contended mutual exclusions (mutexes).
- x-codeSamples:
- - lang: Shell
- label: 'Shell: go tool pprof'
- source: |
- # Analyze the profile in interactive mode.
- go tool pprof http://localhost:8086/debug/pprof/mutex
- # `pprof` returns the following prompt:
- # Entering interactive mode (type "help" for commands, "o" for options)
- # (pprof)
- # At the prompt, get the top N entries.
- (pprof) top10
- servers:
- - url: ''
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: debug
- description: |
- - `0`: (Default) Return the report as a gzip-compressed protocol buffer.
- - `1`: Return a response body with the report formatted as human-readable text.
- The report contains comments that translate addresses to function names and line numbers for debugging.
- `debug=1` is mutually exclusive with the `seconds` query parameter.
- schema:
- type: integer
- format: int64
- enum:
- - 0
- - 1
- - in: query
- name: seconds
- description: |
- Number of seconds to collect statistics.
- `seconds` is mutually exclusive with `debug=1`.
- schema:
- type: string
- format: int64
- responses:
- '200':
- description: |
- [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
- with [pprof](https://github.com/google/pprof) analysis and visualization tools.
- If debug is enabled (`?debug=1`), response body contains a human-readable profile.
- content:
- application/octet-stream:
- schema:
- description: |
- [Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
- type: string
- format: binary
- externalDocs:
- description: Golang pprof package
- url: 'https://pkg.go.dev/net/http/pprof'
- text/plain:
- schema:
- description: |
- Response body contains a report formatted in plain text.
- The report contains comments that translate addresses to
- function names and line numbers for debugging.
- type: string
- format: Go runtime profile
- externalDocs:
- description: Golang pprof package
- url: 'https://pkg.go.dev/net/http/pprof'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /debug/pprof/profile:
- get:
- operationId: GetDebugPprofProfile
- tags:
- - Debug
- - System information endpoints
- summary: Retrieve the CPU runtime profile
- description: |
- Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof)
- report of program counters on the executing stack.
- x-codeSamples:
- - lang: Shell
- label: 'Shell: go tool pprof'
- source: |
- # Download the profile report.
- curl http://localhost:8086/debug/pprof/profile -o cpu
- # Analyze the profile in interactive mode.
- go tool pprof ./cpu
- # At the prompt, get the top N functions most often running
- # or waiting during the sample period.
- (pprof) top10
- servers:
- - url: ''
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: seconds
- description: Number of seconds to collect profile data. Default is `30` seconds.
- schema:
- type: string
- format: int64
- responses:
- '200':
- description: |
- [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
- with [pprof](https://github.com/google/pprof) analysis and visualization tools.
- content:
- application/octet-stream:
- schema:
- description: |
- [Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
- type: string
- format: binary
- externalDocs:
- description: Golang pprof package
- url: 'https://pkg.go.dev/net/http/pprof'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /debug/pprof/threadcreate:
- get:
- operationId: GetDebugPprofThreadCreate
- tags:
- - Debug
- - System information endpoints
- summary: Retrieve the threadcreate runtime profile
- description: |
- Collects statistics and returns a [Go runtime profile](https://pkg.go.dev/runtime/pprof)
- report of stack traces that led to the creation of new OS threads.
- x-codeSamples:
- - lang: Shell
- label: 'Shell: go tool pprof'
- source: |
- # Analyze the profile in interactive mode.
- go tool pprof http://localhost:8086/debug/pprof/threadcreate
- # `pprof` returns the following prompt:
- # Entering interactive mode (type "help" for commands, "o" for options)
- # (pprof)
- # At the prompt, get the top N entries.
- (pprof) top10
- servers:
- - url: ''
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: debug
- description: |
- - `0`: (Default) Return the report as a gzip-compressed protocol buffer.
- - `1`: Return a response body with the report formatted as human-readable text.
- The report contains comments that translate addresses to function names and line numbers for debugging.
- `debug=1` is mutually exclusive with the `seconds` query parameter.
- schema:
- type: integer
- format: int64
- enum:
- - 0
- - 1
- - in: query
- name: seconds
- description: |
- Number of seconds to collect statistics.
- `seconds` is mutually exclusive with `debug=1`.
- schema:
- type: string
- format: int64
- responses:
- '200':
- description: |
- [Go runtime profile](https://pkg.go.dev/runtime/pprof) report compatible
- with [pprof](https://github.com/google/pprof) analysis and visualization tools.
- If debug is enabled (`?debug=1`), response body contains a human-readable profile.
- content:
- application/octet-stream:
- schema:
- description: |
- [Go runtime profile](https://pkg.go.dev/runtime/pprof) report in protocol buffer format.
- type: string
- format: binary
- externalDocs:
- description: Golang pprof package
- url: 'https://pkg.go.dev/net/http/pprof'
- text/plain:
- schema:
- description: |
- Response body contains a report formatted in plain text.
- The report contains comments that translate addresses to
- function names and line numbers for debugging.
- type: string
- format: Go runtime profile
- externalDocs:
- description: Golang pprof package
- url: 'https://pkg.go.dev/net/http/pprof'
- examples:
- profileDebugResponse:
- summary: Profile in plain text
- 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"
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /debug/pprof/trace:
- get:
- operationId: GetDebugPprofTrace
- tags:
- - Debug
- - System information endpoints
- summary: Retrieve the runtime execution trace
- description: |
- Collects profile data and returns trace execution events for the current program.
- x-codeSamples:
- - lang: Shell
- label: 'Shell: go tool trace'
- source: |
- # Download the trace file.
- curl http://localhost:8086/debug/pprof/trace -o trace
- # Analyze the trace.
- go tool trace ./trace
- servers:
- - url: ''
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: seconds
- description: Number of seconds to collect profile data.
- schema:
- type: string
- format: int64
- responses:
- '200':
- description: |
- [Trace file](https://pkg.go.dev/runtime/trace) compatible
- with the [Golang `trace` command](https://pkg.go.dev/cmd/trace).
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- externalDocs:
- description: Golang trace package
- url: 'https://pkg.go.dev/runtime/trace'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /health:
- get:
- operationId: GetHealth
- tags:
- - Health
- - System information endpoints
- summary: Retrieve the health of the instance
- description: Returns the health of the instance.
- servers:
- - url: ''
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- responses:
- '200':
- description: |
- The instance is healthy.
- The response body contains the health check items and status.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/HealthCheck'
- '503':
- description: The instance is unhealthy.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/HealthCheck'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /metrics:
- get:
- operationId: GetMetrics
- tags:
- - Metrics
- - System information endpoints
- summary: Retrieve workload performance metrics
- description: |
- Returns metrics about the workload performance of an InfluxDB instance.
- Use this endpoint to get performance, resource, and usage metrics.
- #### Related guides
- - For the list of metrics categories, see [InfluxDB OSS metrics](https://docs.influxdata.com/influxdb/v2.3/reference/internals/metrics/).
- - Learn how to use InfluxDB to [scrape Prometheus metrics](https://docs.influxdata.com/influxdb/v2.3/write-data/developer-tools/scrape-prometheus-metrics/).
- - Learn how InfluxDB [parses the Prometheus exposition format](https://docs.influxdata.com/influxdb/v2.3/reference/prometheus-metrics/).
- servers:
- - url: ''
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- responses:
- '200':
- description: |
- Success. The response body contains metrics in
- [Prometheus plain-text exposition format](https://prometheus.io/docs/instrumenting/exposition_formats)
- Metrics contain a name, an optional set of key-value pairs, and a value.
- The following descriptors precede each metric:
- - `HELP`: description of the metric
- - `TYPE`: [Prometheus metric type](https://prometheus.io/docs/concepts/metric_types/) (`counter`, `gauge`, `histogram`, or `summary`)
- content:
- text/plain:
- schema:
- type: string
- format: Prometheus text-based exposition
- externalDocs:
- description: Prometheus exposition formats
- url: 'https://prometheus.io/docs/instrumenting/exposition_formats'
- examples:
- expositionResponse:
- summary: Metrics in plain text
- value: |
- # HELP go_threads Number of OS threads created.
- # TYPE go_threads gauge
- go_threads 19
- # HELP http_api_request_duration_seconds Time taken to respond to HTTP request
- # TYPE http_api_request_duration_seconds histogram
- 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
- 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
- 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
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /ready:
- get:
- operationId: GetReady
- tags:
- - Ready
- - System information endpoints
- summary: Get the readiness of an instance at startup
- servers:
- - url: ''
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- responses:
- '200':
- description: The instance is ready
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Ready'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /users:
- get:
- operationId: GetUsers
- tags:
- - Security and access endpoints
- - Users
- summary: List users
- description: |
- Retrieves a list of users. Default limit is `20`.
- To limit which users are returned, pass query parameters in your request.
- #### Required permissions
- - `read-user USER_ID` permission.
- `USER_ID` is the ID of the user that you want to list.
- - InfluxDB OSS requires an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token))_ to list all users.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - $ref: '#/components/parameters/Offset'
- - $ref: '#/components/parameters/Limit'
- - $ref: '#/components/parameters/After'
- - in: query
- name: name
- schema:
- type: string
- - in: query
- name: id
- schema:
- type: string
- responses:
- '200':
- description: Success. The response contains a list of `users`.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Users'
- '401':
- description: |
- Unauthorized.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- tokenNotAuthorized:
- summary: 'API token doesn''t have `write:users` permission'
- value:
- code: unauthorized
- message: 'write:users/09d8462ce0764000 is unauthorized'
- '422':
- description: |
- Unprocessable entity.
- The error may indicate one of the following problems:
- - The request body isn't valid--the request is well-formed, but InfluxDB can't process it due to semantic errors.
- - You passed a parameter combination that InfluxDB doesn't support.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- post:
- operationId: PostUsers
- tags:
- - Users
- summary: Create a user
- description: |
- Creates a user and returns the newly created user.
- #### Required permissions
- - `write-users`. Requires an InfluxDB API **Op** token.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- requestBody:
- description: The user to create.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/User'
- responses:
- '201':
- description: |
- Success.
- The response contains the newly created user.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UserResponse'
- '401':
- description: |
- Unauthorized.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- tokenNotAuthorized:
- summary: 'API token doesn''t have `write:users` permission'
- value:
- code: unauthorized
- message: 'write:users/09d8462ce0764000 is unauthorized'
- '422':
- description: |
- Unprocessable entity.
- The error may indicate one of the following problems:
- - The request body isn't valid--the request is well-formed, but InfluxDB can't process it due to semantic errors.
- - You passed a parameter combination that InfluxDB doesn't support.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- x-codeSamples:
- - label: 'cURL: create a user and set a password'
- lang: Shell
- source: |
- # Create the user and assign the user ID to a variable.
- USER_ID=$(curl --request POST \
- "http://localhost:8086/api/v2/users/" \
- --header "Authorization: Token INFLUX_OP_TOKEN" \
- --header 'Content-type: application/json' \
- --data-binary @- << EOF | jq -r '.id'
- {
- "name": "USER_NAME",
- "status": "active"
- }
- EOF
- )
- # Pass the user ID and a password to set the password for the user.
- curl request POST "http://localhost:8086/api/v2/users/$USER_ID/password/" \
- --header "Authorization: Token INFLUX_OP_TOKEN" \
- --header 'Content-type: application/json' \
- --data '{ "password": "USER_PASSWORD" }'
- '/users/{userID}':
- get:
- operationId: GetUsersID
- tags:
- - Security and access endpoints
- - Users
- summary: Retrieve a user
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The user ID.
- responses:
- '200':
- description: User details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UserResponse'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- patch:
- operationId: PatchUsersID
- tags:
- - Users
- summary: Update a user
- requestBody:
- description: User update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/User'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the user to update.
- responses:
- '200':
- description: User updated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UserResponse'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- delete:
- operationId: DeleteUsersID
- tags:
- - Users
- summary: Delete a user
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the user to delete.
- responses:
- '204':
- description: User deleted
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /setup:
- get:
- operationId: GetSetup
- tags:
- - Setup
- summary: 'Check if database has default user, org, bucket'
- description: 'Returns `true` if no default user, organization, or bucket has been created.'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- responses:
- '200':
- description: allowed true or false
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/IsOnboarding'
- post:
- operationId: PostSetup
- tags:
- - Setup
- summary: 'Set up initial user, org and bucket'
- description: 'Post an onboarding request to set up initial user, org and bucket.'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- requestBody:
- description: Source to create
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/OnboardingRequest'
- responses:
- '201':
- description: 'Created default user, bucket, org'
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/OnboardingResponse'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /authorizations:
- get:
- operationId: GetAuthorizations
- tags:
- - Authorizations
- - Security and access endpoints
- summary: List authorizations
- description: |
- Retrieves a list of authorizations.
- To limit which authorizations are returned, pass query parameters in your request.
- If no query parameters are passed, InfluxDB returns all authorizations.
- #### InfluxDB Cloud
- - 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.
- #### InfluxDB OSS
- - Returns
- [API token](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#token) values in authorizations.
- - Requires an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token))_ to view authorizations.
- #### Related guides
- - [View tokens](https://docs.influxdata.com/influxdb/v2.3/security/tokens/view-tokens/).
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: userID
- schema:
- type: string
- description: |
- A user ID.
- Only returns authorizations scoped to this user.
- - in: query
- name: user
- schema:
- type: string
- description: |
- A user name.
- Only returns authorizations scoped to this user.
- - in: query
- name: orgID
- schema:
- type: string
- description: An organization ID. Only returns authorizations that belong to this organization.
- - in: query
- name: org
- schema:
- type: string
- description: |
- An organization name.
- Only returns authorizations that belong to this organization.
- responses:
- '200':
- description: Success. The response body contains a list of authorizations.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Authorizations'
- '400':
- description: Invalid request
- $ref: '#/components/responses/GeneralServerError'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- post:
- operationId: PostAuthorizations
- tags:
- - Authorizations
- summary: Create an authorization
- description: |
- Creates an authorization and returns the newly created authorization.
- Use this endpoint to generate an API token with resource permissions.
- A permission sets `read` or `write` access to a `type` of resource.
- Keep the following in mind when creating and updating authorizations:
- - A permission with a resource `id` applies only to the resource specified by the ID.
- - A permission that doesn't have a resource `id` applies to all resources of resource `type`.
- - To scope an authorization to a specific user, provide the `userID` property.
- #### Related guides
- - [Create a token](https://docs.influxdata.com/influxdb/v2.3/security/tokens/create-token/).
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- requestBody:
- description: The authorization to create.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AuthorizationPostRequest'
- responses:
- '201':
- description: Created. The response body contains the newly created authorization.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Authorization'
- '400':
- description: Invalid request
- $ref: '#/components/responses/GeneralServerError'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- x-codeSample:
- - lang: Shell
- label: 'cURL: Create auth to read all buckets'
- source: |
- curl --request POST \
- "http://localhost:8086/api/v2/authorizations" \
- --header "Authorization: Token INFLUX_TOKEN" \
- --header 'Content-Type: application/json' \
- --data @- << EOF
- {
- "orgID": "INFLUX_ORG_ID",
- "description": "iot_users read buckets",
- "permissions": [
- {"action": "read", "resource": {"type": "buckets"}}
- ]
- }
- EOF
- - lang: Shell
- - label: 'cURL: Create auth scoped to a user'
- - source: |
- curl --request POST \
- "http://localhost:8086/api/v2/authorizations" \
- --header "Authorization: Token INFLUX_TOKEN" \
- --header 'Content-Type: application/json' \
- --data @- << EOF
- {
- "orgID": "INFLUX_ORG_ID",
- "userID": "INFLUX_USER_ID",
- "description": "iot_user write to bucket",
- "permissions": [
- {"action": "write", "resource": {"type": "buckets", "id: "INFLUX_BUCKET_ID"}}
- ]
- }
- EOF
- '/authorizations/{authID}':
- get:
- operationId: GetAuthorizationsID
- tags:
- - Authorizations
- - Security and access endpoints
- summary: Retrieve an authorization
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: authID
- schema:
- type: string
- required: true
- description: The ID of the authorization to get.
- responses:
- '200':
- description: Authorization details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Authorization'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- patch:
- operationId: PatchAuthorizationsID
- tags:
- - Authorizations
- summary: Update an authorization to be active or inactive
- requestBody:
- description: Authorization to update
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AuthorizationUpdateRequest'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: authID
- schema:
- type: string
- required: true
- description: The ID of the authorization to update.
- responses:
- '200':
- description: The active or inactive authorization
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Authorization'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- delete:
- operationId: DeleteAuthorizationsID
- tags:
- - Authorizations
- summary: Delete an authorization
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: authID
- schema:
- type: string
- required: true
- description: The ID of the authorization to delete.
- responses:
- '204':
- description: Authorization deleted
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /variables:
- get:
- operationId: GetVariables
- tags:
- - Variables
- summary: List all variables
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: org
- description: The name of the organization.
- schema:
- type: string
- - in: query
- name: orgID
- description: The organization ID.
- schema:
- type: string
- responses:
- '200':
- description: A list of variables for an organization
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Variables'
- '400':
- description: Invalid request
- $ref: '#/components/responses/GeneralServerError'
- default:
- description: Internal server error
- $ref: '#/components/responses/GeneralServerError'
- post:
- operationId: PostVariables
- summary: Create a variable
- tags:
- - Variables
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- requestBody:
- description: Variable to create
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Variable'
- responses:
- '201':
- description: Variable created
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Variable'
- default:
- description: Internal server error
- $ref: '#/components/responses/GeneralServerError'
- '/variables/{variableID}':
- get:
- operationId: GetVariablesID
- tags:
- - Variables
- summary: Retrieve a variable
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: variableID
- required: true
- schema:
- type: string
- description: The variable ID.
- responses:
- '200':
- description: Variable found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Variable'
- '404':
- description: Variable not found
- $ref: '#/components/responses/GeneralServerError'
- default:
- description: Internal server error
- $ref: '#/components/responses/GeneralServerError'
- delete:
- operationId: DeleteVariablesID
- tags:
- - Variables
- summary: Delete a variable
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: variableID
- required: true
- schema:
- type: string
- description: The variable ID.
- responses:
- '204':
- description: Variable deleted
- default:
- description: Internal server error
- $ref: '#/components/responses/GeneralServerError'
- patch:
- operationId: PatchVariablesID
- summary: Update a variable
- tags:
- - Variables
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: variableID
- required: true
- schema:
- type: string
- description: The variable ID.
- requestBody:
- description: Variable update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Variable'
- responses:
- '200':
- description: Variable updated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Variable'
- default:
- description: Internal server error
- $ref: '#/components/responses/GeneralServerError'
- put:
- operationId: PutVariablesID
- summary: Replace a variable
- tags:
- - Variables
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: variableID
- required: true
- schema:
- type: string
- description: The variable ID.
- requestBody:
- description: Variable to replace
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Variable'
- responses:
- '200':
- description: Variable updated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Variable'
- default:
- description: Internal server error
- $ref: '#/components/responses/GeneralServerError'
- /sources:
- post:
- operationId: PostSources
- tags:
- - Sources
- summary: Create a source
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- requestBody:
- description: Source to create
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Source'
- responses:
- '201':
- description: Created Source
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Source'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- get:
- operationId: GetSources
- tags:
- - Sources
- summary: List all sources
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: org
- description: The name of the organization.
- schema:
- type: string
- responses:
- '200':
- description: A list of sources
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Sources'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/sources/{sourceID}':
- delete:
- operationId: DeleteSourcesID
- tags:
- - Sources
- summary: Delete a source
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: sourceID
- schema:
- type: string
- required: true
- description: The source ID.
- responses:
- '204':
- description: Delete has been accepted
- '404':
- description: View not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- operationId: PatchSourcesID
- tags:
- - Sources
- summary: Update a Source
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: sourceID
- schema:
- type: string
- required: true
- description: The source ID.
- requestBody:
- description: Source update
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Source'
- responses:
- '200':
- description: Created Source
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Source'
- '404':
- description: Source not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- get:
- operationId: GetSourcesID
- tags:
- - Sources
- summary: Retrieve a source
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: sourceID
- schema:
- type: string
- required: true
- description: The source ID.
- responses:
- '200':
- description: A source
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Source'
- '404':
- description: Source not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/sources/{sourceID}/health':
- get:
- operationId: GetSourcesIDHealth
- tags:
- - Sources
- summary: Get the health of a source
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: sourceID
- schema:
- type: string
- required: true
- description: The source ID.
- responses:
- '200':
- description: The source is healthy
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/HealthCheck'
- '503':
- description: The source is not healthy
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/HealthCheck'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/sources/{sourceID}/buckets':
- get:
- operationId: GetSourcesIDBuckets
- tags:
- - Sources
- - Buckets
- summary: Get buckets in a source
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: sourceID
- schema:
- type: string
- required: true
- description: The source ID.
- - in: query
- name: org
- description: The name of the organization.
- schema:
- type: string
- responses:
- '200':
- description: A source
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Buckets'
- '404':
- description: Source not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /scrapers:
- get:
- operationId: GetScrapers
- tags:
- - Scraper Targets
- summary: List all scraper targets
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: name
- description: Specifies the name of the scraper target.
- schema:
- type: string
- - in: query
- name: id
- description: 'List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used.'
- schema:
- type: array
- items:
- type: string
- - in: query
- name: orgID
- description: Specifies the organization ID of the scraper target.
- schema:
- type: string
- - in: query
- name: org
- description: Specifies the organization name of the scraper target.
- schema:
- type: string
- responses:
- '200':
- description: All scraper targets
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ScraperTargetResponses'
- post:
- operationId: PostScrapers
- summary: Create a scraper target
- tags:
- - Scraper Targets
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- requestBody:
- description: Scraper target to create
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ScraperTargetRequest'
- responses:
- '201':
- description: Scraper target created
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ScraperTargetResponse'
- default:
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/scrapers/{scraperTargetID}':
- get:
- operationId: GetScrapersID
- tags:
- - Scraper Targets
- summary: Retrieve a scraper target
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: scraperTargetID
- required: true
- schema:
- type: string
- description: The identifier of the scraper target.
- responses:
- '200':
- description: The scraper target
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ScraperTargetResponse'
- default:
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- operationId: DeleteScrapersID
- tags:
- - Scraper Targets
- summary: Delete a scraper target
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: scraperTargetID
- required: true
- schema:
- type: string
- description: The identifier of the scraper target.
- responses:
- '204':
- description: Scraper target deleted
- default:
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- operationId: PatchScrapersID
- summary: Update a scraper target
- tags:
- - Scraper Targets
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: scraperTargetID
- required: true
- schema:
- type: string
- description: The identifier of the scraper target.
- requestBody:
- description: Scraper target update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ScraperTargetRequest'
- responses:
- '200':
- description: Scraper target updated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ScraperTargetResponse'
- default:
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/scrapers/{scraperTargetID}/labels':
- get:
- operationId: GetScrapersIDLabels
- tags:
- - Scraper Targets
- summary: List all labels for a scraper target
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- responses:
- '200':
- description: A list of labels for a scraper target.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelsResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostScrapersIDLabels
- tags:
- - Scraper Targets
- summary: Add a label to a scraper target
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelMapping'
- responses:
- '201':
- description: The newly added label
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LabelResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/scrapers/{scraperTargetID}/labels/{labelID}':
- delete:
- operationId: DeleteScrapersIDLabelsID
- tags:
- - Scraper Targets
- summary: Delete a label from a scraper target
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The label ID.
- responses:
- '204':
- description: Delete has been accepted
- '404':
- description: Scraper target not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/scrapers/{scraperTargetID}/members':
- get:
- operationId: GetScrapersIDMembers
- tags:
- - Scraper Targets
- summary: List all users with member privileges for a scraper target
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- responses:
- '200':
- description: A list of scraper target members
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceMembers'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostScrapersIDMembers
- tags:
- - Scraper Targets
- summary: Add a member to a scraper target
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- requestBody:
- description: User to add as member
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AddResourceMemberRequestBody'
- responses:
- '201':
- description: Member added to scraper targets
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceMember'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/scrapers/{scraperTargetID}/members/{userID}':
- delete:
- operationId: DeleteScrapersIDMembersID
- tags:
- - Scraper Targets
- summary: Remove a member from a scraper target
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of member to remove.
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- responses:
- '204':
- description: Member removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/scrapers/{scraperTargetID}/owners':
- get:
- operationId: GetScrapersIDOwners
- tags:
- - Scraper Targets
- summary: List all owners of a scraper target
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- responses:
- '200':
- description: A list of scraper target owners
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceOwners'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: PostScrapersIDOwners
- tags:
- - Scraper Targets
- summary: Add an owner to a scraper target
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- requestBody:
- description: User to add as owner
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AddResourceMemberRequestBody'
- responses:
- '201':
- description: Scraper target owner added
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceOwner'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '/scrapers/{scraperTargetID}/owners/{userID}':
- delete:
- operationId: DeleteScrapersIDOwnersID
- tags:
- - Scraper Targets
- summary: Remove an owner from a scraper target
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of owner to remove.
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- responses:
- '204':
- description: Owner removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /backup/kv:
- get:
- operationId: GetBackupKV
- tags:
- - Backup
- 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.
- description: |
- Retrieves a snapshot of metadata stored in the server's embedded KV store.
- InfluxDB versions greater than 2.1.x don't include metadata stored in embedded SQL;
- avoid using this endpoint with versions greater than 2.1.x.
- deprecated: true
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- responses:
- '200':
- description: Success. The response contains a snapshot of KV metadata.
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /backup/metadata:
- get:
- operationId: GetBackupMetadata
- tags:
- - Backup
- summary: Download snapshot of all metadata in the server
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: header
- name: Accept-Encoding
- description: Indicates the content encoding (usually a compression algorithm) that the client can understand.
- schema:
- type: string
- description: 'The content coding. Use `gzip` for compressed data or `identity` for unmodified, uncompressed data.'
- default: identity
- enum:
- - gzip
- - identity
- responses:
- '200':
- description: Snapshot of metadata
- headers:
- Content-Encoding:
- description: Lists any encodings (usually compression algorithms) that have been applied to the response payload.
- schema:
- type: string
- description: |
- The content coding: `gzip` for compressed data or `identity` for unmodified, uncompressed data.
- default: identity
- enum:
- - gzip
- - identity
- content:
- multipart/mixed:
- schema:
- $ref: '#/components/schemas/MetadataBackup'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- '/backup/shards/{shardID}':
- get:
- operationId: GetBackupShardId
- tags:
- - Backup
- summary: Download snapshot of all TSM data in a shard
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: header
- name: Accept-Encoding
- description: Indicates the content encoding (usually a compression algorithm) that the client can understand.
- schema:
- type: string
- description: 'The content coding. Use `gzip` for compressed data or `identity` for unmodified, uncompressed data.'
- default: identity
- enum:
- - gzip
- - identity
- - in: path
- name: shardID
- schema:
- type: integer
- format: int64
- required: true
- description: The shard ID.
- - in: query
- name: since
- description: 'The earliest time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp) to include in the snapshot.'
- schema:
- type: string
- format: date-time
- examples:
- RFC3339:
- summary: RFC3339 date/time format
- value: '2006-01-02T15:04:05Z07:00'
- responses:
- '200':
- description: TSM snapshot.
- headers:
- Content-Encoding:
- description: Lists any encodings (usually compression algorithms) that have been applied to the response payload.
- schema:
- type: string
- description: |
- The content coding: `gzip` for compressed data or `identity` for unmodified, uncompressed data.
- default: identity
- enum:
- - gzip
- - identity
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '404':
- description: Shard not found.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /restore/kv:
- post:
- operationId: PostRestoreKV
- tags:
- - Restore
- summary: Overwrite the embedded KV store on the server with a backed-up snapshot.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: header
- name: Content-Encoding
- description: |
- The value tells InfluxDB what compression is applied to the line protocol in the request payload.
- To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header.
- schema:
- type: string
- description: 'The content coding. Use `gzip` for compressed data or `identity` for unmodified, uncompressed data.'
- default: identity
- enum:
- - gzip
- - identity
- - in: header
- name: Content-Type
- schema:
- type: string
- default: application/octet-stream
- enum:
- - application/octet-stream
- requestBody:
- description: Full KV snapshot.
- required: true
- content:
- text/plain:
- schema:
- type: string
- format: binary
- responses:
- '200':
- description: KV store successfully overwritten.
- content:
- application/json:
- schema:
- type: object
- properties:
- token:
- description: token is the root token for the instance after restore (this is overwritten during the restore)
- type: string
- '204':
- description: KV store successfully overwritten.
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /restore/sql:
- post:
- operationId: PostRestoreSQL
- tags:
- - Restore
- summary: Overwrite the embedded SQL store on the server with a backed-up snapshot.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: header
- name: Content-Encoding
- description: |
- The value tells InfluxDB what compression is applied to the line protocol in the request payload.
- To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header.
- schema:
- type: string
- description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity.
- default: identity
- enum:
- - gzip
- - identity
- - in: header
- name: Content-Type
- schema:
- type: string
- default: application/octet-stream
- enum:
- - application/octet-stream
- requestBody:
- description: Full SQL snapshot.
- required: true
- content:
- text/plain:
- schema:
- type: string
- format: binary
- responses:
- '204':
- description: SQL store successfully overwritten.
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- '/restore/bucket/{bucketID}':
- post:
- operationId: PostRestoreBucketID
- tags:
- - Restore
- summary: Overwrite storage metadata for a bucket with shard info from a backup.
- deprecated: true
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- - in: header
- name: Content-Type
- schema:
- type: string
- default: application/octet-stream
- enum:
- - application/octet-stream
- requestBody:
- description: Database info serialized as protobuf.
- required: true
- content:
- text/plain:
- schema:
- type: string
- format: byte
- responses:
- '200':
- description: ID mappings for shards in bucket.
- content:
- application/json:
- schema:
- type: string
- format: byte
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /restore/bucketMetadata:
- post:
- operationId: PostRestoreBucketMetadata
- tags:
- - Restore
- summary: Create a new bucket pre-seeded with shard info from a backup.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- requestBody:
- description: Metadata manifest for a bucket.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BucketMetadataManifest'
- responses:
- '201':
- description: ID mappings for shards in new bucket.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RestoredBucketMappings'
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- '/restore/shards/{shardID}':
- post:
- operationId: PostRestoreShardId
- tags:
- - Restore
- summary: Restore a TSM snapshot into a shard.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: header
- name: Content-Encoding
- description: |
- The value tells InfluxDB what compression is applied to the line protocol in the request payload.
- To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header.
- schema:
- type: string
- description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity.
- default: identity
- enum:
- - gzip
- - identity
- - in: header
- name: Content-Type
- schema:
- type: string
- default: application/octet-stream
- enum:
- - application/octet-stream
- - in: path
- name: shardID
- schema:
- type: string
- required: true
- description: The shard ID.
- requestBody:
- description: TSM snapshot.
- required: true
- content:
- text/plain:
- schema:
- type: string
- format: binary
- responses:
- '204':
- description: TSM snapshot successfully restored.
- default:
- description: Unexpected error
- $ref: '#/components/responses/GeneralServerError'
- /config:
- get:
- operationId: GetConfig
- tags:
- - Config
- - System information endpoints
- summary: Retrieve runtime configuration
- description: |
- Returns the active runtime configuration of the InfluxDB instance.
- In InfluxDB v2.2+, use this endpoint to view your active runtime configuration,
- including flags and environment variables.
- #### Related guides
- - [View your runtime server configuration](https://docs.influxdata.com/influxdb/v2.3/reference/config-options/#view-your-runtime-server-configuration)
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- responses:
- '200':
- description: |
- Success.
- The response body contains the active runtime configuration of the InfluxDB instance.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Config'
- '401':
- $ref: '#/components/responses/GeneralServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- /remotes:
- get:
- operationId: GetRemoteConnections
- tags:
- - RemoteConnections
- summary: List all remote connections
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: orgID
- description: The organization ID.
- required: true
- schema:
- type: string
- - in: query
- name: name
- schema:
- type: string
- - in: query
- name: remoteURL
- schema:
- type: string
- format: uri
- responses:
- '200':
- description: List of remote connections
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RemoteConnections'
- '404':
- $ref: '#/components/responses/GeneralServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- post:
- operationId: PostRemoteConnection
- tags:
- - RemoteConnections
- summary: Register a new remote connection
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RemoteConnectionCreationRequest'
- responses:
- '201':
- description: Remote connection saved
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RemoteConnection'
- '400':
- $ref: '#/components/responses/GeneralServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- '/remotes/{remoteID}':
- get:
- operationId: GetRemoteConnectionByID
- tags:
- - RemoteConnections
- summary: Retrieve a remote connection
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: remoteID
- schema:
- type: string
- required: true
- responses:
- '200':
- description: Remote connection
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RemoteConnection'
- '404':
- $ref: '#/components/responses/GeneralServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- patch:
- operationId: PatchRemoteConnectionByID
- tags:
- - RemoteConnections
- summary: Update a remote connection
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: remoteID
- schema:
- type: string
- required: true
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RemoteConnectionUpdateRequest'
- responses:
- '200':
- description: Updated information saved
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RemoteConnection'
- '400':
- $ref: '#/components/responses/GeneralServerError'
- '404':
- $ref: '#/components/responses/GeneralServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- delete:
- operationId: DeleteRemoteConnectionByID
- tags:
- - RemoteConnections
- summary: Delete a remote connection
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: remoteID
- schema:
- type: string
- required: true
- responses:
- '204':
- description: Remote connection info deleted.
- '404':
- $ref: '#/components/responses/GeneralServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- /replications:
- get:
- operationId: GetReplications
- tags:
- - Replications
- summary: List all replications
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: orgID
- description: The organization ID.
- required: true
- schema:
- type: string
- - in: query
- name: name
- schema:
- type: string
- - in: query
- name: remoteID
- schema:
- type: string
- - in: query
- name: localBucketID
- schema:
- type: string
- responses:
- '200':
- description: List of replications
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Replications'
- '404':
- $ref: '#/components/responses/GeneralServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- post:
- operationId: PostReplication
- tags:
- - Replications
- summary: Register a new replication
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: validate
- description: 'If true, validate the replication, but don''t save it.'
- schema:
- type: boolean
- default: false
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReplicationCreationRequest'
- responses:
- '201':
- description: Replication saved
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Replication'
- '204':
- description: 'Replication validated, but not saved'
- '400':
- $ref: '#/components/responses/GeneralServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- '/replications/{replicationID}':
- get:
- operationId: GetReplicationByID
- tags:
- - Replications
- summary: Retrieve a replication
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: replicationID
- schema:
- type: string
- required: true
- responses:
- '200':
- description: Replication
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Replication'
- '404':
- $ref: '#/components/responses/GeneralServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- patch:
- operationId: PatchReplicationByID
- tags:
- - Replications
- summary: Update a replication
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: replicationID
- schema:
- type: string
- required: true
- - in: query
- name: validate
- description: 'If true, validate the updated information, but don''t save it.'
- schema:
- type: boolean
- default: false
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReplicationUpdateRequest'
- responses:
- '200':
- description: Updated information saved
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Replication'
- '204':
- description: 'Updated replication validated, but not saved'
- '400':
- $ref: '#/components/responses/GeneralServerError'
- '404':
- $ref: '#/components/responses/GeneralServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- delete:
- operationId: DeleteReplicationByID
- tags:
- - Replications
- summary: Delete a replication
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: replicationID
- schema:
- type: string
- required: true
- responses:
- '204':
- description: Replication deleted.
- '404':
- $ref: '#/components/responses/GeneralServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- '/replications/{replicationID}/validate':
- post:
- operationId: PostValidateReplicationByID
- tags:
- - Replications
- summary: Validate a replication
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: replicationID
- schema:
- type: string
- required: true
- responses:
- '204':
- description: Replication is valid
- '400':
- description: Replication failed validation
- $ref: '#/components/responses/GeneralServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- /dashboards:
- post:
- operationId: PostDashboards
- tags:
- - Dashboards
- summary: Create a dashboard
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- requestBody:
- description: Dashboard to create
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateDashboardRequest'
- responses:
- '201':
- description: Added dashboard
- content:
- application/json:
- schema:
- oneOf:
- - $ref: '#/components/schemas/Dashboard'
- - $ref: '#/components/schemas/DashboardWithViewProperties'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- get:
- operationId: GetDashboards
- tags:
- - Dashboards
- summary: List all dashboards
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - $ref: '#/components/parameters/Offset'
- - $ref: '#/components/parameters/Limit'
- - $ref: '#/components/parameters/Descending'
- - in: query
- name: owner
- description: A user identifier. Returns only dashboards where this user has the `owner` role.
- schema:
- type: string
- - in: query
- name: sortBy
- description: The column to sort by.
- schema:
- type: string
- enum:
- - ID
- - CreatedAt
- - UpdatedAt
- - in: query
- name: id
- description: 'A list of dashboard identifiers. Returns only the listed dashboards. If both `id` and `owner` are specified, only `id` is used.'
- schema:
- type: array
- items:
- type: string
- - in: query
- name: orgID
- description: The identifier of the organization.
- schema:
- type: string
- - in: query
- name: org
- description: The name of the organization.
- schema:
- type: string
- responses:
- '200':
- description: All dashboards
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Dashboards'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /tasks:
- get:
- operationId: GetTasks
- tags:
- - Data I/O endpoints
- - Tasks
- summary: List tasks
- description: |
- Retrieves a list of [tasks](https://docs.influxdata.com/influxdb/v2.3/process-data/).
- To limit which tasks are returned, pass query parameters in your request.
- If no query parameters are passed, InfluxDB returns all tasks up to the default `limit`.
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: query
- name: name
- description: |
- Task name.
- Only returns tasks with this name.
- Different tasks may have the same name.
- schema:
- type: string
- - in: query
- name: after
- schema:
- type: string
- description: |
- Task ID.
- Only returns tasks created after this task.
- - in: query
- name: user
- schema:
- type: string
- description: |
- User ID.
- Only returns tasks owned by this user.
- - in: query
- name: org
- schema:
- type: string
- description: |
- Organization name.
- Only returns tasks owned by this organization.
- - in: query
- name: orgID
- schema:
- type: string
- description: |
- Organization ID.
- Only returns tasks owned by this organization.
- - in: query
- name: status
- schema:
- type: string
- enum:
- - active
- - inactive
- description: |
- Task status (`active` or `inactive`).
- Only returns tasks with this status.
- - in: query
- name: limit
- schema:
- type: integer
- minimum: 1
- maximum: 500
- default: 100
- description: |
- Limits the number of tasks returned.
- The minimum is `1`, the maximum is `500`, and the default is `100`.
- - in: query
- name: type
- description: |
- Task type (`basic` or `system`).
- The default (`system`) response contains all the metadata properties for tasks.
- To reduce the payload size, pass `basic` to omit some task properties (`flux`, `createdAt`, `updatedAt`) from the response.
- required: false
- schema:
- default: ''
- type: string
- enum:
- - basic
- - system
- responses:
- '200':
- description: |
- Success.
- The response body contains the list of tasks.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Tasks'
- examples:
- basicTypeTaskOutput:
- summary: Basic output
- description: Task fields returned with `?type=basic`
- value:
- links:
- self: /api/v2/tasks?limit=100
- tasks:
- - links:
- labels: /api/v2/tasks/09956cbb6d378000/labels
- logs: /api/v2/tasks/09956cbb6d378000/logs
- members: /api/v2/tasks/09956cbb6d378000/members
- owners: /api/v2/tasks/09956cbb6d378000/owners
- runs: /api/v2/tasks/09956cbb6d378000/runs
- self: /api/v2/tasks/09956cbb6d378000
- labels: []
- id: 09956cbb6d378000
- orgID: 48c88459ee424a04
- org: ''
- ownerID: 0772396d1f411000
- name: task1
- status: active
- flux: ''
- every: 30m
- latestCompleted: '2022-06-30T15:00:00Z'
- lastRunStatus: success
- systemTypeTaskOutput:
- summary: System output
- description: Task fields returned with `?type=system`
- value:
- links:
- self: /api/v2/tasks?limit=100
- tasks:
- - links:
- labels: /api/v2/tasks/09956cbb6d378000/labels
- logs: /api/v2/tasks/09956cbb6d378000/logs
- members: /api/v2/tasks/09956cbb6d378000/members
- owners: /api/v2/tasks/09956cbb6d378000/owners
- runs: /api/v2/tasks/09956cbb6d378000/runs
- self: /api/v2/tasks/09956cbb6d378000
- labels: []
- id: 09956cbb6d378000
- orgID: 48c88459ee424a04
- org: my-iot-center
- ownerID: 0772396d1f411000
- name: task1
- description: IoT Center 90-day environment average.
- status: active
- flux: |-
- option task = {name: "task1", every: 30m}
- from(bucket: "iot_center")
- |> range(start: -90d)
- |> filter(fn: (r) => r._measurement == "environment")
- |> aggregateWindow(every: 1h, fn: mean)
- every: 30m
- latestCompleted: '2022-06-30T15:00:00Z'
- lastRunStatus: success
- createdAt: '2022-06-27T15:09:06Z'
- updatedAt: '2022-06-28T18:10:15Z'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- x-codeSamples:
- - lang: Shell
- label: 'cURL: all tasks, basic output'
- source: |
- curl https://localhost:8086/api/v2/tasks/?limit=-1&type=basic \
- --header 'Content-Type: application/json' \
- --header 'Authorization: Token INFLUX_API_TOKEN'
- post:
- operationId: PostTasks
- tags:
- - Data I/O endpoints
- - Tasks
- summary: Create a task
- description: |
- Creates a [task](https://docs.influxdata.com/influxdb/v2.3/process-data/) and returns the created task.
- #### Related guides
- - [Get started with tasks](https://docs.influxdata.com/influxdb/v2.3/process-data/get-started/)
- - [Create a task](https://docs.influxdata.com/influxdb/v2.3/process-data/manage-tasks/create-task/)
- - [Common tasks](https://docs.influxdata.com/influxdb/v2.3/process-data/common-tasks/)
- - [Task configuration options](https://docs.influxdata.com/influxdb/v2.3/process-data/task-options/)
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- requestBody:
- description: The task to create.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TaskCreateRequest'
- responses:
- '201':
- description: Success. The response body contains a `tasks` list with the new task.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Task'
- '400':
- description: |
- Bad request.
- The response body contains detail about the error.
- #### InfluxDB OSS
- - Returns this error if an incorrect value is passed for `org` or `orgID`.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- orgProvidedNotFound:
- summary: The org or orgID passed doesn't own the token passed in the header
- value:
- code: invalid
- message: 'failed to decode request body: organization not found'
- missingFluxError:
- summary: Task in request body is missing Flux query
- value:
- code: invalid
- message: 'failed to decode request: missing flux'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- x-codeSamples:
- - lang: Shell
- label: 'cURL: create a task'
- source: |
- curl http://localhost:8086/api/v2/tasks \
- --header "Content-type: application/json" \
- --header "Authorization: Token INFLUX_API_TOKEN" \
- --data-binary @- << EOF
- {
- "orgID": "INFLUX_ORG_ID",
- "description": "IoT Center 30d environment average.",
- "flux": "option task = {name: \"iot-center-task-1\", every: 30m}\
- from(bucket: \"iot_center\")\
- |> range(start: -30d)\
- |> filter(fn: (r) => r._measurement == \"environment\")\
- |> aggregateWindow(every: 1h, fn: mean)"
- }
- EOF
- '/tasks/{taskID}':
- get:
- operationId: GetTasksID
- tags:
- - Data I/O endpoints
- - Tasks
- summary: Retrieve a task
- description: |
- Retrieves a [task](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#task).
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The ID of the task to retrieve.
- responses:
- '200':
- description: Success. The response body contains the task.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Task'
- '400':
- $ref: '#/components/responses/BadRequestError'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- patch:
- operationId: PatchTasksID
- tags:
- - Tasks
- summary: Update a task
- description: |
- Updates a task and then cancels all scheduled runs of the task.
- Use this endpoint to set, modify, and clear task properties (for example: `cron`, `name`, `flux`, `status`).
- Once InfluxDB applies the update, it cancels all previously scheduled runs of the task.
- To update a task, pass an object that contains the updated key-value pairs.
- To activate or inactivate a task, set the `status` property.
- _`"status": "inactive"`_ cancels scheduled runs and prevents manual runs of the task.
- requestBody:
- description: An object that contains updated task properties to apply.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TaskUpdateRequest'
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The ID of the task to update.
- responses:
- '200':
- description: Success. The response body contains the updated task.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Task'
- '400':
- $ref: '#/components/responses/BadRequestError'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- delete:
- operationId: DeleteTasksID
- tags:
- - Tasks
- summary: Delete a task
- description: |
- Deletes a task and associated records.
- Use this endpoint to delete a task and all associated records (task runs, logs, and labels).
- Once the task is deleted, InfluxDB cancels all scheduled runs of the task.
- If you want to disable a task instead of delete it, [update the task status to `inactive`](#operation/PatchTasksID).
- parameters:
- - $ref: '#/components/parameters/TraceSpan'
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The ID of the task to delete.
- responses:
- '204':
- description: Success. The task and runs are deleted. Scheduled runs are canceled.
- '400':
- $ref: '#/components/responses/BadRequestError'
- '401':
- $ref: '#/components/responses/AuthorizationError'
- '404':
- $ref: '#/components/responses/ResourceNotFoundError'
- '500':
- $ref: '#/components/responses/InternalServerError'
- default:
- $ref: '#/components/responses/GeneralServerError'
- components:
- parameters:
- TraceSpan:
- in: header
- name: Zap-Trace-Span
- description: OpenTracing span context
- example:
- trace_id: '1'
- span_id: '1'
- baggage:
- key: value
- required: false
- schema:
- type: string
- Offset:
- in: query
- name: offset
- required: false
- description: |
- The offset for pagination.
- The number of records to skip.
- schema:
- type: integer
- minimum: 0
- Limit:
- in: query
- name: limit
- required: false
- description: |
- Limits the number of records returned. Default is `20`.
- schema:
- type: integer
- minimum: 1
- maximum: 100
- default: 20
- Descending:
- in: query
- name: descending
- required: false
- schema:
- type: boolean
- default: false
- SortBy:
- in: query
- name: sortBy
- required: false
- schema:
- type: string
- After:
- in: query
- name: after
- required: false
- schema:
- type: string
- description: |
- Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`.
- schemas:
- LanguageRequest:
- description: Flux query to be analyzed.
- type: object
- required:
- - query
- properties:
- query:
- description: |
- The Flux query script to be analyzed.
- type: string
- Query:
- description: Query InfluxDB with the Flux language
- type: object
- required:
- - query
- properties:
- extern:
- $ref: '#/components/schemas/File'
- query:
- description: The query script to execute.
- type: string
- type:
- description: The type of query. Must be "flux".
- type: string
- enum:
- - flux
- params:
- type: object
- additionalProperties: true
- description: |
- Key-value pairs passed as parameters during query execution.
- To use parameters in your query, pass a _`query`_ with `params` references (in dot notation)--for example:
- ```json
- query: "from(bucket: params.mybucket) |> range(start: params.rangeStart) |> limit(n:1)"
- ```
- and pass _`params`_ with the key-value pairs--for example:
- ```json
- params: {
- "mybucket": "environment",
- "rangeStart": "-30d"
- }
- ```
- During query execution, InfluxDB passes _`params`_ to your script and substitutes the values.
- #### Limitations
- - If you use _`params`_, you can't use _`extern`_.
- dialect:
- $ref: '#/components/schemas/Dialect'
- now:
- description: |
- Specifies the time that should be reported as `now` in the query.
- Default is the server `now` time.
- type: string
- format: date-time
- Package:
- description: Represents a complete package source tree.
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- path:
- description: Package import path
- type: string
- package:
- description: Package name
- type: string
- files:
- description: Package files
- type: array
- items:
- $ref: '#/components/schemas/File'
- File:
- description: Represents a source from a single file
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- name:
- description: The name of the file.
- type: string
- package:
- $ref: '#/components/schemas/PackageClause'
- imports:
- description: A list of package imports
- type: array
- items:
- $ref: '#/components/schemas/ImportDeclaration'
- body:
- description: List of Flux statements
- type: array
- items:
- $ref: '#/components/schemas/Statement'
- PackageClause:
- description: Defines a package identifier
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- name:
- $ref: '#/components/schemas/Identifier'
- ImportDeclaration:
- description: Declares a package import
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- as:
- $ref: '#/components/schemas/Identifier'
- path:
- $ref: '#/components/schemas/StringLiteral'
- DeletePredicateRequest:
- description: The delete predicate request.
- type: object
- required:
- - start
- - stop
- properties:
- start:
- description: |
- A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)).
- The earliest time to delete from.
- type: string
- format: date-time
- stop:
- description: |
- A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)).
- The latest time to delete from.
- type: string
- format: date-time
- predicate:
- description: |
- An expression in [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/delete-predicate/).
- example: tag1="value1" and (tag2="value2" and tag3!="value3")
- type: string
- Node:
- oneOf:
- - $ref: '#/components/schemas/Expression'
- - $ref: '#/components/schemas/Block'
- NodeType:
- description: Type of AST node
- type: string
- Block:
- description: A set of statements
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- body:
- description: Block body
- type: array
- items:
- $ref: '#/components/schemas/Statement'
- Statement:
- oneOf:
- - $ref: '#/components/schemas/BadStatement'
- - $ref: '#/components/schemas/VariableAssignment'
- - $ref: '#/components/schemas/MemberAssignment'
- - $ref: '#/components/schemas/ExpressionStatement'
- - $ref: '#/components/schemas/ReturnStatement'
- - $ref: '#/components/schemas/OptionStatement'
- - $ref: '#/components/schemas/BuiltinStatement'
- - $ref: '#/components/schemas/TestStatement'
- BadStatement:
- description: A placeholder for statements for which no correct statement nodes can be created
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- text:
- description: Raw source text
- type: string
- VariableAssignment:
- description: Represents the declaration of a variable
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- id:
- $ref: '#/components/schemas/Identifier'
- init:
- $ref: '#/components/schemas/Expression'
- MemberAssignment:
- description: Object property assignment
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- member:
- $ref: '#/components/schemas/MemberExpression'
- init:
- $ref: '#/components/schemas/Expression'
- ExpressionStatement:
- description: May consist of an expression that doesn't return a value and is executed solely for its side-effects
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- expression:
- $ref: '#/components/schemas/Expression'
- ReturnStatement:
- description: Defines an expression to return
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- argument:
- $ref: '#/components/schemas/Expression'
- OptionStatement:
- description: A single variable declaration
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- assignment:
- oneOf:
- - $ref: '#/components/schemas/VariableAssignment'
- - $ref: '#/components/schemas/MemberAssignment'
- BuiltinStatement:
- description: Declares a builtin identifier and its type
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- id:
- $ref: '#/components/schemas/Identifier'
- TestStatement:
- description: Declares a Flux test case
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- assignment:
- $ref: '#/components/schemas/VariableAssignment'
- Expression:
- oneOf:
- - $ref: '#/components/schemas/ArrayExpression'
- - $ref: '#/components/schemas/DictExpression'
- - $ref: '#/components/schemas/FunctionExpression'
- - $ref: '#/components/schemas/BinaryExpression'
- - $ref: '#/components/schemas/CallExpression'
- - $ref: '#/components/schemas/ConditionalExpression'
- - $ref: '#/components/schemas/LogicalExpression'
- - $ref: '#/components/schemas/MemberExpression'
- - $ref: '#/components/schemas/IndexExpression'
- - $ref: '#/components/schemas/ObjectExpression'
- - $ref: '#/components/schemas/ParenExpression'
- - $ref: '#/components/schemas/PipeExpression'
- - $ref: '#/components/schemas/UnaryExpression'
- - $ref: '#/components/schemas/BooleanLiteral'
- - $ref: '#/components/schemas/DateTimeLiteral'
- - $ref: '#/components/schemas/DurationLiteral'
- - $ref: '#/components/schemas/FloatLiteral'
- - $ref: '#/components/schemas/IntegerLiteral'
- - $ref: '#/components/schemas/PipeLiteral'
- - $ref: '#/components/schemas/RegexpLiteral'
- - $ref: '#/components/schemas/StringLiteral'
- - $ref: '#/components/schemas/UnsignedIntegerLiteral'
- - $ref: '#/components/schemas/Identifier'
- ArrayExpression:
- description: Used to create and directly specify the elements of an array object
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- elements:
- description: Elements of the array
- type: array
- items:
- $ref: '#/components/schemas/Expression'
- DictExpression:
- description: Used to create and directly specify the elements of a dictionary
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- elements:
- description: Elements of the dictionary
- type: array
- items:
- $ref: '#/components/schemas/DictItem'
- DictItem:
- description: A key-value pair in a dictionary.
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- key:
- $ref: '#/components/schemas/Expression'
- val:
- $ref: '#/components/schemas/Expression'
- FunctionExpression:
- description: Function expression
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- params:
- description: Function parameters
- type: array
- items:
- $ref: '#/components/schemas/Property'
- body:
- $ref: '#/components/schemas/Node'
- BinaryExpression:
- description: uses binary operators to act on two operands in an expression
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- operator:
- type: string
- left:
- $ref: '#/components/schemas/Expression'
- right:
- $ref: '#/components/schemas/Expression'
- CallExpression:
- description: Represents a function call
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- callee:
- $ref: '#/components/schemas/Expression'
- arguments:
- description: Function arguments
- type: array
- items:
- $ref: '#/components/schemas/Expression'
- ConditionalExpression:
- description: 'Selects one of two expressions, `Alternate` or `Consequent`, depending on a third boolean expression, `Test`'
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- test:
- $ref: '#/components/schemas/Expression'
- alternate:
- $ref: '#/components/schemas/Expression'
- consequent:
- $ref: '#/components/schemas/Expression'
- LogicalExpression:
- description: Represents the rule conditions that collectively evaluate to either true or false
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- operator:
- type: string
- left:
- $ref: '#/components/schemas/Expression'
- right:
- $ref: '#/components/schemas/Expression'
- MemberExpression:
- description: Represents accessing a property of an object
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- object:
- $ref: '#/components/schemas/Expression'
- property:
- $ref: '#/components/schemas/PropertyKey'
- IndexExpression:
- description: Represents indexing into an array
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- array:
- $ref: '#/components/schemas/Expression'
- index:
- $ref: '#/components/schemas/Expression'
- ObjectExpression:
- description: Allows the declaration of an anonymous object within a declaration
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- properties:
- description: Object properties
- type: array
- items:
- $ref: '#/components/schemas/Property'
- ParenExpression:
- description: Represents an expression wrapped in parenthesis
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- expression:
- $ref: '#/components/schemas/Expression'
- PipeExpression:
- description: Call expression with pipe argument
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- argument:
- $ref: '#/components/schemas/Expression'
- call:
- $ref: '#/components/schemas/CallExpression'
- UnaryExpression:
- description: Uses operators to act on a single operand in an expression
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- operator:
- type: string
- argument:
- $ref: '#/components/schemas/Expression'
- BooleanLiteral:
- description: Represents boolean values
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- value:
- type: boolean
- DateTimeLiteral:
- 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).'
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- value:
- type: string
- format: date-time
- DurationLiteral:
- description: Represents the elapsed time between two instants as an int64 nanosecond count with syntax of golang's time.Duration
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- values:
- description: Duration values
- type: array
- items:
- $ref: '#/components/schemas/Duration'
- FloatLiteral:
- description: Represents floating point numbers according to the double representations defined by the IEEE-754-1985
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- value:
- type: number
- IntegerLiteral:
- description: Represents integer numbers
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- value:
- type: string
- PipeLiteral:
- description: 'Represents a specialized literal value, indicating the left hand value of a pipe expression'
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- RegexpLiteral:
- description: Expressions begin and end with `/` and are regular expressions with syntax accepted by RE2
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- value:
- type: string
- StringLiteral:
- description: Expressions begin and end with double quote marks
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- value:
- type: string
- UnsignedIntegerLiteral:
- description: Represents integer numbers
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- value:
- type: string
- Duration:
- 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.
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- magnitude:
- type: integer
- unit:
- type: string
- Property:
- description: The value associated with a key
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- key:
- $ref: '#/components/schemas/PropertyKey'
- value:
- $ref: '#/components/schemas/Expression'
- PropertyKey:
- oneOf:
- - $ref: '#/components/schemas/Identifier'
- - $ref: '#/components/schemas/StringLiteral'
- Identifier:
- description: A valid Flux identifier
- type: object
- properties:
- type:
- $ref: '#/components/schemas/NodeType'
- name:
- type: string
- Dialect:
- description: |
- Options for tabular data output.
- Default output is [annotated CSV](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/annotated-csv/#csv-response-format) with headers.
- For more information about tabular data **dialect**,
- see [W3 metadata vocabulary for tabular data](https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions).
- type: object
- properties:
- header:
- description: 'If true, the results contain a header row.'
- type: boolean
- default: true
- delimiter:
- description: 'The separator used between cells. Default is a comma (`,`).'
- type: string
- default: ','
- maxLength: 1
- minLength: 1
- annotations:
- description: |
- Annotation rows to include in the results.
- An _annotation_ is metadata associated with an object (column) in the data model.
- #### Related guides
- - See [Annotated CSV annotations](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/annotated-csv/#annotations) for examples and more information.
- For more information about **annotations** in tabular data,
- see [W3 metadata vocabulary for tabular data](https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns).
- type: array
- uniqueItems: true
- items:
- type: string
- enum:
- - group
- - datatype
- - default
- commentPrefix:
- description: The character prefixed to comment strings. Default is a number sign (`#`).
- type: string
- default: '#'
- maxLength: 1
- minLength: 0
- dateTimeFormat:
- description: |
- The format for timestamps in results.
- Default is [`RFC3339` date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp).
- To include nanoseconds in timestamps, use `RFC3339Nano`.
- #### Example formatted date/time values
- | Format | Value |
- |:------------|:----------------------------|
- | `RFC3339` | `"2006-01-02T15:04:05Z07:00"` |
- | `RFC3339Nano` | `"2006-01-02T15:04:05.999999999Z07:00"` |
- type: string
- default: RFC3339
- enum:
- - RFC3339
- - RFC3339Nano
- AuthorizationUpdateRequest:
- properties:
- status:
- description: 'Status of the token. If `inactive`, requests using the token will be rejected.'
- default: active
- type: string
- enum:
- - active
- - inactive
- description:
- type: string
- description: A description of the token.
- PostBucketRequest:
- properties:
- orgID:
- description: |
- Organization ID.
- The ID of the organization.
- type: string
- name:
- description: |
- The name of the bucket.
- type: string
- description:
- description: |
- A description of the bucket.
- type: string
- rp:
- description: |
- Retention policy is an InfluxDB 1.x concept that represents the duration
- of time that each data point in the retention policy persists. Use `rp`
- for compatibility with InfluxDB 1.x.
- The InfluxDB 2.x and Cloud equivalent is
- [retention period](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#retention-period).
- type: string
- default: '0'
- retentionRules:
- $ref: '#/components/schemas/RetentionRules'
- schemaType:
- description: |
- Schema Type.
- Use `explicit` to enforce column names, tags, fields, and data types for
- your data.
- #### InfluxDB Cloud
- - Default is `implicit`.
- #### InfluxDB OSS
- - Doesn't support `schemaType`.
- $ref: '#/components/schemas/SchemaType'
- default: implicit
- required:
- - orgID
- - name
- Bucket:
- properties:
- links:
- type: object
- readOnly: true
- example:
- labels: /api/v2/buckets/1/labels
- members: /api/v2/buckets/1/members
- org: /api/v2/orgs/2
- owners: /api/v2/buckets/1/owners
- self: /api/v2/buckets/1
- write: /api/v2/write?org=2&bucket=1
- properties:
- labels:
- description: URL to retrieve labels for this bucket.
- $ref: '#/components/schemas/Link'
- members:
- description: URL to retrieve members that can read this bucket.
- $ref: '#/components/schemas/Link'
- org:
- description: URL to retrieve parent organization for this bucket.
- $ref: '#/components/schemas/Link'
- owners:
- description: URL to retrieve owners that can read and write to this bucket.
- $ref: '#/components/schemas/Link'
- self:
- description: URL for this bucket.
- $ref: '#/components/schemas/Link'
- write:
- description: URL to write line protocol to this bucket.
- $ref: '#/components/schemas/Link'
- id:
- readOnly: true
- type: string
- type:
- readOnly: true
- type: string
- default: user
- enum:
- - user
- - system
- name:
- type: string
- description:
- type: string
- orgID:
- type: string
- rp:
- type: string
- schemaType:
- $ref: '#/components/schemas/SchemaType'
- default: implicit
- createdAt:
- type: string
- format: date-time
- readOnly: true
- updatedAt:
- type: string
- format: date-time
- readOnly: true
- retentionRules:
- $ref: '#/components/schemas/RetentionRules'
- labels:
- $ref: '#/components/schemas/Labels'
- required:
- - name
- - retentionRules
- Buckets:
- type: object
- properties:
- links:
- readOnly: true
- $ref: '#/components/schemas/Links'
- buckets:
- type: array
- items:
- $ref: '#/components/schemas/Bucket'
- RetentionRules:
- type: array
- description: |
- Retention rules to expire or retain data.
- #### InfluxDB Cloud
- - `retentionRules` is required.
- #### InfluxDB OSS
- - `retentionRules` isn't required.
- items:
- $ref: '#/components/schemas/RetentionRule'
- PatchBucketRequest:
- type: object
- description: |
- An object that contains updated bucket properties to apply.
- properties:
- name:
- type: string
- description: |
- The name of the bucket.
- description:
- description: |
- A description of the bucket.
- type: string
- retentionRules:
- $ref: '#/components/schemas/PatchRetentionRules'
- PatchRetentionRules:
- type: array
- description: Updates to rules to expire or retain data. No rules means no updates.
- items:
- $ref: '#/components/schemas/PatchRetentionRule'
- PatchRetentionRule:
- type: object
- properties:
- type:
- type: string
- default: expire
- enum:
- - expire
- everySeconds:
- type: integer
- format: int64
- description: |
- The number of seconds to keep data.
- Default duration is `2592000` (30 days).
- `0` represents infinite retention.
- example: 86400
- default: 2592000
- minimum: 0
- shardGroupDurationSeconds:
- type: integer
- format: int64
- description: |
- The [shard group duration](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#shard).
- The number of seconds that each shard group covers.
- #### InfluxDB Cloud
- - Doesn't use `shardGroupDurationsSeconds`.
- #### InfluxDB OSS
- - Default value depends on the [bucket retention period](https://docs.influxdata.com/influxdb/v2.3/reference/internals/shards/#shard-group-duration).
- #### Related guides
- - InfluxDB [shards and shard groups](https://docs.influxdata.com/influxdb/v2.3/reference/internals/shards/)
- required:
- - everySeconds
- RetentionRule:
- type: object
- properties:
- type:
- type: string
- default: expire
- enum:
- - expire
- everySeconds:
- type: integer
- format: int64
- description: |
- The duration in seconds for how long data will be kept in the database.
- The default duration is 2592000 (30 days).
- 0 represents infinite retention.
- example: 86400
- default: 2592000
- minimum: 0
- shardGroupDurationSeconds:
- type: integer
- format: int64
- description: |
- The shard group duration.
- The duration or interval (in seconds) that each shard group covers.
- #### InfluxDB Cloud
- - Does not use `shardGroupDurationsSeconds`.
- #### InfluxDB OSS
- - Default value depends on the
- [bucket retention period](https://docs.influxdata.com/influxdb/v2.3/v2.3/reference/internals/shards/#shard-group-duration).
- required:
- - everySeconds
- Link:
- type: string
- format: uri
- readOnly: true
- description: URI of resource.
- Links:
- type: object
- description: |
- URI pointers for additional paged results.
- properties:
- next:
- $ref: '#/components/schemas/Link'
- self:
- $ref: '#/components/schemas/Link'
- prev:
- $ref: '#/components/schemas/Link'
- required:
- - self
- Logs:
- type: object
- properties:
- events:
- readOnly: true
- type: array
- items:
- $ref: '#/components/schemas/LogEvent'
- LogEvent:
- type: object
- properties:
- time:
- readOnly: true
- description: 'The time ([RFC3339Nano date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339nano-timestamp)) that the event occurred.'
- type: string
- format: date-time
- example: '2006-01-02T15:04:05.999999999Z07:00'
- message:
- readOnly: true
- description: A description of the event that occurred.
- type: string
- example: Halt and catch fire
- runID:
- readOnly: true
- description: The ID of the task run that generated the event.
- type: string
- Organization:
- properties:
- links:
- type: object
- readOnly: true
- example:
- self: /api/v2/orgs/1
- members: /api/v2/orgs/1/members
- owners: /api/v2/orgs/1/owners
- labels: /api/v2/orgs/1/labels
- secrets: /api/v2/orgs/1/secrets
- buckets: /api/v2/buckets?org=myorg
- tasks: /api/v2/tasks?org=myorg
- dashboards: /api/v2/dashboards?org=myorg
- properties:
- self:
- $ref: '#/components/schemas/Link'
- members:
- $ref: '#/components/schemas/Link'
- owners:
- $ref: '#/components/schemas/Link'
- labels:
- $ref: '#/components/schemas/Link'
- secrets:
- $ref: '#/components/schemas/Link'
- buckets:
- $ref: '#/components/schemas/Link'
- tasks:
- $ref: '#/components/schemas/Link'
- dashboards:
- $ref: '#/components/schemas/Link'
- id:
- readOnly: true
- type: string
- name:
- type: string
- description:
- type: string
- createdAt:
- type: string
- format: date-time
- readOnly: true
- updatedAt:
- type: string
- format: date-time
- readOnly: true
- status:
- description: If inactive the organization is inactive.
- default: active
- type: string
- enum:
- - active
- - inactive
- required:
- - name
- Organizations:
- type: object
- properties:
- links:
- $ref: '#/components/schemas/Links'
- orgs:
- type: array
- items:
- $ref: '#/components/schemas/Organization'
- PostOrganizationRequest:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- required:
- - name
- PatchOrganizationRequest:
- type: object
- properties:
- name:
- type: string
- description: New name to set on the organization
- description:
- type: string
- description: New description to set on the organization
- TemplateApply:
- type: object
- properties:
- dryRun:
- type: boolean
- description: |
- Only applies a dry run of the templates passed in the request.
- - Validates the template and generates a resource diff and summary.
- - Doesn't install templates or make changes to the InfluxDB instance.
- orgID:
- type: string
- description: |
- Organization ID.
- InfluxDB applies templates to this organization.
- The organization owns all resources created by the template.
- To find your organization, see how to
- [view organizations](https://docs.influxdata.com/influxdb/v2.3/organizations/view-orgs/).
- stackID:
- type: string
- description: |
- ID of the stack to update.
- To apply templates to an existing stack in the organization, use the `stackID` parameter.
- If you apply templates without providing a stack ID,
- InfluxDB initializes a new stack with all new resources.
- To find a stack ID, use the InfluxDB [`/api/v2/stacks` API endpoint](#operation/ListStacks) to list stacks.
- #### Related guides
- - [Stacks](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/stacks/)
- - [View stacks](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/stacks/view/)
- template:
- type: object
- description: |
- A template object to apply.
- A template object has a `contents` property
- with an array of InfluxDB resource configurations.
- Pass `template` to apply only one template object.
- If you use `template`, you can't use the `templates` parameter.
- If you want to apply multiple template objects, use `templates` instead.
- properties:
- contentType:
- type: string
- sources:
- type: array
- items:
- type: string
- contents:
- $ref: '#/components/schemas/Template'
- templates:
- type: array
- description: |
- A list of template objects to apply.
- A template object has a `contents` property
- with an array of InfluxDB resource configurations.
- Use the `templates` parameter to apply multiple template objects.
- If you use `templates`, you can't use the `template` parameter.
- items:
- type: object
- properties:
- contentType:
- type: string
- sources:
- type: array
- items:
- type: string
- contents:
- $ref: '#/components/schemas/Template'
- envRefs:
- type: object
- description: |
- An object with key-value pairs that map to **environment references** in templates.
- Environment references in templates are `envRef` objects with an `envRef.key`
- property.
- To substitute a custom environment reference value when applying templates,
- pass `envRefs` with the `envRef.key` and the value.
- When you apply a template, InfluxDB replaces `envRef` objects in the template
- with the values that you provide in the `envRefs` parameter.
- For more examples, see how to [define environment references](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/use/#define-environment-references).
- The following template fields may use environment references:
- - `metadata.name`
- - `spec.endpointName`
- - `spec.associations.name`
- For more information about including environment references in template fields, see how to
- [include user-definable resource names](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/create/#include-user-definable-resource-names).
- additionalProperties:
- oneOf:
- - type: string
- - type: integer
- - type: number
- - type: boolean
- secrets:
- type: object
- description: |
- An object with key-value pairs that map to **secrets** in queries.
- Queries may reference secrets stored in InfluxDB--for example,
- the following Flux script retrieves `POSTGRES_USERNAME` and `POSTGRES_PASSWORD`
- secrets and then uses them to connect to a PostgreSQL database:
- ```js
- import "sql"
- import "influxdata/influxdb/secrets"
- username = secrets.get(key: "POSTGRES_USERNAME")
- password = secrets.get(key: "POSTGRES_PASSWORD")
- sql.from(
- driverName: "postgres",
- dataSourceName: "postgresql://${username}:${password}@localhost:5432",
- query: "SELECT * FROM example_table",
- )
- ```
- To define secret values in your `/api/v2/templates/apply` request,
- pass the `secrets` parameter with key-value pairs--for example:
- ```json
- {
- ...
- "secrets": {
- "POSTGRES_USERNAME": "pguser",
- "POSTGRES_PASSWORD": "foo"
- }
- ...
- }
- ```
- InfluxDB stores the key-value pairs as secrets that you can access with `secrets.get()`.
- Once stored, you can't view secret values in InfluxDB.
- #### Related guides
- - [How to pass secrets when installing a template](https://docs.influxdata.com/influxdb/v2.3/influxdb-templates/use/#pass-secrets-when-installing-a-template)
- additionalProperties:
- type: string
- remotes:
- type: array
- description: |
- A list of URLs for template files.
- To apply a template manifest file located at a URL, pass `remotes`
- with an array that contains the URL.
- items:
- type: object
- properties:
- url:
- type: string
- contentType:
- type: string
- required:
- - url
- actions:
- type: array
- description: |
- A list of `action` objects.
- Actions let you customize how InfluxDB applies templates in the request.
- You can use the following actions to prevent creating or updating resources:
- - A `skipKind` action skips template resources of a specified `kind`.
- - A `skipResource` action skips template resources with a specified `metadata.name`
- and `kind`.
- items:
- oneOf:
- - type: object
- properties:
- action:
- type: string
- enum:
- - skipKind
- properties:
- type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- required:
- - kind
- - type: object
- properties:
- action:
- type: string
- enum:
- - skipResource
- properties:
- type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- resourceTemplateName:
- type: string
- required:
- - kind
- - resourceTemplateName
- TemplateKind:
- type: string
- enum:
- - Bucket
- - Check
- - CheckDeadman
- - CheckThreshold
- - Dashboard
- - Label
- - NotificationEndpoint
- - NotificationEndpointHTTP
- - NotificationEndpointPagerDuty
- - NotificationEndpointSlack
- - NotificationRule
- - Task
- - Telegraf
- - Variable
- TemplateExportByID:
- type: object
- properties:
- stackID:
- type: string
- orgIDs:
- type: array
- items:
- type: object
- properties:
- orgID:
- type: string
- resourceFilters:
- type: object
- properties:
- byLabel:
- type: array
- items:
- type: string
- byResourceKind:
- type: array
- items:
- $ref: '#/components/schemas/TemplateKind'
- resources:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- kind:
- $ref: '#/components/schemas/TemplateKind'
- name:
- type: string
- description: 'if defined with id, name is used for resource exported by id. if defined independently, resources strictly matching name are exported'
- required:
- - id
- - kind
- TemplateExportByName:
- type: object
- properties:
- stackID:
- type: string
- orgIDs:
- type: array
- items:
- type: object
- properties:
- orgID:
- type: string
- resourceFilters:
- type: object
- properties:
- byLabel:
- type: array
- items:
- type: string
- byResourceKind:
- type: array
- items:
- $ref: '#/components/schemas/TemplateKind'
- resources:
- type: array
- items:
- type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- name:
- type: string
- required:
- - name
- - kind
- Template:
- type: array
- items:
- type: object
- description: |
- A template entry.
- Defines an InfluxDB resource in a template.
- properties:
- apiVersion:
- type: string
- example: influxdata.com/v2alpha1
- kind:
- $ref: '#/components/schemas/TemplateKind'
- metadata:
- type: object
- description: |
- Metadata properties used for the resource when the template is applied.
- properties:
- name:
- type: string
- spec:
- type: object
- description: |
- Configuration properties used for the resource when the template is applied.
- Key-value pairs map to the specification for the resource.
- The following code samples show `spec` configurations for template resources:
- - A bucket:
- ```json
- { "spec": {
- "name": "iot_center",
- "retentionRules": [{
- "everySeconds": 2.592e+06,
- "type": "expire"
- }]
- }
- }
- ```
- - A variable:
- ```json
- { "spec": {
- "language": "flux",
- "name": "Node_Service",
- "query": "import \"influxdata/influxdb/v1\"\r\nv1.tagValues(bucket: \"iot_center\",
- tag: \"service\")",
- "type": "query"
- }
- }
- ```
- TemplateEnvReferences:
- type: array
- items:
- type: object
- properties:
- resourceField:
- type: string
- description: Field the environment reference corresponds too
- envRefKey:
- type: string
- description: Key identified as environment reference and is the key identified in the template
- value:
- description: Value provided to fulfill reference
- nullable: true
- oneOf:
- - type: string
- - type: integer
- - type: number
- - type: boolean
- defaultValue:
- description: Default value that will be provided for the reference when no value is provided
- nullable: true
- oneOf:
- - type: string
- - type: integer
- - type: number
- - type: boolean
- required:
- - resourceField
- - envRefKey
- TemplateSummary:
- type: object
- properties:
- sources:
- type: array
- items:
- type: string
- stackID:
- type: string
- summary:
- type: object
- properties:
- buckets:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- orgID:
- type: string
- kind:
- $ref: '#/components/schemas/TemplateKind'
- templateMetaName:
- type: string
- name:
- type: string
- description:
- type: string
- retentionPeriod:
- type: integer
- labelAssociations:
- type: array
- items:
- $ref: '#/components/schemas/TemplateSummaryLabel'
- envReferences:
- $ref: '#/components/schemas/TemplateEnvReferences'
- checks:
- type: array
- items:
- allOf:
- - $ref: '#/components/schemas/CheckDiscriminator'
- - type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- templateMetaName:
- type: string
- labelAssociations:
- type: array
- items:
- $ref: '#/components/schemas/TemplateSummaryLabel'
- envReferences:
- $ref: '#/components/schemas/TemplateEnvReferences'
- dashboards:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- orgID:
- type: string
- kind:
- $ref: '#/components/schemas/TemplateKind'
- templateMetaName:
- type: string
- name:
- type: string
- description:
- type: string
- labelAssociations:
- type: array
- items:
- $ref: '#/components/schemas/TemplateSummaryLabel'
- charts:
- type: array
- items:
- $ref: '#/components/schemas/TemplateChart'
- envReferences:
- $ref: '#/components/schemas/TemplateEnvReferences'
- labels:
- type: array
- items:
- $ref: '#/components/schemas/TemplateSummaryLabel'
- labelMappings:
- type: array
- items:
- type: object
- properties:
- status:
- type: string
- resourceTemplateMetaName:
- type: string
- resourceName:
- type: string
- resourceID:
- type: string
- resourceType:
- type: string
- labelTemplateMetaName:
- type: string
- labelName:
- type: string
- labelID:
- type: string
- missingEnvRefs:
- type: array
- items:
- type: string
- missingSecrets:
- type: array
- items:
- type: string
- notificationEndpoints:
- type: array
- items:
- allOf:
- - $ref: '#/components/schemas/NotificationEndpointDiscriminator'
- - type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- templateMetaName:
- type: string
- labelAssociations:
- type: array
- items:
- $ref: '#/components/schemas/TemplateSummaryLabel'
- envReferences:
- $ref: '#/components/schemas/TemplateEnvReferences'
- notificationRules:
- type: array
- items:
- type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- templateMetaName:
- type: string
- name:
- type: string
- description:
- type: string
- endpointTemplateMetaName:
- type: string
- endpointID:
- type: string
- endpointType:
- type: string
- every:
- type: string
- offset:
- type: string
- messageTemplate:
- type: string
- status:
- type: string
- statusRules:
- type: array
- items:
- type: object
- properties:
- currentLevel:
- type: string
- previousLevel:
- type: string
- tagRules:
- type: array
- items:
- type: object
- properties:
- key:
- type: string
- value:
- type: string
- operator:
- type: string
- labelAssociations:
- type: array
- items:
- $ref: '#/components/schemas/TemplateSummaryLabel'
- envReferences:
- $ref: '#/components/schemas/TemplateEnvReferences'
- tasks:
- type: array
- items:
- type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- templateMetaName:
- type: string
- id:
- type: string
- name:
- type: string
- cron:
- type: string
- description:
- type: string
- every:
- type: string
- offset:
- type: string
- query:
- type: string
- status:
- type: string
- envReferences:
- $ref: '#/components/schemas/TemplateEnvReferences'
- telegrafConfigs:
- type: array
- items:
- allOf:
- - $ref: '#/components/schemas/TelegrafRequest'
- - type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- templateMetaName:
- type: string
- labelAssociations:
- type: array
- items:
- $ref: '#/components/schemas/TemplateSummaryLabel'
- envReferences:
- $ref: '#/components/schemas/TemplateEnvReferences'
- variables:
- type: array
- items:
- type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- templateMetaName:
- type: string
- id:
- type: string
- orgID:
- type: string
- name:
- type: string
- description:
- type: string
- arguments:
- $ref: '#/components/schemas/VariableProperties'
- labelAssociations:
- type: array
- items:
- $ref: '#/components/schemas/TemplateSummaryLabel'
- envReferences:
- $ref: '#/components/schemas/TemplateEnvReferences'
- diff:
- type: object
- properties:
- buckets:
- type: array
- items:
- type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- stateStatus:
- type: string
- id:
- type: string
- templateMetaName:
- type: string
- new:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- retentionRules:
- $ref: '#/components/schemas/RetentionRules'
- old:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- retentionRules:
- $ref: '#/components/schemas/RetentionRules'
- checks:
- type: array
- items:
- type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- stateStatus:
- type: string
- id:
- type: string
- templateMetaName:
- type: string
- new:
- $ref: '#/components/schemas/CheckDiscriminator'
- old:
- $ref: '#/components/schemas/CheckDiscriminator'
- dashboards:
- type: array
- items:
- type: object
- properties:
- stateStatus:
- type: string
- id:
- type: string
- kind:
- $ref: '#/components/schemas/TemplateKind'
- templateMetaName:
- type: string
- new:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- charts:
- type: array
- items:
- $ref: '#/components/schemas/TemplateChart'
- old:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- charts:
- type: array
- items:
- $ref: '#/components/schemas/TemplateChart'
- labels:
- type: array
- items:
- type: object
- properties:
- stateStatus:
- type: string
- kind:
- $ref: '#/components/schemas/TemplateKind'
- id:
- type: string
- templateMetaName:
- type: string
- new:
- type: object
- properties:
- name:
- type: string
- color:
- type: string
- description:
- type: string
- old:
- type: object
- properties:
- name:
- type: string
- color:
- type: string
- description:
- type: string
- labelMappings:
- type: array
- items:
- type: object
- properties:
- status:
- type: string
- resourceType:
- type: string
- resourceID:
- type: string
- resourceTemplateMetaName:
- type: string
- resourceName:
- type: string
- labelID:
- type: string
- labelTemplateMetaName:
- type: string
- labelName:
- type: string
- notificationEndpoints:
- type: array
- items:
- type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- stateStatus:
- type: string
- id:
- type: string
- templateMetaName:
- type: string
- new:
- $ref: '#/components/schemas/NotificationEndpointDiscriminator'
- old:
- $ref: '#/components/schemas/NotificationEndpointDiscriminator'
- notificationRules:
- type: array
- items:
- type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- stateStatus:
- type: string
- id:
- type: string
- templateMetaName:
- type: string
- new:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- endpointName:
- type: string
- endpointID:
- type: string
- endpointType:
- type: string
- every:
- type: string
- offset:
- type: string
- messageTemplate:
- type: string
- status:
- type: string
- statusRules:
- type: array
- items:
- type: object
- properties:
- currentLevel:
- type: string
- previousLevel:
- type: string
- tagRules:
- type: array
- items:
- type: object
- properties:
- key:
- type: string
- value:
- type: string
- operator:
- type: string
- old:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- endpointName:
- type: string
- endpointID:
- type: string
- endpointType:
- type: string
- every:
- type: string
- offset:
- type: string
- messageTemplate:
- type: string
- status:
- type: string
- statusRules:
- type: array
- items:
- type: object
- properties:
- currentLevel:
- type: string
- previousLevel:
- type: string
- tagRules:
- type: array
- items:
- type: object
- properties:
- key:
- type: string
- value:
- type: string
- operator:
- type: string
- tasks:
- type: array
- items:
- type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- stateStatus:
- type: string
- id:
- type: string
- templateMetaName:
- type: string
- new:
- type: object
- properties:
- name:
- type: string
- cron:
- type: string
- description:
- type: string
- every:
- type: string
- offset:
- type: string
- query:
- type: string
- status:
- type: string
- old:
- type: object
- properties:
- name:
- type: string
- cron:
- type: string
- description:
- type: string
- every:
- type: string
- offset:
- type: string
- query:
- type: string
- status:
- type: string
- telegrafConfigs:
- type: array
- items:
- type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- stateStatus:
- type: string
- id:
- type: string
- templateMetaName:
- type: string
- new:
- $ref: '#/components/schemas/TelegrafRequest'
- old:
- $ref: '#/components/schemas/TelegrafRequest'
- variables:
- type: array
- items:
- type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- stateStatus:
- type: string
- id:
- type: string
- templateMetaName:
- type: string
- new:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- args:
- $ref: '#/components/schemas/VariableProperties'
- old:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- args:
- $ref: '#/components/schemas/VariableProperties'
- errors:
- type: array
- items:
- type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- reason:
- type: string
- fields:
- type: array
- items:
- type: string
- indexes:
- type: array
- items:
- type: integer
- TemplateSummaryLabel:
- type: object
- properties:
- id:
- type: string
- orgID:
- type: string
- kind:
- $ref: '#/components/schemas/TemplateKind'
- templateMetaName:
- type: string
- name:
- type: string
- properties:
- type: object
- properties:
- color:
- type: string
- description:
- type: string
- envReferences:
- $ref: '#/components/schemas/TemplateEnvReferences'
- TemplateChart:
- type: object
- properties:
- xPos:
- type: integer
- yPos:
- type: integer
- height:
- type: integer
- width:
- type: integer
- properties:
- $ref: '#/components/schemas/ViewProperties'
- Stack:
- type: object
- properties:
- id:
- type: string
- orgID:
- type: string
- createdAt:
- type: string
- format: date-time
- readOnly: true
- events:
- type: array
- items:
- type: object
- properties:
- eventType:
- type: string
- name:
- type: string
- description:
- type: string
- sources:
- type: array
- items:
- type: string
- resources:
- type: array
- items:
- type: object
- properties:
- apiVersion:
- type: string
- resourceID:
- type: string
- kind:
- $ref: '#/components/schemas/TemplateKind'
- templateMetaName:
- type: string
- associations:
- type: array
- items:
- type: object
- properties:
- kind:
- $ref: '#/components/schemas/TemplateKind'
- metaName:
- type: string
- links:
- type: object
- properties:
- self:
- type: string
- urls:
- type: array
- items:
- type: string
- updatedAt:
- type: string
- format: date-time
- readOnly: true
- Runs:
- type: object
- properties:
- links:
- $ref: '#/components/schemas/Links'
- runs:
- type: array
- items:
- $ref: '#/components/schemas/Run'
- Run:
- properties:
- id:
- readOnly: true
- type: string
- taskID:
- readOnly: true
- type: string
- status:
- readOnly: true
- type: string
- enum:
- - scheduled
- - started
- - failed
- - success
- - canceled
- scheduledFor:
- 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.'
- type: string
- format: date-time
- log:
- description: An array of logs associated with the run.
- type: array
- readOnly: true
- items:
- $ref: '#/components/schemas/LogEvent'
- flux:
- description: Flux used for the task
- type: string
- readOnly: true
- startedAt:
- readOnly: true
- description: 'The time ([RFC3339Nano date/time format](https://go.dev/src/time/format.go)) the run started executing.'
- type: string
- format: date-time
- example: '2006-01-02T15:04:05.999999999Z07:00'
- finishedAt:
- readOnly: true
- description: 'The time ([RFC3339Nano date/time format](https://go.dev/src/time/format.go)) the run finished executing.'
- type: string
- format: date-time
- example: '2006-01-02T15:04:05.999999999Z07:00'
- requestedAt:
- readOnly: true
- description: 'The time ([RFC3339Nano date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339nano-timestamp)) the run was manually requested.'
- type: string
- format: date-time
- example: '2006-01-02T15:04:05.999999999Z07:00'
- links:
- type: object
- readOnly: true
- example:
- self: /api/v2/tasks/1/runs/1
- task: /api/v2/tasks/1
- retry: /api/v2/tasks/1/runs/1/retry
- properties:
- self:
- type: string
- format: uri
- task:
- type: string
- format: uri
- retry:
- type: string
- format: uri
- RunManually:
- properties:
- scheduledFor:
- nullable: true
- 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.
- Default is the server _now_ time.
- type: string
- format: date-time
- TaskStatusType:
- type: string
- enum:
- - active
- - inactive
- description: |
- `inactive` cancels scheduled runs and prevents manual runs of the task.
- UserResponse:
- properties:
- id:
- readOnly: true
- type: string
- description: |
- The ID of the user.
- name:
- type: string
- description: |
- The name of the user.
- status:
- description: |
- The status of a user. An inactive user won't have access to resources.
- default: active
- type: string
- enum:
- - active
- - inactive
- links:
- type: object
- readOnly: true
- example:
- self: /api/v2/users/1
- properties:
- self:
- type: string
- format: uri
- required:
- - name
- Flags:
- type: object
- additionalProperties: true
- ResourceMember:
- allOf:
- - $ref: '#/components/schemas/UserResponse'
- - type: object
- properties:
- role:
- type: string
- default: member
- enum:
- - member
- ResourceMembers:
- type: object
- properties:
- links:
- type: object
- properties:
- self:
- type: string
- format: uri
- users:
- type: array
- items:
- $ref: '#/components/schemas/ResourceMember'
- ResourceOwner:
- allOf:
- - $ref: '#/components/schemas/UserResponse'
- - type: object
- properties:
- role:
- type: string
- default: owner
- enum:
- - owner
- ResourceOwners:
- type: object
- properties:
- links:
- type: object
- properties:
- self:
- type: string
- format: uri
- users:
- type: array
- items:
- $ref: '#/components/schemas/ResourceOwner'
- FluxSuggestions:
- type: object
- properties:
- funcs:
- type: array
- items:
- $ref: '#/components/schemas/FluxSuggestion'
- FluxSuggestion:
- type: object
- properties:
- name:
- type: string
- params:
- type: object
- additionalProperties:
- type: string
- Routes:
- properties:
- authorizations:
- type: string
- format: uri
- buckets:
- type: string
- format: uri
- dashboards:
- type: string
- format: uri
- external:
- type: object
- properties:
- statusFeed:
- type: string
- format: uri
- variables:
- type: string
- format: uri
- me:
- type: string
- format: uri
- flags:
- type: string
- format: uri
- orgs:
- type: string
- format: uri
- query:
- type: object
- properties:
- self:
- type: string
- format: uri
- ast:
- type: string
- format: uri
- analyze:
- type: string
- format: uri
- suggestions:
- type: string
- format: uri
- setup:
- type: string
- format: uri
- signin:
- type: string
- format: uri
- signout:
- type: string
- format: uri
- sources:
- type: string
- format: uri
- system:
- type: object
- properties:
- metrics:
- type: string
- format: uri
- debug:
- type: string
- format: uri
- health:
- type: string
- format: uri
- tasks:
- type: string
- format: uri
- telegrafs:
- type: string
- format: uri
- users:
- type: string
- format: uri
- write:
- type: string
- format: uri
- Error:
- properties:
- code:
- description: code is the machine-readable error code.
- readOnly: true
- type: string
- enum:
- - internal error
- - not found
- - conflict
- - invalid
- - unprocessable entity
- - empty value
- - unavailable
- - forbidden
- - too many requests
- - unauthorized
- - method not allowed
- - request too large
- - unsupported media type
- message:
- readOnly: true
- description: Human-readable message.
- type: string
- op:
- readOnly: true
- description: Describes the logical code operation when the error occurred. Useful for debugging.
- type: string
- err:
- readOnly: true
- description: Stack of errors that occurred during processing of the request. Useful for debugging.
- type: string
- required:
- - code
- LineProtocolError:
- properties:
- code:
- description: Code is the machine-readable error code.
- readOnly: true
- type: string
- enum:
- - internal error
- - not found
- - conflict
- - invalid
- - empty value
- - unavailable
- message:
- readOnly: true
- description: Human-readable message.
- type: string
- op:
- readOnly: true
- description: Describes the logical code operation when the error occurred. Useful for debugging.
- type: string
- err:
- readOnly: true
- description: Stack of errors that occurred during processing of the request. Useful for debugging.
- type: string
- line:
- readOnly: true
- description: First line in the request body that contains malformed data.
- type: integer
- format: int32
- required:
- - code
- LineProtocolLengthError:
- properties:
- code:
- description: Code is the machine-readable error code.
- readOnly: true
- type: string
- enum:
- - invalid
- message:
- readOnly: true
- description: Human-readable message.
- type: string
- required:
- - code
- - message
- Field:
- type: object
- properties:
- value:
- description: value is the value of the field. Meaning of the value is implied by the `type` key
- type: string
- type:
- description: '`type` describes the field type. `func` is a function. `field` is a field reference.'
- type: string
- enum:
- - func
- - field
- - integer
- - number
- - regex
- - wildcard
- alias:
- description: Alias overrides the field name in the returned response. Applies only if type is `func`
- type: string
- args:
- description: Args are the arguments to the function
- type: array
- items:
- $ref: '#/components/schemas/Field'
- BuilderConfig:
- type: object
- properties:
- buckets:
- type: array
- items:
- type: string
- tags:
- type: array
- items:
- $ref: '#/components/schemas/BuilderTagsType'
- functions:
- type: array
- items:
- $ref: '#/components/schemas/BuilderFunctionsType'
- aggregateWindow:
- type: object
- properties:
- period:
- type: string
- fillValues:
- type: boolean
- BuilderTagsType:
- type: object
- properties:
- key:
- type: string
- values:
- type: array
- items:
- type: string
- aggregateFunctionType:
- $ref: '#/components/schemas/BuilderAggregateFunctionType'
- BuilderAggregateFunctionType:
- type: string
- enum:
- - filter
- - group
- BuilderFunctionsType:
- type: object
- properties:
- name:
- type: string
- DashboardQuery:
- type: object
- properties:
- text:
- type: string
- description: The text of the Flux query.
- editMode:
- $ref: '#/components/schemas/QueryEditMode'
- name:
- type: string
- builderConfig:
- $ref: '#/components/schemas/BuilderConfig'
- QueryEditMode:
- type: string
- enum:
- - builder
- - advanced
- Axis:
- type: object
- description: Axis used in a visualization.
- properties:
- bounds:
- type: array
- minItems: 0
- maxItems: 2
- description: 'The extents of the axis in the form [lower, upper]. Clients determine whether bounds are inclusive or exclusive of their limits.'
- items:
- type: string
- label:
- description: Description of the axis.
- type: string
- prefix:
- description: Label prefix for formatting axis values.
- type: string
- suffix:
- description: Label suffix for formatting axis values.
- type: string
- base:
- description: Radix for formatting axis values.
- type: string
- enum:
- - ''
- - '2'
- - '10'
- scale:
- $ref: '#/components/schemas/AxisScale'
- AxisScale:
- description: 'Scale is the axis formatting scale. Supported: "log", "linear"'
- type: string
- enum:
- - log
- - linear
- DashboardColor:
- type: object
- description: Defines an encoding of data value into color space.
- required:
- - id
- - type
- - hex
- - name
- - value
- properties:
- id:
- description: The unique ID of the view color.
- type: string
- type:
- description: Type is how the color is used.
- type: string
- enum:
- - min
- - max
- - threshold
- - scale
- - text
- - background
- hex:
- description: The hex number of the color
- type: string
- maxLength: 7
- minLength: 7
- name:
- description: The user-facing name of the hex color.
- type: string
- value:
- description: The data value mapped to this color.
- type: number
- format: float
- RenamableField:
- description: Describes a field that can be renamed and made visible or invisible.
- type: object
- properties:
- internalName:
- description: The calculated name of a field.
- readOnly: true
- type: string
- displayName:
- description: The name that a field is renamed to by the user.
- type: string
- visible:
- description: Indicates whether this field should be visible on the table.
- type: boolean
- XYViewProperties:
- type: object
- required:
- - type
- - geom
- - queries
- - shape
- - axes
- - colors
- - note
- - showNoteWhenEmpty
- - position
- properties:
- adaptiveZoomHide:
- type: boolean
- timeFormat:
- type: string
- type:
- type: string
- enum:
- - xy
- queries:
- type: array
- items:
- $ref: '#/components/schemas/DashboardQuery'
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: '#/components/schemas/DashboardColor'
- colorMapping:
- description: An object that contains information about the color mapping
- $ref: '#/components/schemas/ColorMapping'
- shape:
- type: string
- enum:
- - chronograf-v2
- note:
- type: string
- showNoteWhenEmpty:
- description: 'If true, will display note when empty'
- type: boolean
- axes:
- $ref: '#/components/schemas/Axes'
- staticLegend:
- $ref: '#/components/schemas/StaticLegend'
- xColumn:
- type: string
- generateXAxisTicks:
- type: array
- items:
- type: string
- xTotalTicks:
- type: integer
- xTickStart:
- type: number
- format: float
- xTickStep:
- type: number
- format: float
- yColumn:
- type: string
- generateYAxisTicks:
- type: array
- items:
- type: string
- yTotalTicks:
- type: integer
- yTickStart:
- type: number
- format: float
- yTickStep:
- type: number
- format: float
- shadeBelow:
- type: boolean
- hoverDimension:
- type: string
- enum:
- - auto
- - x
- - 'y'
- - xy
- position:
- type: string
- enum:
- - overlaid
- - stacked
- geom:
- $ref: '#/components/schemas/XYGeom'
- legendColorizeRows:
- type: boolean
- legendHide:
- type: boolean
- legendOpacity:
- type: number
- format: float
- legendOrientationThreshold:
- type: integer
- XYGeom:
- type: string
- enum:
- - line
- - step
- - stacked
- - bar
- - monotoneX
- - stepBefore
- - stepAfter
- BandViewProperties:
- type: object
- required:
- - type
- - geom
- - queries
- - shape
- - axes
- - colors
- - note
- - showNoteWhenEmpty
- properties:
- adaptiveZoomHide:
- type: boolean
- timeFormat:
- type: string
- type:
- type: string
- enum:
- - band
- queries:
- type: array
- items:
- $ref: '#/components/schemas/DashboardQuery'
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: '#/components/schemas/DashboardColor'
- shape:
- type: string
- enum:
- - chronograf-v2
- note:
- type: string
- showNoteWhenEmpty:
- description: 'If true, will display note when empty'
- type: boolean
- axes:
- $ref: '#/components/schemas/Axes'
- staticLegend:
- $ref: '#/components/schemas/StaticLegend'
- xColumn:
- type: string
- generateXAxisTicks:
- type: array
- items:
- type: string
- xTotalTicks:
- type: integer
- xTickStart:
- type: number
- format: float
- xTickStep:
- type: number
- format: float
- yColumn:
- type: string
- generateYAxisTicks:
- type: array
- items:
- type: string
- yTotalTicks:
- type: integer
- yTickStart:
- type: number
- format: float
- yTickStep:
- type: number
- format: float
- upperColumn:
- type: string
- mainColumn:
- type: string
- lowerColumn:
- type: string
- hoverDimension:
- type: string
- enum:
- - auto
- - x
- - 'y'
- - xy
- geom:
- $ref: '#/components/schemas/XYGeom'
- legendColorizeRows:
- type: boolean
- legendHide:
- type: boolean
- legendOpacity:
- type: number
- format: float
- legendOrientationThreshold:
- type: integer
- LinePlusSingleStatProperties:
- type: object
- required:
- - type
- - queries
- - shape
- - axes
- - colors
- - note
- - showNoteWhenEmpty
- - prefix
- - suffix
- - decimalPlaces
- - position
- properties:
- adaptiveZoomHide:
- type: boolean
- timeFormat:
- type: string
- type:
- type: string
- enum:
- - line-plus-single-stat
- queries:
- type: array
- items:
- $ref: '#/components/schemas/DashboardQuery'
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: '#/components/schemas/DashboardColor'
- shape:
- type: string
- enum:
- - chronograf-v2
- note:
- type: string
- showNoteWhenEmpty:
- description: 'If true, will display note when empty'
- type: boolean
- axes:
- $ref: '#/components/schemas/Axes'
- staticLegend:
- $ref: '#/components/schemas/StaticLegend'
- xColumn:
- type: string
- generateXAxisTicks:
- type: array
- items:
- type: string
- xTotalTicks:
- type: integer
- xTickStart:
- type: number
- format: float
- xTickStep:
- type: number
- format: float
- yColumn:
- type: string
- generateYAxisTicks:
- type: array
- items:
- type: string
- yTotalTicks:
- type: integer
- yTickStart:
- type: number
- format: float
- yTickStep:
- type: number
- format: float
- shadeBelow:
- type: boolean
- hoverDimension:
- type: string
- enum:
- - auto
- - x
- - 'y'
- - xy
- position:
- type: string
- enum:
- - overlaid
- - stacked
- prefix:
- type: string
- suffix:
- type: string
- decimalPlaces:
- $ref: '#/components/schemas/DecimalPlaces'
- legendColorizeRows:
- type: boolean
- legendHide:
- type: boolean
- legendOpacity:
- type: number
- format: float
- legendOrientationThreshold:
- type: integer
- MosaicViewProperties:
- type: object
- required:
- - type
- - queries
- - colors
- - shape
- - note
- - showNoteWhenEmpty
- - xColumn
- - ySeriesColumns
- - fillColumns
- - xDomain
- - yDomain
- - xAxisLabel
- - yAxisLabel
- - xPrefix
- - yPrefix
- - xSuffix
- - ySuffix
- properties:
- timeFormat:
- type: string
- type:
- type: string
- enum:
- - mosaic
- queries:
- type: array
- items:
- $ref: '#/components/schemas/DashboardQuery'
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- type: string
- shape:
- type: string
- enum:
- - chronograf-v2
- note:
- type: string
- showNoteWhenEmpty:
- description: 'If true, will display note when empty'
- type: boolean
- xColumn:
- type: string
- generateXAxisTicks:
- type: array
- items:
- type: string
- xTotalTicks:
- type: integer
- xTickStart:
- type: number
- format: float
- xTickStep:
- type: number
- format: float
- yLabelColumnSeparator:
- type: string
- yLabelColumns:
- type: array
- items:
- type: string
- ySeriesColumns:
- type: array
- items:
- type: string
- fillColumns:
- type: array
- items:
- type: string
- xDomain:
- type: array
- items:
- type: number
- maxItems: 2
- yDomain:
- type: array
- items:
- type: number
- maxItems: 2
- xAxisLabel:
- type: string
- yAxisLabel:
- type: string
- xPrefix:
- type: string
- xSuffix:
- type: string
- yPrefix:
- type: string
- ySuffix:
- type: string
- hoverDimension:
- type: string
- enum:
- - auto
- - x
- - 'y'
- - xy
- legendColorizeRows:
- type: boolean
- legendHide:
- type: boolean
- legendOpacity:
- type: number
- format: float
- legendOrientationThreshold:
- type: integer
- ScatterViewProperties:
- type: object
- required:
- - type
- - queries
- - colors
- - shape
- - note
- - showNoteWhenEmpty
- - xColumn
- - yColumn
- - fillColumns
- - symbolColumns
- - xDomain
- - yDomain
- - xAxisLabel
- - yAxisLabel
- - xPrefix
- - yPrefix
- - xSuffix
- - ySuffix
- properties:
- adaptiveZoomHide:
- type: boolean
- timeFormat:
- type: string
- type:
- type: string
- enum:
- - scatter
- queries:
- type: array
- items:
- $ref: '#/components/schemas/DashboardQuery'
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- type: string
- shape:
- type: string
- enum:
- - chronograf-v2
- note:
- type: string
- showNoteWhenEmpty:
- description: 'If true, will display note when empty'
- type: boolean
- xColumn:
- type: string
- generateXAxisTicks:
- type: array
- items:
- type: string
- xTotalTicks:
- type: integer
- xTickStart:
- type: number
- format: float
- xTickStep:
- type: number
- format: float
- yColumn:
- type: string
- generateYAxisTicks:
- type: array
- items:
- type: string
- yTotalTicks:
- type: integer
- yTickStart:
- type: number
- format: float
- yTickStep:
- type: number
- format: float
- fillColumns:
- type: array
- items:
- type: string
- symbolColumns:
- type: array
- items:
- type: string
- xDomain:
- type: array
- items:
- type: number
- maxItems: 2
- yDomain:
- type: array
- items:
- type: number
- maxItems: 2
- xAxisLabel:
- type: string
- yAxisLabel:
- type: string
- xPrefix:
- type: string
- xSuffix:
- type: string
- yPrefix:
- type: string
- ySuffix:
- type: string
- legendColorizeRows:
- type: boolean
- legendHide:
- type: boolean
- legendOpacity:
- type: number
- format: float
- legendOrientationThreshold:
- type: integer
- HeatmapViewProperties:
- type: object
- required:
- - type
- - queries
- - colors
- - shape
- - note
- - showNoteWhenEmpty
- - xColumn
- - yColumn
- - xDomain
- - yDomain
- - xAxisLabel
- - yAxisLabel
- - xPrefix
- - yPrefix
- - xSuffix
- - ySuffix
- - binSize
- properties:
- adaptiveZoomHide:
- type: boolean
- timeFormat:
- type: string
- type:
- type: string
- enum:
- - heatmap
- queries:
- type: array
- items:
- $ref: '#/components/schemas/DashboardQuery'
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- type: string
- shape:
- type: string
- enum:
- - chronograf-v2
- note:
- type: string
- showNoteWhenEmpty:
- description: 'If true, will display note when empty'
- type: boolean
- xColumn:
- type: string
- generateXAxisTicks:
- type: array
- items:
- type: string
- xTotalTicks:
- type: integer
- xTickStart:
- type: number
- format: float
- xTickStep:
- type: number
- format: float
- yColumn:
- type: string
- generateYAxisTicks:
- type: array
- items:
- type: string
- yTotalTicks:
- type: integer
- yTickStart:
- type: number
- format: float
- yTickStep:
- type: number
- format: float
- xDomain:
- type: array
- items:
- type: number
- maxItems: 2
- yDomain:
- type: array
- items:
- type: number
- maxItems: 2
- xAxisLabel:
- type: string
- yAxisLabel:
- type: string
- xPrefix:
- type: string
- xSuffix:
- type: string
- yPrefix:
- type: string
- ySuffix:
- type: string
- binSize:
- type: number
- legendColorizeRows:
- type: boolean
- legendHide:
- type: boolean
- legendOpacity:
- type: number
- format: float
- legendOrientationThreshold:
- type: integer
- SingleStatViewProperties:
- type: object
- required:
- - type
- - queries
- - colors
- - shape
- - note
- - showNoteWhenEmpty
- - prefix
- - tickPrefix
- - suffix
- - tickSuffix
- - decimalPlaces
- properties:
- type:
- type: string
- enum:
- - single-stat
- queries:
- type: array
- items:
- $ref: '#/components/schemas/DashboardQuery'
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: '#/components/schemas/DashboardColor'
- shape:
- type: string
- enum:
- - chronograf-v2
- note:
- type: string
- showNoteWhenEmpty:
- description: 'If true, will display note when empty'
- type: boolean
- prefix:
- type: string
- tickPrefix:
- type: string
- suffix:
- type: string
- tickSuffix:
- type: string
- staticLegend:
- $ref: '#/components/schemas/StaticLegend'
- decimalPlaces:
- $ref: '#/components/schemas/DecimalPlaces'
- HistogramViewProperties:
- type: object
- required:
- - type
- - queries
- - colors
- - shape
- - note
- - showNoteWhenEmpty
- - xColumn
- - fillColumns
- - xDomain
- - xAxisLabel
- - position
- - binCount
- properties:
- type:
- type: string
- enum:
- - histogram
- queries:
- type: array
- items:
- $ref: '#/components/schemas/DashboardQuery'
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: '#/components/schemas/DashboardColor'
- shape:
- type: string
- enum:
- - chronograf-v2
- note:
- type: string
- showNoteWhenEmpty:
- description: 'If true, will display note when empty'
- type: boolean
- xColumn:
- type: string
- fillColumns:
- type: array
- items:
- type: string
- xDomain:
- type: array
- items:
- type: number
- format: float
- xAxisLabel:
- type: string
- position:
- type: string
- enum:
- - overlaid
- - stacked
- binCount:
- type: integer
- legendColorizeRows:
- type: boolean
- legendHide:
- type: boolean
- legendOpacity:
- type: number
- format: float
- legendOrientationThreshold:
- type: integer
- GaugeViewProperties:
- type: object
- required:
- - type
- - queries
- - colors
- - shape
- - note
- - showNoteWhenEmpty
- - prefix
- - tickPrefix
- - suffix
- - tickSuffix
- - decimalPlaces
- properties:
- type:
- type: string
- enum:
- - gauge
- queries:
- type: array
- items:
- $ref: '#/components/schemas/DashboardQuery'
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: '#/components/schemas/DashboardColor'
- shape:
- type: string
- enum:
- - chronograf-v2
- note:
- type: string
- showNoteWhenEmpty:
- description: 'If true, will display note when empty'
- type: boolean
- prefix:
- type: string
- tickPrefix:
- type: string
- suffix:
- type: string
- tickSuffix:
- type: string
- decimalPlaces:
- $ref: '#/components/schemas/DecimalPlaces'
- TableViewProperties:
- type: object
- required:
- - type
- - queries
- - colors
- - shape
- - note
- - showNoteWhenEmpty
- - tableOptions
- - fieldOptions
- - timeFormat
- - decimalPlaces
- properties:
- type:
- type: string
- enum:
- - table
- queries:
- type: array
- items:
- $ref: '#/components/schemas/DashboardQuery'
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: '#/components/schemas/DashboardColor'
- shape:
- type: string
- enum:
- - chronograf-v2
- note:
- type: string
- showNoteWhenEmpty:
- description: 'If true, will display note when empty'
- type: boolean
- tableOptions:
- type: object
- properties:
- verticalTimeAxis:
- description: verticalTimeAxis describes the orientation of the table by indicating whether the time axis will be displayed vertically
- type: boolean
- sortBy:
- $ref: '#/components/schemas/RenamableField'
- wrapping:
- description: Wrapping describes the text wrapping style to be used in table views
- type: string
- enum:
- - truncate
- - wrap
- - single-line
- fixFirstColumn:
- description: fixFirstColumn indicates whether the first column of the table should be locked
- type: boolean
- fieldOptions:
- description: fieldOptions represent the fields retrieved by the query with customization options
- type: array
- items:
- $ref: '#/components/schemas/RenamableField'
- timeFormat:
- description: timeFormat describes the display format for time values according to moment.js date formatting
- type: string
- decimalPlaces:
- $ref: '#/components/schemas/DecimalPlaces'
- SimpleTableViewProperties:
- type: object
- required:
- - type
- - showAll
- - queries
- - shape
- - note
- - showNoteWhenEmpty
- properties:
- type:
- type: string
- enum:
- - simple-table
- showAll:
- type: boolean
- queries:
- type: array
- items:
- $ref: '#/components/schemas/DashboardQuery'
- shape:
- type: string
- enum:
- - chronograf-v2
- note:
- type: string
- showNoteWhenEmpty:
- description: 'If true, will display note when empty'
- type: boolean
- MarkdownViewProperties:
- type: object
- required:
- - type
- - shape
- - note
- properties:
- type:
- type: string
- enum:
- - markdown
- shape:
- type: string
- enum:
- - chronograf-v2
- note:
- type: string
- CheckViewProperties:
- type: object
- required:
- - type
- - shape
- - checkID
- - queries
- - colors
- properties:
- adaptiveZoomHide:
- type: boolean
- type:
- type: string
- enum:
- - check
- shape:
- type: string
- enum:
- - chronograf-v2
- checkID:
- type: string
- check:
- $ref: '#/components/schemas/Check'
- queries:
- type: array
- items:
- $ref: '#/components/schemas/DashboardQuery'
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: '#/components/schemas/DashboardColor'
- legendColorizeRows:
- type: boolean
- legendHide:
- type: boolean
- legendOpacity:
- type: number
- format: float
- legendOrientationThreshold:
- type: integer
- GeoViewLayer:
- type: object
- oneOf:
- - $ref: '#/components/schemas/GeoCircleViewLayer'
- - $ref: '#/components/schemas/GeoHeatMapViewLayer'
- - $ref: '#/components/schemas/GeoPointMapViewLayer'
- - $ref: '#/components/schemas/GeoTrackMapViewLayer'
- GeoViewLayerProperties:
- type: object
- required:
- - type
- properties:
- type:
- type: string
- enum:
- - heatmap
- - circleMap
- - pointMap
- - trackMap
- GeoCircleViewLayer:
- allOf:
- - $ref: '#/components/schemas/GeoViewLayerProperties'
- - type: object
- required:
- - radiusField
- - radiusDimension
- - colorField
- - colorDimension
- - colors
- properties:
- radiusField:
- type: string
- description: Radius field
- radiusDimension:
- $ref: '#/components/schemas/Axis'
- colorField:
- type: string
- description: Circle color field
- colorDimension:
- $ref: '#/components/schemas/Axis'
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: '#/components/schemas/DashboardColor'
- radius:
- description: Maximum radius size in pixels
- type: integer
- interpolateColors:
- description: Interpolate circle color based on displayed value
- type: boolean
- GeoPointMapViewLayer:
- allOf:
- - $ref: '#/components/schemas/GeoViewLayerProperties'
- - type: object
- required:
- - colorField
- - colorDimension
- - colors
- properties:
- colorField:
- type: string
- description: Marker color field
- colorDimension:
- $ref: '#/components/schemas/Axis'
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: '#/components/schemas/DashboardColor'
- isClustered:
- description: Cluster close markers together
- type: boolean
- tooltipColumns:
- description: An array for which columns to display in tooltip
- type: array
- items:
- type: string
- GeoTrackMapViewLayer:
- allOf:
- - $ref: '#/components/schemas/GeoViewLayerProperties'
- - type: object
- required:
- - trackWidth
- - speed
- - randomColors
- - trackPointVisualization
- properties:
- trackWidth:
- description: Width of the track
- type: integer
- speed:
- description: Speed of the track animation
- type: integer
- randomColors:
- description: Assign different colors to different tracks
- type: boolean
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: '#/components/schemas/DashboardColor'
- GeoHeatMapViewLayer:
- allOf:
- - $ref: '#/components/schemas/GeoViewLayerProperties'
- - type: object
- required:
- - intensityField
- - intensityDimension
- - radius
- - blur
- - colors
- properties:
- intensityField:
- type: string
- description: Intensity field
- intensityDimension:
- $ref: '#/components/schemas/Axis'
- radius:
- description: Radius size in pixels
- type: integer
- blur:
- description: Blur for heatmap points
- type: integer
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: '#/components/schemas/DashboardColor'
- GeoViewProperties:
- type: object
- required:
- - type
- - shape
- - queries
- - note
- - showNoteWhenEmpty
- - center
- - zoom
- - allowPanAndZoom
- - detectCoordinateFields
- - layers
- properties:
- type:
- type: string
- enum:
- - geo
- queries:
- type: array
- items:
- $ref: '#/components/schemas/DashboardQuery'
- shape:
- type: string
- enum:
- - chronograf-v2
- center:
- description: Coordinates of the center of the map
- type: object
- required:
- - lat
- - lon
- properties:
- lat:
- description: Latitude of the center of the map
- type: number
- format: double
- lon:
- description: Longitude of the center of the map
- type: number
- format: double
- zoom:
- description: Zoom level used for initial display of the map
- type: number
- format: double
- minimum: 1
- maximum: 28
- allowPanAndZoom:
- description: 'If true, map zoom and pan controls are enabled on the dashboard view'
- type: boolean
- default: true
- detectCoordinateFields:
- description: 'If true, search results get automatically regroupped so that lon,lat and value are treated as columns'
- type: boolean
- default: true
- useS2CellID:
- description: 'If true, S2 column is used to calculate lat/lon'
- type: boolean
- s2Column:
- description: String to define the column
- type: string
- latLonColumns:
- $ref: '#/components/schemas/LatLonColumns'
- mapStyle:
- description: 'Define map type - regular, satellite etc.'
- type: string
- note:
- type: string
- showNoteWhenEmpty:
- description: 'If true, will display note when empty'
- type: boolean
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: '#/components/schemas/DashboardColor'
- layers:
- description: List of individual layers shown in the map
- type: array
- items:
- $ref: '#/components/schemas/GeoViewLayer'
- LatLonColumns:
- description: Object type to define lat/lon columns
- type: object
- required:
- - lat
- - lon
- properties:
- lat:
- $ref: '#/components/schemas/LatLonColumn'
- lon:
- $ref: '#/components/schemas/LatLonColumn'
- LatLonColumn:
- description: Object type for key and column definitions
- type: object
- required:
- - key
- - column
- properties:
- key:
- description: Key to determine whether the column is tag/field
- type: string
- column:
- description: Column to look up Lat/Lon
- type: string
- Axes:
- description: The viewport for a View's visualizations
- type: object
- required:
- - x
- - 'y'
- properties:
- x:
- $ref: '#/components/schemas/Axis'
- 'y':
- $ref: '#/components/schemas/Axis'
- StaticLegend:
- description: StaticLegend represents the options specific to the static legend
- type: object
- properties:
- colorizeRows:
- type: boolean
- heightRatio:
- type: number
- format: float
- show:
- type: boolean
- opacity:
- type: number
- format: float
- orientationThreshold:
- type: integer
- valueAxis:
- type: string
- widthRatio:
- type: number
- format: float
- DecimalPlaces:
- description: 'Indicates whether decimal places should be enforced, and how many digits it should show.'
- type: object
- properties:
- isEnforced:
- description: Indicates whether decimal point setting should be enforced
- type: boolean
- digits:
- description: The number of digits after decimal to display
- type: integer
- format: int32
- ConstantVariableProperties:
- properties:
- type:
- type: string
- enum:
- - constant
- values:
- type: array
- items:
- type: string
- MapVariableProperties:
- properties:
- type:
- type: string
- enum:
- - map
- values:
- type: object
- additionalProperties:
- type: string
- QueryVariableProperties:
- properties:
- type:
- type: string
- enum:
- - query
- values:
- type: object
- properties:
- query:
- type: string
- language:
- type: string
- VariableProperties:
- type: object
- oneOf:
- - $ref: '#/components/schemas/QueryVariableProperties'
- - $ref: '#/components/schemas/ConstantVariableProperties'
- - $ref: '#/components/schemas/MapVariableProperties'
- ViewProperties:
- oneOf:
- - $ref: '#/components/schemas/LinePlusSingleStatProperties'
- - $ref: '#/components/schemas/XYViewProperties'
- - $ref: '#/components/schemas/SingleStatViewProperties'
- - $ref: '#/components/schemas/HistogramViewProperties'
- - $ref: '#/components/schemas/GaugeViewProperties'
- - $ref: '#/components/schemas/TableViewProperties'
- - $ref: '#/components/schemas/SimpleTableViewProperties'
- - $ref: '#/components/schemas/MarkdownViewProperties'
- - $ref: '#/components/schemas/CheckViewProperties'
- - $ref: '#/components/schemas/ScatterViewProperties'
- - $ref: '#/components/schemas/HeatmapViewProperties'
- - $ref: '#/components/schemas/MosaicViewProperties'
- - $ref: '#/components/schemas/BandViewProperties'
- - $ref: '#/components/schemas/GeoViewProperties'
- View:
- required:
- - name
- - properties
- properties:
- links:
- type: object
- readOnly: true
- properties:
- self:
- type: string
- id:
- readOnly: true
- type: string
- name:
- type: string
- properties:
- $ref: '#/components/schemas/ViewProperties'
- Views:
- type: object
- properties:
- links:
- type: object
- properties:
- self:
- type: string
- views:
- type: array
- items:
- $ref: '#/components/schemas/View'
- CellUpdate:
- type: object
- properties:
- x:
- type: integer
- format: int32
- 'y':
- type: integer
- format: int32
- w:
- type: integer
- format: int32
- h:
- type: integer
- format: int32
- CreateCell:
- type: object
- properties:
- name:
- type: string
- x:
- type: integer
- format: int32
- 'y':
- type: integer
- format: int32
- w:
- type: integer
- format: int32
- h:
- type: integer
- format: int32
- usingView:
- type: string
- description: Makes a copy of the provided view.
- AnalyzeQueryResponse:
- type: object
- properties:
- errors:
- type: array
- items:
- type: object
- properties:
- line:
- type: integer
- column:
- type: integer
- character:
- type: integer
- message:
- type: string
- CellWithViewProperties:
- type: object
- allOf:
- - $ref: '#/components/schemas/Cell'
- - type: object
- properties:
- name:
- type: string
- properties:
- $ref: '#/components/schemas/ViewProperties'
- Cell:
- type: object
- properties:
- id:
- type: string
- links:
- type: object
- properties:
- self:
- type: string
- view:
- type: string
- x:
- type: integer
- format: int32
- 'y':
- type: integer
- format: int32
- w:
- type: integer
- format: int32
- h:
- type: integer
- format: int32
- viewID:
- type: string
- description: The reference to a view from the views API.
- CellsWithViewProperties:
- type: array
- items:
- $ref: '#/components/schemas/CellWithViewProperties'
- Cells:
- type: array
- items:
- $ref: '#/components/schemas/Cell'
- Secrets:
- additionalProperties:
- type: string
- example:
- apikey: abc123xyz
- SecretKeys:
- type: object
- properties:
- secrets:
- type: array
- items:
- type: string
- SecretKeysResponse:
- allOf:
- - $ref: '#/components/schemas/SecretKeys'
- - type: object
- properties:
- links:
- readOnly: true
- type: object
- properties:
- self:
- type: string
- org:
- type: string
- CreateDashboardRequest:
- properties:
- orgID:
- type: string
- description: The ID of the organization that owns the dashboard.
- name:
- type: string
- description: The user-facing name of the dashboard.
- description:
- type: string
- description: The user-facing description of the dashboard.
- required:
- - orgID
- - name
- DashboardWithViewProperties:
- type: object
- allOf:
- - $ref: '#/components/schemas/CreateDashboardRequest'
- - type: object
- properties:
- links:
- type: object
- example:
- self: /api/v2/dashboards/1
- cells: /api/v2/dashboards/1/cells
- owners: /api/v2/dashboards/1/owners
- members: /api/v2/dashboards/1/members
- labels: /api/v2/dashboards/1/labels
- org: /api/v2/labels/1
- properties:
- self:
- $ref: '#/components/schemas/Link'
- cells:
- $ref: '#/components/schemas/Link'
- members:
- $ref: '#/components/schemas/Link'
- owners:
- $ref: '#/components/schemas/Link'
- labels:
- $ref: '#/components/schemas/Link'
- org:
- $ref: '#/components/schemas/Link'
- id:
- readOnly: true
- type: string
- meta:
- type: object
- properties:
- createdAt:
- type: string
- format: date-time
- updatedAt:
- type: string
- format: date-time
- cells:
- $ref: '#/components/schemas/CellsWithViewProperties'
- labels:
- $ref: '#/components/schemas/Labels'
- Dashboard:
- type: object
- allOf:
- - $ref: '#/components/schemas/CreateDashboardRequest'
- - type: object
- properties:
- links:
- type: object
- example:
- self: /api/v2/dashboards/1
- cells: /api/v2/dashboards/1/cells
- owners: /api/v2/dashboards/1/owners
- members: /api/v2/dashboards/1/members
- labels: /api/v2/dashboards/1/labels
- org: /api/v2/labels/1
- properties:
- self:
- $ref: '#/components/schemas/Link'
- cells:
- $ref: '#/components/schemas/Link'
- members:
- $ref: '#/components/schemas/Link'
- owners:
- $ref: '#/components/schemas/Link'
- labels:
- $ref: '#/components/schemas/Link'
- org:
- $ref: '#/components/schemas/Link'
- id:
- readOnly: true
- type: string
- meta:
- type: object
- properties:
- createdAt:
- type: string
- format: date-time
- updatedAt:
- type: string
- format: date-time
- cells:
- $ref: '#/components/schemas/Cells'
- labels:
- $ref: '#/components/schemas/Labels'
- Dashboards:
- type: object
- properties:
- links:
- $ref: '#/components/schemas/Links'
- dashboards:
- type: array
- items:
- $ref: '#/components/schemas/Dashboard'
- TelegrafRequest:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- metadata:
- type: object
- properties:
- buckets:
- type: array
- items:
- type: string
- config:
- type: string
- orgID:
- type: string
- TelegrafPluginRequest:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- plugins:
- type: array
- items:
- type: object
- properties:
- type:
- type: string
- name:
- type: string
- alias:
- type: string
- description:
- type: string
- config:
- type: string
- metadata:
- type: object
- properties:
- buckets:
- type: array
- items:
- type: string
- config:
- type: string
- orgID:
- type: string
- Telegraf:
- type: object
- allOf:
- - $ref: '#/components/schemas/TelegrafRequest'
- - type: object
- properties:
- id:
- type: string
- readOnly: true
- links:
- type: object
- readOnly: true
- example:
- self: /api/v2/telegrafs/1
- lables: /api/v2/telegrafs/1/labels
- owners: /api/v2/telegrafs/1/owners
- members: /api/v2/telegrafs/1/members
- properties:
- self:
- $ref: '#/components/schemas/Link'
- labels:
- $ref: '#/components/schemas/Link'
- members:
- $ref: '#/components/schemas/Link'
- owners:
- $ref: '#/components/schemas/Link'
- labels:
- readOnly: true
- $ref: '#/components/schemas/Labels'
- Telegrafs:
- type: object
- properties:
- configurations:
- type: array
- items:
- $ref: '#/components/schemas/Telegraf'
- TelegrafPlugin:
- type: object
- properties:
- type:
- type: string
- name:
- type: string
- description:
- type: string
- config:
- type: string
- TelegrafPlugins:
- type: object
- properties:
- version:
- type: string
- os:
- type: string
- plugins:
- type: array
- items:
- $ref: '#/components/schemas/TelegrafPlugin'
- IsOnboarding:
- type: object
- properties:
- allowed:
- description: |
- If `true`, the InfluxDB instance hasn't had initial setup;
- `false` otherwise.
- type: boolean
- PasswordResetBody:
- properties:
- password:
- type: string
- required:
- - password
- AddResourceMemberRequestBody:
- type: object
- properties:
- id:
- type: string
- description: |
- The ID of the user to add to the resource.
- name:
- type: string
- description: |
- The name of the user to add to the resource.
- required:
- - id
- Ready:
- type: object
- properties:
- status:
- type: string
- enum:
- - ready
- started:
- type: string
- format: date-time
- example: '2019-03-13T10:09:33.891196-04:00'
- up:
- type: string
- example: 14m45.911966424s
- HealthCheck:
- type: object
- required:
- - name
- - status
- properties:
- name:
- type: string
- message:
- type: string
- checks:
- type: array
- items:
- $ref: '#/components/schemas/HealthCheck'
- status:
- type: string
- enum:
- - pass
- - fail
- version:
- type: string
- commit:
- type: string
- Labels:
- type: array
- items:
- $ref: '#/components/schemas/Label'
- Label:
- type: object
- properties:
- id:
- readOnly: true
- type: string
- orgID:
- readOnly: true
- type: string
- name:
- type: string
- properties:
- type: object
- additionalProperties:
- type: string
- description: |
- Key-value pairs associated with this label.
- To remove a property, send an update with an empty value (`""`) for the key.
- example:
- color: ffb3b3
- description: this is a description
- LabelCreateRequest:
- type: object
- required:
- - orgID
- - name
- properties:
- orgID:
- type: string
- name:
- type: string
- properties:
- type: object
- additionalProperties:
- type: string
- description: |
- Key-value pairs associated with this label.
- To remove a property, send an update with an empty value (`""`) for the key.
- example:
- color: ffb3b3
- description: this is a description
- LabelUpdate:
- type: object
- properties:
- name:
- type: string
- properties:
- type: object
- additionalProperties:
- type: string
- description: |
- Key-value pairs associated with this label.
- To remove a property, send an update with an empty value (`""`) for the key.
- example:
- color: ffb3b3
- description: this is a description
- LabelMapping:
- type: object
- properties:
- labelID:
- description: |
- Label ID.
- The ID of the label to attach.
- type: string
- LabelsResponse:
- type: object
- properties:
- labels:
- $ref: '#/components/schemas/Labels'
- links:
- $ref: '#/components/schemas/Links'
- LabelResponse:
- type: object
- properties:
- label:
- $ref: '#/components/schemas/Label'
- links:
- $ref: '#/components/schemas/Links'
- ASTResponse:
- description: Contains the AST for the supplied Flux query
- type: object
- properties:
- ast:
- $ref: '#/components/schemas/Package'
- WritePrecision:
- type: string
- enum:
- - ms
- - s
- - us
- - ns
- FluxResponse:
- description: Rendered flux that backs the check or notification.
- properties:
- flux:
- type: string
- CheckPatch:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- status:
- type: string
- enum:
- - active
- - inactive
- CheckDiscriminator:
- oneOf:
- - $ref: '#/components/schemas/DeadmanCheck'
- - $ref: '#/components/schemas/ThresholdCheck'
- - $ref: '#/components/schemas/CustomCheck'
- discriminator:
- propertyName: type
- mapping:
- deadman: '#/components/schemas/DeadmanCheck'
- threshold: '#/components/schemas/ThresholdCheck'
- custom: '#/components/schemas/CustomCheck'
- Check:
- allOf:
- - $ref: '#/components/schemas/CheckDiscriminator'
- PostCheck:
- allOf:
- - $ref: '#/components/schemas/CheckDiscriminator'
- Checks:
- properties:
- checks:
- type: array
- items:
- $ref: '#/components/schemas/Check'
- links:
- $ref: '#/components/schemas/Links'
- CheckBase:
- properties:
- id:
- readOnly: true
- type: string
- name:
- type: string
- orgID:
- description: The ID of the organization that owns this check.
- type: string
- taskID:
- description: The ID of the task associated with this check.
- type: string
- ownerID:
- description: The ID of creator used to create this check.
- type: string
- readOnly: true
- createdAt:
- type: string
- format: date-time
- readOnly: true
- updatedAt:
- type: string
- format: date-time
- readOnly: true
- query:
- $ref: '#/components/schemas/DashboardQuery'
- status:
- $ref: '#/components/schemas/TaskStatusType'
- description:
- description: An optional description of the check.
- type: string
- latestCompleted:
- type: string
- 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.'
- format: date-time
- readOnly: true
- lastRunStatus:
- readOnly: true
- type: string
- enum:
- - failed
- - success
- - canceled
- lastRunError:
- readOnly: true
- type: string
- labels:
- $ref: '#/components/schemas/Labels'
- links:
- type: object
- readOnly: true
- example:
- self: /api/v2/checks/1
- labels: /api/v2/checks/1/labels
- members: /api/v2/checks/1/members
- owners: /api/v2/checks/1/owners
- query: /api/v2/checks/1/query
- properties:
- self:
- description: URL for this check
- $ref: '#/components/schemas/Link'
- labels:
- description: URL to retrieve labels for this check
- $ref: '#/components/schemas/Link'
- members:
- description: URL to retrieve members for this check
- $ref: '#/components/schemas/Link'
- owners:
- description: URL to retrieve owners for this check
- $ref: '#/components/schemas/Link'
- query:
- description: URL to retrieve flux script for this check
- $ref: '#/components/schemas/Link'
- required:
- - name
- - orgID
- - query
- ThresholdCheck:
- allOf:
- - $ref: '#/components/schemas/CheckBase'
- - type: object
- required:
- - type
- properties:
- type:
- type: string
- enum:
- - threshold
- thresholds:
- type: array
- items:
- $ref: '#/components/schemas/Threshold'
- every:
- description: Check repetition interval.
- type: string
- offset:
- description: 'Duration to delay after the schedule, before executing check.'
- type: string
- tags:
- description: List of tags to write to each status.
- type: array
- items:
- type: object
- properties:
- key:
- type: string
- value:
- type: string
- statusMessageTemplate:
- description: The template used to generate and write a status message.
- type: string
- Threshold:
- oneOf:
- - $ref: '#/components/schemas/GreaterThreshold'
- - $ref: '#/components/schemas/LesserThreshold'
- - $ref: '#/components/schemas/RangeThreshold'
- discriminator:
- propertyName: type
- mapping:
- greater: '#/components/schemas/GreaterThreshold'
- lesser: '#/components/schemas/LesserThreshold'
- range: '#/components/schemas/RangeThreshold'
- DeadmanCheck:
- allOf:
- - $ref: '#/components/schemas/CheckBase'
- - type: object
- required:
- - type
- properties:
- type:
- type: string
- enum:
- - deadman
- timeSince:
- description: String duration before deadman triggers.
- type: string
- staleTime:
- description: String duration for time that a series is considered stale and should not trigger deadman.
- type: string
- reportZero:
- description: 'If only zero values reported since time, trigger an alert'
- type: boolean
- level:
- $ref: '#/components/schemas/CheckStatusLevel'
- every:
- description: Check repetition interval.
- type: string
- offset:
- description: 'Duration to delay after the schedule, before executing check.'
- type: string
- tags:
- description: List of tags to write to each status.
- type: array
- items:
- type: object
- properties:
- key:
- type: string
- value:
- type: string
- statusMessageTemplate:
- description: The template used to generate and write a status message.
- type: string
- CustomCheck:
- allOf:
- - $ref: '#/components/schemas/CheckBase'
- - type: object
- properties:
- type:
- type: string
- enum:
- - custom
- required:
- - type
- ThresholdBase:
- properties:
- level:
- $ref: '#/components/schemas/CheckStatusLevel'
- allValues:
- description: 'If true, only alert if all values meet threshold.'
- type: boolean
- GreaterThreshold:
- allOf:
- - $ref: '#/components/schemas/ThresholdBase'
- - type: object
- required:
- - type
- - value
- properties:
- type:
- type: string
- enum:
- - greater
- value:
- type: number
- format: float
- LesserThreshold:
- allOf:
- - $ref: '#/components/schemas/ThresholdBase'
- - type: object
- required:
- - type
- - value
- properties:
- type:
- type: string
- enum:
- - lesser
- value:
- type: number
- format: float
- RangeThreshold:
- allOf:
- - $ref: '#/components/schemas/ThresholdBase'
- - type: object
- required:
- - type
- - min
- - max
- - within
- properties:
- type:
- type: string
- enum:
- - range
- min:
- type: number
- format: float
- max:
- type: number
- format: float
- within:
- type: boolean
- CheckStatusLevel:
- description: The state to record if check matches a criteria.
- type: string
- enum:
- - UNKNOWN
- - OK
- - INFO
- - CRIT
- - WARN
- RuleStatusLevel:
- description: The state to record if check matches a criteria.
- type: string
- enum:
- - UNKNOWN
- - OK
- - INFO
- - CRIT
- - WARN
- - ANY
- NotificationRuleUpdate:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- status:
- type: string
- enum:
- - active
- - inactive
- NotificationRuleDiscriminator:
- oneOf:
- - $ref: '#/components/schemas/SlackNotificationRule'
- - $ref: '#/components/schemas/SMTPNotificationRule'
- - $ref: '#/components/schemas/PagerDutyNotificationRule'
- - $ref: '#/components/schemas/HTTPNotificationRule'
- - $ref: '#/components/schemas/TelegramNotificationRule'
- discriminator:
- propertyName: type
- mapping:
- slack: '#/components/schemas/SlackNotificationRule'
- smtp: '#/components/schemas/SMTPNotificationRule'
- pagerduty: '#/components/schemas/PagerDutyNotificationRule'
- http: '#/components/schemas/HTTPNotificationRule'
- telegram: '#/components/schemas/TelegramNotificationRule'
- NotificationRule:
- allOf:
- - $ref: '#/components/schemas/NotificationRuleDiscriminator'
- PostNotificationRule:
- allOf:
- - $ref: '#/components/schemas/NotificationRuleDiscriminator'
- NotificationRules:
- properties:
- notificationRules:
- type: array
- items:
- $ref: '#/components/schemas/NotificationRule'
- links:
- $ref: '#/components/schemas/Links'
- NotificationRuleBase:
- type: object
- required:
- - orgID
- - status
- - name
- - statusRules
- - endpointID
- properties:
- latestCompleted:
- 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.'
- type: string
- format: date-time
- readOnly: true
- lastRunStatus:
- readOnly: true
- type: string
- enum:
- - failed
- - success
- - canceled
- lastRunError:
- readOnly: true
- type: string
- id:
- readOnly: true
- type: string
- endpointID:
- type: string
- orgID:
- description: The ID of the organization that owns this notification rule.
- type: string
- taskID:
- description: The ID of the task associated with this notification rule.
- type: string
- ownerID:
- description: The ID of creator used to create this notification rule.
- type: string
- readOnly: true
- createdAt:
- type: string
- format: date-time
- readOnly: true
- updatedAt:
- type: string
- format: date-time
- readOnly: true
- status:
- $ref: '#/components/schemas/TaskStatusType'
- name:
- description: Human-readable name describing the notification rule.
- type: string
- sleepUntil:
- type: string
- every:
- description: The notification repetition interval.
- type: string
- offset:
- description: 'Duration to delay after the schedule, before executing check.'
- type: string
- runbookLink:
- type: string
- limitEvery:
- description: 'Don''t notify me more than <limit> times every <limitEvery> seconds. If set, limit cannot be empty.'
- type: integer
- limit:
- description: 'Don''t notify me more than <limit> times every <limitEvery> seconds. If set, limitEvery cannot be empty.'
- type: integer
- tagRules:
- description: List of tag rules the notification rule attempts to match.
- type: array
- items:
- $ref: '#/components/schemas/TagRule'
- description:
- description: An optional description of the notification rule.
- type: string
- statusRules:
- description: List of status rules the notification rule attempts to match.
- type: array
- minItems: 1
- items:
- $ref: '#/components/schemas/StatusRule'
- labels:
- $ref: '#/components/schemas/Labels'
- links:
- type: object
- readOnly: true
- example:
- self: /api/v2/notificationRules/1
- labels: /api/v2/notificationRules/1/labels
- members: /api/v2/notificationRules/1/members
- owners: /api/v2/notificationRules/1/owners
- query: /api/v2/notificationRules/1/query
- properties:
- self:
- description: URL for this endpoint.
- $ref: '#/components/schemas/Link'
- labels:
- description: URL to retrieve labels for this notification rule.
- $ref: '#/components/schemas/Link'
- members:
- description: URL to retrieve members for this notification rule.
- $ref: '#/components/schemas/Link'
- owners:
- description: URL to retrieve owners for this notification rule.
- $ref: '#/components/schemas/Link'
- query:
- description: URL to retrieve flux script for this notification rule.
- $ref: '#/components/schemas/Link'
- TagRule:
- type: object
- properties:
- key:
- type: string
- value:
- type: string
- operator:
- type: string
- enum:
- - equal
- - notequal
- - equalregex
- - notequalregex
- StatusRule:
- type: object
- properties:
- currentLevel:
- $ref: '#/components/schemas/RuleStatusLevel'
- previousLevel:
- $ref: '#/components/schemas/RuleStatusLevel'
- count:
- type: integer
- period:
- type: string
- HTTPNotificationRuleBase:
- type: object
- required:
- - type
- properties:
- type:
- type: string
- enum:
- - http
- url:
- type: string
- HTTPNotificationRule:
- allOf:
- - $ref: '#/components/schemas/NotificationRuleBase'
- - $ref: '#/components/schemas/HTTPNotificationRuleBase'
- SlackNotificationRuleBase:
- type: object
- required:
- - type
- - messageTemplate
- properties:
- type:
- type: string
- enum:
- - slack
- channel:
- type: string
- messageTemplate:
- type: string
- SlackNotificationRule:
- allOf:
- - $ref: '#/components/schemas/NotificationRuleBase'
- - $ref: '#/components/schemas/SlackNotificationRuleBase'
- SMTPNotificationRule:
- allOf:
- - $ref: '#/components/schemas/NotificationRuleBase'
- - $ref: '#/components/schemas/SMTPNotificationRuleBase'
- SMTPNotificationRuleBase:
- type: object
- required:
- - type
- - subjectTemplate
- - to
- properties:
- type:
- type: string
- enum:
- - smtp
- subjectTemplate:
- type: string
- bodyTemplate:
- type: string
- to:
- type: string
- PagerDutyNotificationRule:
- allOf:
- - $ref: '#/components/schemas/NotificationRuleBase'
- - $ref: '#/components/schemas/PagerDutyNotificationRuleBase'
- PagerDutyNotificationRuleBase:
- type: object
- required:
- - type
- - messageTemplate
- properties:
- type:
- type: string
- enum:
- - pagerduty
- messageTemplate:
- type: string
- TelegramNotificationRule:
- allOf:
- - $ref: '#/components/schemas/NotificationRuleBase'
- - $ref: '#/components/schemas/TelegramNotificationRuleBase'
- TelegramNotificationRuleBase:
- type: object
- required:
- - type
- - messageTemplate
- - channel
- properties:
- type:
- description: The discriminator between other types of notification rules is "telegram".
- type: string
- enum:
- - telegram
- messageTemplate:
- description: The message template as a flux interpolated string.
- type: string
- parseMode:
- description: 'Parse mode of the message text per https://core.telegram.org/bots/api#formatting-options. Defaults to "MarkdownV2".'
- type: string
- enum:
- - MarkdownV2
- - HTML
- - Markdown
- disableWebPagePreview:
- description: Disables preview of web links in the sent messages when "true". Defaults to "false".
- type: boolean
- NotificationEndpointUpdate:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- status:
- type: string
- enum:
- - active
- - inactive
- NotificationEndpointDiscriminator:
- oneOf:
- - $ref: '#/components/schemas/SlackNotificationEndpoint'
- - $ref: '#/components/schemas/PagerDutyNotificationEndpoint'
- - $ref: '#/components/schemas/HTTPNotificationEndpoint'
- - $ref: '#/components/schemas/TelegramNotificationEndpoint'
- discriminator:
- propertyName: type
- mapping:
- slack: '#/components/schemas/SlackNotificationEndpoint'
- pagerduty: '#/components/schemas/PagerDutyNotificationEndpoint'
- http: '#/components/schemas/HTTPNotificationEndpoint'
- telegram: '#/components/schemas/TelegramNotificationEndpoint'
- NotificationEndpoint:
- allOf:
- - $ref: '#/components/schemas/NotificationEndpointDiscriminator'
- PostNotificationEndpoint:
- allOf:
- - $ref: '#/components/schemas/NotificationEndpointDiscriminator'
- NotificationEndpoints:
- properties:
- notificationEndpoints:
- type: array
- items:
- $ref: '#/components/schemas/NotificationEndpoint'
- links:
- $ref: '#/components/schemas/Links'
- NotificationEndpointBase:
- type: object
- required:
- - type
- - name
- properties:
- id:
- type: string
- orgID:
- type: string
- userID:
- type: string
- createdAt:
- type: string
- format: date-time
- readOnly: true
- updatedAt:
- type: string
- format: date-time
- readOnly: true
- description:
- description: An optional description of the notification endpoint.
- type: string
- name:
- type: string
- status:
- description: The status of the endpoint.
- default: active
- type: string
- enum:
- - active
- - inactive
- labels:
- $ref: '#/components/schemas/Labels'
- links:
- type: object
- readOnly: true
- example:
- self: /api/v2/notificationEndpoints/1
- labels: /api/v2/notificationEndpoints/1/labels
- members: /api/v2/notificationEndpoints/1/members
- owners: /api/v2/notificationEndpoints/1/owners
- properties:
- self:
- description: URL for this endpoint.
- $ref: '#/components/schemas/Link'
- labels:
- description: URL to retrieve labels for this endpoint.
- $ref: '#/components/schemas/Link'
- members:
- description: URL to retrieve members for this endpoint.
- $ref: '#/components/schemas/Link'
- owners:
- description: URL to retrieve owners for this endpoint.
- $ref: '#/components/schemas/Link'
- type:
- $ref: '#/components/schemas/NotificationEndpointType'
- SlackNotificationEndpoint:
- type: object
- allOf:
- - $ref: '#/components/schemas/NotificationEndpointBase'
- - type: object
- properties:
- url:
- description: Specifies the URL of the Slack endpoint. Specify either `URL` or `Token`.
- type: string
- token:
- description: Specifies the API token string. Specify either `URL` or `Token`.
- type: string
- PagerDutyNotificationEndpoint:
- type: object
- allOf:
- - $ref: '#/components/schemas/NotificationEndpointBase'
- - type: object
- required:
- - routingKey
- properties:
- clientURL:
- type: string
- routingKey:
- type: string
- HTTPNotificationEndpoint:
- type: object
- allOf:
- - $ref: '#/components/schemas/NotificationEndpointBase'
- - type: object
- required:
- - url
- - authMethod
- - method
- properties:
- url:
- type: string
- username:
- type: string
- password:
- type: string
- token:
- type: string
- method:
- type: string
- enum:
- - POST
- - GET
- - PUT
- authMethod:
- type: string
- enum:
- - none
- - basic
- - bearer
- contentTemplate:
- type: string
- headers:
- type: object
- description: Customized headers.
- additionalProperties:
- type: string
- TelegramNotificationEndpoint:
- type: object
- allOf:
- - $ref: '#/components/schemas/NotificationEndpointBase'
- - type: object
- required:
- - token
- - channel
- properties:
- token:
- description: 'Specifies the Telegram bot token. See https://core.telegram.org/bots#creating-a-new-bot .'
- type: string
- channel:
- description: 'The ID of the telegram channel; a chat_id in https://core.telegram.org/bots/api#sendmessage .'
- type: string
- NotificationEndpointType:
- type: string
- enum:
- - slack
- - pagerduty
- - http
- - telegram
- DBRP:
- type: object
- properties:
- id:
- type: string
- description: The ID of the DBRP mapping.
- readOnly: true
- orgID:
- type: string
- description: The ID of the organization.
- bucketID:
- type: string
- description: The ID of the bucket used as the target for the translation.
- database:
- type: string
- description: InfluxDB v1 database
- retention_policy:
- type: string
- description: InfluxDB v1 retention policy
- default:
- type: boolean
- description: Mapping represents the default retention policy for the database specified.
- virtual:
- type: boolean
- description: 'Indicates an autogenerated, virtual mapping based on the bucket name. Currently only available in OSS.'
- links:
- $ref: '#/components/schemas/Links'
- required:
- - id
- - orgID
- - bucketID
- - database
- - retention_policy
- - default
- DBRPs:
- properties:
- content:
- type: array
- items:
- $ref: '#/components/schemas/DBRP'
- DBRPUpdate:
- properties:
- retention_policy:
- type: string
- description: InfluxDB v1 retention policy
- default:
- type: boolean
- DBRPCreate:
- type: object
- properties:
- orgID:
- type: string
- description: The ID of the organization.
- org:
- type: string
- description: The name of the organization that owns this mapping.
- bucketID:
- type: string
- description: The ID of the bucket used as the target for the translation.
- database:
- type: string
- description: InfluxDB v1 database
- retention_policy:
- type: string
- description: InfluxDB v1 retention policy
- default:
- type: boolean
- description: Mapping represents the default retention policy for the database specified.
- required:
- - bucketID
- - database
- - retention_policy
- DBRPGet:
- type: object
- properties:
- content:
- $ref: '#/components/schemas/DBRP'
- required: true
- SchemaType:
- type: string
- enum:
- - implicit
- - explicit
- ColorMapping:
- type: object
- 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.
- additionalProperties:
- type: string
- example:
- series_id_1: '#edf529'
- series_id_2: '#edf529'
- measurement_birdmigration_europe: '#663cd0'
- configcat_deployments-autopromotionblocker: '#663cd0'
- Authorization:
- required:
- - orgID
- - permissions
- allOf:
- - $ref: '#/components/schemas/AuthorizationUpdateRequest'
- - type: object
- properties:
- createdAt:
- type: string
- format: date-time
- readOnly: true
- updatedAt:
- type: string
- format: date-time
- readOnly: true
- orgID:
- type: string
- description: The ID of the organization.
- permissions:
- type: array
- minItems: 1
- description: |
- A list of permissions for an authorization.
- An authorization must have at least one permission.
- items:
- $ref: '#/components/schemas/Permission'
- id:
- readOnly: true
- type: string
- token:
- readOnly: true
- type: string
- description: |
- The API token for authenticating InfluxDB API and CLI requests.
- userID:
- readOnly: true
- type: string
- description: The ID of the user that created and owns the token.
- user:
- readOnly: true
- type: string
- description: The name of the user that created and owns the token.
- org:
- readOnly: true
- type: string
- description: The name of the organization that the token is scoped to.
- links:
- type: object
- readOnly: true
- example:
- self: /api/v2/authorizations/1
- user: /api/v2/users/12
- properties:
- self:
- readOnly: true
- $ref: '#/components/schemas/Link'
- user:
- readOnly: true
- $ref: '#/components/schemas/Link'
- Authorizations:
- type: object
- properties:
- links:
- readOnly: true
- $ref: '#/components/schemas/Links'
- authorizations:
- type: array
- items:
- $ref: '#/components/schemas/Authorization'
- AuthorizationPostRequest:
- required:
- - orgID
- - permissions
- allOf:
- - $ref: '#/components/schemas/AuthorizationUpdateRequest'
- - type: object
- properties:
- orgID:
- type: string
- description: |
- The ID of the organization that owns the authorization.
- userID:
- type: string
- description: |
- The ID of the user that the authorization is scoped to.
- permissions:
- type: array
- minItems: 1
- description: |
- A list of permissions for an authorization.
- An authorization must have at least one permission.
- items:
- $ref: '#/components/schemas/Permission'
- Permission:
- required:
- - action
- - resource
- properties:
- action:
- type: string
- enum:
- - read
- - write
- resource:
- $ref: '#/components/schemas/Resource'
- Resource:
- type: object
- required:
- - type
- properties:
- type:
- type: string
- enum:
- - authorizations
- - buckets
- - dashboards
- - orgs
- - sources
- - tasks
- - telegrafs
- - users
- - variables
- - scrapers
- - secrets
- - labels
- - views
- - documents
- - notificationRules
- - notificationEndpoints
- - checks
- - dbrp
- - notebooks
- - annotations
- - remotes
- - replications
- - instance
- description: |
- The type of resource.
- In a `permission`, applies the permission to all resources of this type.
- id:
- type: string
- description: |
- The ID of a specific resource.
- In a `permission`, applies the permission to only the resource with this ID.
- name:
- type: string
- description: |
- Optional: A name for the resource.
- Not all resource types have a name field.
- orgID:
- type: string
- description: |
- The ID of the organization that owns the resource.
- In a `permission`, applies the permission to all resources of `type` owned by this organization.
- org:
- type: string
- description: |
- Optional: The name of the organization with `orgID`.
- User:
- properties:
- id:
- readOnly: true
- type: string
- oauthID:
- type: string
- name:
- type: string
- status:
- description: If inactive the user is inactive.
- default: active
- type: string
- enum:
- - active
- - inactive
- required:
- - name
- Users:
- type: object
- properties:
- links:
- type: object
- properties:
- self:
- type: string
- format: uri
- users:
- type: array
- items:
- $ref: '#/components/schemas/UserResponse'
- OnboardingRequest:
- type: object
- properties:
- username:
- type: string
- password:
- type: string
- org:
- type: string
- bucket:
- type: string
- retentionPeriodSeconds:
- type: integer
- format: int64
- retentionPeriodHrs:
- type: integer
- deprecated: true
- description: |
- 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`
- token:
- type: string
- description: |
- Authentication token to set on the initial user. If not specified, the server will generate a token.
- required:
- - username
- - org
- - bucket
- OnboardingResponse:
- type: object
- properties:
- user:
- $ref: '#/components/schemas/UserResponse'
- org:
- $ref: '#/components/schemas/Organization'
- bucket:
- $ref: '#/components/schemas/Bucket'
- auth:
- $ref: '#/components/schemas/Authorization'
- Variable:
- type: object
- required:
- - name
- - orgID
- - arguments
- properties:
- links:
- type: object
- readOnly: true
- properties:
- self:
- type: string
- format: uri
- org:
- type: string
- format: uri
- labels:
- type: string
- format: uri
- id:
- readOnly: true
- type: string
- orgID:
- type: string
- name:
- type: string
- description:
- type: string
- selected:
- type: array
- items:
- type: string
- labels:
- $ref: '#/components/schemas/Labels'
- arguments:
- $ref: '#/components/schemas/VariableProperties'
- createdAt:
- type: string
- format: date-time
- updatedAt:
- type: string
- format: date-time
- Variables:
- type: object
- example:
- variables:
- - id: '1221432'
- name: ':ok:'
- selected:
- - hello
- arguments:
- type: constant
- values:
- - howdy
- - hello
- - hi
- - yo
- - oy
- - id: '1221432'
- name: ':ok:'
- selected:
- - c
- arguments:
- type: map
- values:
- a: fdjaklfdjkldsfjlkjdsa
- b: dfaksjfkljekfajekdljfas
- c: fdjksajfdkfeawfeea
- - id: '1221432'
- name: ':ok:'
- selected:
- - host
- arguments:
- type: query
- query: 'from(bucket: "foo") |> showMeasurements()'
- language: flux
- properties:
- variables:
- type: array
- items:
- $ref: '#/components/schemas/Variable'
- Source:
- type: object
- properties:
- links:
- type: object
- properties:
- self:
- type: string
- query:
- type: string
- health:
- type: string
- buckets:
- type: string
- id:
- type: string
- orgID:
- type: string
- default:
- type: boolean
- name:
- type: string
- type:
- type: string
- enum:
- - v1
- - v2
- - self
- url:
- type: string
- format: uri
- insecureSkipVerify:
- type: boolean
- telegraf:
- type: string
- token:
- type: string
- username:
- type: string
- password:
- type: string
- sharedSecret:
- type: string
- metaUrl:
- type: string
- format: uri
- defaultRP:
- type: string
- languages:
- type: array
- readOnly: true
- items:
- type: string
- enum:
- - flux
- - influxql
- Sources:
- type: object
- properties:
- links:
- type: object
- properties:
- self:
- type: string
- format: uri
- sources:
- type: array
- items:
- $ref: '#/components/schemas/Source'
- ScraperTargetRequest:
- type: object
- properties:
- name:
- type: string
- description: The name of the scraper target.
- type:
- type: string
- description: The type of the metrics to be parsed.
- enum:
- - prometheus
- url:
- type: string
- description: The URL of the metrics endpoint.
- example: 'http://localhost:9090/metrics'
- orgID:
- type: string
- description: The organization ID.
- bucketID:
- type: string
- description: The ID of the bucket to write to.
- allowInsecure:
- type: boolean
- description: Skip TLS verification on endpoint.
- default: false
- ScraperTargetResponse:
- type: object
- allOf:
- - $ref: '#/components/schemas/ScraperTargetRequest'
- - type: object
- properties:
- id:
- type: string
- readOnly: true
- org:
- type: string
- description: The name of the organization.
- bucket:
- type: string
- description: The bucket name.
- links:
- type: object
- readOnly: true
- example:
- self: /api/v2/scrapers/1
- owners: /api/v2/scrapers/1/owners
- members: /api/v2/scrapers/1/members
- bucket: /api/v2/buckets/1
- organization: /api/v2/orgs/1
- properties:
- self:
- $ref: '#/components/schemas/Link'
- members:
- $ref: '#/components/schemas/Link'
- owners:
- $ref: '#/components/schemas/Link'
- bucket:
- $ref: '#/components/schemas/Link'
- organization:
- $ref: '#/components/schemas/Link'
- ScraperTargetResponses:
- type: object
- properties:
- configurations:
- type: array
- items:
- $ref: '#/components/schemas/ScraperTargetResponse'
- MetadataBackup:
- type: object
- properties:
- kv:
- type: string
- format: binary
- sql:
- type: string
- format: binary
- buckets:
- $ref: '#/components/schemas/BucketMetadataManifests'
- required:
- - kv
- - sql
- - buckets
- BucketMetadataManifests:
- type: array
- items:
- $ref: '#/components/schemas/BucketMetadataManifest'
- BucketMetadataManifest:
- type: object
- properties:
- organizationID:
- type: string
- organizationName:
- type: string
- bucketID:
- type: string
- bucketName:
- type: string
- description:
- type: string
- defaultRetentionPolicy:
- type: string
- retentionPolicies:
- $ref: '#/components/schemas/RetentionPolicyManifests'
- required:
- - organizationID
- - organizationName
- - bucketID
- - bucketName
- - defaultRetentionPolicy
- - retentionPolicies
- RetentionPolicyManifests:
- type: array
- items:
- $ref: '#/components/schemas/RetentionPolicyManifest'
- RetentionPolicyManifest:
- type: object
- properties:
- name:
- type: string
- replicaN:
- type: integer
- duration:
- type: integer
- format: int64
- shardGroupDuration:
- type: integer
- format: int64
- shardGroups:
- $ref: '#/components/schemas/ShardGroupManifests'
- subscriptions:
- $ref: '#/components/schemas/SubscriptionManifests'
- required:
- - name
- - replicaN
- - duration
- - shardGroupDuration
- - shardGroups
- - subscriptions
- ShardGroupManifests:
- type: array
- items:
- $ref: '#/components/schemas/ShardGroupManifest'
- ShardGroupManifest:
- type: object
- properties:
- id:
- type: integer
- format: int64
- startTime:
- type: string
- format: date-time
- endTime:
- type: string
- format: date-time
- deletedAt:
- type: string
- format: date-time
- truncatedAt:
- type: string
- format: date-time
- shards:
- $ref: '#/components/schemas/ShardManifests'
- required:
- - id
- - startTime
- - endTime
- - shards
- ShardManifests:
- type: array
- items:
- $ref: '#/components/schemas/ShardManifest'
- ShardManifest:
- type: object
- properties:
- id:
- type: integer
- format: int64
- shardOwners:
- $ref: '#/components/schemas/ShardOwners'
- required:
- - id
- - shardOwners
- ShardOwners:
- type: array
- items:
- $ref: '#/components/schemas/ShardOwner'
- ShardOwner:
- type: object
- properties:
- nodeID:
- type: integer
- format: int64
- description: The ID of the node that owns the shard.
- required:
- - nodeID
- SubscriptionManifests:
- type: array
- items:
- $ref: '#/components/schemas/SubscriptionManifest'
- SubscriptionManifest:
- type: object
- properties:
- name:
- type: string
- mode:
- type: string
- destinations:
- type: array
- items:
- type: string
- required:
- - name
- - mode
- - destinations
- RestoredBucketMappings:
- type: object
- properties:
- id:
- description: New ID of the restored bucket
- type: string
- name:
- type: string
- shardMappings:
- $ref: '#/components/schemas/BucketShardMappings'
- required:
- - id
- - name
- - shardMappings
- BucketShardMappings:
- type: array
- items:
- $ref: '#/components/schemas/BucketShardMapping'
- BucketShardMapping:
- type: object
- properties:
- oldId:
- type: integer
- format: int64
- newId:
- type: integer
- format: int64
- required:
- - oldId
- - newId
- Config:
- type: object
- properties:
- config:
- type: object
- RemoteConnection:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- orgID:
- type: string
- description:
- type: string
- remoteURL:
- type: string
- format: uri
- remoteOrgID:
- type: string
- allowInsecureTLS:
- type: boolean
- default: false
- required:
- - id
- - name
- - orgID
- - remoteURL
- - remoteOrgID
- - allowInsecureTLS
- RemoteConnections:
- type: object
- properties:
- remotes:
- type: array
- items:
- $ref: '#/components/schemas/RemoteConnection'
- RemoteConnectionCreationRequest:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- orgID:
- type: string
- remoteURL:
- type: string
- format: uri
- remoteAPIToken:
- type: string
- remoteOrgID:
- type: string
- allowInsecureTLS:
- type: boolean
- default: false
- required:
- - name
- - orgID
- - remoteURL
- - remoteAPIToken
- - remoteOrgID
- - allowInsecureTLS
- RemoteConnectionUpdateRequest:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- remoteURL:
- type: string
- format: uri
- remoteAPIToken:
- type: string
- remoteOrgID:
- type: string
- allowInsecureTLS:
- type: boolean
- default: false
- Replication:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- description:
- type: string
- orgID:
- type: string
- remoteID:
- type: string
- localBucketID:
- type: string
- remoteBucketID:
- type: string
- remoteBucketName:
- type: string
- maxQueueSizeBytes:
- type: integer
- format: int64
- currentQueueSizeBytes:
- type: integer
- format: int64
- latestResponseCode:
- type: integer
- latestErrorMessage:
- type: string
- dropNonRetryableData:
- type: boolean
- required:
- - id
- - name
- - remoteID
- - orgID
- - localBucketID
- - maxQueueSizeBytes
- - currentQueueSizeBytes
- Replications:
- type: object
- properties:
- replications:
- type: array
- items:
- $ref: '#/components/schemas/Replication'
- ReplicationCreationRequest:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- orgID:
- type: string
- remoteID:
- type: string
- localBucketID:
- type: string
- remoteBucketID:
- type: string
- remoteBucketName:
- type: string
- maxQueueSizeBytes:
- type: integer
- format: int64
- minimum: 33554430
- default: 67108860
- dropNonRetryableData:
- type: boolean
- default: false
- maxAgeSeconds:
- type: integer
- format: int64
- minimum: 0
- default: 604800
- required:
- - name
- - orgID
- - remoteID
- - localBucketID
- - maxQueueSizeBytes
- - maxAgeSeconds
- ReplicationUpdateRequest:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- remoteID:
- type: string
- remoteBucketID:
- type: string
- remoteBucketName:
- type: string
- maxQueueSizeBytes:
- type: integer
- format: int64
- minimum: 33554430
- dropNonRetryableData:
- type: boolean
- maxAgeSeconds:
- type: integer
- format: int64
- minimum: 0
- Tasks:
- type: object
- properties:
- links:
- readOnly: true
- $ref: '#/components/schemas/Links'
- tasks:
- type: array
- items:
- $ref: '#/components/schemas/Task'
- Task:
- type: object
- properties:
- id:
- readOnly: true
- type: string
- orgID:
- description: The ID of the organization that owns the task.
- type: string
- org:
- description: The name of the organization that owns the task.
- type: string
- name:
- description: The name of the task.
- type: string
- ownerID:
- description: The ID of the user who owns the Task.
- type: string
- description:
- description: The description of the task.
- type: string
- status:
- $ref: '#/components/schemas/TaskStatusType'
- labels:
- $ref: '#/components/schemas/Labels'
- authorizationID:
- description: The ID of the authorization used when the task communicates with the query engine.
- type: string
- flux:
- description: The Flux script that the task runs.
- type: string
- every:
- 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.'
- type: string
- format: duration
- cron:
- 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.'
- type: string
- offset:
- 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.'
- type: string
- format: duration
- latestCompleted:
- 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.'
- type: string
- format: date-time
- readOnly: true
- lastRunStatus:
- readOnly: true
- type: string
- enum:
- - failed
- - success
- - canceled
- lastRunError:
- readOnly: true
- type: string
- createdAt:
- type: string
- format: date-time
- readOnly: true
- updatedAt:
- type: string
- format: date-time
- readOnly: true
- links:
- type: object
- readOnly: true
- example:
- self: /api/v2/tasks/1
- owners: /api/v2/tasks/1/owners
- members: /api/v2/tasks/1/members
- labels: /api/v2/tasks/1/labels
- runs: /api/v2/tasks/1/runs
- logs: /api/v2/tasks/1/logs
- properties:
- self:
- $ref: '#/components/schemas/Link'
- owners:
- $ref: '#/components/schemas/Link'
- members:
- $ref: '#/components/schemas/Link'
- runs:
- $ref: '#/components/schemas/Link'
- logs:
- $ref: '#/components/schemas/Link'
- labels:
- $ref: '#/components/schemas/Link'
- required:
- - id
- - name
- - orgID
- - flux
- TaskCreateRequest:
- type: object
- properties:
- orgID:
- description: The ID of the organization that owns this Task.
- type: string
- org:
- description: The name of the organization that owns this Task.
- type: string
- status:
- $ref: '#/components/schemas/TaskStatusType'
- flux:
- description: The Flux script to run for this task.
- type: string
- description:
- description: An optional description of the task.
- type: string
- required:
- - flux
- TaskUpdateRequest:
- type: object
- properties:
- status:
- $ref: '#/components/schemas/TaskStatusType'
- flux:
- description: The Flux script that the task runs.
- type: string
- name:
- description: Update the 'name' option in the flux script.
- type: string
- every:
- description: Update the 'every' option in the flux script.
- type: string
- cron:
- description: Update the 'cron' option in the flux script.
- type: string
- offset:
- description: Update the 'offset' option in the flux script.
- type: string
- description:
- description: Update the description of the task.
- type: string
- responses:
- AuthorizationError:
- description: |
- Unauthorized. The error may indicate one of the following:
- * The `Authorization: Token` header is missing or malformed.
- * The API token value is missing from the header.
- * The token doesn't have sufficient permissions to write to this organization and bucket.
- content:
- application/json:
- schema:
- properties:
- code:
- description: |
- The HTTP status code description. Default is `unauthorized`.
- readOnly: true
- type: string
- enum:
- - unauthorized
- message:
- readOnly: true
- description: A human-readable message that may contain detail about the error.
- type: string
- examples:
- tokenNotAuthorized:
- summary: Token is not authorized to access a resource
- value:
- code: unauthorized
- message: unauthorized access
- BadRequestError:
- description: |
- Bad request.
- The response body contains detail about the error.
- #### InfluxDB OSS
- - Returns this error if an incorrect value is passed for `org` or `orgID`.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- orgProvidedNotFound:
- summary: The org or orgID passed doesn't own the token passed in the header
- value:
- code: invalid
- message: 'failed to decode request body: organization not found'
- GeneralServerError:
- description: Non 2XX error response from server.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- InternalServerError:
- description: |
- Internal server error.
- The server encountered an unexpected situation.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- ResourceNotFoundError:
- description: |
- Not found.
- A requested resource was not found.
- The response body contains the requested resource type and the name value
- (if you passed it)--for example:
- - `"organization name \"my-org\" not found"`
- - `"organization not found"`: indicates you passed an ID that did not match
- an organization.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- examples:
- org-not-found:
- summary: Organization name not found
- value:
- code: not found
- message: organization name "my-org" not found
- bucket-not-found:
- summary: Bucket name not found
- value:
- code: not found
- message: bucket "air_sensor" not found
- orgID-not-found:
- summary: Organization ID not found
- value:
- code: not found
- message: organization not found
- securitySchemes:
- TokenAuthentication:
- type: apiKey
- name: Authorization
- in: header
- description: |
- Use the [Token authentication](#section/Authentication/TokenAuthentication)
- scheme to authenticate to the InfluxDB API.
- In your API requests, send an `Authorization` header.
- For the header value, provide the word `Token` followed by a space and an InfluxDB API token.
- The word `Token` is case-sensitive.
- ### Syntax
- `Authorization: Token YOUR_INFLUX_API_TOKEN`
- For more information and examples, see the following:
- - [`/authorizations`](#tag/Authorizations) endpoint.
- - [Authorize API requests](https://docs.influxdata.com/influxdb/v2.3/api-guide/api_intro/#authentication).
- - [Manage API tokens](https://docs.influxdata.com/influxdb/v2.3/security/tokens/).
- BasicAuthentication:
- type: http
- scheme: basic
- description: |
- Use the HTTP Basic authentication scheme for InfluxDB `/api/v2` API operations that support it.
- Username and password schemes require the following credentials:
- - **username**
- - **password**
- security:
- - TokenAuthentication: []
|