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.
i i i e } m m m x p p p p c c c c c c c c } c } c r o o o o o o o o o o o o ; o ) o e r r r r n n n n n n n n a s h e } n m h } b ; n t t t t t s G s s s s s s s p o i l , s e e , o s u t e t t t t t t t i r g a q } f s t t a " A d t r { { { a t _ t h s u , r i h d C u y n s s u q o s a a p v : l t e f } o z r o e o t : d N a g y e q r u f i c p a e i i r i , m e e d r n h a N e u e n s u l e f z c i r r " g c y l q } : , s : s t o J t e x t t c s e r s e e U a s c h s : t u , : e r S a x t h S i r = y e s r m i r t e e e q } o = " n i O t R O e f o y t = s l s o e : a { r r u , f P { t z N = R e p r u n n = T n a r e y e d f ] q a l f a O - a . e s t v n p e = p o = = : t " c d : r e i , u n e s w S T t s a s p i e c = a w u a k e t h : y f e " " " " " " " e a n e a T y i t w p o o r t r r p r e " { { d i _ { _ a l _ t d j s a a r l i t i " p o r a o n n S i a a U l a s n h _ t d { s u d a i e o c l l y y e , t , e n i i n s s e o w m R . r e t v d l s t l s l t s b h l l , z n " : n t s e s n a e L s s I = t e e e l r t : l l c ^ o _ _ e t f : g e } s i t ( e e n p n s : : i _ " e r 1 o j s _ : e ` i r . } i G t e r a I t s s d c 3 n f [ , ^ i " l o c w t " B f e j f o E r e r n ( e : o " 0 { g i 4 p , ^ b h i t c a e y s s f r n T g s q c t u s / r , , : e " t 1 s o l r h p a ( . o r o ( e . h ( r s / : n l , i " ^ o d u ( p r p j n o m } r t f u P u l i r a { d o , 0 l c e a l e a s ( m e S r r a r . o d " m : n . s a , p i r r o d " f q e o l r l s n m g e ^ 1 ^ r i c a n a " @ r : r m ) a . e ? . r : " 1 2 0 d U a $ m ( t n / o v ; m s a . n d 3 _ . 5 . : r t { s ) a e a m R e U s e r a i m 0 a 2 " 1 l i a ) ; ) x p e r R . a c c i " , l " , 2 t , o c , ; t p " q S L g r h c . , u l , 5 r n c / / n u e e c P e a s " " u { / e s a e e s t h a s c v e , , e j s e p x s s ( P r s . e r , s s r i t t i " a a T j r : o T v / - ) o f r m o p s 3 n o e a a n i a s k / i 0 " k r u u { ( l m . e a o , , e " t t a t s g n p n t n ; h h u e . e ; i : e } / " t r g t / x ` [ ; h [ e ( v 2 t , . O f t " 1 : . p u ( p / } 1 . t l " a s , 2 n i l p g e 4 e o t a e a , x n e g [ r c t s x e l c o a ) t [ i h m u ; ] o m / m t " f i f e h ) f t i n ] s ] l t / e " e s a t ) / . u ] " * t " " ; : h " 1 O ; 2 p " 4 t 2 " i 0 , o " " n 0 , s " " , 1 ; 0 1 ) 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 , t t , t e { } o " " g " " a y " " " " " " " " " " " i s u f t g l t g p p c r u t f i p g w m m u " " " " " " " " " " " " " " " " " " " " " " " ] " " " } " " " " n i o s i o s e r o e s o i n r r i e e l i d d s s c c m m d g t n n n c n n p i i e n , n c h , c f p p t l t " c t " A o m g e t l s e o k t " t d a a o o r r o o e u a o a o a o o a s s x o { } { } o o i " ] o o a a s e a : e a : l j p i r a e t p u i a : s " t t r r e e d d e i g r m r t d d r _ _ t d , d m g n m l r r " " l n l i e o s " l " i r p " d " : e e t t a a i i p d s m e m e e e e r r r e " " e m h a " m d e e : : " { s " [ a c n t : " : t i " : a 1 : _ _ _ _ t t f f _ _ " a " a g _ _ n e e a _ i i _ e l m 0 e e n n : e : ] s t e r : u n : t . " c m f n o o i i u u : l : l o u t t g t _ c d d p n i e 1 n r t t { 1 s , e " n a " " t t " a 3 [ 6 r o i o r r e e r r i i r r i _ i r s o " " u t g " . t _ _ _ , 1 " 1 s : t t U " F i " " W " 2 7 e d l d _ _ r r l l [ z " z y l t i s a e n : : b s h : < " n u t : " " i s A i o : G i : d a i e e i n _ _ " " ] e 0 e " " l d t c a t l " t b : a r i : " : o e l l n r k a t f _ _ d a i n : : , d 1 d : : e " r t r r " " i : " [ > m l t { P n r l e " " o i " 8 e i n n " m d a _ . _ " : a e c i h j c : x n e " l } { r " " s s : P u " M 4 d e a a : e " m " " t x n " " : t d h b j d " { m u " : e , o C : " R " r p , e 7 " d m m " : e / / a m a f / " i " _ u 3 8 : } { l l : " j o , e , " e s t 4 : " e e " : " w b g l m i w " y o : t t a a , < l n : e m " s I p " a 1 : " " h " : z 4 s " e l z サ s n e o 6 r f / , " u c p R u n r , d 6 " : : j " j v 5 " , " e v ブ 8 " f r r " " a b N l n t o e l s i a 0 2 " 3 S d " 9 m : : " 9 プ 6 : a m s l > I l u s n g t t n t 0 0 2 " " a a 8 J g p , g ロ g l s " s " I , l " e i s i t a 0 2 0 0 サ 6 t a u / / [ " / ジ " f s " : e l , n s " t s " 9 5 2 1 ブ " o r n f " ] 0 " ェ , a e : , S t t , u " 0 - 5 . プ , r " i , , 1 , ク l , [ t s r t , 0 0 - x ロ u , O l . ト s " o " a i 1 3 0 m ジ g e x " e 0 r , t o 0 - 3 l ェ N a s m , , 1 a i n 9 1 - " ク a w / l g o s e 9 2 , ト k a o " x e n " 0 T 1 " a " s , m " s , 4 0 T , m , f l , " 5 8 0 u s " , 4 : 4 r t , " 4 : a o , 6 0 " r : 4 , a 4 : g 4 0 e . 4 / 6 . 6 3 0 7 6 1 d 1 1 a 0 5 8 7 5 4 + 1 7 0 + 4 0 0 1 : 0 6 0 : 0 0 0 0 " 0 0 , " 9 , 0 0 1 0 9 e 0 4 5 4 / " ,
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.