Navbar
Logo
shell

Introduction

This is the documentation for the ArchivesSpace RESTful API. This documents the endpoints that are used by the backend server to edit records in the application.

This example API documentation page was created with Slate.

Authentication

To authorize, use this code:

Example Request:

# With shell, you can just pass the correct header with each request
curl -s -F password="admin" "http://localhost:8089/users/admin/login"

Example Response:

{
   "session":"9528190655b979f00817a5d38f9daf07d1686fed99a1d53dd2c9ff2d852a0c6e",
   "user":{
      "lock_version":6,
      "username":"admin",
      "name":"Administrator",
      "is_system_user":true,
      "create_time":"2015-05-08T13:10:06Z",
      "system_mtime":"2015-07-07T10:21:53Z",
      "user_mtime":"2015-07-07T10:21:53Z",
      "jsonmodel_type":"user",
      "groups":[

      ],
      "is_admin":true,
      "uri":"/users/1",
      "agent_record":{
         "ref":"/agents/people/1"
      },
      "permissions":{
         "/repositories/1":[
            "update_location_record",
            "delete_vocabulary_record",
            "update_subject_record",
            "delete_subject_record",
            "update_agent_record",
            "delete_agent_record",
            "update_vocabulary_record",
            "merge_subject_record",
            "merge_agent_record",
            "administer_system",
            "become_user",
            "cancel_importer_job",
            "create_repository",
            "delete_archival_record",
            "delete_classification_record",
            "delete_event_record",
            "delete_repository",
            "import_records",
            "index_system",
            "manage_agent_record",
            "manage_repository",
            "manage_subject_record",
            "manage_users",
            "manage_vocabulary_record",
            "mediate_edits",
            "merge_agents_and_subjects",
            "merge_archival_record",
            "suppress_archival_record",
            "system_config",
            "transfer_archival_record",
            "transfer_repository",
            "update_accession_record",
            "update_classification_record",
            "update_digital_object_record",
            "update_event_record",
            "update_resource_record",
            "view_all_records",
            "view_repository",
            "view_suppressed"
         ],
         "_archivesspace":[
            "administer_system",
            "become_user",
            "cancel_importer_job",
            "create_repository",
            "delete_archival_record",
            "delete_classification_record",
            "delete_event_record",
            "delete_repository",
            "import_records",
            "index_system",
            "manage_agent_record",
            "manage_repository",
            "manage_subject_record",
            "manage_users",
            "manage_vocabulary_record",
            "mediate_edits",
            "merge_agents_and_subjects",
            "merge_archival_record",
            "suppress_archival_record",
            "system_config",
            "transfer_archival_record",
            "transfer_repository",
            "update_accession_record",
            "update_classification_record",
            "update_digital_object_record",
            "update_event_record",
            "update_resource_record",
            "view_all_records",
            "view_repository",
            "view_suppressed",
            "update_location_record",
            "delete_vocabulary_record",
            "update_subject_record",
            "delete_subject_record",
            "update_agent_record",
            "delete_agent_record",
            "update_vocabulary_record",
            "merge_subject_record",
            "merge_agent_record"
         ]
      }
   }
}

It’s a good idea to save the “session” id, since this will be used for later requests.

Most requests to the ArchivesSpace backend requires a user to be authenticated. This can be done with a simple POST request to the /users/:user_name/login endpoint, with :user_name and :password parameters being supplied.

The JSON that is returned will have a session key, which can be stored and used for other requests. Sessions will expire after an hour, although you can change this in your config.rb file.

ArchivesSpace REST API

As of 2019-01-14 08:02:07 -0800 the following REST endpoints exist in the master branch of the development repository:

Create a corporate entity agent

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"agent_corporate_entity",
"agent_contacts":[{ "jsonmodel_type":"agent_contact",
"telephones":[{ "jsonmodel_type":"telephone",
"number_type":"business",
"number":"5876 0048 068",
"ext":"254CWR583"}],
"name":"Name Number 599",
"address_2":"428GB682817",
"address_3":"235GKJ13",
"city":"J251I602552",
"region":"745WQQE",
"email":"YDR330V",
"note":"YT861534Y"}],
"linked_agent_roles":[],
"external_documents":[],
"notes":[],
"used_within_repositories":[],
"used_within_published_repositories":[],
"dates_of_existence":[{ "jsonmodel_type":"date",
"date_type":"inclusive",
"label":"existence",
"begin":"1996-04-07",
"end":"1996-04-07",
"certainty":"inferred",
"era":"ce",
"calendar":"gregorian",
"expression":"K205WUC"}],
"names":[{ "jsonmodel_type":"name_corporate_entity",
"use_dates":[],
"authorized":false,
"is_display_name":false,
"sort_name_auto_generate":true,
"rules":"local",
"primary_name":"Name Number 598",
"subordinate_name_1":"617OSTQ",
"subordinate_name_2":"Y101S991J",
"number":"740516MJ498",
"sort_name":"SORT j - 516",
"dates":"SFTX846",
"qualifier":"UKDQG",
"authority_id":"http://www.example-563.com",
"source":"naf"}],
"related_agents":[],
"agent_type":"agent_corporate_entity"}' \
  "http://localhost:8089/agents/corporate_entities"

Endpoint

[:POST] /agents/corporate_entities

Description

Create a corporate entity agent

Parameters

JSONModel(:agent_corporate_entity) – The record to create

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

List all corporate entity agents


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/agents/corporate_entities?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/agents/corporate_entities?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/agents/corporate_entities?all_ids=true"


Endpoint

[:GET] /agents/corporate_entities

Description

List all corporate entity agents

Parameters

Returns

200 – [(:agent_corporate_entity)]

Update a corporate entity agent

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"agent_corporate_entity",
"agent_contacts":[{ "jsonmodel_type":"agent_contact",
"telephones":[{ "jsonmodel_type":"telephone",
"number_type":"business",
"number":"5876 0048 068",
"ext":"254CWR583"}],
"name":"Name Number 599",
"address_2":"428GB682817",
"address_3":"235GKJ13",
"city":"J251I602552",
"region":"745WQQE",
"email":"YDR330V",
"note":"YT861534Y"}],
"linked_agent_roles":[],
"external_documents":[],
"notes":[],
"used_within_repositories":[],
"used_within_published_repositories":[],
"dates_of_existence":[{ "jsonmodel_type":"date",
"date_type":"inclusive",
"label":"existence",
"begin":"1996-04-07",
"end":"1996-04-07",
"certainty":"inferred",
"era":"ce",
"calendar":"gregorian",
"expression":"K205WUC"}],
"names":[{ "jsonmodel_type":"name_corporate_entity",
"use_dates":[],
"authorized":false,
"is_display_name":false,
"sort_name_auto_generate":true,
"rules":"local",
"primary_name":"Name Number 598",
"subordinate_name_1":"617OSTQ",
"subordinate_name_2":"Y101S991J",
"number":"740516MJ498",
"sort_name":"SORT j - 516",
"dates":"SFTX846",
"qualifier":"UKDQG",
"authority_id":"http://www.example-563.com",
"source":"naf"}],
"related_agents":[],
"agent_type":"agent_corporate_entity"}' \
  "http://localhost:8089/agents/corporate_entities/1"

Endpoint

[:POST] /agents/corporate_entities/:id

Description

Update a corporate entity agent

Parameters

Integer id – The ID of the record

JSONModel(:agent_corporate_entity) – The updated record

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Get a corporate entity by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/agents/corporate_entities/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /agents/corporate_entities/:id

Description

Get a corporate entity by ID

Parameters

Integer id – ID of the corporate entity agent

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:agent_corporate_entity)

404 – Not found

Delete a corporate entity agent

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/agents/corporate_entities/1"

Endpoint

[:DELETE] /agents/corporate_entities/:id

Description

Delete a corporate entity agent

Parameters

Integer id – ID of the corporate entity agent

Returns

200 – deleted

Create a family agent

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"agent_family",
"agent_contacts":[],
"linked_agent_roles":[],
"external_documents":[],
"notes":[],
"used_within_repositories":[],
"used_within_published_repositories":[],
"dates_of_existence":[{ "jsonmodel_type":"date",
"date_type":"bulk",
"label":"existence",
"begin":"2005-07-11",
"end":"2005-07-11",
"certainty":"inferred",
"era":"ce",
"calendar":"gregorian",
"expression":"MF772233T"}],
"names":[{ "jsonmodel_type":"name_family",
"use_dates":[],
"authorized":false,
"is_display_name":false,
"sort_name_auto_generate":true,
"rules":"aacr",
"family_name":"Name Number 600",
"sort_name":"SORT d - 517",
"dates":"CXHJC",
"qualifier":"90UQS649",
"prefix":"41012LNO",
"authority_id":"http://www.example-564.com",
"source":"naf"}],
"related_agents":[],
"agent_type":"agent_family"}' \
  "http://localhost:8089/agents/families"

Endpoint

[:POST] /agents/families

Description

Create a family agent

Parameters

JSONModel(:agent_family) – The record to create

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

List all family agents


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/agents/families?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/agents/families?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/agents/families?all_ids=true"


Endpoint

[:GET] /agents/families

Description

List all family agents

Parameters

Returns

200 – [(:agent_family)]

Update a family agent

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"agent_family",
"agent_contacts":[],
"linked_agent_roles":[],
"external_documents":[],
"notes":[],
"used_within_repositories":[],
"used_within_published_repositories":[],
"dates_of_existence":[{ "jsonmodel_type":"date",
"date_type":"bulk",
"label":"existence",
"begin":"2005-07-11",
"end":"2005-07-11",
"certainty":"inferred",
"era":"ce",
"calendar":"gregorian",
"expression":"MF772233T"}],
"names":[{ "jsonmodel_type":"name_family",
"use_dates":[],
"authorized":false,
"is_display_name":false,
"sort_name_auto_generate":true,
"rules":"aacr",
"family_name":"Name Number 600",
"sort_name":"SORT d - 517",
"dates":"CXHJC",
"qualifier":"90UQS649",
"prefix":"41012LNO",
"authority_id":"http://www.example-564.com",
"source":"naf"}],
"related_agents":[],
"agent_type":"agent_family"}' \
  "http://localhost:8089/agents/families/1"

Endpoint

[:POST] /agents/families/:id

Description

Update a family agent

Parameters

Integer id – The ID of the record

JSONModel(:agent_family) – The updated record

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Get a family by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/agents/families/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /agents/families/:id

Description

Get a family by ID

Parameters

Integer id – ID of the family agent

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:agent)

404 – Not found

Delete an agent family

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/agents/families/1"

Endpoint

[:DELETE] /agents/families/:id

Description

Delete an agent family

Parameters

Integer id – ID of the family agent

Returns

200 – deleted

Create a person agent

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"agent_person",
"agent_contacts":[],
"linked_agent_roles":[],
"external_documents":[],
"notes":[],
"used_within_repositories":[],
"used_within_published_repositories":[],
"dates_of_existence":[{ "jsonmodel_type":"date",
"date_type":"bulk",
"label":"existence",
"begin":"2000-05-02",
"end":"2000-05-02",
"certainty":"inferred",
"era":"ce",
"calendar":"gregorian",
"expression":"MWVWF"}],
"names":[{ "jsonmodel_type":"name_person",
"use_dates":[],
"authorized":false,
"is_display_name":false,
"sort_name_auto_generate":true,
"rules":"local",
"source":"nad",
"primary_name":"Name Number 601",
"sort_name":"SORT c - 518",
"name_order":"direct",
"number":"332PR682K",
"dates":"FOQ456V",
"qualifier":"KD319DV",
"fuller_form":"WJBHR",
"prefix":"KFOSQ",
"title":"986836QX382",
"suffix":"HQGR648",
"rest_of_name":"U512154PG",
"authority_id":"http://www.example-565.com"}],
"related_agents":[],
"agent_type":"agent_person"}' \
  "http://localhost:8089/agents/people"

Endpoint

[:POST] /agents/people

Description

Create a person agent

Parameters

JSONModel(:agent_person) – The record to create

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

List all person agents


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/agents/people?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/agents/people?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/agents/people?all_ids=true"


Endpoint

[:GET] /agents/people

Description

List all person agents

Parameters

Returns

200 – [(:agent_person)]

Update a person agent

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"agent_person",
"agent_contacts":[],
"linked_agent_roles":[],
"external_documents":[],
"notes":[],
"used_within_repositories":[],
"used_within_published_repositories":[],
"dates_of_existence":[{ "jsonmodel_type":"date",
"date_type":"bulk",
"label":"existence",
"begin":"2000-05-02",
"end":"2000-05-02",
"certainty":"inferred",
"era":"ce",
"calendar":"gregorian",
"expression":"MWVWF"}],
"names":[{ "jsonmodel_type":"name_person",
"use_dates":[],
"authorized":false,
"is_display_name":false,
"sort_name_auto_generate":true,
"rules":"local",
"source":"nad",
"primary_name":"Name Number 601",
"sort_name":"SORT c - 518",
"name_order":"direct",
"number":"332PR682K",
"dates":"FOQ456V",
"qualifier":"KD319DV",
"fuller_form":"WJBHR",
"prefix":"KFOSQ",
"title":"986836QX382",
"suffix":"HQGR648",
"rest_of_name":"U512154PG",
"authority_id":"http://www.example-565.com"}],
"related_agents":[],
"agent_type":"agent_person"}' \
  "http://localhost:8089/agents/people/1"

Endpoint

[:POST] /agents/people/:id

Description

Update a person agent

Parameters

Integer id – The ID of the record

JSONModel(:agent_person) – The updated record

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Get a person by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/agents/people/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /agents/people/:id

Description

Get a person by ID

Parameters

Integer id – ID of the person agent

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:agent)

404 – Not found

Delete an agent person

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/agents/people/1"

Endpoint

[:DELETE] /agents/people/:id

Description

Delete an agent person

Parameters

Integer id – ID of the person agent

Returns

200 – deleted

Create a software agent

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"agent_software",
"agent_contacts":[],
"linked_agent_roles":[],
"external_documents":[],
"notes":[],
"used_within_repositories":[],
"used_within_published_repositories":[],
"dates_of_existence":[{ "jsonmodel_type":"date",
"date_type":"range",
"label":"existence",
"begin":"2006-09-17",
"end":"2006-09-17",
"certainty":"inferred",
"era":"ce",
"calendar":"gregorian",
"expression":"T888GFE"}],
"names":[{ "jsonmodel_type":"name_software",
"use_dates":[],
"authorized":false,
"is_display_name":false,
"sort_name_auto_generate":true,
"rules":"dacs",
"software_name":"Name Number 602",
"sort_name":"SORT y - 519"}],
"agent_type":"agent_software"}' \
  "http://localhost:8089/agents/software"

Endpoint

[:POST] /agents/software

Description

Create a software agent

Parameters

JSONModel(:agent_software) – The record to create

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

List all software agents


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/agents/software?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/agents/software?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/agents/software?all_ids=true"


Endpoint

[:GET] /agents/software

Description

List all software agents

Parameters

Returns

200 – [(:agent_software)]

Update a software agent

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"agent_software",
"agent_contacts":[],
"linked_agent_roles":[],
"external_documents":[],
"notes":[],
"used_within_repositories":[],
"used_within_published_repositories":[],
"dates_of_existence":[{ "jsonmodel_type":"date",
"date_type":"range",
"label":"existence",
"begin":"2006-09-17",
"end":"2006-09-17",
"certainty":"inferred",
"era":"ce",
"calendar":"gregorian",
"expression":"T888GFE"}],
"names":[{ "jsonmodel_type":"name_software",
"use_dates":[],
"authorized":false,
"is_display_name":false,
"sort_name_auto_generate":true,
"rules":"dacs",
"software_name":"Name Number 602",
"sort_name":"SORT y - 519"}],
"agent_type":"agent_software"}' \
  "http://localhost:8089/agents/software/1"

Endpoint

[:POST] /agents/software/:id

Description

Update a software agent

Parameters

Integer id – The ID of the record

JSONModel(:agent_software) – The updated record

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Get a software agent by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/agents/software/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /agents/software/:id

Description

Get a software agent by ID

Parameters

Integer id – ID of the software agent

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:agent)

404 – Not found

Delete a software agent

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/agents/software/1"

Endpoint

[:DELETE] /agents/software/:id

Description

Delete a software agent

Parameters

Integer id – ID of the software agent

Returns

200 – deleted

Carry out delete requests against a list of records

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/batch_delete?record_uris=A854IWH"

Endpoint

[:POST] /batch_delete

Description

Carry out delete requests against a list of records

Parameters

