Overview# This is a memo on how to register objects using the AtoM (Access to Memory) API.
Enabling the API# Access the following.
/sfPluginAdminPlugin/plugins
Enable arRestApiPlugin.
Obtaining an API Key# The following explains how to generate an API key.
https://www.accesstomemory.org/en/docs/2.9/dev-manual/api/api-intro/#generating-an-api-key-for-a-user
While it appears you can also connect to the API with a username and password, this time I issued a REST API Key.
Endpoints# AtoM provides multiple menus such as “Authority records” and “Functions,” but it appears that only the following are available via the API.
See the subsequent pages for more details on each endpoint, and available parameters. There are three endpoints available:
Browse taxonomy terms
Browse information objects
Read information object
Download digital objects
Add physical objects
In this regard, ArchivesSpace may have an advantage as it provides a richer set of APIs.
https://archivesspace.github.io/archivesspace/api/
Also, checking the following source code revealed that CreateAction is limited to informationobjects, physicalobjects, and digitalobjects.
https://github.com/artefactual/atom/tree/qa/2.x/plugins/arRestApiPlugin/modules/api/actions
However, since the main use case for batch registration is likely informationobjects, these features alone may be sufficient.
Registering Physical Objects#
Prepare a class like the following.
# c | l a e s x s d d p e e o A f f r p t i l s u p a i e a u p r # i e C _ o e s a p f l d r r e f l l i a l e s i s d l i s C s i n d f r s _ a e _ n p h r e e i _ . n w k p s } : # a a a s } p = t o e e p p p # r p p : p p n t d u a o e i e u u u e h ( n c s r r r e r r r r t _ o r m r y _ l C t t t l y f u s k p i i i I s i i i i : _ t l e d k f r h h h f s " r e o n n n n u n n n n ( e = e . " " e _ _ _ . " " i { l t n t t t f l t t t t s n = = = y h R C a s b b h A C c s , = h s ( ( ( o t ( ( ( ( e v o : e E o t t y 6 e u o a e e e " f f r f j f f l ( o o o s a S n e r t 4 a t n l l s r . P " " m = " s " " f o s s s . d T t i e d h t _ f e e r s h S R a C o E R ) v . . . g e - e B n s = e o e o . l q e t y t e t r r n r e : e g g g e r A n a g r r n b u f u s a s a s i e e . r s r e e e t s P t s = b s i t j r . e p t i t p o s a d o p r t t t e I - i = a z - e l h s o u c u o n p t u r o i e e e n = - T c a s = a T c } e t n s a s n o e m : n d n n n v K y f u e t y t / a s s _ l s a n d p s e v v v ( { e p a " t 6 { i p s a d . e c c e b s s { e = ( ( ( " y e u { h 4 o e ( p e p o o o : o e p ( r : T " " " a " " t u _ . n " s i r o d b d u . h r e r a u p p : : h s s b " : e / s s e j e { t j y e s { u t s a i e e t 6 : l p , t e : r s s s p r e o e s _ a " n r r 4 " f h ( i c e t o i u o e ) m r s k p a t n i e f a , y p u n t { s h n c l n s _ n w e i p i a n n " p s h r r p e ( a t s p u a o y _ p c m g c B p p i y l [ c e o ) l , e o r m r " k l a e . o a l h c s , 2 r s n c . n l e d ) e i t } e d s i y a i 0 e p s r o i s s " " " y c i : n e i c s l c h 0 a o e e b n t e ) ) ) , a o { c ( c a i o a e , t n . a j d a . t n p o a t c b l a e s t t e e t t i a d u { i a j _ d 2 d e e e c n u e o h s e t a o l e o e 0 ! . x d t t s x n e s ( h u n _ c b r 1 " s t = _ t / a w ' _ t / o t j s ] ) t } o I 4 c } j d o a b h j b s e = : a " b D ) o " s e r s y _ s j " c s t ) j : ) d ) o r d c t b o e t e u e e n } i e 6 n c s l s c { } " " i s 4 " t ) f _ t r " ' ) } s . c e ) ) . " ) h o s d , : e d u e a e l c d } t o e " . d r ) g e s e ( , t ' ( a j ' s s i c o d i n ' i = ) ' p } ) h " y ) s i c a l _ o b j e c t s ) Execute as follows.
a # p } a P S R C { } p h p h t e r i P y i y a s e _ h s _ s t p a c y i " " " c i u o t " l s c n l t l c s n e s i i a a o y i a s d l e c l m c p e l c e u n a _ e a e n o : p g t l d " t " t o d h " a : i : . b e { y : = o t o a j : " s b a " n " d e s i " A j T " S d c 2 l c t p e = - : h _ t 0 u a - i c 0 e p 1 g l 0 C t { 1 " l h c " 1 l " E f y r : o " i d , x " s e " b e a a i a t j n t m c t - e t a p a e 0 c ( l l d 1 t ) e _ ! " o } I l b D o j : c e a c N t t o i s n o ( e n p " h , y s i c a l _ d a t a )
As a result, it is registered as follows.
Registering a Parent Record# d e f a u r i e d r e f l d l s s _ p r e i = o e p p p : p p n n s r r r r r f f s p i i i i i o " e o n n n n n r { n t t t t t m s = s ( ( ( ( ( a e e " f f f f t l r . I " " " " i f e s n S R E R o . q t f t e r e n u u a o a s r s _ r e t r t p o p o l s u m u o r o b } t s a s n : n j / s _ t s s e a . c i c e { e c p p o o o : r : t i o d n d e s / s e e { s { ( i t o : r p r s n ( i b e o e e f u n j { s n s l o r e r p s p f r l [ c e o e o , m , 2 t s n . n a 0 p s s s i t h 0 c o e t e n i e , r n . a . f o a e s t t t o n d 2 a e e u e r o e 0 t . x s x m b r 1 e s t _ t a j s ] d t } c } t e = : ! a " o " i c s " t ) d ) o t e ) u e n s l s } _ " f _ " o . c ) b h o j e d e a e c d } t e " s r ) ) s : , j s o n = i n f o r m a t i o n _ o b j e c t s )
Execute the following.
p } a I S R a p n t e r i f a s e _ o t p n " " " c r u o t t i l l m s n _ i d e i a s d t e v e t c e a l n e n i o : t e t l t o d a " i _ . n e { : f o a : " = i f d o i " e _ d b 2 d { P r d _ j 0 " a " e i e 1 : r : s n c 4 e c f t 5 n " r o 3 t P i r c , A p m r " C R t a e s o E i t a l l N o i t u l T n o e g e - " n d " c 0 : _ ! : t 0 o " i 1 " b f o " C j t n , o e b " l c 7 , l t - e s 3 c ( b t p z i a d o r - n e 8 " n 7 , t 5 _ 9 d " a , t " a p ) a r e n t _ i d " : 1 }
It was registered as follows.
Searching by Identifier# This process allows you to retrieve the slug of a registered record.
d e f f u p } r r i r a e e n l r s t d a p u _ = m " " o r i s s s n n n f q f s f " = 0 0 e r o { " " e r s { : : = s m e p a l i " r o t f d i e n i . e d q s o u n e u e n r t n e . _ l i t s j o } f i t s b / i f s o j a e i . n e p r e g ( c i , r e ) t / " t s i , ( ( n u s f r e o l l r , f m , a h t e i i a d o d e n e n o r t b s i j = f e s i c e e t l r s f ) " . : h e a d e r s , p a r a m s = p a r a m s )
Use it as follows.
i i p { } d n r e f i n o n t _ t " " ] i o ( t r f b j o e i j s t s e e o a u { } r c n l l t . " t = s d : s u " " " " " " = m 1 : r s t l P p , e l i e A a s [ f u t v R p ( e g l e E i i r " e l N _ n e : " _ T c f n : o - l o c " f 0 i _ e f " _ 0 e o _ t \ d 1 n b c b u e " t j o 7 8 s . e d - 9 c f c e 3 a r i t " b a i n s : z \ p d , d u t _ " - 3 i i i P 8 0 o n n A 7 b n f d R 5 3 " o e E 9 \ : r n N " u m t T , 3 " a = - 0 C t 4 0 e o i ) 0 c l o ) 1 \ l n " u e _ , 3 c o 0 t b a i j f o e \ n c u " t 3 s 0 ( b i 7 d \ e u n 3 t 0 i e f 7 i \ e u r 3 ) 0 f 3 " ,
Refer to the following for query parameters sq0 and sf0.
https://www.accesstomemory.org/en/docs/2.9/dev-manual/api/browse-io/#api-browse-io
Registering a Child Record# Now that we know the parent record’s slug is ftb7-3bzd-8759, register as follows.
# c } a I S R h p n t e C i i f a s h l _ o t p i d " " " " c r u o l _ t i l p l m s n d d i d e a i a s a t e v r e t c e i t l n e e n i o : n a e t l n t o d f " i _ t . n e { o = : f o _ a : " r i f s d o i m { " e _ l d b 2 d a C r d u _ j 0 " t h " e g i e 1 : i i : s " n c 4 o l c : f t 7 n d " r o 1 C i " r c , o R H p f m r " b e I t t a e s j c L i b t a l e o D o 7 i t u c r - n - o e g t d 0 " 3 n d " " 0 : b _ ! : , 8 z o " " " d b n , F - j s i 8 e a l 7 c a e 5 t - " 9 s y , " ( w c y h w i - l 2 d s _ x d 7 a " t , a " ) p a r e n t _ i d " : 4 5 3 }
As a result, the child record was registered as a subordinate record under the parent record.
Registering Digital Objects# d e f a f # w d i i d l U t _ e p h d _ l f } d } d i e i n o o i a o f l g a a p l t _ s i m d e e a r d e t e n s ' ' ' ' e o d p : p p a f ( f = t i u s _ o r r r l = i f = i i n s p r _ i i i _ l i l { t f a o e r n n n o o e l { e l o g n s e t t t b s e ' e r e s p s ( ( ( j . w _ : ' m ' e o u f f f e p i p : a : n l " " " c a t a ( t = s t D F E t t h t f f i ' e i a r s h h i i o R r . = g i r ( . m , l l n e e s i l o s b u e e O f q t d t e r e a l ' _ _ b e u a o a d l s t r n n j r e t _ l m f e i b a a e e s u r t e , n p ' m m c n t s e o o s a a ) e e t c s _ s b s s m r , , S e . h f d c p j c a l e t a l ' p e i a o o e r g u ( s f u o a l t d n c e e g f f , g s d e a e s t a : , i o f ' # t e s = e t l r : ' : ( r = d i . c e { f e m a M f s f a n j r d i _ p s a " = i t s e d o l p d p l s { s l a [ o a i _ e a a l u t s e e ) 2 n t g r _ t t i g e e l s 0 ( e i e p h a c , r l f , 0 ) d t s a ) a f . , a p t t o . h s l o h i r u e 2 u n ) o r a 0 c o s : n R l d 1 c b e / e } e ] e j . p f / r : s e t d e a s s c e f r p , f t x ' e i u : t ) n / l } , c d # l { " e i y d ) g C : o i o _ t n I r a t D e l e s o n { p b t d o j - o n e T _ s c y r e t p e . s e s s " u t , i l a s t t . u s g s e e _ t t c ( o a ' d u i e t d } o ' " m ) ) a } t " i ) c a l l y
However, executing the following still resulted in an error.
f s a i l p l u i e g _ _ c p = l a i t " e h n n s t = a . a a " - d _ y d 0 w _ 1 y d . w i p - g d 2 i f s t " x a 7 l " _ o b j e c t s ( s l u g , f i l e _ p a t h )
I would like to continue investigating this issue.
Summary# I introduced usage examples of the AtoM (Access to Memory) API.
From a brief investigation, the impression is that API functionality is limited, with only information objects being deletable via API, among other restrictions.
If API-based usage is a prerequisite, it may be worth considering alternatives to AtoM.
We hope this is helpful when evaluating the adoption of AtoM or ArchivesSpace.