Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hudmol/archivematica_plugin
Integration endpoints for Archivematica
https://github.com/hudmol/archivematica_plugin
Last synced: 22 days ago
JSON representation
Integration endpoints for Archivematica
- Host: GitHub
- URL: https://github.com/hudmol/archivematica_plugin
- Owner: hudmol
- Created: 2015-09-21T00:29:18.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-21T03:18:26.000Z (almost 9 years ago)
- Last Synced: 2024-02-25T20:43:01.048Z (4 months ago)
- Language: Ruby
- Size: 87.9 KB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Lists
- awesome-archivesspace - ArchivesSpace-Archivematica Integration
README
Integration endpoints for Archivematica.
## Installation
cd /path/to/your/archivesspace/plugins
git clone https://github.com/hudmol/archivematica_plugin.gitThen edit the ArchivesSpace `config/config.rb` and add the plugin to the list:
AppConfig[:plugins] = ['local', 'other_plugins', 'archivematica_plugin']
## Using it
Once installed, the ArchivesSpace backend will respond to some
additional queries:### Find Digital Object Components by component_id
> GET /repositories/2/find_by_id/digital_object_components?component_id[]=123 HTTP/1.1
> User-Agent: curl/7.38.0
> Host: localhost:8089
> Accept: */*
> X-ArchivesSpace-Session: [token]
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Cache-Control: private, must-revalidate, max-age=0
< X-Content-Type-Options: nosniff
< Content-Length: 86{
"digital_object_components": [
{
"ref": "/repositories/2/digital_object_components/1"
}
]
}### Find Archival Objects by ref_id
> GET /repositories/2/find_by_id/archival_objects?ref_id[]=987 HTTP/1.1
> User-Agent: curl/7.38.0
> Host: localhost:8089
> Accept: */*
> X-ArchivesSpace-Session: [token]
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Cache-Control: private, must-revalidate, max-age=0
< X-Content-Type-Options: nosniff
< Content-Length: 72{
"archival_objects": [
{
"ref": "/repositories/2/archival_objects/25324"
}
]
}### Find Archival Objects by component_id
This uses the same endpoint with a different parameter name:
> GET /repositories/2/find_by_id/archival_objects?component_id[]=987 HTTP/1.1
...If you specify both `ref_id[]` and `component_id[]` parameters, you
get back records matching either identifier (a logical OR).### Finding and getting records in a single request
If you pass an extra parameter like:
resolve[]=archival_objects&resolve[]=digital_object_components
Then ArchivesSpace will return the full JSON object representing each
record found. The response structure is the same, but you'll get an
extra '_resolved' key in each object that contains the record itself.
For example:{
"archival_objects": [
{
"ref": "/repositories/2/archival_objects/25324",
"_resolved": {
"title": "Some ArchivalObject",
"resource" {
"ref": "/repositories/2/resources/555"
},...
}
}
]
}