4. Repositories

How do you update the repository definition?

We use the update API call. Once again we need to check with the API documentation but this time search for “Update a repository”.

On the right side the curl expression looks like

    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'

Note the following

  1. The repo id is at the end of the path, just like it is when you list a specific repository
  2. We have another JSON data structure to submit and we do so with a “POST”
  3. We still need to maintain our token.