NAV
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

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.

$ export SESSION=9528190655b979f00817a5d38f9daf07d1686fed99a1d53dd2c9ff2d852a0c6e

We’ll use the $SESSION variable in the following examples.

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 2015-12-16 18:57:41 +0100 the following REST endpoints exist in the master branch of the development repository:

GET /agents/corporate_entities

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/agents/corporate_entities?page=1'

Description

List all corporate entity agents

Parameters

Returns

200 – [(:agent_corporate_entity)]

POST /agents/corporate_entities

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "agent_corporate_entity",
  "agent_contacts": [
    {
      "jsonmodel_type": "agent_contact",
      "telephones": [
        {
          "jsonmodel_type": "telephone",
          "number_type": "cell",
          "number": "753 25202 1654 07054",
          "ext": "MHDPA"
        }
      ],
      "name": "Name Number 5",
      "address_1": "4H735534V",
      "country": "82691V643281",
      "fax": "440YPQR",
      "email": "HQ854RL",
      "email_signature": "PHCDG"
    }
  ],
  "linked_agent_roles": [

  ],
  "external_documents": [

  ],
  "rights_statements": [

  ],
  "notes": [

  ],
  "dates_of_existence": [
    {
      "jsonmodel_type": "date",
      "date_type": "bulk",
      "label": "existence",
      "begin": "1975-05-13",
      "end": "1975-05-13",
      "expression": "225E934M425"
    }
  ],
  "names": [
    {
      "jsonmodel_type": "name_corporate_entity",
      "use_dates": [

      ],
      "authorized": false,
      "is_display_name": false,
      "sort_name_auto_generate": true,
      "rules": "aacr",
      "primary_name": "Name Number 4",
      "subordinate_name_1": "Y730V810985",
      "subordinate_name_2": "VM55669861",
      "number": "843379REF",
      "sort_name": "SORT e - 2",
      "dates": "H950POS",
      "qualifier": "MSAY348"
    }
  ],
  "related_agents": [

  ],
  "agent_type": "agent_corporate_entity"
}  
 'http://localhost:8089/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)}

DELETE /agents/corporate_entities/:id

Example Request:

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

Description

Delete a corporate entity agent

Parameters

Integer id – ID of the corporate entity agent

Returns

200 – deleted

GET /agents/corporate_entities/:id

Example Request:

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

Description

Get a corporate entity by ID

Parameters

Integer id – ID of the corporate entity agent

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

Returns

200 – (:agent_corporate_entity) 404 – Not found

POST /agents/corporate_entities/:id

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "agent_corporate_entity",
  "agent_contacts": [
    {
      "jsonmodel_type": "agent_contact",
      "telephones": [
        {
          "jsonmodel_type": "telephone",
          "number_type": "cell",
          "number": "753 25202 1654 07054",
          "ext": "MHDPA"
        }
      ],
      "name": "Name Number 5",
      "address_1": "4H735534V",
      "country": "82691V643281",
      "fax": "440YPQR",
      "email": "HQ854RL",
      "email_signature": "PHCDG"
    }
  ],
  "linked_agent_roles": [

  ],
  "external_documents": [

  ],
  "rights_statements": [

  ],
  "notes": [

  ],
  "dates_of_existence": [
    {
      "jsonmodel_type": "date",
      "date_type": "bulk",
      "label": "existence",
      "begin": "1975-05-13",
      "end": "1975-05-13",
      "expression": "225E934M425"
    }
  ],
  "names": [
    {
      "jsonmodel_type": "name_corporate_entity",
      "use_dates": [

      ],
      "authorized": false,
      "is_display_name": false,
      "sort_name_auto_generate": true,
      "rules": "aacr",
      "primary_name": "Name Number 4",
      "subordinate_name_1": "Y730V810985",
      "subordinate_name_2": "VM55669861",
      "number": "843379REF",
      "sort_name": "SORT e - 2",
      "dates": "H950POS",
      "qualifier": "MSAY348"
    }
  ],
  "related_agents": [

  ],
  "agent_type": "agent_corporate_entity"
}  
 'http://localhost:8089/agents/corporate_entities/1'

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)}

POST /agents/families

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d   
 'http://localhost:8089/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)}

GET /agents/families

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/agents/families?page=1'

Description

List all family agents

Parameters

Returns

200 – [(:agent_family)]

POST /agents/families/:id

Example Request:

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

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 /agents/families/:id

Example Request:

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

Description

Get a family by ID

Parameters

Integer id – ID of the family agent

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

Returns

200 – (:agent) 404 – Not found

DELETE /agents/families/:id

Example Request:

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

Description

Delete an agent family

Parameters

Integer id – ID of the family agent

Returns

200 – deleted

POST /agents/people

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d   
 'http://localhost:8089/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)}

GET /agents/people

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/agents/people?page=1'

Description

List all person agents

Parameters

Returns

200 – [(:agent_person)]

POST /agents/people/:id

Example Request:

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

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 /agents/people/:id

Example Request:

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

Description

Get a person by ID

