Avalon Atom Feed

A machine-readable method to query Avalon for catalog entries the results of which can be used to query for avalon object metadata.  
Version
Date
Description
0.1
2 May 2019
Initial Draft
0.25 June 2019Change in query sort field example


Example URL for atom feed

https://avalon.example.com/catalog.atom?q=other_identifier_sim:/GR[0-9]{8}/&sort=timestamp+desc&rows=100&page=1

parameters

  • q - solr query string for filtering results
  • sort - the solr field to use for sorting and direction desc or asc
  • rows - the number of records to return per page
  • page - page number of paged results

Access Control

Access to the atom feed is normally unrestricted. However, results returned will be limited to those items to which the currently logged-in user has access. Only public items will returned for non-logged-in users.

Additionally, a token (also often referred to as a key) can be passed with the request through the http header 'Avalon-Api-Key'. If a matching token is found in Avalon's database, all records will be accessible. Creating and viewing tokens can be done via rake tasks.

Results Format

Results arrive in atom format. Of particular interest will be the <link rel="alternate"> value for each <entry>. This is the link that can be used to retrieve metadata about the given item.

Also of interest will be the <opensearch:totalResults>, <openSearch:startIndex>, and <openSearch:itemsPerPage> values.

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
  <title>Avalon Search Results</title>
  <author>
    <name>Avalon Media System</name>
  </author>
  <link rel="self" href="https://avalon.example.com/catalog.atom"/>
  <link rel="alternate" href="https://avalon.example.com/catalog.html" type="text/html"/>
  <id>https://avalon.example.com/catalog.html?type=text%2Fhtml</id>
  <link rel="next" href="https://avalon.example.com/catalog.atom?page=2"/>
  <link rel="first" href="https://avalon.example.com/catalog.atom?page=1"/>
  <link rel="last" href="https://avalon.example.com/catalog.atom?page=302"/>
  <link rel="search" type="application/opensearchdescription+xml" href="https://avalon.example.com/catalog/opensearch.xml"/>
  <opensearch:totalResults>3011</opensearch:totalResults>
  <opensearch:startIndex>0</opensearch:startIndex>
  <opensearch:itemsPerPage>10</opensearch:itemsPerPage>
  <opensearch:Query role="request" searchTerms="" startPage="1"/>
  <updated>2019-05-02T18:16:43Z</updated>
  <entry>
    <title>&amp;quot;Black Leadership in the Music Industry&amp;quot; Lecture</title>
    <updated>2017-06-20T05:50:47Z</updated>
    <link rel="alternate" type="application/json" href="https://avalon.example.com/media_objects/tb09k692g.json"/>
    <id>https://avalon.example.com/media_objects/tb09k692g</id>
    <summary type="html">
    </summary>
  </entry>
</feed>