Fedora API

The Fedora API requires authentication in order to access the repository objects, but it is possible to send a session token in place of an explicit username and password.

In order to get this authentication token, the application must first POST the username and password values to /fedora/api/authn. A JSON datastructure will be returned with the token value as well as any fedora attributes found for the user. For example:

curl -X POST -d "username=me@amherst.edu" -d "password=blahblah" https://acdc.amherst.edu/fedora/api/authn

Then, using the value of the returned token as part of the query string, your applications can access fedora objects directly using Fedora's REST API. The only difference is that, instead of '/fedora/objects', you will use '/fedora/api'. For example:

curl https://acdc.amherst.edu/fedora/api/vr:50697/datastreams/SMALL_SIZE?token=abcdefghijklmnop

It is worth noting that tokens expire after a short period.