-
Notifications
You must be signed in to change notification settings - Fork 61
Push API
erinspace edited this page Dec 6, 2014
·
10 revisions
Right now, we have (very!) experimental Push API access for the SHARE Notification service.
The Push API accepts documents in the same metadata schema as our notification outputs.
For an example of this in action using python, see:
https://github.com/erinspace/SHARE_push_demo
- Register an API key on the share-dev site
- Create an account and sign in
- In the upper right hand corner, click the gear labeled "settings"
- On the left hand menu, click "Configure API Keys"
- Give your new key a name, and create a new API key by clicking "Create New Key"
- Prepare your content. Your content should be in json format, with 2 fields.
{
'source': 'your source name',
'events': [ { Your Events Here } ]
}
- Each event should be in the same format as the current metadata output
- Right now, malformed events are rejected. Better error reporting coming soon!
- POST your content to the SHARE push API -
http://share-dev.osf.io/api/dev/share/
along with your OSF API key as authorization.- Note: for the time being, you'll have to set verify=False, this will be fixed soon.
- If your content was accepted, you'll receive a
201 Response
from the server! - Check out the share notification stream to see your pushed content
Running Harvesters with ScrAPI
Consuming Notifications - Feed Options
Issues & Using the Issue Tracker
SHARE is a project of the ARL, AAU, and APLU. Development of the SHARE Notification Service is being carried out in partnership with the Center for Open Science and is supported by generous funding from The Institute of Museum and Library Services (IMLS) and the Alfred P. Sloan Foundation.