Overview

In the following article, I introduced building applications using the GakuNin RDM API.

In this article, I introduce how to search files in linked storage using the GakuNin RDM API.

Implementation Example

I implemented the search API as follows. Since directly accessing https://rdm.nii.ac.jp/api/v1/search/file/ from the client caused CORS errors, I implemented it as a Next.js API Route.

iiie}mmmxppppcccccccc}c}croooooooooooo;o)oerrrrnnnnnnnnashe}nmh}b;ntttttsGssssssspoil,see,osutetttttttirgaq}fstta"Adtr{{{at_thsu,rihdCuynssuqosaapv:ltef}ozroeot:dNagyeqruficpaeiiri,meedrnhaNeuensulefzcirr"gcylq}:,s:stoJtexttcserseeUaschs:tu,:erSaxthSir=yesrmirteeeq}o="niOtROefoyt=slsoe:a{rru,fP{tzN=Reprunn=Tnareyedf]qalfaO-a.estvnpe=po==:t"cd:rei,uneswSTtsaspiec=awuaketh:yfe"""""""eaneaTyitwpoortrrpre"{{di_{_al_tdjsaarliti"poraonnSiaaUlasnh_td{sudaieocllyye,t,eniinsseowmR.retvdlstlsltsbhll,zn":ntsesnaeLssI=teeelrt:llc^o__etf:ge}sit(eenpns::i_"er1ojs_:e`ir.}iGteraItssdc3nf[,^i"locwt"BfejfoErern(e:o"0{gi4p,^bhitcaeyssfrnTgsqctus/r,,:e"t1solrhpa(.oro(e.h(rs/:nl,i"^odu(prpjnom}rtfuPulira{do,0lcealeas(meSrrar.od"m:n.sa,pirrod"fqeolrlsnmge^1^ricana"@r:rm)a.e?.r:"120dUa$m(tn/ov;msa.nd3_.5.:rt{s)aeamReUseraim0a2"1lia);)xperR.acci",l",2t,oc,;tp"qSLgrhc.,ul,5rnc//nueecPeas""u{/esaeesthascve,,ejsepxss(Prs.er,ssritti"aaTjr:oTv/-)ofrmops3noeaaniask/i0"kruu{(lm.eao,,e"ttatsgnpntn;hhue.e;i:e}/"trgt/x`[;h[e(v2t,.Oft"1:.pu(p/}1.tl"as,2nilpge4eotaea,xneg[rctsxelcoa)t[ihmu;]om/mt"fifeh)ftin]s]lt/e"esat)/.u]"*t"";:h"1O;2p"4t2"i0,o""n0,s"",1;01)0;);

Usage Example

You can try it at the following URL. (Login to GakuNin RDM is required.)

https://rdm-leaf-editor.vercel.app/search/?q=.xml

This enables cross-searching XML files across multiple linked storage systems in participating projects, and opening them in the LEAF Writer editor.

The API is available at:

https://rdm-leaf-editor.vercel.app/api/search/?filter[fulltext]=.xml

The following results are returned.

{}"]"}"}""}"r,c,a,tt,te{}o""g""ay"""""""""""isuftgltgppcrutfipgwmmu"""""""""""""""""""""""]"""}""""niosioseroesoinrrieeliddssccmmdgtnnncnnpiien,nch,cfpptlt"ct"Aomgetlseokt"tdaaoorrooeuaoaoaooassxo{}{}ooi"]ooaasea:ea:ljpiraetpuia:s"ttrreeddeigrmrtddr__td,dmgnmlrr""lnlieos"l"irp"d":eettaaiipdsmemeeeerrre""emha"mdee::"{s"[acnt:":ti":a1:____ttff__"a"ag__neea_ii_elm0eenn:e:]ster:un:t."cmfnooiiuu:l:louttgt_cddpnie1nrtt{1s,e"na""tt"a3[6roiorreerriirri_irso""utg".t___,1"1s:ttU"Fi""W"27edld__rrll[z"zyltisaen::bsh:<"nut:""isAio:Gi:daieein__""]e0e""ldtcatl"tb:ari:":oellnrkatf__dain::,d1d::e"rtrr""i:"[>mlt{Pnrle""oi"8einn"mda_._":aecihjc:xne"l}{r""ss:Pu"M4deaa:e"m""txn"":tdhbjd"{mu":e,oC:"R"rp,e7"dmm":e//amaf/"i"_u38:}{ll:"jo,e,"est4:"ee":"wbglmiw"yo:ttaa,<ln:em"sIp"a1:""h":z4s"elzsneo6rf/,"ucpRunr,d6"::j"jv5","ev8"frr""abNlntoelsia02"3Sd"9m::"96:amsl>Ilusngttnt002""aa8Jgp,ggls"s"I,l"eisita02006tau//["/"fs":el,ns"ts"9521"ornf"]0",ae:,Stt,u"0-5.,r"i,,1,l,[tsrt,00-xu,Ol.s"o"ai130mgex"e0r,to0-3lNasm,,1ain91-"aw/lgose92,kao"xen"0T1"a"s,m"s,40T,m,fl,"580us",4:4rt,"4:ao,60"r:4,a4:g40e.4/6.630761d11a058754+170+4001:060:0000"00,"9,00109e0454/",

Summary

I felt that by using the API provided by GakuNin RDM, various applications can be developed.

I am grateful to everyone involved with GakuNin RDM.