1 Star 0 Fork 54

@韩/咸鱼云网盘后端

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
咸鱼云PostmanAPI文档.json 170.46 KB
一键复制 编辑 原始数据 按行查看 历史
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425
{
"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": "通用文件资源上传接口",
"request": {
"method": "PUT",
"header": [],
"url": {
"raw": "{{addr}}/api/resource/0/upload?targetId=0&protocol=main&path=/&name=aaa.jpg&xxx=自定义参数",
"host": [
"{{addr}}"
],
"path": [
"api",
"resource",
"0",
"upload"
],
"query": [
{
"key": "targetId",
"value": "0",
"description": "目标资源所有者id"
},
{
"key": "protocol",
"value": "main",
"description": "资源协议"
},
{
"key": "path",
"value": "/",
"description": "文件所在位置"
},
{
"key": "name",
"value": "aaa.jpg",
"description": "文件名"
},
{
"key": "xxx",
"value": "自定义参数",
"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": "创建异步压缩任务",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"sourceUid\": 1,\r\n \"sourcePath\": \"/\",\r\n \"sourceNames\": [\r\n \"文件夹1\"\r\n ],\r\n \"targetUid\": 1,\r\n \"targetFilePath\": \"/test.zip\",\r\n \"archiveParam\": {\r\n \"type\": \"zip\",\r\n \"encoding\": \"gbk\"\r\n },\r\n \"waitExit\": true\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/diskFile/0/asyncCompress",
"host": [
"{{addr}}"
],
"path": [
"api",
"diskFile",
"0",
"asyncCompress"
]
}
},
"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": "重启系统",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/restart?withCluster=true",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"restart"
],
"query": [
{
"key": "withCluster",
"value": "true",
"description": "是否重启整个集群,默认缺省为true"
}
]
}
},
"response": []
},
{
"name": "获取系统当前信息",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/getCurSystemInfo?nodeId=837513836872335360",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"getCurSystemInfo"
],
"query": [
{
"key": "nodeId",
"value": "837513836872335360",
"description": "可选,获取当前节点则不传该参数。节点id可通过/api/cluster/listNodes获取"
}
]
}
},
"response": []
},
{
"name": "列出时间范围系统信息",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/admin/sys/listSystemInfo?nodeId=837513836872335360",
"host": [
"{{addr}}"
],
"path": [
"api",
"admin",
"sys",
"listSystemInfo"
],
"query": [
{
"key": "nodeId",
"value": "837513836872335360",
"description": "可选,获取当前节点则不传该参数。节点id可通过/api/cluster/listNodes获取"
}
]
}
},
"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": []
}
]
},
{
"name": "集群管理",
"item": [
{
"name": "获取节点列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/cluster/listNodes",
"host": [
"{{addr}}"
],
"path": [
"api",
"cluster",
"listNodes"
]
}
},
"response": []
}
]
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
{
"name": "任务",
"item": [
{
"name": "获取任务日志",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/asyncTask/getLog?taskId=848042512181362688",
"host": [
"{{addr}}"
],
"path": [
"api",
"asyncTask",
"getLog"
],
"query": [
{
"key": "taskId",
"value": "848042512181362688"
}
]
}
},
"response": []
},
{
"name": "中断任务",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/asyncTask/interrupt?taskId=1111",
"host": [
"{{addr}}"
],
"path": [
"api",
"asyncTask",
"interrupt"
],
"query": [
{
"key": "taskId",
"value": "1111",
"description": "任务id"
}
]
}
},
"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": "插件需要加载的js",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/plugin/autoLoad.js",
"host": [
"{{addr}}"
],
"path": [
"api",
"plugin",
"autoLoad.js"
]
}
},
"response": []
},
{
"name": "插件需要加载的css",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/plugin/autoLoad.css",
"host": [
"{{addr}}"
],
"path": [
"api",
"plugin",
"autoLoad.css"
]
}
},
"response": []
},
{
"name": "获取所有可用插件",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/plugin/listAvailablePlugins",
"host": [
"{{addr}}"
],
"path": [
"api",
"plugin",
"listAvailablePlugins"
]
}
},
"response": []
},
{
"name": "删除插件",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "{{addr}}/api/plugin/deletePlugin?name=samba-store",
"host": [
"{{addr}}"
],
"path": [
"api",
"plugin",
"deletePlugin"
],
"query": [
{
"key": "name",
"value": "samba-store"
}
]
}
},
"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": "离线下载",
"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=2c92e0818631a746018631a7efb80000",
"host": [
"{{addr}}"
],
"path": [
"api",
"task",
"download"
],
"query": [
{
"key": "taskId",
"value": "2c92e0818631a746018631a7efb80000"
}
]
}
},
"response": []
},
{
"name": "获取可用代理名称",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/task/download/proxy",
"host": [
"{{addr}}"
],
"path": [
"api",
"task",
"download",
"proxy"
]
}
},
"response": []
}
]
},
{
"name": "网络工具",
"item": [
{
"name": "WOL网络唤醒",
"item": [
{
"name": "获取用户WOL设备列表",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/nwt/findWolByUid?uid=1&checkOnline=true",
"host": [
"{{addr}}"
],
"path": [
"api",
"nwt",
"findWolByUid"
],
"query": [
{
"key": "uid",
"value": "1"
},
{
"key": "checkOnline",
"value": "true",
"description": "是否检查设备在线状态"
}
]
}
},
"response": []
},
{
"name": "添加/保存WOL设备",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"我的设备\",\r\n \"mac\": \"AA:BB:CC:DD:EE:FF\",\r\n \"ip\": \"255.255.255.255\",\r\n \"port\": 9,\r\n \"uid\": 1\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/nwt/saveWolDevice",
"host": [
"{{addr}}"
],
"path": [
"api",
"nwt",
"saveWolDevice"
]
}
},
"response": []
},
{
"name": "使用WOL唤醒设备",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/nwt/wakeWolDevice?id=864334797651050496",
"host": [
"{{addr}}"
],
"path": [
"api",
"nwt",
"wakeWolDevice"
],
"query": [
{
"key": "id",
"value": "864334797651050496"
}
]
}
},
"response": []
}
]
},
{
"name": "获取所有已连接网络接口",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/nwt/getAllInterface",
"host": [
"{{addr}}"
],
"path": [
"api",
"nwt",
"getAllInterface"
]
}
},
"response": []
}
]
},
{
"name": "WebShell",
"item": [
{
"name": "快捷执行命令(仅限管理员)",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"cmd\": \"ping\",\r\n \"charset\": \"GBK\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/webShell/executeCommand",
"host": [
"{{addr}}"
],
"path": [
"api",
"webShell",
"executeCommand"
]
}
},
"response": []
},
{
"name": "创建交互式Shell会话(仅限管理员)",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"cmd\": \"\",\r\n \"shell\": \"powershell\",\r\n \"charset\": \"GBK\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{addr}}/api/webShell/createSession",
"host": [
"{{addr}}"
],
"path": [
"api",
"webShell",
"createSession"
]
}
},
"response": []
},
{
"name": "列出所有交互会话(仅限管理员)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/webShell/listSession",
"host": [
"{{addr}}"
],
"path": [
"api",
"webShell",
"listSession"
]
}
},
"response": []
},
{
"name": "获取会话最近的输出(仅限管理员)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{addr}}/api/webShell/getLog?sessionId=874123101577674752",
"host": [
"{{addr}}"
],
"path": [
"api",
"webShell",
"getLog"
],
"query": [
{
"key": "sessionId",
"value": "874123101577674752",
"description": "会话id"
}
]
}
},
"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": [
""
]
}
}
]
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/ZMC520/saltedfishcloud-backend.git
git@gitee.com:ZMC520/saltedfishcloud-backend.git
ZMC520
saltedfishcloud-backend
咸鱼云网盘后端
master

搜索帮助