Parameters

Integer id – ID of the person agent

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

Returns

200 – (:agent) 404 – Not found

DELETE /agents/people/:id

Example Request:

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

Description

Delete an agent person

Parameters

Integer id – ID of the person agent

Returns

200 – deleted

POST /agents/software

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "agent_software",
  "agent_contacts": [

  ],
  "linked_agent_roles": [

  ],
  "external_documents": [

  ],
  "rights_statements": [

  ],
  "notes": [

  ],
  "dates_of_existence": [
    {
      "jsonmodel_type": "date",
      "date_type": "bulk",
      "label": "existence",
      "begin": "1980-07-15",
      "end": "1980-07-15",
      "expression": "O235WL818"
    }
  ],
  "names": [
    {
      "jsonmodel_type": "name_software",
      "use_dates": [

      ],
      "authorized": false,
      "is_display_name": false,
      "sort_name_auto_generate": true,
      "rules": "aacr",
      "software_name": "Name Number 8",
      "sort_name": "SORT e - 5"
    }
  ],
  "agent_type": "agent_software"
}  
 'http://localhost:8089/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)}

GET /agents/software

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/agents/software?page=1'

Description

List all software agents

Parameters

Returns

200 – [(:agent_software)]

DELETE /agents/software/:id

Example Request:

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

Description

Delete a software agent

Parameters

Integer id – ID of the software agent

Returns

200 – deleted

POST /agents/software/:id

Example Request:

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

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 /agents/software/:id

Example Request:

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

Description

Get a software agent by ID

Parameters

Integer id – ID of the software agent

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

Returns

200 – (:agent) 404 – Not found

POST /batch_delete

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 630JAUW  
 'http://localhost:8089/batch_delete'

Description

Carry out delete requests against a list of records

Parameters

[String] record_uris – A list of record uris

Returns

200 – deleted

GET /by-external-id

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/by-external-id'

Description

List records by their external ID(s)

Parameters

String eid – An external ID to find

[String] type – 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

POST /config/enumeration_values/:enum_val_id

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "enumeration_value",
  "value": "627MSSA"
}  
 'http://localhost:8089/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)}

GET /config/enumeration_values/:enum_val_id

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/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)

POST /config/enumeration_values/:enum_val_id/position

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/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)}

POST /config/enumeration_values/:enum_val_id/suppressed

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d BooleanParam  
 'http://localhost:8089/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)}

POST /config/enumerations

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d   
 'http://localhost:8089/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)}

GET /config/enumerations

Example Request:

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

Description

List all defined enumerations

Parameters

Returns

200 – [(:enumeration)]

POST /config/enumerations/:enum_id

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d   
 'http://localhost:8089/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 /config/enumerations/:enum_id

Example Request:

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

Description

Get an Enumeration

Parameters

Integer enum_id – The ID of the enumeration to retrieve

Returns

200 – (:enumeration)

POST /config/enumerations/migration

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "enumeration_migration",
  "enum_uri": "/config/enumerations/67",
  "from": "QJ738G248",
  "to": "AY99075036"
}  
 'http://localhost:8089/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)}

POST /container_profiles

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d   
 'http://localhost:8089/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 /container_profiles

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/container_profiles?page=1'

Description

Get a list of Container Profiles

Parameters

Returns

200 – [(:container_profile)]

POST /container_profiles/:id

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "container_profile",
  "name": "878EL926B",
  "url": "JJ392IV",
  "dimension_units": "inches",
  "extent_dimension": "width",
  "depth": "17",
  "height": "67",
  "width": "34"
}  
 'http://localhost:8089/container_profiles/1'

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 /container_profiles/:id

Example Request:

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

Description

Get a Container Profile by ID

Parameters

Integer id – The ID of the record

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

Returns

200 – (:container_profile)

DELETE /container_profiles/:id

Example Request:

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

Description

Delete an Container Profile

Parameters

Integer id – The ID of the record

Returns

200 – deleted

GET /current_global_preferences

Example Request:

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

Description

Get the global Preferences records for the current user.

Parameters

Returns

200 – {(:preference)}

GET /delete-feed

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/delete-feed?page=1'

Description

Get a stream of deleted records

Parameters

Returns

200 – a list of URIs that were deleted

GET /extent_calculator

Example Request:

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

Description

Calculate the extent of an archival object tree

Parameters

String record_uri – The uri of the object

String unit – The unit of measurement to use

Returns

200 – Calculation results

POST /locations

Example Request:

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

Description

Create a Location

Parameters

JSONModel(:location) – The record to create

Returns

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

GET /locations

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/locations?page=1'

Description

Get a list of locations

Parameters

Returns

200 – [(:location)]

DELETE /locations/:id

Example Request:

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

Description

Delete a Location

Parameters

Integer id – The ID of the record

Returns

200 – deleted

GET /locations/:id

Example Request:

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

Description

Get a Location by ID

Parameters

Integer id – The ID of the record

Returns

200 – (:location)