[String] record_uris – A list of record uris

Returns

200 – deleted

List records by their external ID(s)


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/by-external-id?eid=551429GM673&type=850186XFP"


Endpoint

[:GET] /by-external-id

Description

List records by their external ID(s)

Parameters

String eid – An external ID to find

[String] type (Optional) – The record type to search (useful if IDs may be shared between different types)

Returns

303 – A redirect to the URI named by the external ID (if there’s only one)

300 – A JSON-formatted list of URIs if there were multiple matches

404 – No external ID matched

Get an Enumeration Value


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/config/enumeration_values/1"


Endpoint

[:GET] /config/enumeration_values/:enum_val_id

Description

Get an Enumeration Value

Parameters

Integer enum_val_id – The ID of the enumeration value to retrieve

Returns

200 – (:enumeration_value)

Update an enumeration value

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/config/enumeration_values/1"

Endpoint

[:POST] /config/enumeration_values/:enum_val_id

Description

Update an enumeration value

Parameters

Integer enum_val_id – The ID of the enumeration value to update

JSONModel(:enumeration_value) – The enumeration value to update

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Update the position of an ennumeration value

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/config/enumeration_values/1/position?position=1"

Endpoint

[:POST] /config/enumeration_values/:enum_val_id/position

Description

Update the position of an ennumeration value

Parameters

Integer enum_val_id – The ID of the enumeration value to update

Integer position – The target position in the value list

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Suppress this value

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/config/enumeration_values/1/suppressed?suppressed=true"

Endpoint

[:POST] /config/enumeration_values/:enum_val_id/suppressed

Description

Suppress this value

Parameters

Integer enum_val_id – The ID of the enumeration value to update

RESTHelpers::BooleanParam suppressed – Suppression state

Returns

200 – {:status => “Suppressed”, :id => (id of updated object), :suppressed_state => (true|false)}

400 – {:error => (description of error)}

List all defined enumerations


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/config/enumerations"


Endpoint

[:GET] /config/enumerations

Description

List all defined enumerations

Parameters

Returns

200 – [(:enumeration)]

Create an enumeration

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/config/enumerations"

Endpoint

[:POST] /config/enumerations

Description

Create an enumeration

Parameters

JSONModel(:enumeration) – The record to create

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

Update an enumeration

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/config/enumerations/1"

Endpoint

[:POST] /config/enumerations/:enum_id

Description

Update an enumeration

Parameters

Integer enum_id – The ID of the enumeration to update

JSONModel(:enumeration) – The enumeration to update

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Get an Enumeration


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/config/enumerations/1"


Endpoint

[:GET] /config/enumerations/:enum_id

Description

Get an Enumeration

Parameters

Integer enum_id – The ID of the enumeration to retrieve

Returns

200 – (:enumeration)

Migrate all records from using one value to another

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/config/enumerations/migration"

Endpoint

[:POST] /config/enumerations/migration

Description

Migrate all records from using one value to another

Parameters

JSONModel(:enumeration_migration) – The migration request

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Get an Enumeration by Name


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/config/enumerations/names/1"


Endpoint

[:GET] /config/enumerations/names/:enum_name

Description

Get an Enumeration by Name

Parameters

String enum_name – The name of the enumeration to retrieve

Returns

200 – (:enumeration)

Create a Container_Profile

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"container_profile",
"name":"FJX425D",
"url":"AM99XS",
"dimension_units":"meters",
"extent_dimension":"height",
"depth":"28",
"height":"35",
"width":"87"}' \
  "http://localhost:8089/container_profiles"

Endpoint

[:POST] /container_profiles

Description

Create a Container_Profile

Parameters

JSONModel(:container_profile) – The record to create

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

Get a list of Container Profiles


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/container_profiles?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/container_profiles?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/container_profiles?all_ids=true"


Endpoint

[:GET] /container_profiles

Description

Get a list of Container Profiles

Parameters

Returns

200 – [(:container_profile)]

Update a Container Profile

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"container_profile",
"name":"FJX425D",
"url":"AM99XS",
"dimension_units":"meters",
"extent_dimension":"height",
"depth":"28",
"height":"35",
"width":"87"}' \
  "http://localhost:8089/container_profiles/1"

Endpoint

[:POST] /container_profiles/:id

Description

Update a Container Profile

Parameters

Integer id – The ID of the record

JSONModel(:container_profile) – The updated record

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Get a Container Profile by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/container_profiles/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /container_profiles/:id

Description

Get a Container Profile by ID

Parameters

Integer id – The ID of the record

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:container_profile)

Delete an Container Profile

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/container_profiles/1"

Endpoint

[:DELETE] /container_profiles/:id

Description

Delete an Container Profile

Parameters

Integer id – The ID of the record

Returns

200 – deleted

Get the global Preferences records for the current user.


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/current_global_preferences"


Endpoint

[:GET] /current_global_preferences

Description

Get the global Preferences records for the current user.

Parameters

Returns

200 – {(:preference)}

Calculate the dates of an archival object tree


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/date_calculator?record_uri=519E807837R&label=22328E669Y"


Endpoint

[:GET] /date_calculator

Description

Calculate the dates of an archival object tree

Parameters

String record_uri – The uri of the object

String label (Optional) – The date label to filter on

Returns

200 – Calculation results

Get a stream of deleted records


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/delete-feed?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/delete-feed?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/delete-feed?all_ids=true"


Endpoint

[:GET] /delete-feed

Description

Get a stream of deleted records

Parameters

Returns

200 – a list of URIs that were deleted

Calculate the extent of an archival object tree


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/extent_calculator?record_uri=X193KAB&unit=251351K465626"


Endpoint

[:GET] /extent_calculator

Description

Calculate the extent of an archival object tree

Parameters

String record_uri – The uri of the object

String unit (Optional) – The unit of measurement to use

Returns

200 – Calculation results

List all supported job types


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/job_types"


Endpoint

[:GET] /job_types

Description

List all supported job types

Parameters

Returns

200 – A list of supported job types

Create a Location_Profile

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"location_profile",
"name":"152807202HA",
"dimension_units":"yards",
"depth":"50",
"height":"57",
"width":"2"}' \
  "http://localhost:8089/location_profiles"

Endpoint

[:POST] /location_profiles

Description

Create a Location_Profile

Parameters

JSONModel(:location_profile) – The record to create

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

Get a list of Location Profiles


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/location_profiles?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/location_profiles?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/location_profiles?all_ids=true"


Endpoint

[:GET] /location_profiles

Description

Get a list of Location Profiles

Parameters

Returns

200 – [(:location_profile)]

Update a Location Profile

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"location_profile",
"name":"152807202HA",
"dimension_units":"yards",
"depth":"50",
"height":"57",
"width":"2"}' \
  "http://localhost:8089/location_profiles/1"

Endpoint

[:POST] /location_profiles/:id

Description

Update a Location Profile

Parameters

Integer id – The ID of the record

JSONModel(:location_profile) – The updated record

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Get a Location Profile by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/location_profiles/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /location_profiles/:id

Description

Get a Location Profile by ID

Parameters

Integer id – The ID of the record

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:location_profile)

Delete an Location Profile

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/location_profiles/1"

Endpoint

[:DELETE] /location_profiles/:id

Description

Delete an Location Profile

Parameters

Integer id – The ID of the record

Returns

200 – deleted

Create a Location

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"location",
"external_ids":[],
"functions":[],
"building":"147 W 4th Street",
"floor":"8",
"room":"15",
"area":"Front",
"barcode":"01011001011100111100",
"temporary":"exhibit"}' \
  "http://localhost:8089/locations"

Endpoint

[:POST] /locations

Description

Create a Location

Parameters

JSONModel(:location) – The record to create

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

Get a list of locations


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/locations?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/locations?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/locations?all_ids=true"


Endpoint

[:GET] /locations

Description

Get a list of locations

Parameters

Returns

200 – [(:location)]

Update a Location

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"location",
"external_ids":[],
"functions":[],
"building":"147 W 4th Street",
"floor":"8",
"room":"15",
"area":"Front",
"barcode":"01011001011100111100",
"temporary":"exhibit"}' \
  "http://localhost:8089/locations/1"

Endpoint

[:POST] /locations/:id

Description

Update a Location

Parameters

Integer id – The ID of the record

JSONModel(:location) – The updated record

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Get a Location by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/locations/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /locations/:id

Description

Get a Location by ID

Parameters

Integer id – The ID of the record

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:location)

Delete a Location

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/locations/1"

Endpoint

[:DELETE] /locations/:id

Description

Delete a Location

Parameters

Integer id – The ID of the record

Returns

200 – deleted

Create a Batch of Locations

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/locations/batch?dry_run=true"

Endpoint

[:POST] /locations/batch

Description

Create a Batch of Locations

Parameters

RESTHelpers::BooleanParam dry_run (Optional) – If true, don’t create the locations, just list them

JSONModel(:location_batch) – The location batch data to generate all locations

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Update a Location

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/locations/batch_update"

Endpoint

[:POST] /locations/batch_update

Description

Update a Location

Parameters

JSONModel(:location_batch_update) – The location batch data to update all locations

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Log out the current session

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/logout"

Endpoint

[:POST] /logout

Description

Log out the current session

Parameters

Returns

200 – Session logged out

Carry out a merge request against Agent records

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/merge_requests/agent"

Endpoint

[:POST] /merge_requests/agent

Description

Carry out a merge request against Agent records

Parameters

JSONModel(:merge_request) – A merge request

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Carry out a detailed merge request against Agent records

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/merge_requests/agent_detail?dry_run=true"

Endpoint

[:POST] /merge_requests/agent_detail

Description

Carry out a detailed merge request against Agent records

Parameters

RESTHelpers::BooleanParam dry_run (Optional) – If true, don’t process the merge, just display the merged record

JSONModel(:merge_request_detail) – A detailed merge request

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Carry out a merge request against Digital_Object records

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/merge_requests/digital_object"

Endpoint

[:POST] /merge_requests/digital_object

Description

Carry out a merge request against Digital_Object records

Parameters

Integer repo_id – The Repository ID – The Repository must exist

JSONModel(:merge_request) – A merge request

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Carry out a merge request against Resource records

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/merge_requests/resource"

Endpoint

[:POST] /merge_requests/resource

Description

Carry out a merge request against Resource records

Parameters

Integer repo_id – The Repository ID – The Repository must exist

JSONModel(:merge_request) – A merge request

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Carry out a merge request against Subject records

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/merge_requests/subject"

Endpoint

[:POST] /merge_requests/subject

Description

Carry out a merge request against Subject records

Parameters

JSONModel(:merge_request) – A merge request

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Get a stream of notifications


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/notifications?last_sequence=1"


Endpoint

[:GET] /notifications

Description

Get a stream of notifications

Parameters

Integer last_sequence (Optional) – The last sequence number seen

Returns

200 – a list of notifications

Get a list of Permissions


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/permissions?level=NQ445E221"


Endpoint

[:GET] /permissions

Description

Get a list of Permissions

Parameters

String level – The permission level to get (one of: repository, global, all) – Must be one of repository, global, all

Returns

200 – [(:permission)]

List all reports


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/reports"


Endpoint

[:GET] /reports

Description

List all reports

Parameters

Returns

200 – report list in json

