Yellowdig API Documentation

Api Version: 1

Build Version: 0.0.1

Getting Started

All API requests require an 'apikey' header with your organization's API key. If you'd like to use the API but don't have a key, contact dev@yellowdig.com and we'd be happy to create one for you.

you may wish to set your API key as an environment variable:

export API_KEY=your-api-key

all requests must provide the 'apikey' header:

curl -H "apikey: $API_KEY" https://api.yellowdig.com/v1/users

Query Parameters

The Yellowdig API supports the following query parameters:

Thus, a query ranging from January 1st 2016 to February 1st 2016 would look like:

curl -H 'apikey: $API_KEY' https://api.yellowdig.com/users?start=1451624400000&end=1454302800000

where the start and end parameters are unix timestamps

Api Methods

/events

all interaction data from your oganization

example request:
curl -H 'apikey: $API_KEY' https://api.yellowdig.com/v1/events

example response:
  [
    {
        "type": "pin",
        "action": "visited",
        "owner": {
            "id": 7220,
            "email": "dev@yellowdig.com",
            "name": "Test User",
            "role": "coadmin",
            "class_role": "instructor"
        },
        "actor": {
            "id": 7220,
            "email": "dev@yellowdig.com",
            "name": "Test User",
            "role": "coadmin",
            "class_role": "instructor"
        },
        "organization": {
            "id": 19,
            "name": "Yellowdig",
            "domain": "yellowdig.com",
            "category_id": 1
        },
        "pin": {
            "id": 33234,
            "activity": "visited",
            "title": "Internet freedom in India improved by 2 points in 2015: report",
            "body": "Internet freedom in India has improved slightly under the Narendra Modi-led government even as censorship and surveillance of the Web increased world over ",
            "web_url": "http://indianexpress.com/article/technology/tech-news-technology/internet-freedom-in-india-improved-by-2-points-in-2015-report/",
            "image_url": "http://images.indianexpress.com/2015/11/internet_new1.jpg?w=480",
            "tags": []
        },
        "board": {
            "id": 1328,
            "title": "Test Board (10th Aug 2015)",
            "category": "Communications"
        },
        "timestamp": "2015-12-06T00:10:50.937+00:00"
    }
]

/boards

all boards that belong to your organization

example request:
curl -H 'apikey: $API_KEY' https://api.yellowdig.com/v1/boards

example response:
  [
    {
        "id": 474,
        "title": "My Great Board",
        "category": "Bookmarks"
    },
    {
        "id": 587,
        "title": "Interest Board",
        "category": "Communications"
    },
    {
        "id": 2483,
        "title": "Summer Art",
        "category": "Communications"
    }
]

/board/:board-id

all interactions on a specified board

example request:
curl -H 'apikey: $API_KEY' https://api.yellowdig.com/v1/board/:board-id

example response:
  [
    {
        "type": "board",
        "action": "followed",
        "owner": {
            "id": 82,
            "email": "dev@yellowdig.com",
            "name": "My Name",
            "role": "coadmin",
            "class_role": "instructor"
        },
        "actor": {
            "id": 1665,
            "email": "dev@yellowdig.com",
            "name": "Tester",
            "role": "user",
            "class_role": "instructor"
        },
        "organization": {
            "id": 19,
            "name": "Yellowdig",
            "domain": "yellowdig.com",
            "category_id": 1
        },
        "board": {
            "id": 474,
            "title": "Test Board",
            "category": "Bookmarks"
        },
        "timestamp": "2015-12-09T07:53:29.174+00:00"
    }
]

/pins

all pins from your organization (from all boards)

example request:
curl -H 'apikey: $API_KEY' https://api.yellowdig.com/v1/pins

example response:
  [
    {
        "type": "pin",
        "action": "visited",
        "owner": {
            "id": 7220,
            "email": "dev@yellowdig.com",
            "name": "Dev User",
            "role": "coadmin",
            "class_role": "instructor"
        },
        "actor": {
            "id": 7220,
            "email": "dev@yellowdig.com",
            "name": "Dev User",
            "role": "coadmin",
            "class_role": "instructor"
        },
        "organization": {
            "id": 19,
            "name": "Yellowdig",
            "domain": "yellowdig.com",
            "category_id": 1
        },
        "pin": {
            "id": 33234,
            "activity": "visited",
            "title": "Internet freedom in India improved by 2 points in 2015: report",
            "body": "Internet freedom in India has improved slightly under the Narendra Modi-led government even as censorship and surveillance of the Web increased world over ",
            "web_url": "http://indianexpress.com/article/technology/tech-news-technology/internet-freedom-in-india-improved-by-2-points-in-2015-report/",
            "image_url": "http://images.indianexpress.com/2015/11/internet_new1.jpg?w=480",
            "tags": []
        },
        "board": {
            "id": 1328,
            "title": "Test Board (10th Aug 2015)",
            "category": "Communications"
        },
        "timestamp": "2015-12-06T00:10:50.937+00:00"
    }
]

/users

all users in your organization

example request:
curl -H 'apikey: $API_KEY' https://api.yellowdig.com/v1/users

example response:
  [
    {
        "id": 7220,
        "email": "dev@yellowdig.com",
        "role": "coadmin",
        "name": "Dev User"
    },
    {
        "id": 1482,
        "email": "dev@yellowdig.com",
        "role": "coadmin",
        "name": "Dev User"
    }
]

/user/:user-id

get all interactions from a user by user-id

example request:
curl -H 'apikey: $API_KEY' https://api.yellowdig.com/v1/user/:user-id

example response:
  [
    {
        "type": "pin",
        "action": "visited",
        "owner": {
            "id": 7220,
            "email": "dev@yellowdig.com",
            "name": "Dev User",
            "role": "coadmin",
            "class_role": "instructor"
        },
        "actor": {
            "id": 7220,
            "email": "dev@yellowdig.com",
            "name": "Dev User",
            "role": "coadmin",
            "class_role": "instructor"
        },
        "organization": {
            "id": 19,
            "name": "Yellowdig",
            "domain": "yellowdig.com",
            "category_id": 1
        },
        "pin": {
            "id": 33234,
            "activity": "visited",
            "title": "Internet freedom in India improved by 2 points in 2015: report",
            "body": "Internet freedom in India has improved slightly under the Narendra Modi-led government even as censorship and surveillance of the Web increased world over ",
            "web_url": "http://indianexpress.com/article/technology/tech-news-technology/internet-freedom-in-india-improved-by-2-points-in-2015-report/",
            "image_url": "http://images.indianexpress.com/2015/11/internet_new1.jpg?w=480",
            "tags": []
        },
        "board": {
            "id": 1328,
            "title": "Test Board (10th Aug 2015)",
            "category": "Communications"
        },
        "timestamp": "2015-12-06T00:10:50.937+00:00"
    }
]

Missing something you'd like to see in the API? Leave us a note here or email us at: dev@yellowdig.com.