Skip to content
erinspace edited this page Dec 26, 2014 · 10 revisions

Experimental SHARE Push API Access

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.


Sending content to the PUSH API

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 } ]
}
  • source is the name that you'd like to appear as the source on the notification service.
  • events is a list of individual events that you'd like to send to the notification service.

Formatting the Events

Sending you Events

  • 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, the server verification is not 100% set up, so when making the API request you'll have to disable verification.
    • If you're using the requests module in python like in this example pusher, you'll have to set verify=False for the push request
    • This will be fixed soon!
  • If your content was accepted, you'll receive a 201 Response from the server!
    • Right now, malformed events are rejected, and send a 400 response.
    • The reason for rejection along with specific instructions on how to fix the submission are included along in the text of the server response.
  • Check out the share notification stream to see your pushed content

SHARE Logo

Technical Overview

Creating a Harvester

Running Harvesters with ScrAPI

Consuming Notifications - Feed Options

Issues & Using the Issue Tracker

Metadata Schema

Glossary

Provider Names

Statistics Snapshot

Experimental Push API

Use Cases

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.

Clone this wiki locally