Get a static asset for a report


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/reports/static/*?splat=458RJ128693"


Endpoint

[:GET] /reports/static/*

Description

Get a static asset for a report

Parameters

String splat – The requested asset

Returns

200 – the asset

Create a Repository

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/repositories"

Endpoint

[:POST] /repositories

Description

Create a Repository

Parameters

JSONModel(:repository) – The record to create

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

403 – access_denied

Get a list of Repositories


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories

Description

Get a list of Repositories

Parameters

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – [(:repository)]

Update a repository

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/repositories/1"

Endpoint

[:POST] /repositories/:id

Description

Update a repository

Parameters

Integer id – The ID of the record

JSONModel(:repository) – The updated record

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Get a Repository by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:id

Description

Get a Repository by ID

Parameters

Integer id – The ID of the record

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:repository)

404 – Not found

Delete a Repository

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/repositories/2"

Endpoint

[:DELETE] /repositories/:repo_id

Description

Delete a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – deleted

Create an Accession

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"accession",
"external_ids":[],
"related_accessions":[],
"classifications":[],
"subjects":[],
"linked_events":[],
"extents":[],
"dates":[],
"external_documents":[],
"rights_statements":[],
"deaccessions":[],
"related_resources":[],
"restrictions_apply":false,
"access_restrictions":false,
"use_restrictions":false,
"linked_agents":[],
"instances":[],
"id_0":"349K102402T",
"id_1":"233EIWA",
"id_2":"A214994P652",
"id_3":"G94B60508",
"title":"Accession Title: 375",
"content_description":"Description: 274",
"condition_description":"Description: 275",
"accession_date":"1989-07-08"}' \
  "http://localhost:8089/repositories/2/accessions"

Endpoint

[:POST] /repositories/:repo_id/accessions

Description

Create an Accession

Parameters

JSONModel(:accession) – The record to create

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

Get a list of Accessions for a Repository


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/accessions?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/accessions?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/accessions?all_ids=true"


Endpoint

[:GET] /repositories/:repo_id/accessions

Description

Get a list of Accessions for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:accession)]

Update an Accession

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"accession",
"external_ids":[],
"related_accessions":[],
"classifications":[],
"subjects":[],
"linked_events":[],
"extents":[],
"dates":[],
"external_documents":[],
"rights_statements":[],
"deaccessions":[],
"related_resources":[],
"restrictions_apply":false,
"access_restrictions":false,
"use_restrictions":false,
"linked_agents":[],
"instances":[],
"id_0":"349K102402T",
"id_1":"233EIWA",
"id_2":"A214994P652",
"id_3":"G94B60508",
"title":"Accession Title: 375",
"content_description":"Description: 274",
"condition_description":"Description: 275",
"accession_date":"1989-07-08"}' \
  "http://localhost:8089/repositories/2/accessions/1"

Endpoint

[:POST] /repositories/:repo_id/accessions/:id

Description

Update an Accession

Parameters

Integer id – The ID of the record

JSONModel(:accession) – The updated record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Get an Accession by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/accessions/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/accessions/:id

Description

Get an Accession by ID

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:accession)

Delete an Accession

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/repositories/2/accessions/1"

Endpoint

[:DELETE] /repositories/:repo_id/accessions/:id

Description

Delete an Accession

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – deleted

Suppress this record

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/accessions/1/suppressed?suppressed=true"

Endpoint

[:POST] /repositories/:repo_id/accessions/:id/suppressed

Description

Suppress this record

Parameters

Integer id – The ID of the record

RESTHelpers::BooleanParam suppressed – Suppression state

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Suppressed”, :id => (id of updated object), :suppressed_state => (true|false)}

Get Top Containers linked to an Accession


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/accessions/1/top_containers?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/accessions/:id/top_containers

Description

Get Top Containers linked to an Accession

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – a list of linked top containers

404 – Not found

Transfer this record to a different repository

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/accessions/1/transfer?target_repo=L107874212O"

Endpoint

[:POST] /repositories/:repo_id/accessions/:id/transfer

Description

Transfer this record to a different repository

Parameters

Integer id – The ID of the record

String target_repo – The URI of the target repository

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – moved

Get metadata for an EAC-CPF export of a corporate entity


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/archival_contexts/corporate_entities/1.:fmt/metadata"


Endpoint

[:GET] /repositories/:repo_id/archival_contexts/corporate_entities/:id.:fmt/metadata

Description

Get metadata for an EAC-CPF export of a corporate entity

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – The export metadata

Get an EAC-CPF representation of a Corporate Entity


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/archival_contexts/corporate_entities/1.xml"


Endpoint

[:GET] /repositories/:repo_id/archival_contexts/corporate_entities/:id.xml

Description

Get an EAC-CPF representation of a Corporate Entity

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:agent)

Get metadata for an EAC-CPF export of a family


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/archival_contexts/families/1.:fmt/metadata"


Endpoint

[:GET] /repositories/:repo_id/archival_contexts/families/:id.:fmt/metadata

Description

Get metadata for an EAC-CPF export of a family

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – The export metadata

Get an EAC-CPF representation of a Family


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/archival_contexts/families/1.xml"


Endpoint

[:GET] /repositories/:repo_id/archival_contexts/families/:id.xml

Description

Get an EAC-CPF representation of a Family

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:agent)

Get metadata for an EAC-CPF export of a person


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/archival_contexts/people/1.:fmt/metadata"


Endpoint

[:GET] /repositories/:repo_id/archival_contexts/people/:id.:fmt/metadata

Description

Get metadata for an EAC-CPF export of a person

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – The export metadata

Get an EAC-CPF representation of an Agent


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/archival_contexts/people/1.xml"


Endpoint

[:GET] /repositories/:repo_id/archival_contexts/people/:id.xml

Description

Get an EAC-CPF representation of an Agent

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:agent)

Get metadata for an EAC-CPF export of a software


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/archival_contexts/softwares/1.:fmt/metadata"


Endpoint

[:GET] /repositories/:repo_id/archival_contexts/softwares/:id.:fmt/metadata

Description

Get metadata for an EAC-CPF export of a software

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – The export metadata

Get an EAC-CPF representation of a Software agent


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/archival_contexts/softwares/1.xml"


Endpoint

[:GET] /repositories/:repo_id/archival_contexts/softwares/:id.xml

Description

Get an EAC-CPF representation of a Software agent

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:agent)

Create an Archival Object

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"archival_object",
"external_ids":[],
"subjects":[],
"linked_events":[],
"extents":[],
"dates":[],
"external_documents":[],
"rights_statements":[],
"linked_agents":[],
"restrictions_apply":false,
"ancestors":[],
"instances":[],
"notes":[],
"ref_id":"XVB593V",
"level":"subseries",
"title":"Archival Object Title: 376",
"resource":{ "ref":"/repositories/2/resources/161"}}' \
  "http://localhost:8089/repositories/2/archival_objects"

Endpoint

[:POST] /repositories/:repo_id/archival_objects

Description

Create an Archival Object

Parameters

JSONModel(:archival_object) – The record to create

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

Get a list of Archival Objects for a Repository


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/archival_objects?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/archival_objects?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/archival_objects?all_ids=true"


Endpoint

[:GET] /repositories/:repo_id/archival_objects

Description

Get a list of Archival Objects for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:archival_object)]

Update an Archival Object

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"archival_object",
"external_ids":[],
"subjects":[],
"linked_events":[],
"extents":[],
"dates":[],
"external_documents":[],
"rights_statements":[],
"linked_agents":[],
"restrictions_apply":false,
"ancestors":[],
"instances":[],
"notes":[],
"ref_id":"XVB593V",
"level":"subseries",
"title":"Archival Object Title: 376",
"resource":{ "ref":"/repositories/2/resources/161"}}' \
  "http://localhost:8089/repositories/2/archival_objects/1"

Endpoint

[:POST] /repositories/:repo_id/archival_objects/:id

Description

Update an Archival Object

Parameters

Integer id – The ID of the record

JSONModel(:archival_object) – The updated record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Get an Archival Object by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/archival_objects/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/archival_objects/:id

Description

Get an Archival Object by ID

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:archival_object)

404 – Not found

Delete an Archival Object

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/repositories/2/archival_objects/1"

Endpoint

[:DELETE] /repositories/:repo_id/archival_objects/:id

Description

Delete an Archival Object

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – deleted

Move existing Archival Objects to become children of an Archival Object

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/archival_objects/1/accept_children?children=YP623200R&position=1"

Endpoint

[:POST] /repositories/:repo_id/archival_objects/:id/accept_children

Description

Move existing Archival Objects to become children of an Archival Object

Parameters

[String] children (Optional) – The children to move to the Archival Object

Integer id – The ID of the Archival Object to move children to

Integer position – The index for the first child to be moved to

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

409 – {:error => (description of error)}

Get the children of an Archival Object


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/archival_objects/1/children"


Endpoint

[:GET] /repositories/:repo_id/archival_objects/:id/children

Description

Get the children of an Archival Object

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – a list of archival object references

404 – Not found

Batch create several Archival Objects as children of an existing Archival Object

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/repositories/2/archival_objects/1/children"

Endpoint

[:POST] /repositories/:repo_id/archival_objects/:id/children

Description

Batch create several Archival Objects as children of an existing Archival Object

Parameters

JSONModel(:archival_record_children) – The children to add to the archival object

Integer id – The ID of the archival object to add children to

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

409 – {:error => (description of error)}

Set the parent/position of an Archival Object in a tree

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/archival_objects/1/parent?parent=1&position=1"

Endpoint

[:POST] /repositories/:repo_id/archival_objects/:id/parent

Description

Set the parent/position of an Archival Object in a tree

Parameters

Integer id – The ID of the record

Integer parent (Optional) – The parent of this node in the tree

Integer position (Optional) – The position of this node in the tree

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Get the previous record in the tree for an Archival Object


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/archival_objects/1/previous"


Endpoint

[:GET] /repositories/:repo_id/archival_objects/:id/previous

Description

Get the previous record in the tree for an Archival Object

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:archival_object)

404 – No previous node

Suppress this record

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/archival_objects/1/suppressed?suppressed=true"

Endpoint

[:POST] /repositories/:repo_id/archival_objects/:id/suppressed

Description

Suppress this record

Parameters

Integer id – The ID of the record

RESTHelpers::BooleanParam suppressed – Suppression state

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Suppressed”, :id => (id of updated object), :suppressed_state => (true|false)}

Update this repository’s assessment attribute definitions

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/repositories/2/assessment_attribute_definitions"

Endpoint

[:POST] /repositories/:repo_id/assessment_attribute_definitions

Description

Update this repository’s assessment attribute definitions

Parameters

Integer repo_id – The Repository ID – The Repository must exist

JSONModel(:assessment_attribute_definitions) – The assessment attribute definitions

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Get this repository’s assessment attribute definitions


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/assessment_attribute_definitions"


Endpoint

[:GET] /repositories/:repo_id/assessment_attribute_definitions

Description

Get this repository’s assessment attribute definitions

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:assessment_attribute_definitions)

Create an Assessment

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/repositories/2/assessments"

Endpoint

[:POST] /repositories/:repo_id/assessments

Description

Create an Assessment

Parameters

JSONModel(:assessment) – The record to create

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

Get a list of Assessments for a Repository


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/assessments?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/assessments?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/assessments?all_ids=true"


Endpoint

[:GET] /repositories/:repo_id/assessments

Description

Get a list of Assessments for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:assessment)]

Update an Assessment

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/repositories/2/assessments/1"

Endpoint

[:POST] /repositories/:repo_id/assessments/:id

Description

Update an Assessment

Parameters

Integer id – The ID of the record

JSONModel(:assessment) – The updated record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Get an Assessment by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/assessments/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/assessments/:id

Description

Get an Assessment by ID

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:assessment)

Delete an Assessment

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/repositories/2/assessments/1"

Endpoint

[:DELETE] /repositories/:repo_id/assessments/:id

Description

Delete an Assessment

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – deleted

Import a batch of records

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"body_stream"' \
  "http://localhost:8089/repositories/2/batch_imports?migration=JYQYW&skip_results=true"

Endpoint

[:POST] /repositories/:repo_id/batch_imports

Description

Import a batch of records

Parameters

body_stream batch_import – The batch of records

Integer repo_id – The Repository ID – The Repository must exist

String migration (Optional) – Param to indicate we are using a migrator

RESTHelpers::BooleanParam skip_results (Optional) – If true, don’t return the list of created record URIs

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

409 – {:error => (description of error)}

Create a Classification Term

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"classification_term",
"publish":true,
"path_from_root":[],
"linked_records":[],
"identifier":"HCH700A",
"title":"Classification Title: 378",
"description":"Description: 277",
"classification":{ "ref":"/repositories/2/classifications/12"}}' \
  "http://localhost:8089/repositories/2/classification_terms"

Endpoint

[:POST] /repositories/:repo_id/classification_terms

Description

Create a Classification Term

Parameters

JSONModel(:classification_term) – The record to create

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

Get a list of Classification Terms for a Repository


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/classification_terms?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/classification_terms?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/classification_terms?all_ids=true"


Endpoint

[:GET] /repositories/:repo_id/classification_terms

Description

Get a list of Classification Terms for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:classification_term)]

Update a Classification Term

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"classification_term",
"publish":true,
"path_from_root":[],
"linked_records":[],
"identifier":"HCH700A",
"title":"Classification Title: 378",
"description":"Description: 277",
"classification":{ "ref":"/repositories/2/classifications/12"}}' \
  "http://localhost:8089/repositories/2/classification_terms/1"

Endpoint

[:POST] /repositories/:repo_id/classification_terms/:id

Description

Update a Classification Term

Parameters

Integer id – The ID of the record

JSONModel(:classification_term) – The updated record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Get a Classification Term by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/classification_terms/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/classification_terms/:id

Description

Get a Classification Term by ID

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:classification_term)

404 – Not found

Delete a Classification Term

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/repositories/2/classification_terms/1"

Endpoint

[:DELETE] /repositories/:repo_id/classification_terms/:id

Description

Delete a Classification Term

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – deleted

Move existing Classification Terms to become children of another Classification Term

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/classification_terms/1/accept_children?children=GOR855W&position=1"

Endpoint

[:POST] /repositories/:repo_id/classification_terms/:id/accept_children

Description

Move existing Classification Terms to become children of another Classification Term

Parameters

[String] children (Optional) – The children to move to the Classification Term

Integer id – The ID of the Classification Term to move children to

Integer position – The index for the first child to be moved to

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

409 – {:error => (description of error)}

Get the children of a Classification Term


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/classification_terms/1/children"


Endpoint

[:GET] /repositories/:repo_id/classification_terms/:id/children

Description

Get the children of a Classification Term

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – a list of classification term references

404 – Not found

Set the parent/position of a Classification Term in a tree

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/classification_terms/1/parent?parent=1&position=1"

Endpoint

[:POST] /repositories/:repo_id/classification_terms/:id/parent

Description

Set the parent/position of a Classification Term in a tree

Parameters

Integer id – The ID of the record

Integer parent (Optional) – The parent of this node in the tree

Integer position (Optional) – The position of this node in the tree

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Create a Classification

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"classification",
"publish":true,
"path_from_root":[],
"linked_records":[],
"identifier":"H639OXW",
"title":"Classification Title: 377",
"description":"Description: 276"}' \
  "http://localhost:8089/repositories/2/classifications"

Endpoint

[:POST] /repositories/:repo_id/classifications

Description

Create a Classification

Parameters

JSONModel(:classification) – The record to create

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

Get a list of Classifications for a Repository


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/classifications?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/classifications?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/classifications?all_ids=true"


Endpoint

[:GET] /repositories/:repo_id/classifications

Description

Get a list of Classifications for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:classification)]

Get a Classification


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/classifications/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/classifications/:id

Description

Get a Classification

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:classification)

Update a Classification

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"classification",
"publish":true,
"path_from_root":[],
"linked_records":[],
"identifier":"H639OXW",
"title":"Classification Title: 377",
"description":"Description: 276"}' \
  "http://localhost:8089/repositories/2/classifications/1"

Endpoint

[:POST] /repositories/:repo_id/classifications/:id

Description

Update a Classification

Parameters

Integer id – The ID of the record

JSONModel(:classification) – The updated record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Delete a Classification

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/repositories/2/classifications/1"

Endpoint

[:DELETE] /repositories/:repo_id/classifications/:id

Description

Delete a Classification

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – deleted

Move existing Classification Terms to become children of a Classification

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/classifications/1/accept_children?children=GL531LH&position=1"

Endpoint

[:POST] /repositories/:repo_id/classifications/:id/accept_children

Description

Move existing Classification Terms to become children of a Classification

Parameters

[String] children (Optional) – The children to move to the Classification

Integer id – The ID of the Classification to move children to

Integer position – The index for the first child to be moved to

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

409 – {:error => (description of error)}

Get a Classification tree


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/classifications/1/tree"


Endpoint

[:GET] /repositories/:repo_id/classifications/:id/tree

Description

Get a Classification tree

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – OK

Fetch tree information for an Classification Term record within a tree


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/classifications/1/tree/node?node_uri=ML225OL&published_only=true"


Endpoint

[:GET] /repositories/:repo_id/classifications/:id/tree/node

Description

Fetch tree information for an Classification Term record within a tree

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

String node_uri – The URI of the Classification Term record of interest

RESTHelpers::BooleanParam published_only – Whether to restrict to published/unsuppressed items

Returns

200 – Returns a JSON object describing enough information about a specific node. Includes:

Fetch tree path from the root record to Classification Terms


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/classifications/1/tree/node_from_root?node_ids=1&published_only=true"


Endpoint

[:GET] /repositories/:repo_id/classifications/:id/tree/node_from_root

Description

Fetch tree path from the root record to Classification Terms

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

[Integer] node_ids – The IDs of the Classification Term records of interest

RESTHelpers::BooleanParam published_only – Whether to restrict to published/unsuppressed items

Returns

200 – Returns a JSON array describing the path to a node, starting from the root of the tree. Each path element provides:

Fetch tree information for the top-level classification record


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/classifications/1/tree/root?published_only=true"


Endpoint

[:GET] /repositories/:repo_id/classifications/:id/tree/root

Description

Fetch tree information for the top-level classification record

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

RESTHelpers::BooleanParam published_only – Whether to restrict to published/unsuppressed items

Returns

200 – Returns a JSON object describing enough information about this tree’s root record to render the rest. Includes:

Fetch the record slice for a given tree waypoint


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/classifications/1/tree/waypoint?offset=1&parent_node=PJN100L&published_only=true"


Endpoint

[:GET] /repositories/:repo_id/classifications/:id/tree/waypoint

Description

Fetch the record slice for a given tree waypoint

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Integer offset – The page of records to return

String parent_node (Optional) – The URI of the parent of this waypoint (none for the root record)

RESTHelpers::BooleanParam published_only – Whether to restrict to published/unsuppressed items

Returns

200 – Returns a JSON array containing information for the records contained in a given waypoint. Each array element is an object that includes:

Get a Collection Management Record by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/collection_management/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/collection_management/:id

Description

Get a Collection Management Record by ID

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:collection_management)

Transfer components from one resource to another

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/component_transfers?target_resource=BH598M761&component=RV192841Q"

Endpoint

[:POST] /repositories/:repo_id/component_transfers

Description

Transfer components from one resource to another

Parameters

String target_resource – The URI of the resource to transfer into

String component – The URI of the archival object to transfer

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

409 – {:error => (description of error)}

Get the Preferences records for the current repository and user.


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/current_preferences"


Endpoint

[:GET] /repositories/:repo_id/current_preferences

Description

Get the Preferences records for the current repository and user.

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {(:preference)}

Save defaults for a record type

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/repositories/2/default_values/1"

Endpoint

[:POST] /repositories/:repo_id/default_values/:record_type

Description

Save defaults for a record type

Parameters

JSONModel(:default_values) – The default values set

Integer repo_id – The Repository ID – The Repository must exist

String record_type –

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

Get default values for a record type


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/default_values/1"


Endpoint

[:GET] /repositories/:repo_id/default_values/:record_type

Description

Get default values for a record type

Parameters

Integer repo_id – The Repository ID – The Repository must exist

String record_type –

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

Create an Digital Object Component

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"digital_object_component",
"external_ids":[],
"subjects":[],
"linked_events":[],
"extents":[],
"dates":[],
"external_documents":[],
"rights_statements":[],
"linked_agents":[],
"file_versions":[],
"notes":[],
"component_id":"284128333EQ",
"title":"Digital Object Component Title: 381",
"digital_object":{ "ref":"/repositories/2/digital_objects/58"},
"position":5,
"has_unpublished_ancestor":true}' \
  "http://localhost:8089/repositories/2/digital_object_components"

Endpoint

[:POST] /repositories/:repo_id/digital_object_components

Description

Create an Digital Object Component

Parameters

JSONModel(:digital_object_component) – The record to create

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

Get a list of Digital Object Components for a Repository


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_object_components?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_object_components?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_object_components?all_ids=true"


Endpoint

[:GET] /repositories/:repo_id/digital_object_components

Description

Get a list of Digital Object Components for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:digital_object_component)]

Update an Digital Object Component

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"digital_object_component",
"external_ids":[],
"subjects":[],
"linked_events":[],
"extents":[],
"dates":[],
"external_documents":[],
"rights_statements":[],
"linked_agents":[],
"file_versions":[],
"notes":[],
"component_id":"284128333EQ",
"title":"Digital Object Component Title: 381",
"digital_object":{ "ref":"/repositories/2/digital_objects/58"},
"position":5,
"has_unpublished_ancestor":true}' \
  "http://localhost:8089/repositories/2/digital_object_components/1"

Endpoint

[:POST] /repositories/:repo_id/digital_object_components/:id

Description

Update an Digital Object Component

Parameters

Integer id – The ID of the record

JSONModel(:digital_object_component) – The updated record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Get an Digital Object Component by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_object_components/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/digital_object_components/:id

Description

Get an Digital Object Component by ID

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:digital_object_component)

404 – Not found

Delete a Digital Object Component

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/repositories/2/digital_object_components/1"

Endpoint

[:DELETE] /repositories/:repo_id/digital_object_components/:id

Description

Delete a Digital Object Component

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – deleted

Move existing Digital Object Components to become children of a Digital Object Component

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/digital_object_components/1/accept_children?children=TO237FQ&position=1"

Endpoint

[:POST] /repositories/:repo_id/digital_object_components/:id/accept_children

Description

Move existing Digital Object Components to become children of a Digital Object Component

Parameters

[String] children (Optional) – The children to move to the Digital Object Component

Integer id – The ID of the Digital Object Component to move children to

Integer position – The index for the first child to be moved to

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

409 – {:error => (description of error)}

Batch create several Digital Object Components as children of an existing Digital Object Component

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/repositories/2/digital_object_components/1/children"

Endpoint

[:POST] /repositories/:repo_id/digital_object_components/:id/children

Description

Batch create several Digital Object Components as children of an existing Digital Object Component

Parameters

JSONModel(:digital_record_children) – The children to add to the digital object component

Integer id – The ID of the digital object component to add children to

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

409 – {:error => (description of error)}

Get the children of an Digital Object Component


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_object_components/1/children"


Endpoint

[:GET] /repositories/:repo_id/digital_object_components/:id/children

Description

Get the children of an Digital Object Component

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:digital_object_component)]

404 – Not found

Set the parent/position of an Digital Object Component in a tree

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/digital_object_components/1/parent?parent=1&position=1"

Endpoint

[:POST] /repositories/:repo_id/digital_object_components/:id/parent

Description

Set the parent/position of an Digital Object Component in a tree

Parameters

Integer id – The ID of the record

Integer parent (Optional) – The parent of this node in the tree

Integer position (Optional) – The position of this node in the tree

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Suppress this record

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/digital_object_components/1/suppressed?suppressed=true"

Endpoint

[:POST] /repositories/:repo_id/digital_object_components/:id/suppressed

Description

Suppress this record

Parameters

Integer id – The ID of the record

RESTHelpers::BooleanParam suppressed – Suppression state

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Suppressed”, :id => (id of updated object), :suppressed_state => (true|false)}

Create a Digital Object

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"digital_object",
"external_ids":[],
"subjects":[],
"linked_events":[],
"extents":[{ "jsonmodel_type":"extent",
"portion":"part",
"number":"82",
"extent_type":"terabytes",
"dimensions":"YCQKH",
"physical_details":"G307903JO"}],
"dates":[{ "jsonmodel_type":"date",
"date_type":"bulk",
"label":"creation",
"begin":"2007-04-15",
"end":"2007-04-15",
"certainty":"inferred",
"era":"ce",
"calendar":"gregorian",
"expression":"HJES310"}],
"external_documents":[],
"rights_statements":[],
"linked_agents":[],
"file_versions":[{ "jsonmodel_type":"file_version",
"is_representative":false,
"file_uri":"X949O296130",
"use_statement":"text-codebook",
"xlink_actuate_attribute":"onRequest",
"xlink_show_attribute":"none",
"file_format_name":"gif",
"file_format_version":"FESC308",
"file_size_bytes":71,
"checksum":"AFC624520",
"checksum_method":"md5",
"publish":true},
{ "jsonmodel_type":"file_version",
"is_representative":false,
"file_uri":"Y83811KG",
"use_statement":"image-service-edited",
"xlink_actuate_attribute":"onLoad",
"xlink_show_attribute":"none",
"file_format_name":"mp3",
"file_format_version":"G171IEG",
"file_size_bytes":34,
"checksum":"WUTSI",
"checksum_method":"sha-256",
"publish":true},
{ "jsonmodel_type":"file_version",
"is_representative":false,
"file_uri":"QVY757412",
"use_statement":"text-ocr-edited",
"xlink_actuate_attribute":"none",
"xlink_show_attribute":"replace",
"file_format_name":"jpeg",
"file_format_version":"D5JUM",
"file_size_bytes":73,
"checksum":"222QTAJ",
"checksum_method":"sha-512",
"publish":true}],
"restrictions":false,
"notes":[],
"linked_instances":[],
"title":"Digital Object Title: 380",
"language":"fil",
"digital_object_id":"P446HO680"}' \
  "http://localhost:8089/repositories/2/digital_objects"

Endpoint

[:POST] /repositories/:repo_id/digital_objects

Description

Create a Digital Object

Parameters

JSONModel(:digital_object) – The record to create

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

Get a list of Digital Objects for a Repository


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_objects?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_objects?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_objects?all_ids=true"


Endpoint

[:GET] /repositories/:repo_id/digital_objects

Description

Get a list of Digital Objects for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:digital_object)]

Get a Digital Object


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_objects/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/digital_objects/:id

Description

Get a Digital Object

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:digital_object)

Update a Digital Object

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"digital_object",
"external_ids":[],
"subjects":[],
"linked_events":[],
"extents":[{ "jsonmodel_type":"extent",
"portion":"part",
"number":"82",
"extent_type":"terabytes",
"dimensions":"YCQKH",
"physical_details":"G307903JO"}],
"dates":[{ "jsonmodel_type":"date",
"date_type":"bulk",
"label":"creation",
"begin":"2007-04-15",
"end":"2007-04-15",
"certainty":"inferred",
"era":"ce",
"calendar":"gregorian",
"expression":"HJES310"}],
"external_documents":[],
"rights_statements":[],
"linked_agents":[],
"file_versions":[{ "jsonmodel_type":"file_version",
"is_representative":false,
"file_uri":"X949O296130",
"use_statement":"text-codebook",
"xlink_actuate_attribute":"onRequest",
"xlink_show_attribute":"none",
"file_format_name":"gif",
"file_format_version":"FESC308",
"file_size_bytes":71,
"checksum":"AFC624520",
"checksum_method":"md5",
"publish":true},
{ "jsonmodel_type":"file_version",
"is_representative":false,
"file_uri":"Y83811KG",
"use_statement":"image-service-edited",
"xlink_actuate_attribute":"onLoad",
"xlink_show_attribute":"none",
"file_format_name":"mp3",
"file_format_version":"G171IEG",
"file_size_bytes":34,
"checksum":"WUTSI",
"checksum_method":"sha-256",
"publish":true},
{ "jsonmodel_type":"file_version",
"is_representative":false,
"file_uri":"QVY757412",
"use_statement":"text-ocr-edited",
"xlink_actuate_attribute":"none",
"xlink_show_attribute":"replace",
"file_format_name":"jpeg",
"file_format_version":"D5JUM",
"file_size_bytes":73,
"checksum":"222QTAJ",
"checksum_method":"sha-512",
"publish":true}],
"restrictions":false,
"notes":[],
"linked_instances":[],
"title":"Digital Object Title: 380",
"language":"fil",
"digital_object_id":"P446HO680"}' \
  "http://localhost:8089/repositories/2/digital_objects/1"

Endpoint

[:POST] /repositories/:repo_id/digital_objects/:id

Description

Update a Digital Object

Parameters

Integer id – The ID of the record

JSONModel(:digital_object) – The updated record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Delete a Digital Object

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/repositories/2/digital_objects/1"

Endpoint

[:DELETE] /repositories/:repo_id/digital_objects/:id

Description

Delete a Digital Object

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – deleted

Move existing Digital Object components to become children of a Digital Object

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/digital_objects/1/accept_children?children=NQXRV&position=1"

Endpoint

[:POST] /repositories/:repo_id/digital_objects/:id/accept_children

Description

Move existing Digital Object components to become children of a Digital Object

Parameters

[String] children (Optional) – The children to move to the Digital Object

Integer id – The ID of the Digital Object to move children to

Integer position – The index for the first child to be moved to

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

409 – {:error => (description of error)}

Batch create several Digital Object Components as children of an existing Digital Object

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/repositories/2/digital_objects/1/children"

Endpoint

[:POST] /repositories/:repo_id/digital_objects/:id/children

Description

Batch create several Digital Object Components as children of an existing Digital Object

Parameters

JSONModel(:digital_record_children) – The component children to add to the digital object

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

409 – {:error => (description of error)}

Publish a digital object and all its sub-records and components

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/digital_objects/1/publish"

Endpoint

[:POST] /repositories/:repo_id/digital_objects/:id/publish

Description

Publish a digital object and all its sub-records and components

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Suppress this record

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/digital_objects/1/suppressed?suppressed=true"

Endpoint

[:POST] /repositories/:repo_id/digital_objects/:id/suppressed

Description

Suppress this record

Parameters

Integer id – The ID of the record

RESTHelpers::BooleanParam suppressed – Suppression state

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Suppressed”, :id => (id of updated object), :suppressed_state => (true|false)}

Transfer this record to a different repository

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/digital_objects/1/transfer?target_repo=125HWF29"

Endpoint

[:POST] /repositories/:repo_id/digital_objects/:id/transfer

Description

Transfer this record to a different repository

Parameters

Integer id – The ID of the record

String target_repo – The URI of the target repository

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – moved

Get a Digital Object tree


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_objects/1/tree"


Endpoint

[:GET] /repositories/:repo_id/digital_objects/:id/tree

Description

Get a Digital Object tree

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – OK

Fetch tree information for an Digital Object Component record within a tree


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_objects/1/tree/node?node_uri=321UBX339&published_only=true"


Endpoint

[:GET] /repositories/:repo_id/digital_objects/:id/tree/node

Description

Fetch tree information for an Digital Object Component record within a tree

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

String node_uri – The URI of the Digital Object Component record of interest

RESTHelpers::BooleanParam published_only – Whether to restrict to published/unsuppressed items

Returns

200 – Returns a JSON object describing enough information about a specific node. Includes:

Fetch tree paths from the root record to Digital Object Components


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_objects/1/tree/node_from_root?node_ids=1&published_only=true"


Endpoint

[:GET] /repositories/:repo_id/digital_objects/:id/tree/node_from_root

Description

Fetch tree paths from the root record to Digital Object Components

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

[Integer] node_ids – The IDs of the Digital Object Component records of interest

RESTHelpers::BooleanParam published_only – Whether to restrict to published/unsuppressed items

Returns

200 – Returns a JSON array describing the path to a node, starting from the root of the tree. Each path element provides:

Fetch tree information for the top-level digital object record


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_objects/1/tree/root?published_only=true"


Endpoint

[:GET] /repositories/:repo_id/digital_objects/:id/tree/root

Description

Fetch tree information for the top-level digital object record

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

RESTHelpers::BooleanParam published_only – Whether to restrict to published/unsuppressed items

Returns

200 – Returns a JSON object describing enough information about this tree’s root record to render the rest. Includes:

Fetch the record slice for a given tree waypoint


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_objects/1/tree/waypoint?offset=1&parent_node=C37218CW&published_only=true"


Endpoint

[:GET] /repositories/:repo_id/digital_objects/:id/tree/waypoint

Description

Fetch the record slice for a given tree waypoint

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Integer offset – The page of records to return

String parent_node (Optional) – The URI of the parent of this waypoint (none for the root record)

RESTHelpers::BooleanParam published_only – Whether to restrict to published/unsuppressed items

Returns

200 – Returns a JSON array containing information for the records contained in a given waypoint. Each array element is an object that includes:

Get metadata for a Dublin Core export


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_objects/dublin_core/1.:fmt/metadata"


Endpoint

[:GET] /repositories/:repo_id/digital_objects/dublin_core/:id.:fmt/metadata

Description

Get metadata for a Dublin Core export

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – The export metadata

Get a Dublin Core representation of a Digital Object


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_objects/dublin_core/1.xml"


Endpoint

[:GET] /repositories/:repo_id/digital_objects/dublin_core/:id.xml

Description

Get a Dublin Core representation of a Digital Object

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:digital_object)

Get metadata for a METS export


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_objects/mets/1.:fmt/metadata"


Endpoint

[:GET] /repositories/:repo_id/digital_objects/mets/:id.:fmt/metadata

Description

Get metadata for a METS export

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – The export metadata

Get a METS representation of a Digital Object


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_objects/mets/1.xml?dmd=IO681PH"


Endpoint

[:GET] /repositories/:repo_id/digital_objects/mets/:id.xml

Description

Get a METS representation of a Digital Object

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

String dmd (Optional) – DMD Scheme to use

Returns

200 – (:digital_object)

Get metadata for a MODS export


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_objects/mods/1.:fmt/metadata"


Endpoint

[:GET] /repositories/:repo_id/digital_objects/mods/:id.:fmt/metadata

Description

Get metadata for a MODS export

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – The export metadata

Get a MODS representation of a Digital Object


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/digital_objects/mods/1.xml"


Endpoint

[:GET] /repositories/:repo_id/digital_objects/mods/:id.xml

Description

Get a MODS representation of a Digital Object

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:digital_object)

Create an Event

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"event",
"external_ids":[],
"external_documents":[],
"linked_agents":[{ "ref":"/agents/people/337",
"role":"requester"}],
"linked_records":[{ "ref":"/repositories/2/accessions/102",
"role":"outcome"}],
"date":{ "jsonmodel_type":"date",
"date_type":"range",
"label":"creation",
"begin":"2018-11-17",
"end":"2018-11-17",
"certainty":"inferred",
"era":"ce",
"calendar":"gregorian",
"expression":"E12264494954"},
"event_type":"processing_in_progress"}' \
  "http://localhost:8089/repositories/2/events"

Endpoint

[:POST] /repositories/:repo_id/events

Description

Create an Event

Parameters

JSONModel(:event) – The record to create

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

Get a list of Events for a Repository


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/events?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/events?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/events?all_ids=true"


Endpoint

[:GET] /repositories/:repo_id/events

Description

Get a list of Events for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:event)]

Update an Event

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"event",
"external_ids":[],
"external_documents":[],
"linked_agents":[{ "ref":"/agents/people/337",
"role":"requester"}],
"linked_records":[{ "ref":"/repositories/2/accessions/102",
"role":"outcome"}],
"date":{ "jsonmodel_type":"date",
"date_type":"range",
"label":"creation",
"begin":"2018-11-17",
"end":"2018-11-17",
"certainty":"inferred",
"era":"ce",
"calendar":"gregorian",
"expression":"E12264494954"},
"event_type":"processing_in_progress"}' \
  "http://localhost:8089/repositories/2/events/1"

Endpoint

[:POST] /repositories/:repo_id/events/:id

Description

Update an Event

Parameters

Integer id – The ID of the record

JSONModel(:event) – The updated record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Get an Event by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/events/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/events/:id

Description

Get an Event by ID

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:event)

404 – Not found

Delete an event record

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/repositories/2/events/1"

Endpoint

[:DELETE] /repositories/:repo_id/events/:id

Description

Delete an event record

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – deleted

Suppress this record from non-managers

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/events/1/suppressed?suppressed=true"

Endpoint

[:POST] /repositories/:repo_id/events/:id/suppressed

Description

Suppress this record from non-managers

Parameters

Integer id – The ID of the record

RESTHelpers::BooleanParam suppressed – Suppression state

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Suppressed”, :id => (id of updated object), :suppressed_state => (true|false)}

Find Archival Objects by ref_id or component_id


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/find_by_id/archival_objects?ref_id=I306YFJ&component_id=AKTQA&resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/find_by_id/archival_objects

Description

Find Archival Objects by ref_id or component_id

Parameters

Integer repo_id – The Repository ID – The Repository must exist

[String] ref_id (Optional) – An archival object’s Ref ID (param may be repeated)

[String] component_id (Optional) – An archival object’s component ID (param may be repeated)

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – JSON array of refs

Find Digital Object Components by component_id


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/find_by_id/digital_object_components?component_id=H848GW181&resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/find_by_id/digital_object_components

Description

Find Digital Object Components by component_id

Parameters

Integer repo_id – The Repository ID – The Repository must exist

[String] component_id (Optional) – A digital object component’s component ID (param may be repeated)

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – JSON array of refs

Find Digital Objects by digital_object_id


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/find_by_id/digital_objects?digital_object_id=UKPKL&resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/find_by_id/digital_objects

Description

Find Digital Objects by digital_object_id

Parameters

Integer repo_id – The Repository ID – The Repository must exist

[String] digital_object_id (Optional) – A digital object’s digital object ID (param may be repeated)

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – JSON array of refs

Find Resources by their identifiers


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/find_by_id/resources?identifier=759BC49X&resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/find_by_id/resources

Description

Find Resources by their identifiers

Parameters

Integer repo_id – The Repository ID – The Repository must exist

[String] identifier (Optional) – A 4-part identifier expressed as a JSON array (of up to 4 strings) comprised of the id_0 to id_3 fields (though empty fields will be handled if not provided)

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – JSON array of refs

Create a group within a repository

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"group",
"description":"Description: 282",
"member_usernames":[],
"grants_permissions":[],
"group_code":"276PVLR"}' \
  "http://localhost:8089/repositories/2/groups"

Endpoint

[:POST] /repositories/:repo_id/groups

Description

Create a group within a repository

Parameters

JSONModel(:group) – The record to create

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

409 – conflict

Get a list of groups for a repository


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/groups?group_code=LIA191A"


Endpoint

[:GET] /repositories/:repo_id/groups

Description

Get a list of groups for a repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

String group_code (Optional) – Get groups by group code

Returns

200 – [(:resource)]

Update a group

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"group",
"description":"Description: 282",
"member_usernames":[],
"grants_permissions":[],
"group_code":"276PVLR"}' \
  "http://localhost:8089/repositories/2/groups/1?with_members=true"

Endpoint

[:POST] /repositories/:repo_id/groups/:id

Description

Update a group

Parameters

Integer id – The ID of the record

JSONModel(:group) – The updated record

Integer repo_id – The Repository ID – The Repository must exist

RESTHelpers::BooleanParam with_members – If ‘true’ (the default) replace the membership list with the list provided

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

409 – conflict

Get a group by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/groups/1?with_members=true"


Endpoint

[:GET] /repositories/:repo_id/groups/:id

Description

Get a group by ID

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

RESTHelpers::BooleanParam with_members – If 'true’ (the default) return the list of members with the group

Returns

200 – (:group)

404 – Not found

Delete a group by ID

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/repositories/2/groups/1"

Endpoint

[:DELETE] /repositories/:repo_id/groups/:id

Description

Delete a group by ID

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:group)

404 – Not found

Create a new job

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"job",
"status":"queued",
"job":{ "jsonmodel_type":"import_job",
"filenames":["658E644117I",
"656Y513JS",
"11I894X562",
"61324T726730"],
"import_type":"eac_xml"}}' \
  "http://localhost:8089/repositories/2/jobs"

Endpoint

[:POST] /repositories/:repo_id/jobs

Description

Create a new job

Parameters

JSONModel(:job) – The job object

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Get a list of Jobs for a Repository


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/jobs?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/jobs?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/jobs?all_ids=true"


Endpoint

[:GET] /repositories/:repo_id/jobs

Description

Get a list of Jobs for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:job)]

Delete a Job

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/repositories/2/jobs/1"

Endpoint

[:DELETE] /repositories/:repo_id/jobs/:id

Description

Delete a Job

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – deleted

Get a Job by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/jobs/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/jobs/:id

Description

Get a Job by ID

Parameters

Integer id – The ID of the record

[String] resolve (Optional) – A list of references to resolve and embed in the response

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:job)

Cancel a Job

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/jobs/1/cancel"

Endpoint

[:POST] /repositories/:repo_id/jobs/:id/cancel

Description

Cancel a Job

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Get a Job’s log by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/jobs/1/log?offset=NonNegativeInteger"


Endpoint

[:GET] /repositories/:repo_id/jobs/:id/log

Description

Get a Job’s log by ID

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

RESTHelpers::NonNegativeInteger offset – The byte offset of the log file to show

Returns

200 – The section of the import log between 'offset’ and the end of file

Get a list of Job’s output files by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/jobs/1/output_files"


Endpoint

[:GET] /repositories/:repo_id/jobs/:id/output_files

Description

Get a list of Job’s output files by ID

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – An array of output files

Get a Job’s output file by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/jobs/1/output_files/1"


Endpoint

[:GET] /repositories/:repo_id/jobs/:id/output_files/:file_id

Description

Get a Job’s output file by ID

Parameters

Integer id – The ID of the record

Integer file_id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – Returns the file

Get a Job’s list of created URIs


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/jobs/1/records?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/jobs/1/records?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/jobs/1/records?all_ids=true"


Endpoint

[:GET] /repositories/:repo_id/jobs/:id/records

Description

Get a Job’s list of created URIs

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – An array of created records

Get a list of all active Jobs for a Repository


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/jobs/active?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/jobs/active

Description

Get a list of all active Jobs for a Repository

Parameters

[String] resolve (Optional) – A list of references to resolve and embed in the response

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:job)]

Get a list of all archived Jobs for a Repository


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/jobs/archived?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/jobs/archived?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/jobs/archived?all_ids=true"


Endpoint

[:GET] /repositories/:repo_id/jobs/archived

Description

Get a list of all archived Jobs for a Repository

Parameters

[String] resolve (Optional) – A list of references to resolve and embed in the response

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:job)]

List all supported import job types


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/jobs/import_types"


Endpoint

[:GET] /repositories/:repo_id/jobs/import_types

Description

List all supported import job types

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – A list of supported import types

Create a new job and post input files

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/jobs_with_files?job={"jsonmodel_type"=>"job", "status"=>"queued", "job"=>{"jsonmodel_type"=>"import_job", "filenames"=>["658E644117I", "656Y513JS", "11I894X562", "61324T726730"], "import_type"=>"eac_xml"}}&files=UploadFile"

Endpoint

[:POST] /repositories/:repo_id/jobs_with_files

Description

Create a new job and post input files

Parameters

JSONModel(:job) job –

[RESTHelpers::UploadFile] files –

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Create a Preferences record

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"preference",
"defaults":{ "jsonmodel_type":"defaults",
"default_values":false,
"note_order":[],
"show_suppressed":false,
"publish":false}}' \
  "http://localhost:8089/repositories/2/preferences"

Endpoint

[:POST] /repositories/:repo_id/preferences

Description

Create a Preferences record

Parameters

JSONModel(:preference) – The record to create

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

Get a list of Preferences for a Repository and optionally a user


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/preferences?user_id=1"


Endpoint

[:GET] /repositories/:repo_id/preferences

Description

Get a list of Preferences for a Repository and optionally a user

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Integer user_id (Optional) – The username to retrieve defaults for

Returns

200 – [(:preference)]

Get a Preferences record


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/preferences/1"


Endpoint

[:GET] /repositories/:repo_id/preferences/:id

Description

Get a Preferences record

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:preference)

Update a Preferences record

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"preference",
"defaults":{ "jsonmodel_type":"defaults",
"default_values":false,
"note_order":[],
"show_suppressed":false,
"publish":false}}' \
  "http://localhost:8089/repositories/2/preferences/1"

Endpoint

[:POST] /repositories/:repo_id/preferences/:id

Description

Update a Preferences record

Parameters

Integer id – The ID of the record

JSONModel(:preference) – The updated record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Delete a Preferences record

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/repositories/2/preferences/1"

Endpoint

[:DELETE] /repositories/:repo_id/preferences/:id

Description

Delete a Preferences record

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – deleted

Get the default set of Preferences for a Repository and optionally a user


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/preferences/defaults?username=RVH853706"


Endpoint

[:GET] /repositories/:repo_id/preferences/defaults

Description

Get the default set of Preferences for a Repository and optionally a user

Parameters

Integer repo_id – The Repository ID – The Repository must exist

String username (Optional) – The username to retrieve defaults for

Returns

200 – (defaults)

Create an RDE template

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/repositories/2/rde_templates"

Endpoint

[:POST] /repositories/:repo_id/rde_templates

Description

Create an RDE template

Parameters

JSONModel(:rde_template) – The record to create

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

Get a list of RDE Templates


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/rde_templates"


Endpoint

[:GET] /repositories/:repo_id/rde_templates

Description

Get a list of RDE Templates

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:rde_template)]

Get an RDE template record


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/rde_templates/1"


Endpoint

[:GET] /repositories/:repo_id/rde_templates/:id

Description

Get an RDE template record

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:rde_template)

Delete an RDE Template

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/repositories/2/rde_templates/1"

Endpoint

[:DELETE] /repositories/:repo_id/rde_templates/:id

Description

Delete an RDE Template

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – deleted

Require fields for a record type

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/repositories/2/required_fields/1"

Endpoint

[:POST] /repositories/:repo_id/required_fields/:record_type

Description

Require fields for a record type

Parameters

JSONModel(:required_fields) – The fields required

Integer repo_id – The Repository ID – The Repository must exist

String record_type –

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

Get required fields for a record type


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/required_fields/1"


Endpoint

[:GET] /repositories/:repo_id/required_fields/:record_type

Description

Get required fields for a record type

Parameters

Integer repo_id – The Repository ID – The Repository must exist

String record_type –

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

Get export metadata for a Resource Description


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resource_descriptions/1.:fmt/metadata?fmt=DGVPG"


Endpoint

[:GET] /repositories/:repo_id/resource_descriptions/:id.:fmt/metadata

Description

Get export metadata for a Resource Description

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

String fmt (Optional) – Format of the request

Returns

200 – The export metadata

Get an EAD representation of a Resource


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resource_descriptions/1.pdf?include_unpublished=true&include_daos=true&numbered_cs=true&print_pdf=true&ead3=true"


Endpoint

[:GET] /repositories/:repo_id/resource_descriptions/:id.pdf

Description

Get an EAD representation of a Resource

Parameters

Integer id – The ID of the record

RESTHelpers::BooleanParam include_unpublished (Optional) – Include unpublished records

RESTHelpers::BooleanParam include_daos (Optional) – Include digital objects in dao tags

RESTHelpers::BooleanParam numbered_cs (Optional) – Use numbered tags in ead

RESTHelpers::BooleanParam print_pdf (Optional) – Print EAD to pdf

Integer repo_id – The Repository ID – The Repository must exist

RESTHelpers::BooleanParam ead3 (Optional) – Export using EAD3 schema

Returns

200 – (:resource)

Get an EAD representation of a Resource


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resource_descriptions/1.xml?include_unpublished=true&include_daos=true&numbered_cs=true&print_pdf=true&ead3=true"


Endpoint

[:GET] /repositories/:repo_id/resource_descriptions/:id.xml

Description

Get an EAD representation of a Resource

Parameters

Integer id – The ID of the record

RESTHelpers::BooleanParam include_unpublished (Optional) – Include unpublished records

RESTHelpers::BooleanParam include_daos (Optional) – Include digital objects in dao tags

RESTHelpers::BooleanParam numbered_cs (Optional) – Use numbered tags in ead

RESTHelpers::BooleanParam print_pdf (Optional) – Print EAD to pdf

Integer repo_id – The Repository ID – The Repository must exist

RESTHelpers::BooleanParam ead3 (Optional) – Export using EAD3 schema

Returns

200 – (:resource)

Get export metadata for Resource labels


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resource_labels/1.:fmt/metadata"


Endpoint

[:GET] /repositories/:repo_id/resource_labels/:id.:fmt/metadata

Description

Get export metadata for Resource labels

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – The export metadata

Get a tsv list of printable labels for a Resource


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resource_labels/1.tsv"


Endpoint

[:GET] /repositories/:repo_id/resource_labels/:id.tsv

Description

Get a tsv list of printable labels for a Resource

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:resource)

Create a Resource

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"resource",
"external_ids":[],
"subjects":[],
"linked_events":[],
"extents":[{ "jsonmodel_type":"extent",
"portion":"part",
"number":"35",
"extent_type":"terabytes",
"dimensions":"SGER537",
"physical_details":"778130656IO"}],
"dates":[{ "jsonmodel_type":"date",
"date_type":"single",
"label":"creation",
"begin":"2007-08-31",
"end":"2007-08-31",
"certainty":"inferred",
"era":"ce",
"calendar":"gregorian",
"expression":"DVGVC"},
{ "jsonmodel_type":"date",
"date_type":"single",
"label":"creation",
"begin":"1973-08-15",
"certainty":"inferred",
"era":"ce",
"calendar":"gregorian",
"expression":"TRB50X"}],
"external_documents":[],
"rights_statements":[],
"linked_agents":[],
"restrictions":false,
"revision_statements":[{ "jsonmodel_type":"revision_statement",
"date":"MW82OO",
"description":"687634502IQ"}],
"instances":[{ "jsonmodel_type":"instance",
"is_representative":false,
"instance_type":"realia",
"sub_container":{ "jsonmodel_type":"sub_container",
"top_container":{ "ref":"/repositories/2/top_containers/185"},
"type_2":"object",
"indicator_2":"YJL308J",
"type_3":"folder",
"indicator_3":"LEWGB"}}],
"deaccessions":[],
"related_accessions":[],
"classifications":[],
"notes":[],
"title":"Resource Title: <emph render='italic'>149</emph>",
"id_0":"894I483W399",
"level":"subseries",
"language":"iba",
"ead_id":"XO549J999",
"finding_aid_date":"HIJH376",
"finding_aid_series_statement":"W38485B38",
"finding_aid_note":"QN710N707",
"ead_location":"V33358S515"}' \
  "http://localhost:8089/repositories/2/resources"

Endpoint

[:POST] /repositories/:repo_id/resources

Description

Create a Resource

Parameters

JSONModel(:resource) – The record to create

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

Get a list of Resources for a Repository


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resources?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resources?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resources?all_ids=true"


Endpoint

[:GET] /repositories/:repo_id/resources

Description

Get a list of Resources for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:resource)]

Get a Resource


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resources/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/resources/:id

Description

Get a Resource

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:resource)

Update a Resource

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"resource",
"external_ids":[],
"subjects":[],
"linked_events":[],
"extents":[{ "jsonmodel_type":"extent",
"portion":"part",
"number":"35",
"extent_type":"terabytes",
"dimensions":"SGER537",
"physical_details":"778130656IO"}],
"dates":[{ "jsonmodel_type":"date",
"date_type":"single",
"label":"creation",
"begin":"2007-08-31",
"end":"2007-08-31",
"certainty":"inferred",
"era":"ce",
"calendar":"gregorian",
"expression":"DVGVC"},
{ "jsonmodel_type":"date",
"date_type":"single",
"label":"creation",
"begin":"1973-08-15",
"certainty":"inferred",
"era":"ce",
"calendar":"gregorian",
"expression":"TRB50X"}],
"external_documents":[],
"rights_statements":[],
"linked_agents":[],
"restrictions":false,
"revision_statements":[{ "jsonmodel_type":"revision_statement",
"date":"MW82OO",
"description":"687634502IQ"}],
"instances":[{ "jsonmodel_type":"instance",
"is_representative":false,
"instance_type":"realia",
"sub_container":{ "jsonmodel_type":"sub_container",
"top_container":{ "ref":"/repositories/2/top_containers/185"},
"type_2":"object",
"indicator_2":"YJL308J",
"type_3":"folder",
"indicator_3":"LEWGB"}}],
"deaccessions":[],
"related_accessions":[],
"classifications":[],
"notes":[],
"title":"Resource Title: <emph render='italic'>149</emph>",
"id_0":"894I483W399",
"level":"subseries",
"language":"iba",
"ead_id":"XO549J999",
"finding_aid_date":"HIJH376",
"finding_aid_series_statement":"W38485B38",
"finding_aid_note":"QN710N707",
"ead_location":"V33358S515"}' \
  "http://localhost:8089/repositories/2/resources/1"

Endpoint

[:POST] /repositories/:repo_id/resources/:id

Description

Update a Resource

Parameters

Integer id – The ID of the record

JSONModel(:resource) – The updated record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Delete a Resource

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/repositories/2/resources/1"

Endpoint

[:DELETE] /repositories/:repo_id/resources/:id

Description

Delete a Resource

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – deleted

Move existing Archival Objects to become children of a Resource

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/resources/1/accept_children?children=F530BKX&position=1"

Endpoint

[:POST] /repositories/:repo_id/resources/:id/accept_children

Description

Move existing Archival Objects to become children of a Resource

Parameters

[String] children (Optional) – The children to move to the Resource

Integer id – The ID of the Resource to move children to

Integer position – The index for the first child to be moved to

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

409 – {:error => (description of error)}

Batch create several Archival Objects as children of an existing Resource

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/repositories/2/resources/1/children"

Endpoint

[:POST] /repositories/:repo_id/resources/:id/children

Description

Batch create several Archival Objects as children of an existing Resource

Parameters

JSONModel(:archival_record_children) – The children to add to the resource

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

409 – {:error => (description of error)}

Get a list of record types in the graph of a resource


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resources/1/models_in_graph"


Endpoint

[:GET] /repositories/:repo_id/resources/:id/models_in_graph

Description

Get a list of record types in the graph of a resource

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – OK

Get the list of URIs of this published resource and all published archival objects contained within.Ordered by tree order (i.e. if you fully expanded the record tree and read from top to bottom)


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resources/1/ordered_records"


Endpoint

[:GET] /repositories/:repo_id/resources/:id/ordered_records

Description

Get the list of URIs of this published resource and all published archival objects contained within.Ordered by tree order (i.e. if you fully expanded the record tree and read from top to bottom)

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – JSONModel(:resource_ordered_records)

Publish a resource and all its sub-records and components

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/resources/1/publish"

Endpoint

[:POST] /repositories/:repo_id/resources/:id/publish

Description

Publish a resource and all its sub-records and components

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Suppress this record

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/resources/1/suppressed?suppressed=true"

Endpoint

[:POST] /repositories/:repo_id/resources/:id/suppressed

Description

Suppress this record

Parameters

Integer id – The ID of the record

RESTHelpers::BooleanParam suppressed – Suppression state

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Suppressed”, :id => (id of updated object), :suppressed_state => (true|false)}

Get Top Containers linked to a published resource and published archival ojbects contained within.


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resources/1/top_containers?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/resources/:id/top_containers

Description

Get Top Containers linked to a published resource and published archival ojbects contained within.

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – a list of linked top containers

404 – Not found

Transfer this record to a different repository

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/resources/1/transfer?target_repo=C960I777D"

Endpoint

[:POST] /repositories/:repo_id/resources/:id/transfer

Description

Transfer this record to a different repository

Parameters

Integer id – The ID of the record

String target_repo – The URI of the target repository

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – moved

Get a Resource tree


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resources/1/tree?limit_to=O519MIG"


Endpoint

[:GET] /repositories/:repo_id/resources/:id/tree

Description

Get a Resource tree

Parameters

Integer id – The ID of the record

String limit_to (Optional) – An Archival Object URI or 'root’

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – OK

Fetch tree information for an Archival Object record within a tree


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resources/1/tree/node?node_uri=B14I938Y&published_only=true"


Endpoint

[:GET] /repositories/:repo_id/resources/:id/tree/node

Description

Fetch tree information for an Archival Object record within a tree

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

String node_uri – The URI of the Archival Object record of interest

RESTHelpers::BooleanParam published_only – Whether to restrict to published/unsuppressed items

Returns

200 – Returns a JSON object describing enough information about a specific node. Includes:

Fetch tree paths from the root record to Archival Objects


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resources/1/tree/node_from_root?node_ids=1&published_only=true"


Endpoint

[:GET] /repositories/:repo_id/resources/:id/tree/node_from_root

Description

Fetch tree paths from the root record to Archival Objects

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

[Integer] node_ids – The IDs of the Archival Object records of interest

RESTHelpers::BooleanParam published_only – Whether to restrict to published/unsuppressed items

Returns

200 – Returns a JSON array describing the path to a node, starting from the root of the tree. Each path element provides:

Fetch tree information for the top-level resource record


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resources/1/tree/root?published_only=true"


Endpoint

[:GET] /repositories/:repo_id/resources/:id/tree/root

Description

Fetch tree information for the top-level resource record

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

RESTHelpers::BooleanParam published_only – Whether to restrict to published/unsuppressed items

Returns

200 – Returns a JSON object describing enough information about this tree’s root record to render the rest. Includes:

Fetch the record slice for a given tree waypoint


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resources/1/tree/waypoint?offset=1&parent_node=U85MKJ&published_only=true"


Endpoint

[:GET] /repositories/:repo_id/resources/:id/tree/waypoint

Description

Fetch the record slice for a given tree waypoint

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Integer offset – The page of records to return

String parent_node (Optional) – The URI of the parent of this waypoint (none for the root record)

RESTHelpers::BooleanParam published_only – Whether to restrict to published/unsuppressed items

Returns

200 – Returns a JSON array containing information for the records contained in a given waypoint. Each array element is an object that includes:

Get metadata for a MARC21 export


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resources/marc21/1.:fmt/metadata?include_unpublished_marc=true"


Endpoint

[:GET] /repositories/:repo_id/resources/marc21/:id.:fmt/metadata

Description

Get metadata for a MARC21 export

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

RESTHelpers::BooleanParam include_unpublished_marc (Optional) – Include unpublished notes

Returns

200 – The export metadata

Get a MARC 21 representation of a Resource


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/resources/marc21/1.xml?include_unpublished_marc=true"


Endpoint

[:GET] /repositories/:repo_id/resources/marc21/:id.xml

Description

Get a MARC 21 representation of a Resource

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

RESTHelpers::BooleanParam include_unpublished_marc (Optional) – Include unpublished notes

Returns

200 – (:resource)

Search this repository




curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"PRWOY"' \
  "http://localhost:8089/repositories/2/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/repositories/2/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"254EUNG"' \
  "http://localhost:8089/repositories/2/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"748Q927P224"' \
  "http://localhost:8089/repositories/2/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"426UAY615"' \
  "http://localhost:8089/repositories/2/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"1"' \
  "http://localhost:8089/repositories/2/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/repositories/2/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"691LD662T"' \
  "http://localhost:8089/repositories/2/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"BooleanParam"' \
  "http://localhost:8089/repositories/2/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"LIDUG"' \
  "http://localhost:8089/repositories/2/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"ENCN500"' \
  "http://localhost:8089/repositories/2/search"


Endpoint

[:GET, :POST] /repositories/:repo_id/search

Description

Search this repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

String q (Optional) – A search query string. Uses Lucene 4.0 syntax: http://lucene.apache.org/core/4_0_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html Search index structure can be found in solr/schema.xml

JSONModel(:advanced_query) aq (Optional) – A json string containing the advanced query

[String] type (Optional) – The record type to search (defaults to all types if not specified)

String sort (Optional) – The attribute to sort and the direction e.g. &sort=title desc&…

[String] facet (Optional) – The list of the fields to produce facets for

Integer facet_mincount (Optional) – The minimum count for a facet field to be included in the response

JSONModel(:advanced_query) filter (Optional) – A json string containing the advanced query to filter by

[String] exclude (Optional) – A list of document IDs that should be excluded from results

RESTHelpers::BooleanParam hl (Optional) – Whether to use highlighting

String root_record (Optional) – Search within a collection of records (defined by the record at the root of the tree)

String dt (Optional) – Format to return (JSON default)

Returns

200 –

Create a top container

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"top_container",
"active_restrictions":[],
"container_locations":[],
"series":[],
"collection":[],
"indicator":"W128EVJ",
"type":"box",
"barcode":"24a4216e745acf51073491abe2d913bb",
"ils_holding_id":"V473689EM",
"ils_item_id":"V4195154265",
"exported_to_ils":"2019-01-14T06:59:58-08:00"}' \
  "http://localhost:8089/repositories/2/top_containers"

Endpoint

[:POST] /repositories/:repo_id/top_containers

Description

Create a top container

Parameters

JSONModel(:top_container) – The record to create

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

Get a list of TopContainers for a Repository


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/top_containers?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/top_containers?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/top_containers?all_ids=true"


Endpoint

[:GET] /repositories/:repo_id/top_containers

Description

Get a list of TopContainers for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:top_container)]

Update a top container

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"top_container",
"active_restrictions":[],
"container_locations":[],
"series":[],
"collection":[],
"indicator":"W128EVJ",
"type":"box",
"barcode":"24a4216e745acf51073491abe2d913bb",
"ils_holding_id":"V473689EM",
"ils_item_id":"V4195154265",
"exported_to_ils":"2019-01-14T06:59:58-08:00"}' \
  "http://localhost:8089/repositories/2/top_containers/1"

Endpoint

[:POST] /repositories/:repo_id/top_containers/:id

Description

Update a top container

Parameters

Integer id – The ID of the record

JSONModel(:top_container) – The updated record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Get a top container by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/top_containers/1?resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /repositories/:repo_id/top_containers/:id

Description

Get a top container by ID

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – (:top_container)

Delete a top container

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/repositories/2/top_containers/1"

Endpoint

[:DELETE] /repositories/:repo_id/top_containers/:id

Description

Delete a top container

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – deleted

Update container profile for a batch of top containers

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/top_containers/batch/container_profile?ids=1&container_profile_uri=731DE775W"

Endpoint

[:POST] /repositories/:repo_id/top_containers/batch/container_profile

Description

Update container profile for a batch of top containers

Parameters

[Integer] ids –

String container_profile_uri – The uri of the container profile

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Update ils_holding_id for a batch of top containers

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/top_containers/batch/ils_holding_id?ids=1&ils_holding_id=156346BQG"

Endpoint

[:POST] /repositories/:repo_id/top_containers/batch/ils_holding_id

Description

Update ils_holding_id for a batch of top containers

Parameters

[Integer] ids –

String ils_holding_id – Value to set for ils_holding_id

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Update location for a batch of top containers

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/top_containers/batch/location?ids=1&location_uri=HP59891V"

Endpoint

[:POST] /repositories/:repo_id/top_containers/batch/location

Description

Update location for a batch of top containers

Parameters

[Integer] ids –

String location_uri – The uri of the location

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Bulk update barcodes

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"YQ673420874"' \
  "http://localhost:8089/repositories/2/top_containers/bulk/barcodes"

Endpoint

[:POST] /repositories/:repo_id/top_containers/bulk/barcodes

Description

Bulk update barcodes

Parameters

String – JSON string containing barcode data {uri=>barcode}

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Bulk update locations

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"HLJFJ"' \
  "http://localhost:8089/repositories/2/top_containers/bulk/locations"

Endpoint

[:POST] /repositories/:repo_id/top_containers/bulk/locations

Description

Bulk update locations

Parameters

String – JSON string containing location data {container_uri=>location_uri}

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Search for top containers


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/top_containers/search?q=GTLUX&aq=["Example Missing"]&type=BTA253719&sort=V414285337S&facet=720776994YG&facet_mincount=1&filter=["Example Missing"]&exclude=CL680IQ&hl=true&root_record=P983UPQ&dt=YJNR981"


Endpoint

[:GET] /repositories/:repo_id/top_containers/search

Description

Search for top containers

Parameters

Integer repo_id – The Repository ID – The Repository must exist

String q (Optional) – A search query string. Uses Lucene 4.0 syntax: http://lucene.apache.org/core/4_0_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html Search index structure can be found in solr/schema.xml

JSONModel(:advanced_query) aq (Optional) – A json string containing the advanced query

[String] type (Optional) – The record type to search (defaults to all types if not specified)

String sort (Optional) – The attribute to sort and the direction e.g. &sort=title desc&…

[String] facet (Optional) – The list of the fields to produce facets for

Integer facet_mincount (Optional) – The minimum count for a facet field to be included in the response

JSONModel(:advanced_query) filter (Optional) – A json string containing the advanced query to filter by

[String] exclude (Optional) – A list of document IDs that should be excluded from results

RESTHelpers::BooleanParam hl (Optional) – Whether to use highlighting

String root_record (Optional) – Search within a collection of records (defined by the record at the root of the tree)

String dt (Optional) – Format to return (JSON default)

Returns

200 – [(:top_container)]

Transfer this record to a different repository

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/repositories/2/transfer?target_repo=232183228109J"

Endpoint

[:POST] /repositories/:repo_id/transfer

Description

Transfer this record to a different repository

Parameters

String target_repo – The URI of the target repository

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – moved

Get a user’s details including their groups for the current repository


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/2/users/1"


Endpoint

[:GET] /repositories/:repo_id/users/:id

Description

Get a user’s details including their groups for the current repository

Parameters

Integer id – The username id to fetch

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:user)

Create a Repository with an agent representation

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/repositories/with_agent"

Endpoint

[:POST] /repositories/with_agent

Description

Create a Repository with an agent representation

Parameters

JSONModel(:repository_with_agent) – The record to create

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

403 – access_denied

Get a Repository by ID, including its agent representation


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/repositories/with_agent/1"


Endpoint

[:GET] /repositories/with_agent/:id

Description

Get a Repository by ID, including its agent representation

Parameters

Integer id – The ID of the record

Returns

200 – (:repository_with_agent)

404 – Not found

Update a repository with an agent representation

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/repositories/with_agent/1"

Endpoint

[:POST] /repositories/with_agent/:id

Description

Update a repository with an agent representation

Parameters

Integer id – The ID of the record

JSONModel(:repository_with_agent) – The updated record

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Get all ArchivesSpace schemas


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/schemas"


Endpoint

[:GET] /schemas

Description

Get all ArchivesSpace schemas

Parameters

Returns

200 – ArchivesSpace (schemas)

Get an ArchivesSpace schema


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/schemas/1"


Endpoint

[:GET] /schemas/:schema

Description

Get an ArchivesSpace schema

Parameters

String schema – Schema name to retrieve

Returns

200 – ArchivesSpace (:schema)

404 – Schema not found

Search this archive



curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"470V36140252"' \
  "http://localhost:8089/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"TLE581H"' \
  "http://localhost:8089/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"384417885ES"' \
  "http://localhost:8089/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"QULJX"' \
  "http://localhost:8089/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"1"' \
  "http://localhost:8089/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"BELD746"' \
  "http://localhost:8089/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"BooleanParam"' \
  "http://localhost:8089/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"EY998B551"' \
  "http://localhost:8089/search"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"PJU424Y"' \
  "http://localhost:8089/search"


Endpoint

[:GET, :POST] /search

Description

Search this archive

Parameters

String q (Optional) – A search query string. Uses Lucene 4.0 syntax: http://lucene.apache.org/core/4_0_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html Search index structure can be found in solr/schema.xml

JSONModel(:advanced_query) aq (Optional) – A json string containing the advanced query

[String] type (Optional) – The record type to search (defaults to all types if not specified)

String sort (Optional) – The attribute to sort and the direction e.g. &sort=title desc&…

[String] facet (Optional) – The list of the fields to produce facets for

Integer facet_mincount (Optional) – The minimum count for a facet field to be included in the response

JSONModel(:advanced_query) filter (Optional) – A json string containing the advanced query to filter by

[String] exclude (Optional) – A list of document IDs that should be excluded from results

RESTHelpers::BooleanParam hl (Optional) – Whether to use highlighting

String root_record (Optional) – Search within a collection of records (defined by the record at the root of the tree)

String dt (Optional) – Format to return (JSON default)

Returns

200 –

Search across Location Profiles


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/search/location_profile?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/search/location_profile?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/search/location_profile?all_ids=true"


Endpoint

[:GET] /search/location_profile

Description

Search across Location Profiles

Parameters

String q (Optional) – A search query string. Uses Lucene 4.0 syntax: http://lucene.apache.org/core/4_0_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html Search index structure can be found in solr/schema.xml

JSONModel(:advanced_query) aq (Optional) – A json string containing the advanced query

[String] type (Optional) – The record type to search (defaults to all types if not specified)

String sort (Optional) – The attribute to sort and the direction e.g. &sort=title desc&…

[String] facet (Optional) – The list of the fields to produce facets for

Integer facet_mincount (Optional) – The minimum count for a facet field to be included in the response

JSONModel(:advanced_query) filter (Optional) – A json string containing the advanced query to filter by

[String] exclude (Optional) – A list of document IDs that should be excluded from results

RESTHelpers::BooleanParam hl (Optional) – Whether to use highlighting

String root_record (Optional) – Search within a collection of records (defined by the record at the root of the tree)

String dt (Optional) – Format to return (JSON default)

Returns

200 –

Find the tree view for a particular archival record


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/search/published_tree?node_uri=470421105ED"


Endpoint

[:GET] /search/published_tree

Description

Find the tree view for a particular archival record

Parameters

String node_uri – The URI of the archival record to find the tree view for

Returns

200 – OK

404 – Not found

Return the counts of record types of interest by repository



curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"WGND817"' \
  "http://localhost:8089/search/record_types_by_repository?record_types=WGND817&repo_uri=E54147JQ"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"E54147JQ"' \
  "http://localhost:8089/search/record_types_by_repository?record_types=WGND817&repo_uri=E54147JQ"


Endpoint

[:GET, :POST] /search/record_types_by_repository

Description

Return the counts of record types of interest by repository

Parameters

[String] record_types – The list of record types to tally

String repo_uri (Optional) – An optional repository URI. If given, just return counts for the single repository

Returns

200 – If repository is given, returns a map like {'record_type’ => }. Otherwise, {'repo_uri’ => {'record_type’ => }}

Return a set of records by URI



curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"S842YVK"' \
  "http://localhost:8089/search/records?uri=S842YVK&resolve[]=[record_types, to_resolve]"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"AOG83W"' \
  "http://localhost:8089/search/records?uri=S842YVK&resolve[]=[record_types, to_resolve]"


Endpoint

[:GET, :POST] /search/records

Description

Return a set of records by URI

Parameters

[String] uri – The list of record URIs to fetch

[String] resolve (Optional) – The list of result fields to resolve (if any)

Returns

200 – a JSON map of records

Search across repositories



curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"VMU665744"' \
  "http://localhost:8089/search/repositories"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/search/repositories"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"JJ961KS"' \
  "http://localhost:8089/search/repositories"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"FULFQ"' \
  "http://localhost:8089/search/repositories"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"381G787DL"' \
  "http://localhost:8089/search/repositories"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"1"' \
  "http://localhost:8089/search/repositories"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/search/repositories"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"S940YXP"' \
  "http://localhost:8089/search/repositories"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"BooleanParam"' \
  "http://localhost:8089/search/repositories"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"645GX455649"' \
  "http://localhost:8089/search/repositories"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"J404959SW"' \
  "http://localhost:8089/search/repositories"


Endpoint

[:GET, :POST] /search/repositories

Description

Search across repositories

Parameters

String q (Optional) – A search query string. Uses Lucene 4.0 syntax: http://lucene.apache.org/core/4_0_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html Search index structure can be found in solr/schema.xml

JSONModel(:advanced_query) aq (Optional) – A json string containing the advanced query

[String] type (Optional) – The record type to search (defaults to all types if not specified)

String sort (Optional) – The attribute to sort and the direction e.g. &sort=title desc&…

[String] facet (Optional) – The list of the fields to produce facets for

Integer facet_mincount (Optional) – The minimum count for a facet field to be included in the response

JSONModel(:advanced_query) filter (Optional) – A json string containing the advanced query to filter by

[String] exclude (Optional) – A list of document IDs that should be excluded from results

RESTHelpers::BooleanParam hl (Optional) – Whether to use highlighting

String root_record (Optional) – Search within a collection of records (defined by the record at the root of the tree)

String dt (Optional) – Format to return (JSON default)

Returns

200 –

Search across subjects



curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"281707W543R"' \
  "http://localhost:8089/search/subjects"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/search/subjects"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"546304Q941W"' \
  "http://localhost:8089/search/subjects"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"3K984990A"' \
  "http://localhost:8089/search/subjects"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"897301XB679"' \
  "http://localhost:8089/search/subjects"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"1"' \
  "http://localhost:8089/search/subjects"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/search/subjects"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"JFFRI"' \
  "http://localhost:8089/search/subjects"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"BooleanParam"' \
  "http://localhost:8089/search/subjects"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"493F235EJ"' \
  "http://localhost:8089/search/subjects"


curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '"Y139SS17"' \
  "http://localhost:8089/search/subjects"


Endpoint

[:GET, :POST] /search/subjects

Description

Search across subjects

Parameters

String q (Optional) – A search query string. Uses Lucene 4.0 syntax: http://lucene.apache.org/core/4_0_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html Search index structure can be found in solr/schema.xml

JSONModel(:advanced_query) aq (Optional) – A json string containing the advanced query

[String] type (Optional) – The record type to search (defaults to all types if not specified)

String sort (Optional) – The attribute to sort and the direction e.g. &sort=title desc&…

[String] facet (Optional) – The list of the fields to produce facets for

Integer facet_mincount (Optional) – The minimum count for a facet field to be included in the response

JSONModel(:advanced_query) filter (Optional) – A json string containing the advanced query to filter by

[String] exclude (Optional) – A list of document IDs that should be excluded from results

RESTHelpers::BooleanParam hl (Optional) – Whether to use highlighting

String root_record (Optional) – Search within a collection of records (defined by the record at the root of the tree)

String dt (Optional) – Format to return (JSON default)

Returns

200 –

Get a Location by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/space_calculator/buildings"


Endpoint

[:GET] /space_calculator/buildings

Description

Get a Location by ID

Parameters

Returns

200 – Location building data as JSON

Calculate how many containers will fit in locations for a given building


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/space_calculator/by_building?container_profile_uri=C906247D822&building=ODQ46834&floor=18TMLL&room=E564763856A&area=G11364CS"


Endpoint

[:GET] /space_calculator/by_building

Description

Calculate how many containers will fit in locations for a given building

Parameters

String container_profile_uri – The uri of the container profile

String building – The building to check for space in

String floor (Optional) – The floor to check for space in

String room (Optional) – The room to check for space in

String area (Optional) – The area to check for space in

Returns

200 – Calculation results

Calculate how many containers will fit in a list of locations


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/space_calculator/by_location?container_profile_uri=461160846N997&location_uris=OA95120J"


Endpoint

[:GET] /space_calculator/by_location

Description

Calculate how many containers will fit in a list of locations

Parameters

String container_profile_uri – The uri of the container profile

[String] location_uris – A list of location uris to calculate space for

Returns

200 – Calculation results

Create a Subject

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"subject",
"external_ids":[],
"publish":true,
"used_within_repositories":[],
"used_within_published_repositories":[],
"terms":[{ "jsonmodel_type":"term",
"term":"Term 132",
"term_type":"temporal",
"vocabulary":"/vocabularies/156"}],
"external_documents":[],
"vocabulary":"/vocabularies/157",
"authority_id":"http://www.example-572.com",
"scope_note":"EFYWK",
"source":"aat"}' \
  "http://localhost:8089/subjects"

Endpoint

[:POST] /subjects

Description

Create a Subject

Parameters

JSONModel(:subject) – The record to create

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

Get a list of Subjects


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/subjects?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/subjects?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/subjects?all_ids=true"


Endpoint

[:GET] /subjects

Description

Get a list of Subjects

Parameters

Returns

200 – [(:subject)]

Update a Subject

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"subject",
"external_ids":[],
"publish":true,
"used_within_repositories":[],
"used_within_published_repositories":[],
"terms":[{ "jsonmodel_type":"term",
"term":"Term 132",
"term_type":"temporal",
"vocabulary":"/vocabularies/156"}],
"external_documents":[],
"vocabulary":"/vocabularies/157",
"authority_id":"http://www.example-572.com",
"scope_note":"EFYWK",
"source":"aat"}' \
  "http://localhost:8089/subjects/1"

Endpoint

[:POST] /subjects/:id

Description

Update a Subject

Parameters

Integer id – The ID of the record

JSONModel(:subject) – The updated record

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Get a Subject by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/subjects/1"


Endpoint

[:GET] /subjects/:id

Description

Get a Subject by ID

Parameters

Integer id – The ID of the record

Returns

200 – (:subject)

Delete a Subject

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/subjects/1"

Endpoint

[:DELETE] /subjects/:id

Description

Delete a Subject

Parameters

Integer id – The ID of the record

Returns

200 – deleted

Get a list of Terms matching a prefix


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/terms?q=JSPFL"


Endpoint

[:GET] /terms

Description

Get a list of Terms matching a prefix

Parameters

String q – The prefix to match

Returns

200 – [(:term)]

Get a stream of updated records


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/update-feed?last_sequence=1&resolve[]=[record_types, to_resolve]"


Endpoint

[:GET] /update-feed

Description

Get a stream of updated records

Parameters

Integer last_sequence (Optional) – The last sequence number seen

[String] resolve (Optional) – A list of references to resolve and embed in the response

Returns

200 – a list of records and sequence numbers

Refresh the list of currently known edits

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/update_monitor"

Endpoint

[:POST] /update_monitor

Description

Refresh the list of currently known edits

Parameters

JSONModel(:active_edits) – The list of active edits

Returns

200 – A list of records, the user editing it and the lock version for each

Create a local user

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"user",
"groups":[],
"is_admin":false,
"username":"username_21",
"name":"Name Number 608"}' \
  "http://localhost:8089/users?password=XR132524686&groups=S28IT167"

Endpoint

[:POST] /users

Description

Create a local user

Parameters

String password – The user’s password

[String] groups (Optional) – Array of groups URIs to assign the user to

JSONModel(:user) – The record to create

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

400 – {:error => (description of error)}

Get a list of users


# return first 10 records
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/users?page=1&page_size=10"
# return first 5 records in the Fibonacci sequence
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/users?id_set=1,2,3,5,8"
# return an array of all the ids
curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/users?all_ids=true"


Endpoint

[:GET] /users

Description

Get a list of users

Parameters

Returns

200 – [(:resource)]

Get a user’s details (including their current permissions)


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/users/1"


Endpoint

[:GET] /users/:id

Description

Get a user’s details (including their current permissions)

Parameters

Integer id – The username id to fetch

Returns

200 – (:user)

Update a user’s account

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '{ "jsonmodel_type":"user",
"groups":[],
"is_admin":false,
"username":"username_21",
"name":"Name Number 608"}' \
  "http://localhost:8089/users/1?password=665176829757A"

Endpoint

[:POST] /users/:id

Description

Update a user’s account

Parameters

Integer id – The ID of the record

String password (Optional) – The user’s password

JSONModel(:user) – The updated record

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Delete a user

curl -H "X-ArchivesSpace-Session: $SESSION" -X DELETE "http://localhost:8089/users/1"

Endpoint

[:DELETE] /users/:id

Description

Delete a user

Parameters

Integer id – The user to delete

Returns

200 – deleted

Update a user’s groups

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/users/1/groups?groups=N958430AO&remove_groups=true"

Endpoint

[:POST] /users/:id/groups

Description

Update a user’s groups

Parameters

Integer id – The ID of the record

[String] groups (Optional) – Array of groups URIs to assign the user to

RESTHelpers::BooleanParam remove_groups – Remove all groups from the user for the current repo_id if true

Integer repo_id – The Repository groups to clear

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

400 – {:error => (description of error)}

Become a different user

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/users/1/become-user"

Endpoint

[:POST] /users/:username/become-user

Description

Become a different user

Parameters

Username username – The username to become

Returns

200 – Accepted

404 – User not found

Log in

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d 'Example Missing' \
  "http://localhost:8089/users/1/login?password=256QEU327&expiring=true"

Endpoint

[:POST] /users/:username/login

Description

Log in

Parameters

Username username – Your username

String password – Your password

RESTHelpers::BooleanParam expiring – If true, the session will expire after 3600 seconds of inactivity. If false, it will expire after 604800 seconds of inactivity.

NOTE: Previously this parameter would cause the created session to last forever, but this generally isn’t what you want. The parameter name is unfortunate, but we’re keeping it for backward-compatibility.

Returns

200 – Login accepted

403 – Login failed

Get a list of system users


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/users/complete?query=YN881MP"


Endpoint

[:GET] /users/complete

Description

Get a list of system users

Parameters

String query – A prefix to search for

Returns

200 – A list of usernames

Get the currently logged in user


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/users/current-user"


Endpoint

[:GET] /users/current-user

Description

Get the currently logged in user

Parameters

Returns

200 – (:user)

404 – Not logged in

Get the ArchivesSpace application version


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/version"


Endpoint

[:GET] /version

Description

Get the ArchivesSpace application version

Parameters

Returns

200 – ArchivesSpace (version)

Create a Vocabulary

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/vocabularies"

Endpoint

[:POST] /vocabularies

Description

Create a Vocabulary

Parameters

JSONModel(:vocabulary) – The record to create

Returns

200 – {:status => “Created”, :id => (id of created object), :warnings => {(warnings)}}

Get a list of Vocabularies


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/vocabularies?ref_id=888Y224UN"


Endpoint

[:GET] /vocabularies

Description

Get a list of Vocabularies

Parameters

String ref_id (Optional) – An alternate, externally-created ID for the vocabulary

Returns

200 – [(:vocabulary)]

Update a Vocabulary

curl -H "X-ArchivesSpace-Session: $SESSION" \
  -d '["Example Missing"]' \
  "http://localhost:8089/vocabularies/1"

Endpoint

[:POST] /vocabularies/:id

Description

Update a Vocabulary

Parameters

Integer id – The ID of the record

JSONModel(:vocabulary) – The updated record

Returns

200 – {:status => “Updated”, :id => (id of updated object)}

Get a Vocabulary by ID


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/vocabularies/1"


Endpoint

[:GET] /vocabularies/:id

Description

Get a Vocabulary by ID

Parameters

Integer id – The ID of the record

Returns

200 – OK

Get a list of Terms for a Vocabulary


curl -H "X-ArchivesSpace-Session: $SESSION" "http://localhost:8089/vocabularies/1/terms"


Endpoint

[:GET] /vocabularies/:id/terms

Description

Get a list of Terms for a Vocabulary

Parameters

Integer id – The ID of the record

Returns

200 – [(:term)]

Routes by URI

An index of routes available in the ArchivesSpace API, alphabetically by URI.

>
Route Method(s) Description
/agents/corporate_entities POST Create a corporate entity agent
/agents/corporate_entities GET List all corporate entity agents
/agents/corporate_entities/:id POST Update a corporate entity agent
/agents/corporate_entities/:id GET Get a corporate entity by ID
/agents/corporate_entities/:id DELETE Delete a corporate entity agent
/agents/families POST Create a family agent
/agents/families GET List all family agents
/agents/families/:id POST Update a family agent
/agents/families/:id GET Get a family by ID
/agents/families/:id DELETE Delete an agent family
/agents/people POST Create a person agent
/agents/people GET List all person agents
/agents/people/:id POST Update a person agent
/agents/people/:id GET Get a person by ID
/agents/people/:id DELETE Delete an agent person
/agents/software POST Create a software agent
/agents/software GET List all software agents
/agents/software/:id POST Update a software agent
/agents/software/:id GET Get a software agent by ID
/agents/software/:id DELETE Delete a software agent
/batch_delete POST Carry out delete requests against a list of records
/by-external-id GET List records by their external ID(s)
/config/enumeration_values/:enum_val_id GET Get an Enumeration Value
/config/enumeration_values/:enum_val_id POST Update an enumeration value
/config/enumeration_values/:enum_val_id/position POST Update the position of an ennumeration value
/config/enumeration_values/:enum_val_id/suppressed POST Suppress this value
/config/enumerations GET List all defined enumerations
/config/enumerations POST Create an enumeration
/config/enumerations/:enum_id POST Update an enumeration
/config/enumerations/:enum_id GET Get an Enumeration
/config/enumerations/migration POST Migrate all records from using one value to another
/config/enumerations/names/:enum_name GET Get an Enumeration by Name
/container_profiles POST Create a Container_Profile
/container_profiles GET Get a list of Container Profiles
/container_profiles/:id POST Update a Container Profile
/container_profiles/:id GET Get a Container Profile by ID
/container_profiles/:id DELETE Delete an Container Profile
/current_global_preferences GET Get the global Preferences records for the current user.
/date_calculator GET Calculate the dates of an archival object tree
/delete-feed GET Get a stream of deleted records
/extent_calculator GET Calculate the extent of an archival object tree
/job_types GET List all supported job types
/location_profiles POST Create a Location_Profile
/location_profiles GET Get a list of Location Profiles
/location_profiles/:id POST Update a Location Profile
/location_profiles/:id GET Get a Location Profile by ID
/location_profiles/:id DELETE Delete an Location Profile
/locations POST Create a Location
/locations GET Get a list of locations
/locations/:id POST Update a Location
/locations/:id GET Get a Location by ID
/locations/:id DELETE Delete a Location
/locations/batch POST Create a Batch of Locations
/locations/batch_update POST Update a Location
/logout POST Log out the current session
/merge_requests/agent POST Carry out a merge request against Agent records
/merge_requests/agent_detail POST Carry out a detailed merge request against Agent records
/merge_requests/digital_object POST Carry out a merge request against Digital_Object records
/merge_requests/resource POST Carry out a merge request against Resource records
/merge_requests/subject POST Carry out a merge request against Subject records
/notifications GET Get a stream of notifications
/permissions GET Get a list of Permissions
/reports GET List all reports
/reports/static/* GET Get a static asset for a report
/repositories POST Create a Repository
/repositories GET Get a list of Repositories
/repositories/:id POST Update a repository
/repositories/:id GET Get a Repository by ID
/repositories/:repo_id DELETE Delete a Repository
/repositories/:repo_id/accessions POST Create an Accession
/repositories/:repo_id/accessions GET Get a list of Accessions for a Repository
/repositories/:repo_id/accessions/:id POST Update an Accession
/repositories/:repo_id/accessions/:id GET Get an Accession by ID
/repositories/:repo_id/accessions/:id DELETE Delete an Accession
/repositories/:repo_id/accessions/:id/suppressed POST Suppress this record
/repositories/:repo_id/accessions/:id/top_containers GET Get Top Containers linked to an Accession
/repositories/:repo_id/accessions/:id/transfer POST Transfer this record to a different repository
/repositories/:repo_id/archival_contexts/corporate_entities/:id.:fmt/metadata GET Get metadata for an EAC-CPF export of a corporate entity
/repositories/:repo_id/archival_contexts/corporate_entities/:id.xml GET Get an EAC-CPF representation of a Corporate Entity
/repositories/:repo_id/archival_contexts/families/:id.:fmt/metadata GET Get metadata for an EAC-CPF export of a family
/repositories/:repo_id/archival_contexts/families/:id.xml GET Get an EAC-CPF representation of a Family
/repositories/:repo_id/archival_contexts/people/:id.:fmt/metadata GET Get metadata for an EAC-CPF export of a person
/repositories/:repo_id/archival_contexts/people/:id.xml GET Get an EAC-CPF representation of an Agent
/repositories/:repo_id/archival_contexts/softwares/:id.:fmt/metadata GET Get metadata for an EAC-CPF export of a software
/repositories/:repo_id/archival_contexts/softwares/:id.xml GET Get an EAC-CPF representation of a Software agent
/repositories/:repo_id/archival_objects POST Create an Archival Object
/repositories/:repo_id/archival_objects GET Get a list of Archival Objects for a Repository
/repositories/:repo_id/archival_objects/:id POST Update an Archival Object
/repositories/:repo_id/archival_objects/:id GET Get an Archival Object by ID
/repositories/:repo_id/archival_objects/:id DELETE Delete an Archival Object
/repositories/:repo_id/archival_objects/:id/accept_children POST Move existing Archival Objects to become children of an Archival Object
/repositories/:repo_id/archival_objects/:id/children GET Get the children of an Archival Object
/repositories/:repo_id/archival_objects/:id/children POST Batch create several Archival Objects as children of an existing Archival Object
/repositories/:repo_id/archival_objects/:id/parent POST Set the parent/position of an Archival Object in a tree
/repositories/:repo_id/archival_objects/:id/previous GET Get the previous record in the tree for an Archival Object
/repositories/:repo_id/archival_objects/:id/suppressed POST Suppress this record
/repositories/:repo_id/assessment_attribute_definitions POST Update this repository’s assessment attribute definitions
/repositories/:repo_id/assessment_attribute_definitions GET Get this repository’s assessment attribute definitions
/repositories/:repo_id/assessments POST Create an Assessment
/repositories/:repo_id/assessments GET Get a list of Assessments for a Repository
/repositories/:repo_id/assessments/:id POST Update an Assessment
/repositories/:repo_id/assessments/:id GET Get an Assessment by ID
/repositories/:repo_id/assessments/:id DELETE Delete an Assessment
/repositories/:repo_id/batch_imports POST Import a batch of records
/repositories/:repo_id/classification_terms POST Create a Classification Term
/repositories/:repo_id/classification_terms GET Get a list of Classification Terms for a Repository
/repositories/:repo_id/classification_terms/:id POST Update a Classification Term
/repositories/:repo_id/classification_terms/:id GET Get a Classification Term by ID
/repositories/:repo_id/classification_terms/:id DELETE Delete a Classification Term
/repositories/:repo_id/classification_terms/:id/accept_children POST Move existing Classification Terms to become children of another Classification Term
/repositories/:repo_id/classification_terms/:id/children GET Get the children of a Classification Term
/repositories/:repo_id/classification_terms/:id/parent POST Set the parent/position of a Classification Term in a tree
/repositories/:repo_id/classifications POST Create a Classification
/repositories/:repo_id/classifications GET Get a list of Classifications for a Repository
/repositories/:repo_id/classifications/:id GET Get a Classification
/repositories/:repo_id/classifications/:id POST Update a Classification
/repositories/:repo_id/classifications/:id DELETE Delete a Classification
/repositories/:repo_id/classifications/:id/accept_children POST Move existing Classification Terms to become children of a Classification
/repositories/:repo_id/classifications/:id/tree GET Get a Classification tree
/repositories/:repo_id/classifications/:id/tree/node GET Fetch tree information for an Classification Term record within a tree
/repositories/:repo_id/classifications/:id/tree/node_from_root GET Fetch tree path from the root record to Classification Terms
/repositories/:repo_id/classifications/:id/tree/root GET Fetch tree information for the top-level classification record
/repositories/:repo_id/classifications/:id/tree/waypoint GET Fetch the record slice for a given tree waypoint
/repositories/:repo_id/collection_management/:id GET Get a Collection Management Record by ID
/repositories/:repo_id/component_transfers POST Transfer components from one resource to another
/repositories/:repo_id/current_preferences GET Get the Preferences records for the current repository and user.
/repositories/:repo_id/default_values/:record_type POST Save defaults for a record type
/repositories/:repo_id/default_values/:record_type GET Get default values for a record type
/repositories/:repo_id/digital_object_components POST Create an Digital Object Component
/repositories/:repo_id/digital_object_components GET Get a list of Digital Object Components for a Repository
/repositories/:repo_id/digital_object_components/:id POST Update an Digital Object Component
/repositories/:repo_id/digital_object_components/:id GET Get an Digital Object Component by ID
/repositories/:repo_id/digital_object_components/:id DELETE Delete a Digital Object Component
/repositories/:repo_id/digital_object_components/:id/accept_children POST Move existing Digital Object Components to become children of a Digital Object Component
/repositories/:repo_id/digital_object_components/:id/children POST Batch create several Digital Object Components as children of an existing Digital Object Component
/repositories/:repo_id/digital_object_components/:id/children GET Get the children of an Digital Object Component
/repositories/:repo_id/digital_object_components/:id/parent POST Set the parent/position of an Digital Object Component in a tree
/repositories/:repo_id/digital_object_components/:id/suppressed POST Suppress this record
/repositories/:repo_id/digital_objects POST Create a Digital Object
/repositories/:repo_id/digital_objects GET Get a list of Digital Objects for a Repository
/repositories/:repo_id/digital_objects/:id GET Get a Digital Object
/repositories/:repo_id/digital_objects/:id POST Update a Digital Object
/repositories/:repo_id/digital_objects/:id DELETE Delete a Digital Object
/repositories/:repo_id/digital_objects/:id/accept_children POST Move existing Digital Object components to become children of a Digital Object
/repositories/:repo_id/digital_objects/:id/children POST Batch create several Digital Object Components as children of an existing Digital Object
/repositories/:repo_id/digital_objects/:id/publish POST Publish a digital object and all its sub-records and components
/repositories/:repo_id/digital_objects/:id/suppressed POST Suppress this record
/repositories/:repo_id/digital_objects/:id/transfer POST Transfer this record to a different repository
/repositories/:repo_id/digital_objects/:id/tree GET Get a Digital Object tree
/repositories/:repo_id/digital_objects/:id/tree/node GET Fetch tree information for an Digital Object Component record within a tree
/repositories/:repo_id/digital_objects/:id/tree/node_from_root GET Fetch tree paths from the root record to Digital Object Components
/repositories/:repo_id/digital_objects/:id/tree/root GET Fetch tree information for the top-level digital object record
/repositories/:repo_id/digital_objects/:id/tree/waypoint GET Fetch the record slice for a given tree waypoint
/repositories/:repo_id/digital_objects/dublin_core/:id.:fmt/metadata GET Get metadata for a Dublin Core export
/repositories/:repo_id/digital_objects/dublin_core/:id.xml GET Get a Dublin Core representation of a Digital Object
/repositories/:repo_id/digital_objects/mets/:id.:fmt/metadata GET Get metadata for a METS export
/repositories/:repo_id/digital_objects/mets/:id.xml GET Get a METS representation of a Digital Object
/repositories/:repo_id/digital_objects/mods/:id.:fmt/metadata GET Get metadata for a MODS export
/repositories/:repo_id/digital_objects/mods/:id.xml GET Get a MODS representation of a Digital Object
/repositories/:repo_id/events POST Create an Event
/repositories/:repo_id/events GET Get a list of Events for a Repository
/repositories/:repo_id/events/:id POST Update an Event
/repositories/:repo_id/events/:id GET Get an Event by ID
/repositories/:repo_id/events/:id DELETE Delete an event record
/repositories/:repo_id/events/:id/suppressed POST Suppress this record from non-managers
/repositories/:repo_id/find_by_id/archival_objects GET Find Archival Objects by ref_id or component_id
/repositories/:repo_id/find_by_id/digital_object_components GET Find Digital Object Components by component_id
/repositories/:repo_id/find_by_id/digital_objects GET Find Digital Objects by digital_object_id
/repositories/:repo_id/find_by_id/resources GET Find Resources by their identifiers
/repositories/:repo_id/groups POST Create a group within a repository
/repositories/:repo_id/groups GET Get a list of groups for a repository
/repositories/:repo_id/groups/:id POST Update a group
/repositories/:repo_id/groups/:id GET Get a group by ID
/repositories/:repo_id/groups/:id DELETE Delete a group by ID
/repositories/:repo_id/jobs POST Create a new job
/repositories/:repo_id/jobs GET Get a list of Jobs for a Repository
/repositories/:repo_id/jobs/:id DELETE Delete a Job
/repositories/:repo_id/jobs/:id GET Get a Job by ID
/repositories/:repo_id/jobs/:id/cancel POST Cancel a Job
/repositories/:repo_id/jobs/:id/log GET Get a Job’s log by ID
/repositories/:repo_id/jobs/:id/output_files GET Get a list of Job’s output files by ID
/repositories/:repo_id/jobs/:id/output_files/:file_id GET Get a Job’s output file by ID
/repositories/:repo_id/jobs/:id/records GET Get a Job’s list of created URIs
/repositories/:repo_id/jobs/active GET Get a list of all active Jobs for a Repository
/repositories/:repo_id/jobs/archived GET Get a list of all archived Jobs for a Repository
/repositories/:repo_id/jobs/import_types GET List all supported import job types
/repositories/:repo_id/jobs_with_files POST Create a new job and post input files
/repositories/:repo_id/preferences POST Create a Preferences record
/repositories/:repo_id/preferences GET Get a list of Preferences for a Repository and optionally a user
/repositories/:repo_id/preferences/:id GET Get a Preferences record
/repositories/:repo_id/preferences/:id POST Update a Preferences record
/repositories/:repo_id/preferences/:id DELETE Delete a Preferences record
/repositories/:repo_id/preferences/defaults GET Get the default set of Preferences for a Repository and optionally a user
/repositories/:repo_id/rde_templates POST Create an RDE template
/repositories/:repo_id/rde_templates GET Get a list of RDE Templates
/repositories/:repo_id/rde_templates/:id GET Get an RDE template record
/repositories/:repo_id/rde_templates/:id DELETE Delete an RDE Template
/repositories/:repo_id/required_fields/:record_type POST Require fields for a record type
/repositories/:repo_id/required_fields/:record_type GET Get required fields for a record type
/repositories/:repo_id/resource_descriptions/:id.:fmt/metadata GET Get export metadata for a Resource Description
/repositories/:repo_id/resource_descriptions/:id.pdf GET Get an EAD representation of a Resource
/repositories/:repo_id/resource_descriptions/:id.xml GET Get an EAD representation of a Resource
/repositories/:repo_id/resource_labels/:id.:fmt/metadata GET Get export metadata for Resource labels
/repositories/:repo_id/resource_labels/:id.tsv GET Get a tsv list of printable labels for a Resource
/repositories/:repo_id/resources POST Create a Resource
/repositories/:repo_id/resources GET Get a list of Resources for a Repository
/repositories/:repo_id/resources/:id GET Get a Resource
/repositories/:repo_id/resources/:id POST Update a Resource
/repositories/:repo_id/resources/:id DELETE Delete a Resource
/repositories/:repo_id/resources/:id/accept_children POST Move existing Archival Objects to become children of a Resource
/repositories/:repo_id/resources/:id/children POST Batch create several Archival Objects as children of an existing Resource
/repositories/:repo_id/resources/:id/models_in_graph GET Get a list of record types in the graph of a resource
/repositories/:repo_id/resources/:id/ordered_records GET Get the list of URIs of this published resource and all published archival objects contained within.Ordered by tree order (i.e. if you fully expanded the record tree and read from top to bottom)
/repositories/:repo_id/resources/:id/publish POST Publish a resource and all its sub-records and components
/repositories/:repo_id/resources/:id/suppressed POST Suppress this record
/repositories/:repo_id/resources/:id/top_containers GET Get Top Containers linked to a published resource and published archival ojbects contained within.
/repositories/:repo_id/resources/:id/transfer POST Transfer this record to a different repository
/repositories/:repo_id/resources/:id/tree GET Get a Resource tree
/repositories/:repo_id/resources/:id/tree/node GET Fetch tree information for an Archival Object record within a tree
/repositories/:repo_id/resources/:id/tree/node_from_root GET Fetch tree paths from the root record to Archival Objects
/repositories/:repo_id/resources/:id/tree/root GET Fetch tree information for the top-level resource record
/repositories/:repo_id/resources/:id/tree/waypoint GET Fetch the record slice for a given tree waypoint
/repositories/:repo_id/resources/marc21/:id.:fmt/metadata GET Get metadata for a MARC21 export
/repositories/:repo_id/resources/marc21/:id.xml GET Get a MARC 21 representation of a Resource
/repositories/:repo_id/search GET, POST Search this repository
/repositories/:repo_id/top_containers POST Create a top container
/repositories/:repo_id/top_containers GET Get a list of TopContainers for a Repository
/repositories/:repo_id/top_containers/:id POST Update a top container
/repositories/:repo_id/top_containers/:id GET Get a top container by ID
/repositories/:repo_id/top_containers/:id DELETE Delete a top container
/repositories/:repo_id/top_containers/batch/container_profile POST Update container profile for a batch of top containers
/repositories/:repo_id/top_containers/batch/ils_holding_id POST Update ils_holding_id for a batch of top containers
/repositories/:repo_id/top_containers/batch/location POST Update location for a batch of top containers
/repositories/:repo_id/top_containers/bulk/barcodes POST Bulk update barcodes
/repositories/:repo_id/top_containers/bulk/locations POST Bulk update locations
/repositories/:repo_id/top_containers/search GET Search for top containers
/repositories/:repo_id/transfer POST Transfer this record to a different repository
/repositories/:repo_id/users/:id GET Get a user’s details including their groups for the current repository
/repositories/with_agent POST Create a Repository with an agent representation
/repositories/with_agent/:id GET Get a Repository by ID, including its agent representation
/repositories/with_agent/:id POST Update a repository with an agent representation
/schemas GET Get all ArchivesSpace schemas
/schemas/:schema GET Get an ArchivesSpace schema
/search GET, POST Search this archive
/search/location_profile GET Search across Location Profiles
/search/published_tree GET Find the tree view for a particular archival record
/search/record_types_by_repository GET, POST Return the counts of record types of interest by repository
/search/records GET, POST Return a set of records by URI
/search/repositories GET, POST Search across repositories
/search/subjects GET, POST Search across subjects
/space_calculator/buildings GET Get a Location by ID
/space_calculator/by_building GET Calculate how many containers will fit in locations for a given building
/space_calculator/by_location GET Calculate how many containers will fit in a list of locations
/subjects POST Create a Subject
/subjects GET Get a list of Subjects
/subjects/:id POST Update a Subject
/subjects/:id GET Get a Subject by ID
/subjects/:id DELETE Delete a Subject
/terms GET Get a list of Terms matching a prefix
/update-feed GET Get a stream of updated records
/update_monitor POST Refresh the list of currently known edits
/users POST Create a local user
/users GET Get a list of users
/users/:id GET Get a user’s details (including their current permissions)
/users/:id POST Update a user’s account
/users/:id DELETE Delete a user
/users/:id/groups POST Update a user’s groups
/users/:username/become-user POST Become a different user
/users/:username/login POST Log in
/users/complete GET Get a list of system users
/users/current-user GET Get the currently logged in user
/version GET Get the ArchivesSpace application version
/vocabularies POST Create a Vocabulary
/vocabularies GET Get a list of Vocabularies
/vocabularies/:id POST Update a Vocabulary
/vocabularies/:id GET Get a Vocabulary by ID
/vocabularies/:id/terms GET Get a list of Terms for a Vocabulary

Errors

The ArchivesSpace API uses the following error codes:

Error Code Meaning
400 Bad Request – Your request sucks
401 Unauthorized – Your session key is wrong
403 Forbidden – The record requested is hidden for administrators only
404 Not Found – The endpoint could not be found
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarially offline for maintanance. Please try again later.