Navigation
Basic Operations
Home
Issues & Requests
Member API
Partner Tools
Recent Changes
test page
 

API Basics

These are base URLs for the REST API:
  • Test/Demo Server: http://test.aptrust.org/member-api/v1/
  • Live/Production Server: https://repository.aptrust.org/member-api/v1/  
The URL for the Test/Demo server may change in the coming months. We'll send an announcement to members if before we make a change.

Request Headers


 Header Name Value Description
 Content-Type application/json This is required for POST and PUT requests. You can omit it on GET requests, but it won't hurt if it's there. This header tells the server that the data in the body of your PUT/POST is in JSON format.
 Accept application/json This tells the server to return data in JSON format.
 X-Fluctus-API-User An email address. This should be the email address of a user with a valid account in the APTrust system. Most likely, this is your university/work email address. If the role associated with this email address is Institutional User, you may have access to fewer resources than a user whose role is Institutional Admin.
 X-Fluctus-API-Key A long string of psuedo-random characters If you have a user account, but you don't have an API key, contact support@aptrust.org.

Testing

If you like to test basic API requests with a graphical client, try Postman for Chrome. If you prefer to use curl on the command line, you can specify the -H header multiple times. Here's a sample curl request to the items endpoint on the APTrust test server:

curl -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Fluctus-API-User: pam@virginia.edu" -H "X-Fluctus-API-Key: ab8347c1d4f092a8" http://test.aptrust.org/member-api/v1/items/

Errors





Updated on Aug 4, 2016 by Andrew Diamond (Version 2)