POST /locations/:id

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "location",
  "external_ids": [

  ],
  "building": "32 E 9th Street",
  "floor": "11",
  "room": "3",
  "area": "Back",
  "barcode": "01101011000101100110",
  "temporary": "conservation"
}  
 'http://localhost:8089/locations/1'

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)}

POST /locations/batch

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "location_batch",
  "external_ids": [

  ],
  "locations": [

  ],
  "building": "41 W 7th Street",
  "floor": "11",
  "room": "5",
  "area": "Back",
  "barcode": "00101111001110011111",
  "temporary": "loan",
  "coordinate_1_range": {
    "label": "GUK746L",
    "start": "0",
    "end": "10"
  }
}  
 'http://localhost:8089/locations/batch'

Description

Create a Batch of Locations

Parameters

RESTHelpers::BooleanParam dry_run – 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)}

POST /locations/batch_update

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "location_batch_update",
  "external_ids": [

  ],
  "record_uris": [

  ],
  "building": "114 E 6th Street",
  "floor": "6",
  "room": "3",
  "area": "Front",
  "barcode": "11001111001110011000",
  "temporary": "conservation"
}  
 'http://localhost:8089/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)}

POST /logout

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {}  
 'http://localhost:8089/logout'

Description

Log out the current session

Parameters

Returns

200 – Session logged out

POST /merge_requests/agent

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "merge_request",
  "victims": [
    {
      "ref": "/repositories/2/resources/2"
    }
  ],
  "target": {
    "ref": "/repositories/2/resources/1"
  }
}  
 'http://localhost:8089/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)}

POST /merge_requests/digital_object

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "merge_request",
  "victims": [
    {
      "ref": "/repositories/2/resources/2"
    }
  ],
  "target": {
    "ref": "/repositories/2/resources/1"
  }
}  
 'http://localhost:8089/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)}

POST /merge_requests/resource

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "merge_request",
  "victims": [
    {
      "ref": "/repositories/2/resources/2"
    }
  ],
  "target": {
    "ref": "/repositories/2/resources/1"
  }
}  
 'http://localhost:8089/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)}

POST /merge_requests/subject

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "merge_request",
  "victims": [
    {
      "ref": "/repositories/2/resources/2"
    }
  ],
  "target": {
    "ref": "/repositories/2/resources/1"
  }
}  
 'http://localhost:8089/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 /notifications

Example Request:

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

Description

Get a stream of notifications

Parameters

Integer last_sequence – The last sequence number seen

Returns

200 – a list of notifications

GET /permissions

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/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)]

GET /reports

Example Request:

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

Description

List all reports

Parameters

Returns

200 – report list in json

