[Archivesspace_Users_Group] EAD export and/or API call for Accession links

James Bullen james at hudmol.com
Fri Jun 30 20:34:15 EDT 2023


Hi Sarit and Kevin,

Yes, the property is called `related_accessions` in Resources, but it is called `accession_links` in Archival Objects.

And, no, it seems linked Accessions are not included in EAD exports.

By default the API will return the linked Accessions as an array of refs, like this:

GET /repositories/2/archival_objects/1
...
  "accession_links":
  [
    {
      "ref": "/repositories/2/accessions/5"
    },
    {
      "ref": "/repositories/2/accessions/8"
    }
  ],
...

To get the Accession record(s) included in the response, give it a `resolve[]` parameter, like this:

GET /repositories/2/archival_objects/1?resolve[]=accession_links
...
  "accession_links":
  [
    {
      "ref": "/repositories/2/accessions/5",
      "_resolved":
      {
        "lock_version": 1,
        "jsonmodel_type": "accession",
        …
      }
    },
    ...
  ],
...

This is a general rule: if you see a property in a record that includes refs, you can get the referenced records included in the response by giving it a `resolve[]` parameter with a value set to the name of the property. The `[]` part of the parameter name means it is repeatable, so you can resolve as many properties as you like.

I hope that helps.


Cheers,
James




> On Jul 1, 2023, at 12:25 AM, Hand, Sarit <shand at ap.org> wrote:
> 
> Thanks Kevin!
>  
> Cheers,
> <image001.png>                                              <image002.jpg>
> Sarit Hand                                                       200 Liberty St.
> Digital Archivist                                               New York, NY 10281
> Corporate Archives                                         T 212.621.7035
>  
> 
> shand at ap.org <mailto:shand at ap.org>                                                 
> www.ap.org <http://www.ap.org/>
> From: archivesspace_users_group-bounces at lyralists.lyrasis.org <mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> <archivesspace_users_group-bounces at lyralists.lyrasis.org <mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org>> On Behalf Of Clair, Kevin
> Sent: Friday, June 30, 2023 9:38 AM
> To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org <mailto:archivesspace_users_group at lyralists.lyrasis.org>>
> Subject: Re: [Archivesspace_Users_Group] EAD export and/or API call for Accession links
>  
> [EXTERNAL]
> 
> That I don't know; we don't have any accessions linked to archival objects in our database.  -k
> From: archivesspace_users_group-bounces at lyralists.lyrasis.org <mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> <archivesspace_users_group-bounces at lyralists.lyrasis.org <mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org>> on behalf of Hand, Sarit <shand at ap.org <mailto:shand at ap.org>>
> Sent: Friday, June 30, 2023 9:34 AM
> To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org <mailto:archivesspace_users_group at lyralists.lyrasis.org>>
> Subject: Re: [Archivesspace_Users_Group] EAD export and/or API call for Accession links
>  
> Hi Kevin,
>  
> Do you know if that returns the Accession data for the component records as well.  I have not yet mastered APIs
>  
> Many thanks
>  
> Cheers,
> <image001.png>                                              <image002.jpg>
> Sarit Hand                                                       200 Liberty St.
> Digital Archivist                                               New York, NY 10281
> Corporate Archives                                         T 212.621.7035
>  
> 
> shand at ap.org <mailto:shand at ap.org>                                                 
> www.ap.org <https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ap.org%2F&data=05%7C01%7Cshand%40ap.org%7C05028417fb8a445bcf0008db796f42e9%7Ce442e1abfd6b4ba3abf3b020eb50df37%7C1%7C0%7C638237290997627072%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=mucoYZl4BiBEvjwnN1JNImjGt6SyomQcTrkb70tVq80%3D&reserved=0>
> From: archivesspace_users_group-bounces at lyralists.lyrasis.org <mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> <archivesspace_users_group-bounces at lyralists.lyrasis.org <mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org>> On Behalf Of Clair, Kevin
> Sent: Friday, June 30, 2023 9:11 AM
> To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org <mailto:archivesspace_users_group at lyralists.lyrasis.org>>
> Subject: Re: [Archivesspace_Users_Group] EAD export and/or API call for Accession links
>  
> [EXTERNAL]
> 
> Hi Sarit,
>  
> I don't believe accessions are exported in EAD in ArchivesSpace, unless I'm missing something in the exporter code.
>  
> If you do a GET request for a resource, though, it will give you all of the accessions related to it in the "related_accessions" list (although they export as URIs, not as links per se).  -k
> From: archivesspace_users_group-bounces at lyralists.lyrasis.org <mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> <archivesspace_users_group-bounces at lyralists.lyrasis.org <mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org>> on behalf of Hand, Sarit <shand at ap.org <mailto:shand at ap.org>>
> Sent: Friday, June 30, 2023 8:41 AM
> To: archivesspace_users_group at lyralists.lyrasis.org <mailto:archivesspace_users_group at lyralists.lyrasis.org><archivesspace_users_group at lyralists.lyrasis.org <mailto:archivesspace_users_group at lyralists.lyrasis.org>>
> Subject: [Archivesspace_Users_Group] EAD export and/or API call for Accession links
>  
> Hello,
>  
> Is the accession link in a resource record or its components returned in the EAD?
> And/or can someone point me to any API calls that retrieve the Accession link?
>  
> Thank you!
>  
> Cheers,
> <image001.png>                                              <image002.jpg>
> Sarit Hand                                                       200 Liberty St.
> Digital Archivist                                               New York, NY 10281
> Corporate Archives                                         T 212.621.7035
>  
> 
> shand at ap.org <mailto:shand at ap.org>                                                 
> www.ap.org <https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ap.org%2F&data=05%7C01%7Cshand%40ap.org%7C05028417fb8a445bcf0008db796f42e9%7Ce442e1abfd6b4ba3abf3b020eb50df37%7C1%7C0%7C638237290997627072%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=mucoYZl4BiBEvjwnN1JNImjGt6SyomQcTrkb70tVq80%3D&reserved=0>
> The information contained in this communication is intended for the use of the designated recipients named above. If the reader of this communication is not the intended recipient, you are hereby notified that you have received this communication in error, and that any review, dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify The Associated Press immediately by telephone at +1-212-621-1500 and delete this email. Thank you. 
> The information contained in this communication is intended for the use of the designated recipients named above. If the reader of this communication is not the intended recipient, you are hereby notified that you have received this communication in error, and that any review, dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify The Associated Press immediately by telephone at +1-212-621-1500 and delete this email. Thank you. 
> The information contained in this communication is intended for the use of the designated recipients named above. If the reader of this communication is not the intended recipient, you are hereby notified that you have received this communication in error, and that any review, dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify The Associated Press immediately by telephone at +1-212-621-1500 and delete this email. Thank you._______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org <mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20230701/8f55859a/attachment.html>


More information about the Archivesspace_Users_Group mailing list