1 Star 0 Fork 52

欧宏峰 / 咸鱼云网盘后端

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
咸鱼云PostmanAPI文档.json 159.56 KB
一键复制 编辑 原始数据 按行查看 历史
老咸鱼 提交于 2023-01-13 00:25 . feat 实现留言板功能
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893
{
"info": {
"_postman_id": "b8e56f77-b8f8-40ea-8288-d2f5a7e6987a",
"name": "咸鱼云Java版",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "12016898"
},
"item": [
{
"name": "账号模块",
"item": [
{
"name": "注册与找回",
"item": [
{
"name": "注册用户",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "user",
"value": "xiaotao233666",
"contentType": "用户名",
"description": "用户名",
"type": "text"
},
{
"key": "passwd",
"value": "123123123",
"contentType": "密码",
"description": "密码",
"type": "text"
},
{
"key": "regcode",
"value": "cjqec",
"contentType": "注册码或邮箱验证码",
"description": "注册邀请码",
"type": "text"
},
{
"key": "email",
"value": "mjt233@qq.com",
"contentType": "邮箱",
"type": "text"
},
{
"key": "validEmail",
"value": "1",
"contentType": "验证邮箱(即通过邮箱验证码方式注册)",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user",
"host": [
"{{addr}}"
],
"path": [
"api",
"user"
]
},
"description": "用户自主注册接口\n\n* URI: `/api/user/`\n* 动作:POST\n \n\n### 请求体参数\n\n* user 用户名\n* passwd 登录密码\n* regcode 注册邀请码,如果是管理员用户请求该接口,则不需要填写邀请码。若使用邮箱注册,该字段则使用邮箱验证码。\n* email 邮箱,邮箱注册方式需要填写这个字段。若使用邀请码方式注册,该字段不会被处理\n* type 用户类型 1 - 管理员,0 - 普通用户,只有当管理员用户调用该字段时才有效\n* validEmail 是否使用邮箱方式注册 true - 是,false - 邀请码注册。使用邮箱方式注册时会验证email字段的有效性"
},
"response": []
},
{
"name": "发送注册验证码",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "email",
"value": "mjt233@qq.com",
"description": "接收邮件的地址",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user/regcode",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"regcode"
]
}
},
"response": []
},
{
"name": "发送密码重置验证码",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "account",
"value": "mjt233@qq.com",
"description": "要找回密码的账号的用户名或邮箱",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user/sendResetPasswordEmail",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"sendResetPasswordEmail"
]
},
"description": "# 发送密码重置验证码\r\n用于用户忘记密码的情况下,需要重置密码时发送\r\n\r\n- URL: `/api/user/sendResetPasswordEmail`\r\n- 方法:post\r\n\r\n## 表单参数\r\n\r\n- account 要找回密码的账号的用户名或邮箱"
},
"response": []
},
{
"name": "重置密码(忘记密码)",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "account",
"value": "mjt233@qq.com",
"description": "被重置的账号的邮箱或用户名",
"type": "text"
},
{
"key": "code",
"value": "123123",
"description": "邮箱验证码",
"type": "text"
},
{
"key": "password",
"value": "123123123123",
"description": "新密码",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user/resetPassword",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"resetPassword"
]
},
"description": "# 因忘记密码而重置密码\r\n\r\n- URL: `/api/user/resetPassword`\r\n- 方法:post\r\n\r\n## 表单参数\r\n- account 被重置的账号的用户名或账号的邮箱\r\n- code 邮箱验证码\r\n- password 新密码"
},
"response": []
}
]
},
{
"name": "基本操作与基本信息",
"item": [
{
"name": "取用户信息",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "passwd",
"value": "mojintao233",
"type": "text"
},
{
"key": "user",
"value": "xiaotao",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user",
"host": [
"{{addr}}"
],
"path": [
"api",
"user"
]
},
"description": "获取用户信息\r\n- URI: `/api/user/`\r\n- 动作:GET\r\n\r\n### 响应\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": {\r\n \"id\": 42,\r\n \"user\": \"xiaotao\",\r\n \"type\": 1, // 1为管理员,0为普通用户\r\n \"quota\": 10 // 私人空间配额(GiB)\r\n },\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": [
{
"name": "取用户信息",
"originalRequest": {
"method": "GET",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "passwd",
"value": "mojintao233",
"type": "text"
},
{
"key": "user",
"value": "xiaotao",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user",
"host": [
"{{addr}}"
],
"path": [
"api",
"user"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Sat, 25 Dec 2021 13:58:11 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n \"id\": 1,\n \"user\": \"admin\",\n \"type\": 1,\n \"quota\": 10,\n \"email\": \"\"\n },\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "上传用户头像",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"type": "file",
"src": "/C:/Users/12079/Desktop/avatar.jpg"
}
]
},
"url": {
"raw": "{{addr}}/api/user/avatar",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"avatar"
]
},
"description": "上传用户头像\r\n- URI: `/api/user/avatar`\r\n- 动作:POST\r\n\r\n### 请求体参数\r\n- file 头像文件"
},
"response": []
},
{
"name": "获取用户头像",
"protocolProfileBehavior": {
"followRedirects": true
},
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/user/avatar/xiaotao",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"avatar",
"xiaotao"
]
},
"description": "获取用户头像\r\n- URI: `/api/user/avatar`或`/api/user/avater/{用户名}`\r\n- 动作:GET\r\n\r\n### 响应\r\n直接响应文件"
},
"response": []
},
{
"name": "获取空间配额使用情况",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/user/quota",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"quota"
]
},
"description": "描述:查询已登录用户的空间配额使用情况 \r\n- URI: `/api/user/quota` \r\n- 动作:GET\r\n\r\n#### 响应data样例 \r\n```json\r\n{\r\n // 单位均为字节(Byte)\r\n \"used\": 114514, // 已用空间\r\n \"quota\": 10737418240 // 总配额\r\n}\r\n```"
},
"response": []
},
{
"name": "修改密码",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "old",
"value": "233333",
"type": "text"
},
{
"key": "new",
"value": "123123123",
"type": "text"
},
{
"key": "force",
"value": "true",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user/51/passwd",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"51",
"passwd"
]
},
"description": "修改用户的密码\r\n- URI: `/api/user/{uid}/passwd`\r\n- 动作:POST\r\n\r\n### URI参数\r\n- uid 被操作的用户ID(非管理员用户只允许操作自己)\r\n\r\n### 表单参数\r\n- old 旧密码\r\n- new 新密码\r\n- force 强制重置,只允许管理员使用,可无视旧密码直接重置密码"
},
"response": []
},
{
"name": "登录",
"event": [
{
"listen": "test",
"script": {
"exec": [
"let res = JSON.parse(responseBody)\r",
"if (pm.response.code === 200) {\r",
" pm.environment.set(\"token\", res.data)\r",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": []
},
"url": {
"raw": "{{addr}}/api/user/token?user=admin&passwd=admin666",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"token"
],
"query": [
{
"key": "user",
"value": "admin"
},
{
"key": "passwd",
"value": "admin666"
}
]
},
"description": "获取token以登录,在后续请求中将此token放于名为`Token`的header字段中实现身份鉴权\r\n- URI: `/api/user/token`\r\n- 动作:POST\r\n\r\n### 参数\r\n- user 用户名\r\n- passwd 密码"
},
"response": []
},
{
"name": "更新token",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "kick",
"value": "false",
"description": "是否踢旧token下线,默认true",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user/updateToken",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"updateToken"
]
}
},
"response": []
}
]
},
{
"name": "邮箱改绑",
"item": [
{
"name": "设置绑定新邮箱",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "email",
"value": "mjt233@qq.com",
"description": "要绑定的新邮箱",
"type": "text"
},
{
"key": "originCode",
"value": "axjsz",
"description": "旧邮箱验证码",
"type": "text"
},
{
"key": "newCode",
"value": "asdasd",
"description": "新邮箱验证码",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user/newMail",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"newMail"
]
},
"description": "# 绑定新邮箱之前,\r\n- URL: `/api/user/newMail`\r\n- 方法:post\r\n\r\n## 表单参数\r\n- email 要绑定的新邮箱\r\n- originCode 旧邮箱验证码,若先前未绑定则不需要该参数\r\n- newCode 新邮箱验证码"
},
"response": []
},
{
"name": "发送新邮箱验证码",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "email",
"value": "mjt233@qq.com",
"description": "要绑定的新邮箱",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user/sendBindEmail",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"sendBindEmail"
]
},
"description": "# 验证旧邮箱之后,继续验证新邮箱是否有效\r\n- URL: `/api/user/sendBindEmail`\r\n- 方法:post\r\n\r\n## 表单参数\r\n- email 要绑定的新邮箱\r\n\r\n方法调用后会向新邮箱发送验证码。\r\n若新邮箱已在系统中被使用则调用失败。"
},
"response": []
},
{
"name": "发送旧邮箱验证码",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": []
},
"url": {
"raw": "{{addr}}/api/user/sendVerifyEmail",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"sendVerifyEmail"
]
},
"description": "# 绑定新邮箱之前,先验证旧邮箱是否有效\r\n- URL: `/api/user/sendVerifyEmail`\r\n- 方法:post\r\n\r\n调用成功后会向用户的邮箱发送验证码。\r\n若用户未设置邮箱则无需调用。"
},
"response": []
},
{
"name": "验证旧邮箱验证码是否正确",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "code",
"value": "123123",
"description": "验证码",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user/verifyEmail",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"verifyEmail"
]
},
"description": "# 用于校验旧邮箱验证码是否正确\n正确响应200,否则400,该API通常用于在设置绑定新邮箱之前提前对旧邮箱验证码继续校验。\n\n通过后再进行下一步的新邮箱验证\n\n- URL: `/api/user/sendVerifyEmail`\n- 方法:post\n\n调用成功后会向用户的邮箱发送验证码。\n若用户未设置邮箱则无需调用。"
},
"response": []
}
]
}
]
},
{
"name": "系统资源操作",
"item": [
{
"name": "断点续传任务",
"item": [
{
"name": "创建断点续传任务",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "{{addr}}/api/breakpoint?fileName=test.mp4&length=2097153&chunkSize=3024000",
"host": [
"{{addr}}"
],
"path": [
"api",
"breakpoint"
],
"query": [
{
"key": "fileName",
"value": "test.mp4",
"description": "文件名"
},
{
"key": "length",
"value": "2097153",
"description": "文件长度"
},
{
"key": "chunkSize",
"value": "3024000"
}
]
},
"description": "创建断点续传任务\r\n\r\n- URI:`/api/breakpoint/`\r\n- 动作:POST\r\n\r\n### 参数\r\n- fileName - 文件名\r\n- length - 文件长度\r\n\r\n### 响应\r\n创建成功后响应任务信息\r\n```json\r\n{\r\n \"taskId\": \"67ab0bc9-92d0-4b4c-ae22-f9e4b4196bec\", // 任务ID\r\n \"fileName\": \"test.mp4\", // 文件名\r\n \"length\": 2097153, // 文件长度\r\n \"chunkSize\": 2097152, // 每分块长度\r\n \"chunkCount\": 2 // 总分块数量\r\n}\r\n```"
},
"response": []
},
{
"name": "获取任务信息",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/breakpoint?id=b2c1ad18-6b93-4da3-872a-4f82dfeb0a8f",
"host": [
"{{addr}}"
],
"path": [
"api",
"breakpoint"
],
"query": [
{
"key": "id",
"value": "b2c1ad18-6b93-4da3-872a-4f82dfeb0a8f",
"description": "任务ID"
}
]
},
"description": "获取断点续传任务的详细信息\r\n\r\n- URI:`/api/breakpoint/`\r\n- 动作:GET\r\n\r\n### 参数\r\n- id - 要查询的任务ID\r\n\r\n### 响应\r\n创建成功后响应任务信息\r\n```json\r\n{\r\n \"taskId\": \"67ab0bc9-92d0-4b4c-ae22-f9e4b4196bec\", // 任务ID\r\n \"fileName\": \"test.mp4\", // 文件名\r\n \"length\": 2097153, // 文件长度\r\n \"chunkSize\": 2097152, // 每分块长度\r\n \"chunkCount\": 2 // 总分块数量\r\n}\r\n```"
},
"response": []
},
{
"name": "结束断点续传任务",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{addr}}/api/breakpoint?id=b2c1ad18-6b93-4da3-872a-4f82dfeb0a8f",
"host": [
"{{addr}}"
],
"path": [
"api",
"breakpoint"
],
"query": [
{
"key": "id",
"value": "b2c1ad18-6b93-4da3-872a-4f82dfeb0a8f",
"description": "任务ID"
}
]
},
"description": "结束断点续传任务,操作将使服务器释放对应的资源,同时会导致该断点续传任务不再可用\r\n\r\n- URI:`/api/breakpoint/`\r\n- 动作:DELETE\r\n\r\n### 参数:\r\n- id - 要结束的任务ID"
},
"response": []
},
{
"name": "上传文件片段",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"type": "file",
"src": "/D:/game/mc/脚本启动.bat"
}
]
},
"url": {
"raw": "{{addr}}/api/breakpoint/9eb03bf5-2d61-4e3d-bb50-6e3179407c1b/1",
"host": [
"{{addr}}"
],
"path": [
"api",
"breakpoint",
"9eb03bf5-2d61-4e3d-bb50-6e3179407c1b",
"1"
]
},
"description": "上传文件片段到断点续传任务\r\n\r\n- URI:`/api/breakpoint/{taskId}/{part}`\r\n- 动作:POST\r\n\r\n### URL参数\r\n- taskId 断点续传任务ID\r\n- part 本次上传的文件块编号,可以使用范围,如:3-6表示这个文件是文件块3,4,5,6的部分"
},
"response": []
}
]
},
{
"name": "解析节点ID",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/resource/42/path/root",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"42",
"path",
"root"
]
},
"description": "用于将节点ID解析为网盘路径,因为搜索文件接口返回的结果中,只有文件所处的节点ID或节点本身的ID,进一步访问需要得知该资源的网盘路径。\r\n\r\n- URI: `/api/resource/{uid}/path/{nodeId}`\r\n- 动作:GET \r\n\r\n### URI参数\r\n- uid 用户ID \r\n- nodeId 节点ID\r\n\r\n#### 响应\r\n```json\r\n{\r\n \"code\":1,\r\n \"data\": \"/this/is/a/path\",\r\n \"msg\": \"ok\"\r\n}\r\n```"
},
"response": []
},
{
"name": "使用下载码下载文件",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/resource/0/fileContentByFDC/eyJhbGciOiJIUzI1NiJ9.eyJkYXRhIjoie1wibmFtZVwiOlwicGhvdG8xLnBuZ1wiLFwibWQ1XCI6XCJmZjljMTk4ZTNjZDFkNmU5NDg2OTgzNTU5OTJmMmZjM1wiLFwic2l6ZVwiOjAsXCJ1aWRcIjo0MixcImRpclwiOlwiL2ZvbGRlcjFcIixcInN1ZmZpeFwiOlwicG5nXCJ9IiwiZXhwIjoxNjIwNjYyNjE2LCJpYXQiOjE2MjA1NzYyMTZ9.mSdg9kS4xsStn4g8vUOdJJBv4VcVNWL0TratxkrQ86o",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"0",
"fileContentByFDC",
"eyJhbGciOiJIUzI1NiJ9.eyJkYXRhIjoie1wibmFtZVwiOlwicGhvdG8xLnBuZ1wiLFwibWQ1XCI6XCJmZjljMTk4ZTNjZDFkNmU5NDg2OTgzNTU5OTJmMmZjM1wiLFwic2l6ZVwiOjAsXCJ1aWRcIjo0MixcImRpclwiOlwiL2ZvbGRlcjFcIixcInN1ZmZpeFwiOlwicG5nXCJ9IiwiZXhwIjoxNjIwNjYyNjE2LCJpYXQiOjE2MjA1NzYyMTZ9.mSdg9kS4xsStn4g8vUOdJJBv4VcVNWL0TratxkrQ86o"
]
},
"description": "用于需要免登录验证而又保护用户认证信息的情况下下载文件,比如 使用外部下载器,分享好友等\r\n\r\n- URI:`/api/resource/0/fileContentByFDC/{下载码}`\r\n- 动作:GET\r\n\r\n下载码通过'获取文件下载码'接口获得\r\n\r\n### 响应\r\n直接响应文件"
},
"response": []
},
{
"name": "获取文件下载码",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "formdata",
"formdata": []
},
"url": {
"raw": "{{addr}}/api/resource/42/FDC/folder1?md5=ff9c198e3cd1d6e948698355992f2fc3&name=photo1.png",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"42",
"FDC",
"folder1"
],
"query": [
{
"key": "md5",
"value": "ff9c198e3cd1d6e948698355992f2fc3",
"description": "目标文件的MD5(当服务器采用唯一存储方式时,该值必须正确)"
},
{
"key": "name",
"value": "photo1.png",
"description": "目标文件名"
}
]
},
"description": "获取某个文件的下载码,使用下载码可用于免登录在外部工具下载或分享他人 \r\n- URI:`/api/resource/{用户ID}/FDC/{文件所在路径}` \r\n- 动作:GET\r\n\r\n#### 参数列表\r\n- md5: 文件的MD5(当服务器使用原始文件结构存储文件时,该项不起作用)\r\n- name:文件名 \r\n\r\n#### 响应data\r\n- 下载码,用于'使用下载码下载文件'接口"
},
"response": []
},
{
"name": "使用MD5下载文件",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/resource/50/fileContentByMD5/bd68e6b2312bb88889809df88641bbb0",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"50",
"fileContentByMD5",
"bd68e6b2312bb88889809df88641bbb0"
]
},
"description": "通过文件MD5下载网盘中的文件而无需关注文件位置和所属用户\r\n\r\n- URI:`/api/resource/{uid}/fileContentByMD5/{md5}/{name}`\r\n- 动作:GET\r\n\r\nURI参数:\r\n- uid 用户id,任意int型整数均可,此为占位参数,不起作用但必须传入\r\n- md5 文件md5值\r\n- name 文件名,可选参数,不影响服务器响应。可用于wget等工具方便识别文件名\r\n\r\n### 响应\r\n直接响应文件"
},
"response": []
},
{
"name": "取路径对应节点ID",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/resource/1/node/我的收集/新建文件夹/新建文件夹133",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"1",
"node",
"我的收集",
"新建文件夹",
"新建文件夹133"
]
},
"description": "# 获取路径途径的所有节点信息\n\n- URL: /api/resource/{uid}/node/{path}\n- 方法: GET\n\n## URL参数\n- uid:用户ID\n- path: 请求的完整路径\n\n## 响应\n```json\n{\n \"code\": 200,\n \"data\": [\n {\n \"name\": \"我的收集\", // 根节点\n \"uid\": 1,\n \"id\": \"84148bb27433475fa86dc5c6df776cba\",\n \"parent\": \"1\",\n \"rootNode\": true\n },\n {\n \"name\": \"新建文件夹\",\n \"uid\": 1,\n \"id\": \"36436ff784c4408a9a1571aeed12456b\",\n \"parent\": \"84148bb27433475fa86dc5c6df776cba\",\n \"rootNode\": false\n },\n {\n \"name\": \"新建文件夹133\", // 最后一级\n \"uid\": 1,\n \"id\": \"e6cfaa1b1c42435a91b5c82bea74c4ee\",\n \"parent\": \"36436ff784c4408a9a1571aeed12456b\",\n \"rootNode\": false\n }\n ],\n \"msg\": \"OK\"\n}\n```"
},
"response": [
{
"name": "取路径对应ID",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/resource/1/node/我的收集/新建文件夹/新建文件夹133",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"1",
"node",
"我的收集",
"新建文件夹",
"新建文件夹133"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Sat, 06 Nov 2021 16:54:58 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": [\n {\n \"name\": \"我的收集\",\n \"uid\": 1,\n \"id\": \"84148bb27433475fa86dc5c6df776cba\",\n \"parent\": \"1\",\n \"rootNode\": true\n },\n {\n \"name\": \"新建文件夹\",\n \"uid\": 1,\n \"id\": \"36436ff784c4408a9a1571aeed12456b\",\n \"parent\": \"84148bb27433475fa86dc5c6df776cba\",\n \"rootNode\": false\n },\n {\n \"name\": \"新建文件夹133\",\n \"uid\": 1,\n \"id\": \"e6cfaa1b1c42435a91b5c82bea74c4ee\",\n \"parent\": \"36436ff784c4408a9a1571aeed12456b\",\n \"rootNode\": false\n }\n ],\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "获取文件资源缩略图",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/resource/0/thumbnail/6b454d209e535b566c5e211e625afbc0",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"0",
"thumbnail",
"6b454d209e535b566c5e211e625afbc0"
]
},
"description": "通过文件MD5获取网盘中文件的缩略图\n\n- URI:`/api/resource/{uid}/thumbnail/{md5}`\n- 动作:GET\n\nURI参数:\n- uid 任意数字均可\n- md5 文件md5值\n\n### 响应\n直接响应缩略图文件"
},
"response": []
},
{
"name": "通用文件资源获取接口",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/resource/0/get?targetId=3&protocol=share&path=/&name=10.【1】中村由利子 - 火宵の月・テーマ~ピアノソロ.jpg&isThumbnail=true&vid=f56dc279a40f4b3c8e53ddddb9686df0&code=jXeY",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"0",
"get"
],
"query": [
{
"key": "targetId",
"value": "3",
"description": "目标资源id"
},
{
"key": "protocol",
"value": "share",
"description": "main-主存储服务,share-文件分享"
},
{
"key": "path",
"value": "/",
"description": "资源所处路径"
},
{
"key": "name",
"value": "10.【1】中村由利子 - 火宵の月・テーマ~ピアノソロ.jpg",
"description": "文件名"
},
{
"key": "isThumbnail",
"value": "true",
"description": "是否为获取缩略图"
},
{
"key": "vid",
"value": "f56dc279a40f4b3c8e53ddddb9686df0",
"description": "文件分享的额外参数-校验id"
},
{
"key": "code",
"value": "jXeY",
"description": "文件分享的额外参数-提取码"
}
]
}
},
"response": []
}
]
},
{
"name": "网盘文件操作",
"item": [
{
"name": "基本操作",
"item": [
{
"name": "直接下载网盘文件",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/diskFile/42/content/folder1/photo1.png",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"42",
"content",
"folder1",
"photo1.png"
]
},
"description": "## 从网盘中获取一个文件内容 \r\n- URI:`/api/diskFile/{uid}/{文件路径}`\r\n- 动作:GET/POST\r\n\r\n要注意的是,使用该接口下载文件需要在header或表单中传递Token,在浏览器中可使用POST提交带Token的表单实现下载\r\n\r\n### 响应\r\n直接响应文件"
},
"response": []
},
{
"name": "取文件列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/diskFile/0/fileList/byPath/软件工具/网络工具",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"0",
"fileList",
"byPath",
"软件工具",
"网络工具"
]
},
"description": "获取网盘中的文件列表 \r\n- URI:`/api/diskFile/{用户id}/fileList/byPath/{请求的路径} ` \r\n- 动作:GET \r\n\r\n响应示例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": [\r\n [\r\n {\r\n \"name\": \"网络分析与抓包\",\r\n \"md5\": \"334ca18030b781d171b5b65cf5f42388\",\r\n \"type\": 1,\r\n \"size\": -1,\r\n \"node\": \"ed71dfc52b1cbf4237e69e6333bde461\",\r\n \"created_at\": \"2021-05-08T17:06:01.000+00:00\",\r\n \"formatModified\": \"2021-05-09 01:06:01\",\r\n \"suffix\": \"网络分析与抓包\",\r\n \"dir\": true\r\n }\r\n ],\r\n [\r\n {\r\n \"name\": \"Postman-win64-7.26.0-Setup.exe\",\r\n \"md5\": \"6ad1d3fdfd37f78284ac6a111eaddac2\",\r\n \"type\": 2,\r\n \"size\": 90929760,\r\n \"node\": \"ed71dfc52b1cbf4237e69e6333bde461\",\r\n \"created_at\": \"2021-05-08T17:06:01.000+00:00\",\r\n \"formatModified\": \"2021-05-09 01:06:01\",\r\n \"suffix\": \"exe\",\r\n \"dir\": false\r\n }\r\n ]\r\n ],\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": [
{
"name": "取文件列表",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/fileList/0",
"host": [
"{{addr}}"
],
"path": [
"api",
"fileList",
"0"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Mon, 15 Feb 2021 15:16:03 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 1,\n \"data\": [\n [\n {\n \"name\": \"其他\",\n \"size\": -1,\n \"type\": 1,\n \"lastModified\": 1601457910295,\n \"file\": false,\n \"suffix\": \"其他\",\n \"dir\": true,\n \"formatModified\": \"2020-09-30 17:25:10\"\n },\n {\n \"name\": \"图片资源\",\n \"size\": -1,\n \"type\": 1,\n \"lastModified\": 1605077251788,\n \"file\": false,\n \"suffix\": \"图片资源\",\n \"dir\": true,\n \"formatModified\": \"2020-11-11 14:47:31\"\n },\n {\n \"name\": \"安卓APP\",\n \"size\": -1,\n \"type\": 1,\n \"lastModified\": 1601463156268,\n \"file\": false,\n \"suffix\": \"安卓app\",\n \"dir\": true,\n \"formatModified\": \"2020-09-30 18:52:36\"\n },\n {\n \"name\": \"工具软件\",\n \"size\": -1,\n \"type\": 1,\n \"lastModified\": 1601463281242,\n \"file\": false,\n \"suffix\": \"工具软件\",\n \"dir\": true,\n \"formatModified\": \"2020-09-30 18:54:41\"\n },\n {\n \"name\": \"驱动\",\n \"size\": -1,\n \"type\": 1,\n \"lastModified\": 1601468904893,\n \"file\": false,\n \"suffix\": \"驱动\",\n \"dir\": true,\n \"formatModified\": \"2020-09-30 20:28:24\"\n }\n ],\n [\n {\n \"name\": \"autoindex.html\",\n \"size\": 11795,\n \"type\": 2,\n \"lastModified\": 1595249972503,\n \"file\": true,\n \"suffix\": \"html\",\n \"dir\": false,\n \"formatModified\": \"2020-07-20 20:59:32\"\n },\n {\n \"name\": \"web.config\",\n \"size\": 168,\n \"type\": 2,\n \"lastModified\": 1602303497178,\n \"file\": true,\n \"suffix\": \"config\",\n \"dir\": false,\n \"formatModified\": \"2020-10-10 12:18:17\"\n }\n ]\n ],\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "新建文件夹",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "name",
"value": "新建文件夹233",
"description": "文件夹名称",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/diskFile/42/dir/",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"42",
"dir",
""
]
},
"description": "在请求的路径下创建文件夹 \r\n- URI: `/api/diskFile/{用户id}/dir/{目标所在路径}`\r\n- 动作:PUT\r\n\r\n\r\n### 参数:\r\n- name 文件夹名称"
},
"response": []
},
{
"name": "删除文件",
"request": {
"method": "DELETE",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"fileName\": [\r\n \"avatar.jpg\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/diskFile/42/content/",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"42",
"content",
""
]
},
"description": "对某个目录下的多个文件进行删除 \r\n- URI:`/api/diskFile/{uid}/content/{目标所在路径}` \r\n- 动作:DELETE \r\n\r\n#### 请求体\r\n```json\r\n{\r\n \"fileName\": [\r\n \"avatar.jpg\",\r\n \"otherfile\"\r\n ]\r\n}\r\n```\r\n\r\n#### 响应体\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": 3, // 删除的文件和文件夹总数,若为0则表示没有删除任何数据\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": [
{
"name": "删除2个文件",
"originalRequest": {
"method": "DELETE",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"fileName\": [\r\n \"cb85a661e0074edfc2260057807ba16d.jpg\",\r\n \"IMG_20210131_205153_1.jpg\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/resource/1/我的图片",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"1",
"我的图片"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Mon, 15 Feb 2021 15:09:37 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 1,\n \"data\": 2,\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "搜索文件",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/diskFile/42/fileList/byName/photo?page=1",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"42",
"fileList",
"byName",
"photo"
],
"query": [
{
"key": "page",
"value": "1"
}
]
},
"description": "搜索网盘中的文件\r\n- URI:`/api/diskFile/{uid}/fileList/byName/{文件名关键字}` \r\n- 动作:GET\r\n\r\n#### 响应示例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": {\r\n \"total\": 2, // 文件总数\r\n \"list\": [\r\n {\r\n \"name\": \"photo1.png\", // 文件名\r\n \"md5\": \"ff9c198e3cd1d6e948698355992f2fc3\", // 文件MD5\r\n \"size\": 889946, // 文件大小(Byte),文件夹为-1\r\n \"parent\": \"folder2\", // 所在文件夹名称\r\n \"node\": \"de1e955ec96bd60c089d60bc05931032\", // 所在文件夹节点ID\r\n \"created_at\": \"2021-05-10T00:17:10.000+00:00\", // 创建日期\r\n \"formatModified\": \"2021-05-10 08:17:10\", // 修改日期\r\n \"suffix\": \"png\", // 后缀名\r\n \"dir\": false // 是否为文件夹\r\n }\r\n ],\r\n \"pageNum\": 1,\r\n \"pageSize\": 10,\r\n \"size\": 2,\r\n \"startRow\": 1,\r\n \"endRow\": 2,\r\n \"pages\": 1,\r\n \"prePage\": 0,\r\n \"nextPage\": 0,\r\n \"isFirstPage\": true,\r\n \"isLastPage\": true,\r\n \"hasPreviousPage\": false,\r\n \"hasNextPage\": false,\r\n \"navigatePages\": 8,\r\n \"navigatepageNums\": [\r\n 1\r\n ],\r\n \"navigateFirstPage\": 1,\r\n \"navigateLastPage\": 1\r\n },\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": []
},
{
"name": "上传文件",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"description": "文件[当使用断点续传时可为空或不使用]",
"type": "file",
"src": [],
"disabled": true
}
]
},
"url": {
"raw": "{{addr}}/api/diskFile/1/file?breakpoint_id=4f681cb5-1cfc-4210-869c-63222535718f",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"1",
"file"
],
"query": [
{
"key": "breakpoint_id",
"value": "4f681cb5-1cfc-4210-869c-63222535718f"
}
]
},
"description": "将文件上传到网盘,若文件已存在则会覆盖 \n- URI: `/api/diskFile/{用户id}/file/{要上传到的路径}`\n- 动作:PUT \n\n#### QueryString参数\n- breakpoint_id 断点任务ID,当断点续传任务完成后,使用任务ID请求该接口,表示保存\"使用断点续传任务上传文件\"到用户网盘。保存成功后断点续传任务将被销毁\n\n#### body参数:\n- file 类型:文件 当使用断点续传时,可不需要\n注意:请求的路径必须是存在的路径,若不存在需要手动提前创建,否则文件会保存失败\n\n#### 响应data含义\n- 0 - 文件覆盖(同一目录下的同名文件上传导致覆盖)\n- 1 - 新文件上传(上传的文件为新文件)\n- 2 - 文件无修改(同一目录下的同名文件与上传的文件内容相同)"
},
"response": []
},
{
"name": "移动文件",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"target\": \"/folder1\",\r\n \"files\":[\r\n {\r\n \"source\": \"folder2\",\r\n \"target\": \"wow\"\r\n }\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/diskFile/42/fromPath/",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"42",
"fromPath",
""
]
},
"description": "移动多个文件或目录到指定目录下 \r\n- API:`/api/file/move/{用户ID}/{原文件所在路径}` \r\n- 动作:POST\r\n\r\n\r\n\r\n#### 请求体结构\r\n```json\r\n{\r\n \"target\":\"/abcd/\", // 粘贴到的目标目录下\r\n \"files\":[ \r\n {\r\n \"source\":\"文件名\", // 要移动的文件名\r\n \"target\":\"文件名\" // 暂时无用\r\n },\r\n {\r\n \"source\":\"file1\",\r\n \"target\":\"file1\"\r\n }\r\n ]\r\n}\r\n```"
},
"response": []
},
{
"name": "复制文件或目录",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"target\": \"/\",\r\n \"files\":[\r\n {\r\n \"source\": \"folder1\",\r\n \"target\": \"folder2\"\r\n }\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/diskFile/42/fromPath/",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"42",
"fromPath",
""
]
},
"description": "- URI:`/api/diskFile/{用户ID}/fromPath/{原文件所在路径}` \r\n- 动作:POST\r\n\r\n#### 请求体结构\r\n```json\r\n{\r\n \"target\":\"/abcd/\", // 粘贴目录\r\n \"files\":[ // 要操作的文件列表\r\n {\r\n \"source\":\"旧文件名\", // 被复制的文件名\r\n \"target\":\"新文件名\" // 粘贴后的文件名(可重命名)\r\n },\r\n {\r\n \"source\":\"file1\",\r\n \"target\":\"file2\"\r\n }\r\n ]\r\n}\r\n```"
},
"response": []
},
{
"name": "重命名文件或目录",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "oldName",
"value": "photo1.png",
"description": "旧文件名",
"type": "text"
},
{
"key": "newName",
"value": "photo2.png",
"description": "重命名后新文件名",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/diskFile/42/name/folder1",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"42",
"name",
"folder1"
]
},
"description": "- API:`/api/file/rename/{用户ID}/{原文件所在路径}` \r\n- 方法:POST\r\n\r\n### 参数\r\n- oldName 原文件名\r\n- newName 新文件名"
},
"response": []
},
{
"name": "快速保存(秒传)",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "{{addr}}/api/diskFile/15/quickSave?path=/test233&name=啦啦啦.jpg&md5=123",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"15",
"quickSave"
],
"query": [
{
"key": "path",
"value": "/test233",
"description": "文件要保存到的目录"
},
{
"key": "name",
"value": "啦啦啦.jpg",
"description": "文件名"
},
{
"key": "md5",
"value": "123",
"description": "文件MD5"
}
]
},
"description": "# 快速保存(秒传)\n- url: `/api/diskFile/{uid}/quickSave`\n- 方法:POST\n\n## URL参数\n- uid 目标用户\n\n## 表单参数\n- path 文件要保存到的目录\n- name 文件名\n- md5 文件md5\n\n## 响应\n若响应的消息结构中,code为100则标识快速保存未能命中文件,需要上传文件。\ncode为200则表示快速保存成功。\n\n**注意**\n无论code为100还是200,HTTP响应码均为200,code是响应体中json数据的code"
},
"response": [
{
"name": "快速保存(秒传)",
"originalRequest": {
"method": "POST",
"header": [],
"url": {
"raw": "{{addr}}/api/diskFile/15/quickSave?path=/test233&name=啦啦啦.jpg&md5=0d73b405e53a03816376da287d995422",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"15",
"quickSave"
],
"query": [
{
"key": "path",
"value": "/test233",
"description": "文件要保存到的目录"
},
{
"key": "name",
"value": "啦啦啦.jpg",
"description": "文件名"
},
{
"key": "md5",
"value": "0d73b405e53a03816376da287d995422",
"description": "文件MD5"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Wed, 19 Jan 2022 15:42:52 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"data\": null,\n \"code\": 200,\n \"msg\": \"ok\"\n}"
},
{
"name": "失败-快速保存(秒传)",
"originalRequest": {
"method": "POST",
"header": [],
"url": {
"raw": "{{addr}}/api/diskFile/15/quickSave?path=/test233&name=啦啦啦.jpg&md5=123",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"15",
"quickSave"
],
"query": [
{
"key": "path",
"value": "/test233",
"description": "文件要保存到的目录"
},
{
"key": "name",
"value": "啦啦啦.jpg",
"description": "文件名"
},
{
"key": "md5",
"value": "123",
"description": "文件MD5"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Wed, 19 Jan 2022 17:08:06 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"data\": null,\n \"code\": 100,\n \"msg\": \"未命中,请上传\"\n}"
}
]
}
]
},
{
"name": "压缩文件与打包下载",
"item": [
{
"name": "解压压缩包",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "name",
"value": "1.zip",
"description": "压缩文件名称",
"type": "text"
},
{
"key": "dest",
"value": "/unzip",
"description": "要解压到的目标目录",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/diskFile/1/extractArchive/",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"1",
"extractArchive",
""
]
},
"description": "# 解压压缩包\r\n- 描述:将压缩包解压到指定目录(目前只支持不带密码的ZIP) \r\n- URL: `/api/diskFile/{uid}/extracArchive/{path}`\r\n- 方法:`POST`\r\n\r\n## URL参数\r\n- uid: 用户ID\r\n- path: 压缩包所在的目录路径,空则表示在根目录\r\n\r\n## body参数(x-www-form-urlencoded或multipart)\r\n- name 压缩包名称\r\n- dest 解压到的目标目录"
},
"response": []
},
{
"name": "创建多文件打包",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"source\": \"/要下载的文件所在目录\",\r\n \"filenames\": [\r\n \"文件1\",\r\n \"文件2\",\r\n \"文件3\",\r\n \"目录或文件都可以\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/diskFile/1/wrap",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"1",
"wrap"
]
},
"description": "# 创建多文件打包下载任务\n创建一个用于打包下载多个文件的标识符\n- URL:`/api/diskFile/{uid}/wrap`\n- 方法:POST\n\n## URL参数\n- uid - 用户ID\n\n## JSON请求体\n```json\n{\n \"source\": \"/要下载的文件所在目录\",\n \"filenames\": [\n \"文件1\",\n \"文件2\",\n \"文件3\",\n \"目录或文件都可以\"\n ]\n}\n```"
},
"response": [
{
"name": "创建多文件打包",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"source\": \"/要下载的文件所在目录\",\r\n \"filenames\": [\r\n \"文件1\",\r\n \"文件2\",\r\n \"文件3\",\r\n \"目录或文件都可以\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/diskFile/1/wrap",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"1",
"wrap"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Tue, 14 Dec 2021 15:46:30 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": \"3aac256772834bc7893d04c537d668e2\",\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "下载多文件打包",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/diskFile/1/wrap/3aac256772834bc7893d04c537d668e2/123.zip",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"1",
"wrap",
"3aac256772834bc7893d04c537d668e2",
"123.zip"
]
},
"description": "# 打包下载多个文件\n服务器响应一个未知长度的压缩文件的下载流,打包的内容取决于文件打包码\n\n- URL:`/api/diskFile/0/wrap/{wid}/{alias}`\n- 方法:GET\n\n## URL参数\n- wid 打包码,可通过创建多文件打包接口获取\n- alias 文件资源响应别名(可选,默认“打包下载”+时间戳.zip)"
},
"response": []
},
{
"name": "创建压缩文件",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"source\": \"/被压缩的/文件所在/的目录\",\r\n \"filenames\": [\r\n \"文件1\",\r\n \"文件2\",\r\n \"文件或目录都可以\",\r\n \"数组加加加\"\r\n ],\r\n \"dest\": \"/压缩文件/在/网盘里/保存的/位置.zip\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/diskFile/1/compress",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"1",
"compress"
]
},
"description": "# 直接在网盘上创建一个压缩包\n- URL: `/api/diskFile/{uid}/compress`\n- 方法:POST\n\n## URL参数\n- uid - 资源所属用户ID\n\n## 注意\n接口产生的任务不是异步任务,响应会一直等待到压缩完成\n\n## JSON请求体\n```json\n{\n \"source\": \"/被压缩的/文件所在/的目录\",\n \"filenames\": [\n \"文件1\",\n \"文件2\",\n \"文件或目录都可以\",\n \"数组加加加\"\n ],\n \"dest\": \"/压缩文件/在/网盘里/保存的/位置.zip\"\n}\n```"
},
"response": []
}
]
}
]
},
{
"name": "管理员",
"item": [
{
"name": "用户管理",
"item": [
{
"name": "取用户列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/user/list?page=1",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"list"
],
"query": [
{
"key": "page",
"value": "1"
}
]
},
"description": "获取系统中的用户列表信息\r\n- URI:`/api/user/list` \r\n- 动作:GET \r\n\r\n响应示例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": {\r\n \"total\": 3,\r\n \"list\": [\r\n {\r\n \"id\": 49,\r\n \"user\": \"admin\",\r\n \"type\": 1,\r\n \"quota\": 10\r\n },\r\n {\r\n \"id\": 50,\r\n \"user\": \"xiaotao\",\r\n \"type\": 1,\r\n \"quota\": 10\r\n },\r\n {\r\n \"id\": 51,\r\n \"user\": \"test\",\r\n \"type\": 0,\r\n \"quota\": 10\r\n }\r\n ],\r\n \"pageNum\": 1,\r\n \"pageSize\": 10,\r\n \"size\": 3,\r\n \"startRow\": 1,\r\n \"endRow\": 3,\r\n \"pages\": 1,\r\n \"prePage\": 0,\r\n \"nextPage\": 0,\r\n \"isFirstPage\": true,\r\n \"isLastPage\": true,\r\n \"hasPreviousPage\": false,\r\n \"hasNextPage\": false,\r\n \"navigatePages\": 8,\r\n \"navigatepageNums\": [\r\n 1\r\n ],\r\n \"navigateFirstPage\": 1,\r\n \"navigateLastPage\": 1\r\n },\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": []
},
{
"name": "用户授权",
"request": {
"method": "PUT",
"header": [],
"url": {
"raw": "{{addr}}/api/user/51/type/1",
"host": [
"{{addr}}"
],
"path": [
"api",
"user",
"51",
"type",
"1"
]
},
"description": "授予或撤销用户的管理员权限\r\n- URI:`/api/user/{uid}/type/{typeCode}` \r\n- 动作:PUT \r\n\r\nURI参数:\r\n- uid 目标用户ID\r\n- typeCode 权限代码,1为设置管理员,0为撤销管理员"
},
"response": []
},
{
"name": "添加用户",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "user",
"value": "wodiu",
"description": "用户名",
"type": "text"
},
{
"key": "passwd",
"value": "wodiu",
"description": "密码",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/user",
"host": [
"{{addr}}"
],
"path": [
"api",
"user"
]
},
"description": "添加用户\r\n该接口与`用户/注册用户`为同一接口\r\n- URI: `/api/user/`\r\n- 动作:POST\r\n\r\n### 请求体参数\r\n- user 用户名\r\n- passwd 登录密码"
},
"response": []
}
]
},
{
"name": "系统管理",
"item": [
{
"name": "存储管理",
"item": [
{
"name": "切换存储模式",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": []
},
"url": {
"raw": "{{addr}}/api/admin/sys/config/STORE_TYPE/UNIQUE",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"config",
"STORE_TYPE",
"UNIQUE"
]
},
"description": "切换网盘系统的存储模式 \r\n- URI:`/api/admin/sys/config/STORE_TYPE/{type}` \r\n- 动作:PUT \r\n\r\n注意:\r\n1. 切换过程中将会暂时阻断所有文件相关的接口调用\r\n2. 调用该接口可能会导致正在下载文件的用户连接断开\r\n3. 若切换过程中服务器异常(如程序bug,服务器断电等)导致切换中断,可能会造成数据丢失,请谨慎操作 \r\n\r\nURI参数\r\n- type 可选RAW与UNIQUE\r\n\r\n模式说明\r\n- RAW 原始存储模式,每个用户都使用独立的服务器文件资源,本地的文件名与目录结构与用户网盘文件结构保持一致\r\n - 优点:方便管理员直接通过操作系统的文件操作来查看与更改用户文件\r\n - 缺点:文件的复制,移动耗时长,消耗服务器资源大,相同文件存在多份时,文件冗余占用大\r\n- UNIQUE 唯一存储模式,每个相同的文件在服务器只存储一份,将依据文件散列值进行编配文件结构与文件名\r\n - 优点:几乎零成本的复制和移动,服务器不会存储多个相同文件\r\n - 缺点:可能会占用大量node节点,管理员不方便直接通过操作系统的文件操作来查看与更改用户文件\r\n\r\n切换成功响应示例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": null,\r\n \"msg\": \"ok\"\r\n}\r\n```\r\n\r\n系统当前存储模式与参数相同时的响应示例\r\n```json\r\n{\r\n \"code\": 0,\r\n \"data\": \"UNIQUE\", // 服务器当前存储模式\r\n \"msg\": \"请求被忽略,模式无变化\"\r\n}\r\n```"
},
"response": []
},
{
"name": "获取存储状态",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/store/state",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"store",
"state"
]
},
"description": "获取网盘系统的存储状态 \r\n- URI:`/api/admin/store/state` \r\n- 动作:GET \r\n\r\n响应示例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": {\r\n \"store_type\": \"UNIQUE\", // 存储类型\r\n \"file_count\": 248, // 文件计数\r\n \"dir_count\": 69, // 目录计数\r\n \"real_user_size\": 14678764, // 实际存储的用户文件总大小\r\n \"total_user_size\": 32274467, // 记录的用户文件总大小\r\n \"total_public_size\": 9505370783, // 公共目录总大小\r\n \"store_total_space\": 1000203087872, // 用户数据根所在分区总大小 \r\n \"store_free_space\": 283439636480, // 用户数据根所在分区可用空间大小\r\n \"public_total_space\": 1000203087872, // 公共数据根所在分区总大小 \r\n \"public_free_space\": 283439636480, // 公共数据根所在分区可用空间大小\r\n \"store_root\": \"D:\\\\data\\\\xiaotao\\\\saltedfishcloud\\\\store\", // 用户数据根\r\n \"public_root\": \"D:\\\\pack\", // 公共数据根\r\n \"store_type_switching\": false // 系统是否处于存储切换中状态\r\n },\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": []
},
{
"name": "立即同步",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/store/sync?all=true",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"store",
"sync"
],
"query": [
{
"key": "all",
"value": "true"
}
]
},
"description": "立即同步网盘(默认只同步公共网盘)与本地存储的文件信息\r\n- URI: `/api/admin/store/sync`\r\n- 动作:POST\r\n\r\n### 参数\r\n- all 类型:boolean 说明:是否同步所有私人用户的数据 默认值:false"
},
"response": []
}
]
},
{
"name": "常规设置",
"item": [
{
"name": "代理节点",
"item": [
{
"name": "添加代理节点",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "name",
"value": "local2",
"type": "text"
},
{
"key": "type",
"value": "SOCKS",
"type": "text"
},
{
"key": "address",
"value": "127.0.0.1",
"type": "text"
},
{
"key": "port",
"value": "1",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/admin/sys/proxy",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"proxy"
]
}
},
"response": []
},
{
"name": "获取所有代理",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/proxy",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"proxy"
]
}
},
"response": []
},
{
"name": "修改代理节点信息",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "formdata",
"formdata": []
},
"url": {
"raw": "{{addr}}/api/admin/sys/proxy?proxyName=a&type=HTTP&port=1080&address=127.0.0.1&name=local",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"proxy"
],
"query": [
{
"key": "proxyName",
"value": "a"
},
{
"key": "type",
"value": "HTTP"
},
{
"key": "port",
"value": "1080"
},
{
"key": "address",
"value": "127.0.0.1"
},
{
"key": "name",
"value": "local"
}
]
}
},
"response": []
},
{
"name": "删除代理节点",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/proxy?proxyName=local2",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"proxy"
],
"query": [
{
"key": "proxyName",
"value": "local2"
}
]
}
},
"response": []
}
]
},
{
"name": "设置配置项值",
"request": {
"method": "PUT",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/config/REG_CODE/10241024",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"config",
"REG_CODE",
"10241024"
]
},
"description": "设置配置项的值\n- URI:`/api/admin/sys/config/{key}/{value}` \n- 动作:PUT \n\n### URI参数:\n- key 配置项名,可选值见配置表\n- value 要设置的值\n\n### 配置表:\n\n|配置名|说明|\n|-|-|\n|STORE_TYPE|存储类型,可选RAW和UNIQUE,RAW为原始存储,UNIQUE为利用硬链接实现的唯一存储|\n|REG_CODE|注册邀请码|\n|SYNC_DELAY |同步延迟,单位分钟,-1关闭同步功能|\n|ENABLE_EMAIL_REG|是否启用邮件注册功能,TRUE启用,FALSE关闭|\n|ENABLE_REG_CODE|是否启用注册邀请码注册功能,TRUE启用,FALSE关闭|\n|MAIL_PROPERTIES|邮件发信服务器配置,参考MAIL_PROPERTIES结构,注意转化URL编码|\n|TOKEN_SECRET|token安全密钥,修改后会导致所有token失效(影响范围:直链,用户登录状态)|\n|FTP_PROPERTIES|FTP服务配置信息,参考FTP_PROPERTIES结构|\n|VERSION|系统版本,由系统内部维护,切勿手动手动修改|\n\n### MAIL_PROPERTIES结构(JSON格式):\n\n|key|value|\n|-|-|\n|from|发信人地址|\n|alias|发信人别名称呼|\n|reply|发信人的回信地址|\n|protocol|发信协议,目前只测试过stmp|\n|username|发信服务器用户名|\n|password|发信服务器密码|\n|port|发信服务器端口|\n|host|发信服务器主机名|\n\n### FTP_PROPERTIE结构(JSON格式):\n|key|value|\n|-|-|\n|ftpEnable|是否启用FTP|\n|listenAddr|服务监听地址|\n|controlPort|FTP主控制端口|\n|passiveAddr|被动传输地址|\n|passivePort|被动传输端口范围,示例:\"2300\":被动模式仅使用2300做数据端口\"2300-2399\": 指定闭区间端口范围\"2300-\" : 2300开始到往后的所有端口\"2300, 2305, 2400-\": 指定2300,2305和2400开始到往后的所有端口|"
},
"response": []
},
{
"name": "获取所有配置项的值",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/config",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"config"
]
},
"description": "获取常规设置选项值\r\n- URI:`/api/admin/sys/config` \r\n- 动作:GET\r\n\r\n响应示例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": {\r\n \"REG_CODE\": \"10241024\",\r\n \"STORE_TYPE\": \"UNIQUE\",\r\n \"SYNC_DELAY\": \"10\"\r\n },\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": []
},
{
"name": "读取配置项值",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/config/SYNC_DELAY",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"config",
"SYNC_DELAY"
]
},
"description": "读取某项配置项值\r\n- URI:`/api/admin/sys/config/{key}` \r\n- 动作:GET\r\n\r\nURI参数:\r\n- key 参数名,可选STORE_TYPE,REG_CODE,SYNC_DELAY"
},
"response": []
},
{
"name": "取所有可用配置项",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/configKeys",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"configKeys"
]
},
"description": "取所有可用的配置项名\r\n- URI:`/api/admin/sys/configKeys` \r\n- 动作:GET\r\n\r\n响应示例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": [\r\n \"REG_CODE\",\r\n \"STORE_TYPE\",\r\n \"SYNC_DELAY\"\r\n ],\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": []
},
{
"name": "设置邮件发信配置",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"host\": \"your smtp host\",\r\n \"username\": \"your stmp user name\",\r\n \"password\": \"your stmp password\",\r\n \"port\": 25,\r\n \"from\": \"sender from address\",\r\n \"alias\": \"your nick\",\r\n \"reply\": \"reply address\",\r\n \"protocol\": \"smtp\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/admin/sys/mailConfig",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"mailConfig"
]
},
"description": "# 设置系统邮件发信配置\n- API: /api/admin/sys/mailConfig\n- 方法:PUT\n\n## JSON请求体\n```json\n{\n \"host\": \"发信服务器主机名,\n \"username\": \"发信用户名\",\n \"password\": \"发信密码\",\n \"port\": 发信端口,\n \"from\": \"发信人地址\",\n \"alias\": \"发信人别名\",\n \"reply\": \"回信地址\",\n \"protocol\": \"协议,目前只测试过smtp(小写)\"\n}\n```"
},
"response": []
}
]
},
{
"name": "取总览信息",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/overview",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"overview"
]
},
"description": "获取网盘系统的存储状态 \r\n- URI:`/api/admin/sys/overview` \r\n- 动作:GET \r\n\r\n响应示例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": {\r\n \"store: {\r\n \"store_type\": \"UNIQUE\", // 存储类型\r\n \"file_count\": 248, // 文件计数\r\n \"dir_count\": 69, // 目录计数\r\n \"real_user_size\": 14678764, // 实际存储的用户文件总大小\r\n \"total_user_size\": 32274467, // 记录的用户文件总大小\r\n \"total_public_size\": 9505370783, // 公共目录总大小\r\n \"store_total_space\": 1000203087872, // 用户数据根所在分区总大小 \r\n \"store_free_space\": 283439636480, // 用户数据根所在分区可用空间大小\r\n \"public_total_space\": 1000203087872, // 公共数据根所在分区总大小 \r\n \"public_free_space\": 283439636480, // 公共数据根所在分区可用空间大小\r\n \"store_root\": \"D:\\\\data\\\\xiaotao\\\\saltedfishcloud\\\\store\", // 用户数据根\r\n \"public_root\": \"D:\\\\pack\", // 公共数据根\r\n \"store_type_switching\": false // 系统是否处于存储切换中状态\r\n },\r\n \"invite_reg_code\": 114514,\r\n },\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": []
},
{
"name": "获取所有插件配置",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/listPluginConfig",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"listPluginConfig"
]
}
},
"response": []
}
]
},
{
"name": "开发调试接口",
"item": [
{
"name": "切换只读级别",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "level",
"value": "null",
"type": "text"
}
]
},
"url": {
"raw": "{{addr}}/api/admin/debug/readOnly",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"debug",
"readOnly"
]
},
"description": "设置系统的只读状态,用于只读状态下各接口的工作情况 \r\n\r\n该状态一般在切换存储模式执行过程中为null\r\n\r\n该状态仅在运行时有效\r\n- URI:`/api/admin/debug/readOnly` \r\n- 动作:PUT \r\n\r\n参数:\r\n- level 只读级别,可选DATA_MOVING,DATA_CHECKING,和null。为null时表示关闭只读模式 \r\n\r\n当系统处于任意一种只读级别(null除外)时,无法切换到另一种只读级别,必须要先切换到null后才可切换到另一个级别"
},
"response": []
},
{
"name": "获取只读级别",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": []
},
"url": {
"raw": "{{addr}}/api/admin/debug/readOnly",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"debug",
"readOnly"
]
},
"description": "获取系统当前的只读级别\r\n- URI:`/api/admin/debug/readOnly` \r\n- 动作:GET"
},
"response": []
},
{
"name": "获取开发者选项值",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/debug/options",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"debug",
"options"
]
},
"description": "获取系统开发者选项值\r\n- URI:`/api/admin/debug/options` \r\n- 动作:GET\r\n\r\n响应样例\r\n```json\r\n{\r\n \"code\": 1,\r\n \"data\": {\r\n \"read_only_level\": null, // 系统阻塞级别\r\n \"sync_delay\": 5 // 公共网盘同步延迟\r\n },\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": []
}
]
},
{
"name": "插件管理",
"item": [
{
"name": "获取插件列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/plugin/getAllPlugins",
"host": [
"{{addr}}"
],
"path": [
"api",
"plugin",
"getAllPlugins"
]
}
},
"response": []
}
]
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
{
"name": "任务",
"item": [
{
"name": "下载任务",
"item": [
{
"name": "创建下载任务",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"savePath\": \"/\",\r\n \"url\": \"https://bigota.d.miui.com/V11.0.5.0.PCACNXM/miui_MI6_V11.0.5.0.PCACNXM_996ffd2660_9.0.zip\",\r\n \"headers\": {\r\n \"ua\": \"a\",\r\n \"name\": \"xiaotao\"\r\n },\r\n \"method\": \"GET\",\r\n \"uid\": 1\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/task/download",
"host": [
"{{addr}}"
],
"path": [
"api",
"task",
"download"
]
},
"description": "## 创建一个下载任务 \n异步API,请求后在data中返回异步任务ID\n\n### 请求体json参数\n- savePath: 必填,下载后保存的目录\n- url: 必填,文件下载地址\n- headers: 选填,附加的请求header,key-value类型对象\n- method: 选填,请求方法,默认GET,可选:[HEAD, TRACE, GET, PATCH, DELETE, OPTIONS, PUT, POST],必须全大写\n请求体(Body)示例\n- proxy: 选填,代理节点名称\n\n### 请求体示例\n```json\n{\n \"savePath\": \"/\",\n \"url\": \"www.baidu.com\",\n \"headers\": {\n \"key\": \"value\",\n \"token\": \"123123123\"\n },\n \"method\": \"GET\",\n \"proxy\": \"local1\"\n}\n```"
},
"response": []
},
{
"name": "获取下载任务列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/task/download?uid=1&page=1&size=40&type=FINISH",
"host": [
"{{addr}}"
],
"path": [
"api",
"task",
"download"
],
"query": [
{
"key": "uid",
"value": "1"
},
{
"key": "page",
"value": "1"
},
{
"key": "size",
"value": "40"
},
{
"key": "type",
"value": "FINISH"
}
]
},
"description": "## 查询参数\n- uid:要查询的用户\n- page:选填,页数,从1开始,默认1\n- size:选填,每页大小,每页大小,5-400之间,默认10\n\n## 响应data数组元素\n- id:下载任务的ID\n- uid:目标用户\n- url:文件URL\n- proxy:使用的代理名称\n- state: 任务状态,FINISH - 任务完成, FAILED - 任务失败, DOWNLOADING - 下载中,WAITING - 等待中\n- message:任务消息,一般为null,当任务失败时为失败消息\n- size:文件大小\n- name:文件名\n- savePath:保存到的网盘位置\n- createdAt:创建日期\n- finishAt:完成日期\n- createdBy:创建者\n\n## 响应体其他字段\n- totalItem:总数量\n- totalPage:当前分页大小下的总页数"
},
"response": []
},
{
"name": "中止下载任务",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{addr}}/api/task/download?taskId=2ecf7de0-46d8-4e0c-b77f-2153772b3266",
"host": [
"{{addr}}"
],
"path": [
"api",
"task",
"download"
],
"query": [
{
"key": "taskId",
"value": "2ecf7de0-46d8-4e0c-b77f-2153772b3266"
}
]
}
},
"response": []
},
{
"name": "获取可用代理名称",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/task/download/proxy",
"host": [
"{{addr}}"
],
"path": [
"api",
"task",
"download",
"proxy"
]
}
},
"response": []
}
]
}
]
},
{
"name": "文件收集",
"item": [
{
"name": "创建收集",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"title\": \"测试收集233\",\r\n \"expiredAt\": 1636033051000,\r\n \"saveNode\": \"1\",\r\n \"pattern\": \"[${__ext__}]${name}-${class}.${__ext__}\",\r\n \"extPattern\": \"^pdf$\",\r\n \"allowMax\": 5,\r\n \"maxSize\": -1,\r\n \"nickname\": \"啦啦啦\",\r\n \"field\": [\r\n {\r\n \"name\": \"name\",\r\n \"type\": \"TEXT\",\r\n \"value\": \"田所浩二先辈\",\r\n \"describe\": \"这里输入你的姓名\",\r\n \"pattern\": \"先辈$\"\r\n },\r\n {\r\n \"name\": \"class\",\r\n \"type\": \"OPTION\",\r\n \"value\": \"红茶工艺1班\",\r\n \"describe\": \"请选择你的班级\",\r\n \"options\": [\"红茶工艺1班\", \"红茶工艺2班\"]\r\n }\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/collection",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection"
]
},
"description": "# 创建一个收集任务\n- 请求方法:POST\n- URL:`/api/collection`\n\n## JSON请求体: \n```JSON\n{\n \"title\": \"测试收集233\", // 收集标题,必填\n \"expiredAt\": 1635856841000, // 收集任务到期时间,必填\n \"saveNode\": \"1\", // 收集到的文件保存节点,必填。注意:是文件夹对应的节点ID,不是保存路径\n \"nickname\": \"啦啦啦\", // 接收者署名,必填,可以自行使用用户名作为默认值\n ”extPattern\": \"^(doc|docx)$\", // 文件拓展名正则表达式,只有符合该表达式的文件后缀名才可被接受。必填。\n \"pattern\": \"asdasd\", // 匹配文件的表达式,可以是正则或字段拼接语法。默认为空\n \"allowMax\": 233, // 允许接收的最大文件数,默认为100\n \"maxSize\": 114514, // 文件最大大小,单位Byte,默认为128MiB\n \"allowAnonymous\": true // 是否允许匿名游客上传,默认为true,\n \"field\": [ // 参数字段数组,可为空\n {\n \"name\": \"姓名\", // 字段名,必填\n \"type\": \"TEXT\", // 类型,可选TEXT或OPTION,大小写敏感,必填\n \"value\": \"田所浩二\", // 默认值,可为空\n \"describe\": \"这里输入你的姓名\", // 额外描述,可为空\n \"pattern\": \"\", // 字段值需要匹配的正则表达式,可为空\n },\n {\n \"name\": \"class\",\n \"type\": \"OPTION\",\n \"value\": \"红茶工艺1班\",\n \"describe\": \"请选择你的班级\",\n \"pattern\": \"\",\n \"options\": [\"红茶工艺1班\", \"红茶工艺2班\"] // 候选项,仅当type为OPTION时有效\n },\n ]\n}\n```\n\n## JSON响应体\n```JSON\n{\n \"code\": 200, // 状态码\n \"data\": {\n \"id\": 1, // 收集ID\n \"verification\":\" 99d15046df774fccad7b2aee16aaffd3\", // 校验码\n \"msg\": \"OK\"\n}\n```\n\n## 表达式pattern说明\n收集任务文件名的表达式只支持正则表达式和字段拼接表达式二选其一,不可混用。 \n当请求体参数中pattern和field均不为空时视为使用字段拼接表达式。 \n当pattern不为空,field为空时,表示用户自主进行文件命名,且命名需要符合pattern正则表达式 \n当field不为空,pattern必须也不为空。 \n\n### 字段拼接表达式\n在表达式中可使用字段变量,如存在字段name,class,使用以下表达式: \n`${name}-${class}-第1周作业.${__ext__}` \n最终可拼接为:田所浩二-红茶工艺1班-第1周作业.docx \n其中`__ext__`是特殊的的变量,表示用户上传的文件拓展名"
},
"response": [
{
"name": "创建收集",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"title\": \"测试收集233\",\r\n \"expiredAt\": 1636033051000,\r\n \"saveNode\": \"1\",\r\n \"pattern\": \"[${__ext__}]${name}-${class}.${__ext__}\",\r\n \"extPattern\": \"^pdf$\",\r\n \"allowMax\": 5,\r\n \"maxSize\": -1,\r\n \"nickname\": \"啦啦啦\",\r\n \"field\": [\r\n {\r\n \"name\": \"name\",\r\n \"type\": \"TEXT\",\r\n \"value\": \"田所浩二先辈\",\r\n \"describe\": \"这里输入你的姓名\",\r\n \"pattern\": \"先辈$\"\r\n },\r\n {\r\n \"name\": \"class\",\r\n \"type\": \"OPTION\",\r\n \"value\": \"红茶工艺1班\",\r\n \"describe\": \"请选择你的班级\",\r\n \"options\": [\"红茶工艺1班\", \"红茶工艺2班\"]\r\n }\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/collection",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Thu, 04 Nov 2021 08:41:41 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n \"id\": 3,\n \"verification\": \"fa808622494f40908d70650bac760080\"\n },\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "取当前登录用户创建的收集",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/collection",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection"
]
}
},
"response": []
},
{
"name": "查询收集任务信息",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/collection/3/fa808622494f40908d70650bac760080",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"3",
"fa808622494f40908d70650bac760080"
]
},
"description": "# 查询收集任务信息\n若任务的allowAnonymous为false,未登录用户请求则会响应401错误\n## 请求说明\n- 请求方法:GET\n- URL:`/api/collection/{cid}/{verification}`\n\n### URL参数 \n- cid: 收集任务ID,必填\n- verification: 收集任务校验码,必填"
},
"response": [
{
"name": "查询收集任务信息",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/collection/3/fa808622494f40908d70650bac760080",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"3",
"fa808622494f40908d70650bac760080"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Thu, 04 Nov 2021 08:44:49 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"id\": 3,\n \"verification\": \"fa808622494f40908d70650bac760080\",\n \"uid\": 1,\n \"nickname\": \"啦啦啦\",\n \"describe\": null,\n \"title\": \"测试收集233\",\n \"maxSize\": -1,\n \"allowAnonymous\": true,\n \"allowMax\": 5,\n \"pattern\": \"[${__ext__}]${name}-${class}.${__ext__}\",\n \"extPattern\": \"^pdf$\",\n \"field\": [\n {\n \"name\": \"name\",\n \"type\": \"TEXT\",\n \"value\": \"田所浩二先辈\",\n \"describe\": \"这里输入你的姓名\",\n \"pattern\": \"先辈$\"\n },\n {\n \"name\": \"class\",\n \"type\": \"OPTION\",\n \"value\": \"红茶工艺1班\",\n \"describe\": \"请选择你的班级\",\n \"options\": [\n \"红茶工艺1班\",\n \"红茶工艺2班\"\n ]\n }\n ],\n \"saveNode\": \"1\",\n \"expiredAt\": \"2021-11-04T13:37:31.000+00:00\",\n \"available\": 1,\n \"createdAt\": \"2021-11-04T08:41:41.000+00:00\",\n \"state\": \"CLOSED\"\n}"
}
]
},
{
"name": "提交文件",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "submitInfo",
"value": "{\n\"filename\":\"a.pdf\",\n\"field\": [\n {\n \"name\": \"name\",\n \"value\": \"李田所先辈\"\n },\n {\n \"name\": \"class\",\n \"value\": \"红茶工艺2班\"\n }\n ]\n}",
"contentType": "application/json",
"type": "text"
},
{
"key": "file",
"type": "file",
"src": []
}
]
},
"url": {
"raw": "{{addr}}/api/collection/4/00a753981004459599a13ae718df7612",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"4",
"00a753981004459599a13ae718df7612"
]
},
"description": "# 提交一个文件到收集\n- URL:/api/collection/{cid}/{verification}\n- 方法:POST\n\n## URL参数\n- cid: 收集ID\n- verification: 收集任务校验码\n\n## 表单参数\n- submitInfo: 提交信息,json格式,详见[submitInfo对象](#submitInfo)\n- file: 文件本体\n\n\n### submitInfo对象\n<span id=\"submitInfo\"></span>\n```JSON\n{\n\"filename\": \"a.pdf\", // 提供的文件名,必填\n\"field\": [ // 提供的字段信息(如果有的话)\n {\n \"name\": \"name\", // 字段名\n \"value\": \"李田所先辈\" // 字段值\n },\n {\n \"name\": \"class\",\n \"value\": \"红茶工艺2班\"\n }\n ]\n}\n```"
},
"response": [
{
"name": "提交文件",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "submitInfo",
"value": "{\n\"filename\":\"a.pdf\",\n\"field\": [\n {\n \"name\": \"name\",\n \"value\": \"李田所先辈\"\n },\n {\n \"name\": \"class\",\n \"value\": \"红茶工艺2班\"\n }\n ]\n}",
"contentType": "application/json",
"type": "text"
},
{
"key": "file",
"type": "file",
"src": []
}
],
"options": {
"raw": {
"language": "text"
}
}
},
"url": {
"raw": "{{addr}}/api/collection/4/00a753981004459599a13ae718df7612",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"4",
"00a753981004459599a13ae718df7612"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Thu, 04 Nov 2021 08:45:12 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": null,\n \"msg\": \"OK\"\n}"
},
{
"name": "字段不符合约束",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "submitInfo",
"value": "{\n\"filename\":\"a.pdf\",\n\"field\": [\n {\n \"name\": \"name\",\n \"value\": \"李田所先辈123\"\n },\n {\n \"name\": \"class\",\n \"value\": \"红茶工艺2班\"\n }\n ]\n}",
"contentType": "application/json",
"type": "text"
},
{
"key": "file",
"type": "file",
"src": "/D:/data/xiaotao/吉他谱/cry for the moon.pdf"
}
],
"options": {
"raw": {
"language": "text"
}
}
},
"url": {
"raw": "{{addr}}/api/collection/3/8921d0d81c0f459584f4c50856874906",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"3",
"8921d0d81c0f459584f4c50856874906"
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Wed, 03 Nov 2021 16:31:22 GMT"
},
{
"key": "Connection",
"value": "close"
}
],
"cookie": [],
"body": "{\n \"code\": 400,\n \"data\": null,\n \"msg\": \"不满足约束条件:字段name的值不满足正则表达式约束:先辈$\"\n}"
}
]
},
{
"name": "删除收集",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{addr}}/api/collection/2",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"2"
]
},
"description": "# 删除收集\n- URL:/api/collection/{cid}\n- 方法:DELETE\n- 权限:只允许创建者删除\n## URL参数\n- cid: 收集ID"
},
"response": []
},
{
"name": "查询收集记录",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/collection/record/5?page=1&size=5",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"record",
"5"
],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "size",
"value": "5"
}
]
},
"description": "# 查询收集提交记录\n- URL:/api/collection/record/{uid}\n- 方法: GET\n- 权限:只允许创建者查询\n\n## QueryString参数\n- page:查询的页码,默认为1,最小为1\n- size:每页的大小,默认为10,最小为5\n\n## 响应样例:\n```json\n{\n \"code\": 200,\n \"data\": {\n \"content\": [\n {\n \"id\": 3,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 0,\n \"md5\": \"d41d8cd98f00b204e9800998ecf8427e\",\n \"createdAt\": \"2021-11-05T03:33:57.000+00:00\"\n },\n {\n \"id\": 4,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 0,\n \"md5\": \"d41d8cd98f00b204e9800998ecf8427e\",\n \"createdAt\": \"2021-11-05T03:34:26.000+00:00\"\n },\n {\n \"id\": 5,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 427258,\n \"md5\": \"bfb58b9b75035569b8a0b7c23023e569\",\n \"createdAt\": \"2021-11-05T03:35:05.000+00:00\"\n },\n {\n \"id\": 6,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 427258,\n \"md5\": \"bfb58b9b75035569b8a0b7c23023e569\",\n \"createdAt\": \"2021-11-05T03:35:39.000+00:00\"\n },\n {\n \"id\": 7,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 427258,\n \"md5\": \"bfb58b9b75035569b8a0b7c23023e569\",\n \"createdAt\": \"2021-11-05T03:35:40.000+00:00\"\n }\n ],\n \"totalCount\": 5,\n \"totalPage\": 1\n },\n \"msg\": \"OK\"\n}\n```"
},
"response": [
{
"name": "查询收集记录",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/collection/record/5?page=1&size=5",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"record",
"5"
],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "size",
"value": "5"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Fri, 05 Nov 2021 06:27:20 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n \"content\": [\n {\n \"id\": 3,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 0,\n \"md5\": \"d41d8cd98f00b204e9800998ecf8427e\",\n \"createdAt\": \"2021-11-05T03:33:57.000+00:00\"\n },\n {\n \"id\": 4,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 0,\n \"md5\": \"d41d8cd98f00b204e9800998ecf8427e\",\n \"createdAt\": \"2021-11-05T03:34:26.000+00:00\"\n },\n {\n \"id\": 5,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 427258,\n \"md5\": \"bfb58b9b75035569b8a0b7c23023e569\",\n \"createdAt\": \"2021-11-05T03:35:05.000+00:00\"\n },\n {\n \"id\": 6,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 427258,\n \"md5\": \"bfb58b9b75035569b8a0b7c23023e569\",\n \"createdAt\": \"2021-11-05T03:35:39.000+00:00\"\n },\n {\n \"id\": 7,\n \"cid\": 5,\n \"uid\": 1,\n \"filename\": \"[pdf]李田所先辈-红茶工艺2班.pdf\",\n \"size\": 427258,\n \"md5\": \"bfb58b9b75035569b8a0b7c23023e569\",\n \"createdAt\": \"2021-11-05T03:35:40.000+00:00\"\n }\n ],\n \"totalCount\": 5,\n \"totalPage\": 1\n },\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "设置收集状态",
"request": {
"method": "PUT",
"header": [],
"url": {
"raw": "{{addr}}/api/collection/2/state/OPEN",
"host": [
"{{addr}}"
],
"path": [
"api",
"collection",
"2",
"state",
"OPEN"
]
},
"description": "# 设置收集状态\n- URL: /api/collection/{cid}/state/{state}\n- 方法:DELETE\n\n## URL参数\n- cid - 要操作的收集ID\n- state - 设置的状态,可选OPEN或CLOSED\n\n## 注意事项\n- 因时间过期导致的收集自动关闭时,会在一分钟内被自动关闭,且在开启期间提交的文件也会无法通过时间约束校验\n- 因收集数量限制满导致的关闭时,再对其进行开启操作后,提交的文件仍无法通过数量约束校验"
},
"response": []
}
]
},
{
"name": "文件分享",
"item": [
{
"name": "创建分享",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"path\": \"/\",\r\n \"expiredAt\": null,\r\n \"name\": \"我的收集\",\r\n \"extractCode\": \"啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/share",
"host": [
"{{addr}}"
],
"path": [
"api",
"share"
]
},
"description": "# 创建分享\n- URL: /api/share\n- 方法:POST\n\n## 请求示例\n```json\n{\n \"path\": \"/\", // 资源所在的目录\n \"expiredAt\": 1637072638000, // 分享到期时间,可以为null或缺少该字段表示永不过期\n \"name\": \"我的收集\", // 文件或目录的名称\n \"extractCode\": \"啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦\"// 资源提取码,最大16个字符,可以为null或缺少该字段表示不需要提取码\n}\n```\n\n## 响应字段含义\n|字段名|含义|\n|-|-|\n|id|分享id|\n|uid|创建者ID|\n|nid|资源所在节点id|\n|parentId|资源所在的节点的父节点ID|\n|verification|分享校验码,一般与分享id一同使用用于定位一个具体的分享|\n|type|分享类型,可为DIR或FILE|\n|extractCode|提取码|\n|name|分享的资源名称|\n|created_at|创建日期|\n|expired_at|过期日期|"
},
"response": [
{
"name": "创建分享",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"path\": \"/\",\r\n \"expiredAt\": 1639647653000,\r\n \"name\": \"我的收集\",\r\n \"extractCode\": \"啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/share",
"host": [
"{{addr}}"
],
"path": [
"api",
"share"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Tue, 16 Nov 2021 02:37:26 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n \"id\": 7,\n \"uid\": 1,\n \"nid\": \"1\",\n \"parentId\": \"1\",\n \"verification\": \"03e53fcba25546e1ae1da180e13d0263\",\n \"size\": -1,\n \"type\": \"DIR\",\n \"extractCode\": \"啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦\",\n \"name\": \"我的收集\",\n \"createdAt\": \"2021-11-16T10:06:16.619+00:00\",\n \"expiredAt\": \"2021-12-16T09:40:53.000+00:00\",\n \"validateSuccess\": false,\n \"expired\": false,\n \"needExtractCode\": true\n },\n \"msg\": \"OK\"\n}"
},
{
"name": "有效期无限制的分享",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"path\": \"/\",\r\n \"expiredAt\": null,\r\n \"name\": \"我的收集\",\r\n \"extractCode\": \"啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/share",
"host": [
"{{addr}}"
],
"path": [
"api",
"share"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Tue, 16 Nov 2021 02:09:16 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n \"id\": 6,\n \"uid\": 1,\n \"nid\": \"1\",\n \"parentId\": \"1\",\n \"verification\": \"f9dd9fdd8a0d490f8ea7b6f21ed63fb3\",\n \"size\": -1,\n \"type\": \"DIR\",\n \"extractCode\": \"啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦\",\n \"name\": \"我的收集\",\n \"createdAt\": \"2021-11-16T10:05:32.842+00:00\",\n \"validateSuccess\": false,\n \"expired\": false,\n \"needExtractCode\": true\n },\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "获取创建的分享列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/user/1?page=1&size=10",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"user",
"1"
],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "size",
"value": "10"
}
]
},
"description": "# 获取创建的分享列表\n- URL: /api/share/user/{uid}\n- 方法:GET\n\n## URL参数\n- uid 请求的用户ID(可选,留空则表示使用当前登录的用户id)当未指定uid时,可获取所有分享的verification验证码\n\n## 响应\n当查看指定用户的分享列表时,verification和extractCode字段会被隐藏"
},
"response": [
{
"name": "获取已登录用户的分享列表",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/user?page=1&size=10",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"user"
],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "size",
"value": "10"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Mon, 15 Nov 2021 16:04:40 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n \"content\": [\n {\n \"id\": 7,\n \"uid\": 1,\n \"nid\": \"28e9694a3133f1b421ce5d420290fdc1\",\n \"parentId\": \"1\",\n \"verification\": \"78add3df39634e17af3ccc7e7dfee13b\",\n \"size\": 463922,\n \"type\": \"FILE\",\n \"name\": \"0065tQdely1fz45l6q9m0j31ao0t6h01.jpg\",\n \"createdAt\": \"2021-11-18T05:30:24.000+00:00\",\n \"expiredAt\": \"2021-11-19T05:30:24.000+00:00\",\n \"validateSuccess\": true,\n \"expired\": false,\n \"needExtractCode\": false\n },\n {\n \"id\": 8,\n \"uid\": 1,\n \"nid\": \"1hzcp014kc33tgxs21cezk6u82xcasd\",\n \"parentId\": \"1\",\n \"verification\": \"78add3df39634e17af3ccc7e7dfee13b\",\n \"size\": 463922,\n \"type\": \"FILE\",\n \"name\": \"0065tQdely1fz45l6q9m0j31ao0t6h01.jpg\",\n \"createdAt\": \"2021-11-18T05:30:24.000+00:00\",\n \"expiredAt\": \"2021-11-19T05:30:24.000+00:00\",\n \"validateSuccess\": true,\n \"expired\": false,\n \"needExtractCode\": false\n }\n ],\n \"totalCount\": 2,\n \"totalPage\": 1\n },\n \"msg\": \"OK\"\n}"
},
{
"name": "获取指定用户的分享列表",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/user/1?page=1&size=10",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"user",
"1"
],
"query": [
{
"key": "page",
"value": "1"
},
{
"key": "size",
"value": "10"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Tue, 16 Nov 2021 03:16:55 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n \"content\": [\n {\n \"id\": 2,\n \"uid\": 1,\n \"size\": -1,\n \"type\": \"DIR\",\n \"name\": \"我的收集\",\n \"createdAt\": \"2021-11-16T03:00:57.000+00:00\",\n \"validateSuccess\": false,\n \"expired\": false,\n \"needExtractCode\": true\n },\n {\n \"id\": 1,\n \"uid\": 1,\n \"size\": -1,\n \"type\": \"DIR\",\n \"name\": \"我的收集\",\n \"createdAt\": \"2021-11-16T03:00:55.000+00:00\",\n \"validateSuccess\": false,\n \"expired\": false,\n \"needExtractCode\": true\n }\n ],\n \"totalCount\": 2,\n \"totalPage\": 1\n },\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "获取分享资源的基本信息",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/1/9391bb58cc9447fe81ef563eaa45629e?code=啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"1",
"9391bb58cc9447fe81ef563eaa45629e"
],
"query": [
{
"key": "code",
"value": "啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦"
}
]
},
"description": "# 获取分享资源的基本信息\n- URL: /api/share/{sid}/{verification}\n- 方法:GET\n\n## URL参数\n- sid 分享ID\n- verification 分享校验码\n\n## QueryString参数\n- code 提取码(可选)\n\n## 响应\n- 若分享已过期,则HTTP响应码为非200,且在msg字段提供错误内容\n- 若分享需要使用提取码,提取码不正确或未提供时,validateSuccess字段为false"
},
"response": [
{
"name": "未提供提取码",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/1/9391bb58cc9447fe81ef563eaa45629e",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"1",
"9391bb58cc9447fe81ef563eaa45629e"
],
"query": [
{
"key": "code",
"value": "啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦",
"disabled": true
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Tue, 16 Nov 2021 01:57:06 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n\n \"id\": 2,\n \"uid\": 1,\n \"size\": -1,\n \"type\": \"DIR\",\n \"name\": \"我的收集\",\n \"createdAt\": \"2021-11-16T03:00:57.000+00:00\",\n \"validateSuccess\": false,\n \"username\": \"admin\",\n \"expired\": false,\n \"needExtractCode\": true\n },\n \"msg\": \"OK\"\n}"
},
{
"name": "提供提取码",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/1/9391bb58cc9447fe81ef563eaa45629e?code=啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"1",
"9391bb58cc9447fe81ef563eaa45629e"
],
"query": [
{
"key": "code",
"value": "啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Tue, 16 Nov 2021 01:54:47 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": {\n \"id\": 2,\n \"uid\": 1,\n \"size\": -1,\n \"type\": \"DIR\",\n \"name\": \"我的收集\",\n \"createdAt\": \"2021-11-16T03:00:57.000+00:00\",\n \"validateSuccess\": true,\n \"username\": \"admin\",\n \"expired\": false,\n \"needExtractCode\": true\n },\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "浏览分享目录",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/view/3/b4047afcaf7e4e7fb16ff086916beefd/我的收集/123?code=啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"view",
"3",
"b4047afcaf7e4e7fb16ff086916beefd",
"我的收集",
"123"
],
"query": [
{
"key": "code",
"value": "啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦"
}
]
},
"description": "# 浏览分享目录\n- URL:/api/share/view/{sid}/{verification}/{path}\n- 方法:GET\n\n## URL参数\n- sid 分享ID\n- verification 分享校验码\n- path 要浏览的路径\n\n## QueryString参数\n- code 资源提取码,可选。当分享的资源要求提取码的时候,需要提供该参数\n\n## 注意\n仅可用于目录(DIR)类型的分享\n\n## 响应说明\n```json\n{\n \"code\": 200,\n \"data\": [\n [], // 目录信息列表\n [ // 文件信息列表\n {\n \"name\": \"Vegas_Pro_13.0-64bit(Build453)特别版汉化包_2.zip\",\n \"md5\": \"a9365e3bb386d26d2e71511dcf06279a\",\n \"type\": 2,\n \"size\": 39233182,\n \"uid\": 1,\n \"node\": \"a7b752307ce247adb3b5481a242cc2da\",\n \"created_at\": \"2021-11-15T02:31:15.000+00:00\",\n \"formatModified\": \"2021-11-15 10:31:15\",\n \"suffix\": \"zip\",\n \"dir\": false\n }\n ] \n ],\n \"msg\": \"OK\"\n}\n```"
},
"response": [
{
"name": "浏览分享目录",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/view/3/b4047afcaf7e4e7fb16ff086916beefd/我的收集/123?code=啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"view",
"3",
"b4047afcaf7e4e7fb16ff086916beefd",
"我的收集",
"123"
],
"query": [
{
"key": "code",
"value": "啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Mon, 15 Nov 2021 18:22:28 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": [\n [],\n [\n {\n \"name\": \"Vegas_Pro_13.0-64bit(Build453)特别版汉化包_2.zip\",\n \"md5\": \"a9365e3bb386d26d2e71511dcf06279a\",\n \"type\": 2,\n \"size\": 39233182,\n \"uid\": 1,\n \"node\": \"a7b752307ce247adb3b5481a242cc2da\",\n \"created_at\": \"2021-11-15T02:31:15.000+00:00\",\n \"formatModified\": \"2021-11-15 10:31:15\",\n \"suffix\": \"zip\",\n \"dir\": false\n },\n {\n \"name\": \"package-lock.json\",\n \"md5\": \"a9c39ca9ce7e935100cc62fb5cd1a431\",\n \"type\": 2,\n \"size\": 157858,\n \"uid\": 1,\n \"node\": \"a7b752307ce247adb3b5481a242cc2da\",\n \"created_at\": \"2021-11-15T02:32:01.000+00:00\",\n \"formatModified\": \"2021-11-15 10:32:01\",\n \"suffix\": \"json\",\n \"dir\": false\n }\n ]\n ],\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "获取分享的文件内容",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/share/resource?sid=4&verification=24f72153403c4fff9cec8e6cd7f6658a&code=114514&path=/我的收集/123&name=1.jpg",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"resource"
],
"query": [
{
"key": "sid",
"value": "4",
"description": "分享ID"
},
{
"key": "verification",
"value": "24f72153403c4fff9cec8e6cd7f6658a",
"description": "分享校验码"
},
{
"key": "code",
"value": "114514",
"description": "提取码(如果有则需要提供)"
},
{
"key": "path",
"value": "/我的收集/123",
"description": "要获取的目标文件所在的目录路径(该参数仅当分享类型为DIR时有意义)"
},
{
"key": "name",
"value": "1.jpg",
"description": "文件名(该参数仅当分享类型为DIR时有意义)"
}
]
},
"description": "# 获取分享的文件内容\n调用成功后将直接响应文件本体\n\n- URL: /api/share/resource/\n\n## QueryString参数\n- sid 分享ID\n- verification 分享校验码\n- code 提取码(如果有需要)\n- path 要获取的目标文件所在路径\n- name 文件名\n\n注意:path与name仅当分享类型为目录时有意义"
},
"response": []
},
{
"name": "取消分享",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{addr}}/api/share/-1",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"-1"
]
},
"description": "# 取消共享\n- URL: /api/share/{sid}\n- 方法:DELETE\n\n## URL参数\n- sid 分享ID\n\n## 注意\n删除的分享的创建者必须是当前登录用户,否则权限不足"
},
"response": [
{
"name": "分享不存在",
"originalRequest": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{addr}}/api/share/-1",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"-1"
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Tue, 16 Nov 2021 04:24:10 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 404,\n \"data\": null,\n \"msg\": \"分享不存在\"\n}"
},
{
"name": "取消分享",
"originalRequest": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{addr}}/api/share/2",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"2"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Tue, 16 Nov 2021 04:23:59 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": null,\n \"msg\": \"OK\"\n}"
}
]
},
{
"name": "创建多文件打包",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"source\": \"/\",\r\n \"filenames\": [\r\n \"子目录\",\r\n \"文件1.xlsx\",\r\n \"文件2.xlsx\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/share/wrap/2/4d9c801dd01145a3a4a9c55d0b30b74f?code",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"wrap",
"2",
"4d9c801dd01145a3a4a9c55d0b30b74f"
],
"query": [
{
"key": "code",
"value": "",
"description": "提取码,没有则留空"
}
]
},
"description": "# 创建多文件打包\r\n创建一个来自目录分享的打包码,在文件模块的打包下载中使用这个打包码即可下载分享打包的内容\r\n\r\n- URL: `/api/share/wrap/{wid}/{verification}`\r\n- 方法:`POST`\r\n\r\n### url参数\r\n- wid - 分享ID\r\n- verification - 分享校验码\r\n\r\n### QueryString参数\r\n- code - 提取码,没有可留空留\r\n\r\n### Body\r\n```json\r\n{\r\n \"source\": \"/文件/所在/的目录\",\r\n \"filenames\": [\r\n \"文件名数组\", // 注意:创建打包时不会对文件名是否存在进行校验,若传递了不存在的文件名,下载时会报错\r\n \"子目录1\",\r\n \"文件1.xlsx\",\r\n \"文件2.xlsx\"\r\n ]\r\n}\r\n```\r\n\r\n### 响应\r\n```json\r\n{\r\n \"code\": 200,\r\n \"data\": \"546bcea5900140a4bc56acdde1cd5bd7\", // 打包码\r\n \"msg\": \"OK\"\r\n}\r\n```"
},
"response": [
{
"name": "创建多文件打包",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"source\": \"/\",\r\n \"filenames\": [\r\n \"子目录\",\r\n \"文件1.xlsx\",\r\n \"文件2.xlsx\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/share/wrap/2/4d9c801dd01145a3a4a9c55d0b30b74f?code",
"host": [
"{{addr}}"
],
"path": [
"api",
"share",
"wrap",
"2",
"4d9c801dd01145a3a4a9c55d0b30b74f"
],
"query": [
{
"key": "code",
"value": null,
"description": "提取码,没有则留空"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Sat, 18 Dec 2021 16:32:37 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"code\": 200,\n \"data\": \"546bcea5900140a4bc56acdde1cd5bd7\",\n \"msg\": \"OK\"\n}"
}
]
}
]
},
{
"name": "插件模块",
"item": [
{
"name": "插件管理",
"item": [
{
"name": "获取插件资源文件",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/plugin/sys/resource/test.txt",
"host": [
"{{addr}}"
],
"path": [
"api",
"plugin",
"sys",
"resource",
"test.txt"
]
},
"description": "获取插件的静态资源文件\n\n* URI: `/api/plugin/{插件名}/resource/{资源路径}`\n* 动作:GET\n \n\n直接响应文件二进制内容,或404\n\n示例:\n\n获取插件sys的资源文件test.txt,则URL为:\n\n`/api/plugin/sys/resource/test.txt`"
},
"response": []
},
{
"name": "获取需要自动加载的资源",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/plugin/listPluginAutoLoadList",
"host": [
"{{addr}}"
],
"path": [
"api",
"plugin",
"listPluginAutoLoadList"
]
},
"description": "列出所有autoLoad不为空的插件列表,前端可以根据这个列表选择加载这些资源实现前端部分的动态拓展"
},
"response": []
}
]
},
{
"name": "视频插件",
"item": [
{
"name": "获取视频信息",
"request": {
"method": "GET",
"header": []
},
"response": []
},
{
"name": "获取视频字幕内容",
"request": {
"method": "GET",
"header": []
},
"response": []
},
{
"name": "获取编码转换任务列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/video/listConvertTask?uid=1&status=1&page=0",
"host": [
"{{addr}}"
],
"path": [
"api",
"video",
"listConvertTask"
],
"query": [
{
"key": "uid",
"value": "1"
},
{
"key": "status",
"value": "1"
},
{
"key": "page",
"value": "0",
"description": "首页为0"
}
]
}
},
"response": []
}
]
}
]
},
{
"name": "挂载点",
"item": [
{
"name": "添加挂载点",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\":\"挂载点测试32332\",\r\n \"nid\": \"1\",\r\n \"uid\": 1,\r\n \"protocol\": \"local\",\r\n \"params\": \"{\\\"path\\\":\\\"store\\\"}\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/mountPoint/setMountPoint",
"host": [
"{{addr}}"
],
"path": [
"api",
"mountPoint",
"setMountPoint"
]
}
},
"response": []
},
{
"name": "根据id获取挂载点信息",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/mountPoint/getById?id=787131762953158656",
"host": [
"{{addr}}"
],
"path": [
"api",
"mountPoint",
"getById"
],
"query": [
{
"key": "id",
"value": "787131762953158656"
}
]
}
},
"response": [
{
"name": "根据id获取挂载点信息",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/mountPoint/getById?id=787131762953158656",
"host": [
"{{addr}}"
],
"path": [
"api",
"mountPoint",
"getById"
],
"query": [
{
"key": "id",
"value": "787131762953158656"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Vary",
"value": "Origin"
},
{
"key": "Vary",
"value": "Access-Control-Request-Method"
},
{
"key": "Vary",
"value": "Access-Control-Request-Headers"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "X-XSS-Protection",
"value": "1; mode=block"
},
{
"key": "Cache-Control",
"value": "no-cache, no-store, max-age=0, must-revalidate"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
},
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Date",
"value": "Sat, 19 Nov 2022 15:22:11 GMT"
},
{
"key": "Keep-Alive",
"value": "timeout=60"
},
{
"key": "Connection",
"value": "keep-alive"
}
],
"cookie": [],
"body": "{\n \"msg\": \"OK\",\n \"data\": {\n \"id\": \"787131762953158656\",\n \"uid\": \"0\",\n \"nid\": \"0\",\n \"protocol\": \"hdfs\",\n \"params\": \"{\\\"url\\\":\\\"hdfs://localhost:9000\\\",\\\"root\\\":\\\"/xyy\\\",\\\"user\\\":\\\"xiaotao\\\"}\",\n \"name\": \"hadoop\",\n \"createAt\": \"2022-11-07T15:01:42.000+00:00\",\n \"path\": null,\n \"parentPath\": null\n },\n \"code\": 200\n}"
}
]
}
]
},
{
"name": "桌面小组件",
"item": [
{
"name": "获取可配置组件",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/desktop/listAllComponent",
"host": [
"{{addr}}"
],
"path": [
"api",
"desktop",
"listAllComponent"
]
}
},
"response": []
}
]
},
{
"name": "评论",
"item": [
{
"name": "发送匿名留言",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"content\": \"你好\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/comment/sendAnonymousComment",
"host": [
"{{addr}}"
],
"path": [
"api",
"comment",
"sendAnonymousComment"
]
}
},
"response": []
},
{
"name": "获取评论列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/comment/listByTopicId?topicId=0&size=10&page=0",
"host": [
"{{addr}}"
],
"path": [
"api",
"comment",
"listByTopicId"
],
"query": [
{
"key": "topicId",
"value": "0"
},
{
"key": "size",
"value": "10"
},
{
"key": "page",
"value": "0"
}
]
}
},
"response": []
}
]
},
{
"name": "获取系统特性",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/hello/feature",
"host": [
"{{addr}}"
],
"path": [
"api",
"hello",
"feature"
]
},
"description": "由于系统某些功能支持开关以及系统本身具有插件拓展能力,不同的咸鱼云实例能提供的的特性可能会不一致。通过该接口可以让客户端了解服务器的能力从而选择性进行功能调用。\n\n比如通过加载插件,服务器会比原生系统多支持exe、mp4文件的缩略图生成与查看。而客户端可以根据这一特性选择对exe、mp4文件请求缩略图查看\n\n- URI:`/api/hello/feature`\n- 动作:GET\n\n无需登录\n\n### 响应\n特性功能汇总"
},
"response": []
}
],
"auth": {
"type": "apikey",
"apikey": [
{
"key": "value",
"value": "{{token}}",
"type": "string"
},
{
"key": "key",
"value": "Token",
"type": "string"
},
{
"key": "in",
"value": "header",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
}
Java
1
https://gitee.com/flower-ai/saltedfishcloud-backend.git
git@gitee.com:flower-ai/saltedfishcloud-backend.git
flower-ai
saltedfishcloud-backend
咸鱼云网盘后端
master

搜索帮助