GET /reports/static/*

Example Request:

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

Description

Get a static asset for a report

Parameters

String splat – The requested asset

Returns

200 – the asset

GET /repositories

Example Request:

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

Description

Get a list of Repositories

Parameters

Returns

200 – [(:repository)]

POST /repositories

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "repository",
  "name": "Description: 11",
  "repo_code": "ASPACE REPO 2 -- 631024",
  "org_code": "970UV228G",
  "image_url": "http://www.example-3.com",
  "url": "http://www.example-4.com"
}  
 'http://localhost:8089/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

POST /repositories/:id

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "repository",
  "name": "Description: 11",
  "repo_code": "ASPACE REPO 2 -- 631024",
  "org_code": "970UV228G",
  "image_url": "http://www.example-3.com",
  "url": "http://www.example-4.com"
}  
 'http://localhost:8089/repositories/1'

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 /repositories/:id

Example Request:

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

Description

Get a Repository by ID

Parameters

Integer id – The ID of the record

Returns

200 – (:repository) 404 – Not found

DELETE /repositories/:repo_id

Example Request:

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

Description

Delete a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – deleted

GET /repositories/:repo_id/accessions

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/accessions?page=1'

Description

Get a list of Accessions for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:accession)]

POST /repositories/:repo_id/accessions

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d   
 'http://localhost:8089/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)}}

DELETE /repositories/:repo_id/accessions/:id

Example Request:

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

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

GET /repositories/:repo_id/accessions/:id

Example Request:

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

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 – A list of references to resolve and embed in the response

Returns

200 – (:accession)

POST /repositories/:repo_id/accessions/:id

Example Request:

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

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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/accessions/1/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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/accessions/1/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 /repositories/:repo_id/archival_contexts/corporate_entities/:id.:fmt/metadata

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/archival_contexts/corporate_entities/1.: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 /repositories/:repo_id/archival_contexts/corporate_entities/:id.xml

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/archival_contexts/corporate_entities/1.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 /repositories/:repo_id/archival_contexts/families/:id.:fmt/metadata

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/archival_contexts/families/1.: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 /repositories/:repo_id/archival_contexts/families/:id.xml

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/archival_contexts/families/1.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 /repositories/:repo_id/archival_contexts/people/:id.:fmt/metadata

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/archival_contexts/people/1.: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 /repositories/:repo_id/archival_contexts/people/:id.xml

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/archival_contexts/people/1.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 /repositories/:repo_id/archival_contexts/softwares/:id.:fmt/metadata

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/archival_contexts/softwares/1.: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 /repositories/:repo_id/archival_contexts/softwares/:id.xml

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/archival_contexts/softwares/1.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)

POST /repositories/:repo_id/archival_objects

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/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 /repositories/:repo_id/archival_objects

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/archival_objects?page=1'

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)]

DELETE /repositories/:repo_id/archival_objects/:id

Example Request:

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

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

POST /repositories/:repo_id/archival_objects/:id

Example Request:

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

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 /repositories/:repo_id/archival_objects/:id

Example Request:

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

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 – A list of references to resolve and embed in the response

Returns

200 – (:archival_object) 404 – Not found

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/archival_objects/1/accept_children'

Description

Move existing Archival Objects to become children of an Archival Object

Parameters

[String] children – 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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/archival_objects/1/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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/archival_objects/1/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

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/archival_objects/1/parent'

Description

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

Parameters

Integer id – The ID of the record

Integer parent – The parent of this node in the tree

Integer position – 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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/archival_objects/1/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)}

POST /repositories/:repo_id/batch_imports

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d Q524VPF  
 'http://localhost:8089/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 – param to indicate we are using a migrator

Returns

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

GET /repositories/:repo_id/classification_terms

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/classification_terms?page=1'

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)]

POST /repositories/:repo_id/classification_terms

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d   
 'http://localhost:8089/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)}

POST /repositories/:repo_id/classification_terms/:id

Example Request:

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

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)}

DELETE /repositories/:repo_id/classification_terms/:id

Example Request:

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

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

GET /repositories/:repo_id/classification_terms/:id

Example Request:

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

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 – A list of references to resolve and embed in the response

Returns

200 – (:classification_term) 404 – Not found

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/classification_terms/1/accept_children'

Description

Move existing Classification Terms to become children of another Classification Term

Parameters

[String] children – 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 /repositories/:repo_id/classification_terms/:id/children

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/classification_terms/1/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

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/classification_terms/1/parent'

Description

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

Parameters

Integer id – The ID of the record

Integer parent – The parent of this node in the tree

Integer position – 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)}

POST /repositories/:repo_id/classifications

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/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 /repositories/:repo_id/classifications

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/classifications?page=1'

Description

Get a list of Classifications for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:classification)]

DELETE /repositories/:repo_id/classifications/:id

Example Request:

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

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

POST /repositories/:repo_id/classifications/:id

Example Request:

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

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)}

GET /repositories/:repo_id/classifications/:id

Example Request:

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

Description

Get a Classification

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

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

Returns

200 – (:classification)

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/classifications/1/accept_children'

Description

Move existing Classification Terms to become children of a Classification

Parameters

[String] children – 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 /repositories/:repo_id/classifications/:id/tree

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/classifications/1/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

POST /repositories/:repo_id/component_transfers

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/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 /repositories/:repo_id/current_preferences

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/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)}

GET /repositories/:repo_id/default_values/:record_type

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/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)}

POST /repositories/:repo_id/default_values/:record_type

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d JF681N373  
 'http://localhost:8089/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)}

POST /repositories/:repo_id/digital_object_components

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d   
 'http://localhost:8089/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 /repositories/:repo_id/digital_object_components

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/digital_object_components?page=1'

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)]

POST /repositories/:repo_id/digital_object_components/:id

Example Request:

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

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)}

DELETE /repositories/:repo_id/digital_object_components/:id

Example Request:

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

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

GET /repositories/:repo_id/digital_object_components/:id

Example Request:

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

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 – A list of references to resolve and embed in the response

Returns

200 – (:digital_object_component) 404 – Not found

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/digital_object_components/1/accept_children'

Description

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

Parameters

[String] children – 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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d   
 'http://localhost:8089/repositories/:repo_id/digital_object_components/1/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 /repositories/:repo_id/digital_object_components/:id/children

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/digital_object_components/1/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

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/digital_object_components/1/parent'

Description

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

Parameters

Integer id – The ID of the record

Integer parent – The parent of this node in the tree

Integer position – 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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/digital_object_components/1/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)}

POST /repositories/:repo_id/digital_objects

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/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 /repositories/:repo_id/digital_objects

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/digital_objects?page=1'

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 /repositories/:repo_id/digital_objects/:id

Example Request:

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

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 – A list of references to resolve and embed in the response

Returns

200 – (:digital_object)

POST /repositories/:repo_id/digital_objects/:id

Example Request:

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

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 /repositories/:repo_id/digital_objects/:id

Example Request:

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

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

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/digital_objects/1/accept_children'

Description

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

Parameters

[String] children – 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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/digital_objects/1/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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/digital_objects/1/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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/digital_objects/1/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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/digital_objects/1/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 /repositories/:repo_id/digital_objects/:id/tree

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/digital_objects/1/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

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/digital_objects/dublin_core/1.: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 /repositories/:repo_id/digital_objects/dublin_core/:id.xml

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/digital_objects/dublin_core/1.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 /repositories/:repo_id/digital_objects/mets/:id.:fmt/metadata

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/digital_objects/mets/1.: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 /repositories/:repo_id/digital_objects/mets/:id.xml

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/digital_objects/mets/1.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

Returns

200 – (:digital_object)

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/digital_objects/mods/1.: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 /repositories/:repo_id/digital_objects/mods/:id.xml

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/digital_objects/mods/1.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)

POST /repositories/:repo_id/events

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d   
 'http://localhost:8089/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 /repositories/:repo_id/events

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/events?page=1'

Description

Get a list of Events for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:event)]

DELETE /repositories/:repo_id/events/:id

Example Request:

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

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

GET /repositories/:repo_id/events/:id

Example Request:

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

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 – A list of references to resolve and embed in the response

Returns

200 – (:event) 404 – Not found

POST /repositories/:repo_id/events/:id

Example Request:

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

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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/events/1/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)}

GET /repositories/:repo_id/find_by_id/archival_objects

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/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 – A set of record Ref IDs

[String] component_id – A set of record component IDs

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

Returns

200 – JSON array of refs

GET /repositories/:repo_id/find_by_id/digital_object_components

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/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 – A set of record component IDs

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

Returns

200 – JSON array of refs

GET /repositories/:repo_id/groups

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/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 – Get groups by group code

Returns

200 – [(:resource)]

POST /repositories/:repo_id/groups

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/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

DELETE /repositories/:repo_id/groups/:id

Example Request:

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

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

GET /repositories/:repo_id/groups/:id

Example Request:

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

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

POST /repositories/:repo_id/groups/:id

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d BooleanParam  
 'http://localhost:8089/repositories/:repo_id/groups/1'

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

POST /repositories/:repo_id/jobs

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d   
 'http://localhost:8089/repositories/:repo_id/jobs'

Description

Create a new import 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 /repositories/:repo_id/jobs

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/jobs?page=1'

Description

Get a list of Jobs for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:job)]

GET /repositories/:repo_id/jobs/:id

Example Request:

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

Description

Get a Job by ID

Parameters

Integer id – The ID of the record

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

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:job)

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/jobs/1/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 /repositories/:repo_id/jobs/:id/log

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/jobs/1/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 /repositories/:repo_id/jobs/:id/output_files

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/jobs/1/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 /repositories/:repo_id/jobs/:id/output_files/:file_id

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/jobs/1/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 /repositories/:repo_id/jobs/:id/records

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/jobs/1/records?page=1'

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 /repositories/:repo_id/jobs/active

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/jobs/active'

Description

Get a list of all active Jobs for a Repository

Parameters

[String] resolve – 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 /repositories/:repo_id/jobs/archived

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/jobs/archived?page=1'

Description

Get a list of all archived Jobs for a Repository

Parameters

[String] resolve – 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 /repositories/:repo_id/jobs/import_types

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/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

GET /repositories/:repo_id/jobs/types

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/jobs/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 job types

POST /repositories/:repo_id/jobs_with_files

Example Request:

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

Description

Create a new import 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)}

POST /repositories/:repo_id/preferences

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/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 /repositories/:repo_id/preferences

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/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 – The username to retrieve defaults for

Returns

200 – [(:preference)]

GET /repositories/:repo_id/preferences/:id

Example Request:

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

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)

DELETE /repositories/:repo_id/preferences/:id

Example Request:

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

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

POST /repositories/:repo_id/preferences/:id

Example Request:

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

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)}

GET /repositories/:repo_id/preferences/defaults

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/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 – The username to retrieve defaults for

Returns

200 – (defaults)

POST /repositories/:repo_id/rde_templates

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d   
 'http://localhost:8089/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 /repositories/:repo_id/rde_templates

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/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 /repositories/:repo_id/rde_templates/:id

Example Request:

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

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 /repositories/:repo_id/rde_templates/:id

Example Request:

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

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

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/resource_descriptions/1.: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 – Format of the request

Returns

200 – The export metadata

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/resource_descriptions/1.pdf'

Description

Get an EAD representation of a Resource

Parameters

Integer id – The ID of the record

RESTHelpers::BooleanParam include_unpublished – Include unpublished records

RESTHelpers::BooleanParam include_daos – Include digital objects in dao tags

RESTHelpers::BooleanParam numbered_cs – Use numbered tags in ead

RESTHelpers::BooleanParam print_pdf – Print EAD to pdf

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:resource)

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/resource_descriptions/1.xml'

Description

Get an EAD representation of a Resource

Parameters

Integer id – The ID of the record

RESTHelpers::BooleanParam include_unpublished – Include unpublished records

RESTHelpers::BooleanParam include_daos – Include digital objects in dao tags

RESTHelpers::BooleanParam numbered_cs – Use numbered tags in ead

RESTHelpers::BooleanParam print_pdf – Print EAD to pdf

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – (:resource)

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/resource_labels/1.: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 /repositories/:repo_id/resource_labels/:id.tsv

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/resource_labels/1.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)

POST /repositories/:repo_id/resources

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d   
 'http://localhost:8089/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 /repositories/:repo_id/resources

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/resources?page=1'

Description

Get a list of Resources for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:resource)]

GET /repositories/:repo_id/resources/:id

Example Request:

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

Description

Get a Resource

Parameters

Integer id – The ID of the record

Integer repo_id – The Repository ID – The Repository must exist

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

Returns

200 – (:resource)

POST /repositories/:repo_id/resources/:id

Example Request:

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

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 /repositories/:repo_id/resources/:id

Example Request:

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

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

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/resources/1/accept_children'

Description

Move existing Archival Objects to become children of a Resource

Parameters

[String] children – 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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/resources/1/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 /repositories/:repo_id/resources/:id/models_in_graph

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/resources/1/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

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/resources/1/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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/resources/1/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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/repositories/:repo_id/resources/1/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 /repositories/:repo_id/resources/:id/tree

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/resources/1/tree'

Description

Get a Resource tree

Parameters

Integer id – The ID of the record

String limit_to – An Archival Object URI or 'root’

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – OK

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/resources/marc21/1.: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

Returns

200 – The export metadata

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/resources/marc21/1.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

Returns

200 – (:resource)

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/search?page=1'

Description

Search this repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

String q – A search query string

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

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

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

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

[String] filter_term – A json string containing the term/value pairs to be applied as filters. Of the form: {“fieldname”: “fieldvalue”}.

[String] simple_filter – A simple direct filter to be applied as a filter. Of the form 'primary_type:accession OR primary_type:agent_person’.

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

RESTHelpers::BooleanParam hl – Whether to use highlighting

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

Returns

200 –

POST /repositories/:repo_id/top_containers

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d   
 'http://localhost:8089/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 /repositories/:repo_id/top_containers

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/top_containers?page=1'

Description

Get a list of TopContainers for a Repository

Parameters

Integer repo_id – The Repository ID – The Repository must exist

Returns

200 – [(:top_container)]

POST /repositories/:repo_id/top_containers/:id

Example Request:

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

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 /repositories/:repo_id/top_containers/:id

Example Request:

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

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 – A list of references to resolve and embed in the response

Returns

200 – (:top_container)

DELETE /repositories/:repo_id/top_containers/:id

Example Request:

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

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

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/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)}

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/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)}

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/repositories/:repo_id/top_containers/search'

Description

Search for top containers

Parameters

Integer repo_id – The Repository ID – The Repository must exist

String q – A search query string

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

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

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

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

[String] filter_term – A json string containing the term/value pairs to be applied as filters. Of the form: {“fieldname”: “fieldvalue”}.

[String] simple_filter – A simple direct filter to be applied as a filter. Of the form 'primary_type:accession OR primary_type:agent_person’.

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

RESTHelpers::BooleanParam hl – Whether to use highlighting

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

Returns

200 – [(:top_container)]

POST /repositories/:repo_id/transfer

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d 1  
 'http://localhost:8089/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 /repositories/:repo_id/users/:id

Example Request:

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

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)

POST /repositories/with_agent

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "repository_with_agent",
  "repository": {
    "jsonmodel_type": "repository",
    "name": "Description: 12",
    "repo_code": "ASPACE REPO 3 -- 83816",
    "org_code": "BJ26310812",
    "image_url": "http://www.example-5.com",
    "url": "http://www.example-6.com"
  },
  "agent_representation": {
    "jsonmodel_type": "agent_corporate_entity",
    "agent_contacts": [
      {
        "jsonmodel_type": "agent_contact",
        "telephones": [
          {
            "jsonmodel_type": "telephone",
            "number_type": "cell",
            "number": "53384 68481 03307 458 18032",
            "ext": "548FJB643"
          }
        ],
        "name": "Name Number 15",
        "address_2": "253HWNA",
        "address_3": "MWGQ694",
        "region": "R18028PD",
        "country": "590811QWW",
        "fax": "PDT154I",
        "note": "429448XUH"
      }
    ],
    "linked_agent_roles": [

    ],
    "external_documents": [

    ],
    "rights_statements": [

    ],
    "notes": [

    ],
    "dates_of_existence": [
      {
        "jsonmodel_type": "date",
        "date_type": "bulk",
        "label": "existence",
        "begin": "1981-08-13",
        "end": "1981-08-13",
        "expression": "PTTA946"
      }
    ],
    "names": [
      {
        "jsonmodel_type": "name_corporate_entity",
        "use_dates": [

        ],
        "authorized": false,
        "is_display_name": false,
        "sort_name_auto_generate": true,
        "rules": "rda",
        "primary_name": "Name Number 14",
        "subordinate_name_1": "L171484GE",
        "subordinate_name_2": "B834217562G",
        "number": "264WXB399",
        "sort_name": "SORT l - 11",
        "dates": "285385KEY",
        "qualifier": "N906ENG"
      }
    ],
    "related_agents": [

    ],
    "agent_type": "agent_corporate_entity"
  }
}  
 'http://localhost:8089/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

POST /repositories/with_agent/:id

Example Request:

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

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 /repositories/with_agent/:id

Example Request:

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

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

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/search?page=1'

Description

Search this archive

Parameters

String q – A search query string

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

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

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

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

[String] filter_term – A json string containing the term/value pairs to be applied as filters. Of the form: {“fieldname”: “fieldvalue”}.

[String] simple_filter – A simple direct filter to be applied as a filter. Of the form 'primary_type:accession OR primary_type:agent_person’.

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

RESTHelpers::BooleanParam hl – Whether to use highlighting

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

Returns

200 –

GET /search/published_tree

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/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

GET /search/repositories

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/search/repositories?page=1'

Description

Search across repositories

Parameters

String q – A search query string

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

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

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

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

[String] filter_term – A json string containing the term/value pairs to be applied as filters. Of the form: {“fieldname”: “fieldvalue”}.

[String] simple_filter – A simple direct filter to be applied as a filter. Of the form 'primary_type:accession OR primary_type:agent_person’.

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

RESTHelpers::BooleanParam hl – Whether to use highlighting

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

Returns

200 –

GET /search/subjects

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/search/subjects?page=1'

Description

Search across subjects

Parameters

String q – A search query string

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

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

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

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

[String] filter_term – A json string containing the term/value pairs to be applied as filters. Of the form: {“fieldname”: “fieldvalue”}.

[String] simple_filter – A simple direct filter to be applied as a filter. Of the form 'primary_type:accession OR primary_type:agent_person’.

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

RESTHelpers::BooleanParam hl – Whether to use highlighting

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

Returns

200 –

POST /subjects

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "subject",
  "external_ids": [

  ],
  "publish": true,
  "terms": [
    {
      "jsonmodel_type": "term",
      "term": "Term 1",
      "term_type": "technique",
      "vocabulary": "/vocabularies/2"
    }
  ],
  "external_documents": [

  ],
  "vocabulary": "/vocabularies/3",
  "authority_id": "http://www.example-7.com",
  "scope_note": "NR888166E",
  "source": "gmgpc"
}  
 'http://localhost:8089/subjects'

Description

Create a Subject

Parameters

JSONModel(:subject) – The record to create

Returns

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

GET /subjects

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/subjects?page=1'

Description

Get a list of Subjects

Parameters

Returns

200 – [(:subject)]

DELETE /subjects/:id

Example Request:

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

Description

Delete a Subject

Parameters

Integer id – The ID of the record

Returns

200 – deleted

GET /subjects/:id

Example Request:

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

Description

Get a Subject by ID

Parameters

Integer id – The ID of the record

Returns

200 – (:subject)

POST /subjects/:id

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "subject",
  "external_ids": [

  ],
  "publish": true,
  "terms": [
    {
      "jsonmodel_type": "term",
      "term": "Term 1",
      "term_type": "technique",
      "vocabulary": "/vocabularies/2"
    }
  ],
  "external_documents": [

  ],
  "vocabulary": "/vocabularies/3",
  "authority_id": "http://www.example-7.com",
  "scope_note": "NR888166E",
  "source": "gmgpc"
}  
 'http://localhost:8089/subjects/1'

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 /terms

Example Request:

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

Description

Get a list of Terms matching a prefix

Parameters

String q – The prefix to match

Returns

200 – [(:term)]

GET /update-feed

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/update-feed'

Description

Get a stream of updated records

Parameters

Integer last_sequence – The last sequence number seen

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

Returns

200 – a list of records and sequence numbers

POST /update_monitor

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "active_edits",
  "active_edits": [
    {
      "user": "PK994JL",
      "uri": "TOBLQ",
      "time": "2015-12-16T18:57:34+01:00"
    }
  ]
}  
 'http://localhost:8089/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

POST /users

Example Request:

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

Description

Create a local user

Parameters

String password – The user’s password

[String] groups – 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 /users

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/users?page=1'

Description

Get a list of users

Parameters

Returns

200 – [(:resource)]

DELETE /users/:id

Example Request:

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

Description

Delete a user

Parameters

Integer id – The user to delete

Returns

200 – deleted

GET /users/:id

Example Request:

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

Description

Get a user’s details (including their current permissions)

Parameters

Integer id – The username id to fetch

Returns

200 – (:user)

POST /users/:id

Example Request:

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

Description

Update a user’s account

Parameters

Integer id – The ID of the record

String password – The user’s password

[String] groups – 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

JSONModel(:user) – The updated record

Returns

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

POST /users/:username/become-user

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d username_2  
 'http://localhost:8089/users/:username/become-user'

Description

Become a different user

Parameters

Username username – The username to become

Returns

200 – Accepted 404 – User not found

POST /users/:username/login

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d BooleanParam  
 'http://localhost:8089/users/:username/login'

Description

Log in

Parameters

Username username – Your username

String password – Your password

RESTHelpers::BooleanParam expiring – true if the created session should expire

Returns

200 – Login accepted 403 – Login failed

GET /users/complete

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/users/complete'

Description

Get a list of system users

Parameters

String query – A prefix to search for

Returns

200 – A list of usernames

GET /users/current-user

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/users/current-user'

Description

Get the currently logged in user

Parameters

Returns

200 – (:user) 404 – Not logged in

GET /version

Example Request:

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

Description

Get the ArchivesSpace application version

Parameters

Returns

200 – ArchivesSpace (version)

POST /vocabularies

Example Request:

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

Description

Create a Vocabulary

Parameters

JSONModel(:vocabulary) – The record to create

Returns

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

GET /vocabularies

Example Request:

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

Description

Get a list of Vocabularies

Parameters

String ref_id – An alternate, externally-created ID for the vocabulary

Returns

200 – [(:vocabulary)]

POST /vocabularies/:id

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 -d {
  "jsonmodel_type": "vocabulary",
  "terms": [

  ],
  "name": "Vocabulary 4 - 2015-12-16 18:57:37 +0100",
  "ref_id": "vocab_ref_4 - 2015-12-16 18:57:37 +0100"
}  
 'http://localhost:8089/vocabularies/1'

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 /vocabularies/:id

Example Request:

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

Description

Get a Vocabulary by ID

Parameters

Integer id – The ID of the record

Returns

200 – OK

GET /vocabularies/:id/terms

Example Request:

curl -H "X-ArchivesSpace-Session: $SESSION"  
 'http://localhost:8089/vocabularies/1/terms'

Description

Get a list of Terms for a Vocabulary

Parameters

Integer id – The ID of the record

Returns

200 – [(:term)]

Schemas

JSONModel(:abstract_agent)

JSONModel(:abstract_agent_relationship)

JSONModel(:abstract_archival_object)

JSONModel(:abstract_classification)

JSONModel(:abstract_name)

JSONModel(:abstract_note)

JSONModel(:accession)

JSONModel(:accession_parts_relationship)

JSONModel(:accession_sibling_relationship)

JSONModel(:active_edits)

JSONModel(:advanced_query)

JSONModel(:agent_contact)

JSONModel(:agent_corporate_entity)

JSONModel(:agent_family)

JSONModel(:agent_person)

JSONModel(:agent_relationship_associative)

JSONModel(:agent_relationship_earlierlater)

JSONModel(:agent_relationship_parentchild)

JSONModel(:agent_relationship_subordinatesuperior)

JSONModel(:agent_software)

JSONModel(:archival_object)

JSONModel(:archival_record_children)

JSONModel(:boolean_field_query)

JSONModel(:boolean_query)

JSONModel(:classification)

JSONModel(:classification_term)

JSONModel(:record_tree)

JSONModel(:classification_tree)

JSONModel(:collection_management)

JSONModel(:container)

JSONModel(:container_location)

JSONModel(:container_profile)

JSONModel(:date)

JSONModel(:date_field_query)

JSONModel(:deaccession)

JSONModel(:default_values)

JSONModel(:defaults)

JSONModel(:digital_object)

JSONModel(:digital_object_component)

JSONModel(:digital_object_tree)

JSONModel(:digital_record_children)

JSONModel(:enumeration)

JSONModel(:enumeration_migration)

JSONModel(:enumeration_value)

JSONModel(:event)

JSONModel(:extent)

JSONModel(:external_document)

JSONModel(:external_id)

JSONModel(:field_query)

JSONModel(:file_version)

JSONModel(:find_and_replace_job)

JSONModel(:group)

JSONModel(:import_job)

JSONModel(:instance)

JSONModel(:job)

JSONModel(:location)

JSONModel(:location_batch)

JSONModel(:location_batch_update)

JSONModel(:merge_request)

JSONModel(:name_corporate_entity)

JSONModel(:name_family)

JSONModel(:name_form)

JSONModel(:name_person)

JSONModel(:name_software)

JSONModel(:note_abstract)

JSONModel(:note_bibliography)

JSONModel(:note_bioghist)

JSONModel(:note_chronology)

JSONModel(:note_citation)

JSONModel(:note_definedlist)

JSONModel(:note_digital_object)

JSONModel(:note_index)

JSONModel(:note_index_item)

JSONModel(:note_multipart)

JSONModel(:note_orderedlist)

JSONModel(:note_outline)

JSONModel(:note_outline_level)

JSONModel(:note_singlepart)

JSONModel(:note_text)

JSONModel(:permission)

JSONModel(:preference)

JSONModel(:print_to_pdf_job)

JSONModel(:rde_template)

JSONModel(:report_job)

JSONModel(:repository)

JSONModel(:repository_with_agent)

JSONModel(:resource)

JSONModel(:resource_tree)

JSONModel(:revision_statement)

JSONModel(:rights_restriction)

JSONModel(:rights_statement)

JSONModel(:sub_container)

JSONModel(:subject)

JSONModel(:telephone)

JSONModel(:term)

JSONModel(:top_container)

JSONModel(:user)

JSONModel(:user_defined)

JSONModel(: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.