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|laesxsddpeeoAffrptilsupaieaupr#ieC_oesapfldrrefllialesisdlisCsindfrs_ae_nphreei_.nwkps}:#aaas}p=toeeppp#rpp:ppntduaoeieuuueh(ncsrrrerrrrt_ormry_lCtttlyfuskpiiiIsiiii:_tledkfrhhhfs"reonnnnunnnn(e=e.""e___.""i{ltntttflttttsn===yhRCasbbhACcs,=hs(((ot((((evo:eEotty6euoaeee"ffrfjffl(ooosaSnert4atnllsr.P""m="s""fosss.dTtiedht_feershSRaCoER)v...ge-eBns=eoeo.lqetytetrrnre:egggerAnagrrnbufusasasiee.rsreeetsPts=bsitjr.eptitposadoprttteI-i=az-elhsoucuonpturoieeen=-Tcas=aTc}etnsasnoem:ndnnnvKyfuetyt/ass_lsandpsevvv({epa"t6{ipsad.eccebss{e=((("yeu{h4oe(pepooo:oep(r:T"""a""tu_.n"sirodbdu.hreraupp::hssb":e/sseje{tjyes{utsaieet6:lp,te:rssspreoes_a"nrr4"fh(icetoiuoe)mrskpatniefa,ypunt{shnclns_nweipiann"pshrrpe(atspuaoy_pcmgcBppiyl[ceo)l,eormr"klae.oalhcs,2rsnc.nled)eit}edsiyai0epsroiss"""yci:neicslch0aoeebnte))),ao{c(caioae,tn.ajda.tnpoatcblaestteettiadu{iaj_d2deeecnueohsetaoleoe0!.xdttsxnes(hun_cbr1"st=_t/aw'_t/otjs])t}oI4c}jdoabhjbse=:a"bD)o"sersy_sj"cst)j:)d)ordctboeteueen}ie6ncslsc{}""is4"t)f_tr"')}s.ce)).")hosd,:edueaelcd}toe".dr)gese(,t'(aj'ssicodin'i=)'p})h"y)sical_objects)

Execute as follows.

a#p}aPSRC{}phphteriPyiyase_hs_stpacyi"""ciuot"lscnltlcsnesiiaaoyiasdleclmcpelceuna_eaeno:pgtld"t"todh"a:i:.be{y:=otoaj:"sba"n"desi"AjT"Sdc2lctpe=-:h_t0ua-ic0ep1gl0Ct{1"lhc"1l"Efyr:o"id,x"se"beaaiatjntmct-etapae0c(lld1t)e_!"o}IlbDoj:ceacNttoisno(enp"h,ysical_data)

As a result, it is registered as follows.

Registering Information Objects

Registering a Parent Record

defauriedrefldlss_prei=oeppp:ppnnsrrrrrffspiiiiio"eonnnnnr{ntttttms=s(((((aee"fffftlr.I""""ifesnSRERo.qtfterenuuaoasrs_retrtpopolsumuorob}tsasn:nj/s_tssea.cice{ecppooo:r:tiodndes/see{s{(ito:rprsn(ibeoeefunj{snslorerpspfrl[ceoeo,m,2tsn.na0psssith0coetenie,rn.a.foaestttond2aeeueroe0t.xsxmbr1est_tajs]dt}c}te=:!a"o"ics"t)d)ote)uensls}_"f_"o.c)bhojedeaecd}te"sr))s:,json=information_objects)

Execute the following.

p}aISRapnterifase_otpn"""cruottillmsn_ideiasdtevetcealnenio:tetltoda"i_.ne{:foa:"=ifdoi"e_db2d{Prd_j0"a"eie1:r:snc4ecft5n"ro3tPirc,Apmr"CRtaesoEitallNoitulTnoege-"nd"c0:_!:t0o"i1"bfo"Cjtn,oeb"lc7,lt-es3c(btpziador-ne8"n7,t5_9d"a,t"ap)arent_id":1}

It was registered as follows.

Searching by Identifier

This process allows you to retrieve the slug of a registered record.

deffup}rriraeenlrstdapu_=m""orisssnnnfqfsf"=00ero{""ers{::=smepali"rotfdieni.edqsouneuenrtne._litsjo}fitsb/ifsojaei.nepreg(ci,re)t/"tsi,((nusfreollr,fm,ahteiiadodenenortbsij=fesiceetlrsf)".:headers,params=params)

Use it as follows.

iip{}dnrefinont_t""]io(trfbjoeijstseeoau{}rcnllt."t=sd:su""""""=m1:rstlPp,elieAas[futvRp(egleEiir"elN_ne:"_Tcfn:o-loc"f0i_ef"_0eo_t\d1nbcbue"tjo78s.ed-9cfce3arit"bains:z\pd,dut_"-3iiiP80onnA7bnfdR53"oeE9\:rnN"umtT,3"a=-0Ct40eoi)0clo)1\ln"ue_,3co0tbaijfoe\ncu"t3s0(bi7d\eun3t0ief7i\eur3)0f3",

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}aISRhpnteCiifashl_otpid""""cruol_tilplmsnddideaiasatevretceitlneenio:naetlntodf"i_t.ne{o=:fo_a:"rifsdoim{"e_ldb2daCrdu_j0"th"egie1:ii:s"nc4olc:ft7nd"ro1Ci"rc,oRHpfmr"beIttaesjcLibtaleoDo7itucr-n-oegtd0"3nd""0:b_!:,8zo"""dbn,F-jsi8eal7cae5t-"9sy,"(wcyhwi-l2ds_xd7a"t,a")parent_id":453}

As a result, the child record was registered as a subordinate record under the parent record.

Registering Digital Objects

defaf#wdiidlUt_ephd_lf}d}dieinooiaoflgaaplt_simdeeardetens''''eodp:ppaf(f=tius_orrrl=if=iinspr_iii_lil{tfaoernnnooel{elognsetttbse'eresps(((j.w_:'m'eoufffepip:a:nl"""cata(t=stDFEtthtffi'eiarshhiioRr.=gir(.m,llneesilosbueeOfqtdtereal'__beuaoadlstrnnjret_lmfeibaaeesurte,np'mmcntseoosaa)eetcs_sbssmr,,Se.hfdcpjcaletal'peiaooergu(sfuoaltdnceegff,gsdeaesta:,iof'#tes=etlr:':(r=di.ce{femaMfsfanjrdi_psa"=itsedolpdpls{sla[oai_eaalutsee)2ntgr_ttigeels0(eiephac,rlf,0)dtsa)af.,aptto.hslohirue2un)ora0cos:nRld1cbe/e}e]ej.pf/r:setdeasscefrp,ftx'eiu:t)n/l},cd#l{"eiyd)gC:oio_tnIratDeleson{pbtdoj-oneT_scyretpe.sess"ut,ilastt.usgsee_ttc(oa'duietd}o'"m))a}t"i)cally

However, executing the following still resulted in an error.

fsailpluieg__cp=lait"ehnnst=a.aa"-d_yd0w_1yd.wip-gd2ifst"xa7l"_objects(slug,file_path)

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.