Integration

APIs that power common integration requirements with your content management system, data warehouse, or other software.

Get Activity Stream Updates

gethttps://{networkName}.bootstrap.fyre.co/api/v3.1/activity/

Get recent updates about changes within a Network or Site. Updates include: new Content, edited Content.

Use the Activity Stream API to consume user generated data flowing through the Livefyre system on your network or site. For example: use data from this API to update your search indices based on ratings, or to manage users’ badges in a 3rd party system based on their activity.

Query Parameters
namerequiredtypedescription
resourcetruestring

A URN of the Network or Site for which you are requesting activity data. Examples: 'urn:livefyre:example.fyre.co', 'urn:livefyre:example.fyre.co:site=54321'

sincefalseinteger

A 64-bit integer representing the the ID of the last event you received. Specify ‘0’ if you have no prior data. Otherwise, use the value from a previous response's 'data.meta.cursor.next'.

Responses

200

Activity Stream Updates

Example application/json
{
  "status": "ok",
  "meta": {
    "cursor": {
      "self": 0,
      "limit": 50,
      "next": 1459904731530238
    }
  },
  "data": {
    "maxEventId": 1459904731530238,
    "colAnnotations": {},
    "states": {
      "488682752": {
        "vis": 1,
        "collectionId": "161764560",
        "content": {
          "generator": {
            "id": "livefyre.com"
          },
          "bodyHtml": "<p>Nice!</p>",
          "id": "488682752",
          "authorId": "system@labs.fyre.co",
          "parentId": "",
          "updatedAt": 1459904731,
          "annotations": {
            "moderator": true
          },
          "createdAt": 1459904731
        },
        "source": 5,
        "lastVis": 0,
        "type": 0,
        "event": 1459904731530238
      }
    },
    "collections": {
      "161764560": {
        "url": "http://designer-app.livefyre.com/app/1459903771306",
        "articleIdentifier": "designer-app-1459903771306",
        "title": "Ben Activity Stream API Test",
        "id": "161764560",
        "site": "315833"
      }
    },
    "authors": {
      "system@labs.fyre.co": {
        "displayName": "system",
        "tags": [],
        "profileUrl": "",
        "avatar": "https://secure.gravatar.com/avatar/e23293c6dfc25b86762b045336233add/?s=50&d=https://dpstvy7p9whsy.cloudfront.net/a/anon/50.jpg",
        "handle": "system",
        "type": 1,
        "id": "system@labs.fyre.co"
      }
    },
    "annotations": {}
  },
  "code": 200
}

Get Bulk Content Counts

gethttps://{networkName}.bootstrap.fyre.co/api/v1.1/public/comments/ncomments/{hash}.json

This API returns content count information for a given Collection. Use this API to generate a list of counts that map to a list of articles or blog posts.

Note: There is a 2 minute caching delay between count updates, so the number of comments on the article page and those returned by API may be out of sync for a maximum of 2 minutes.

Path Parameters
namerequiredtypedescription
hashtruestring

The Base64 encoded hash of all the site-article ID pairs for which counter information should be fetched. For example: (pre-encoded) {siteId}:{articleId},{articleId}|{siteId}:{articleId}.

Responses

200

Ncomments

Example application/json
{
  "status": "ok",
  "code": 200,
  "data": {
    "site-id": {
      "some-article-id": {
        "feed": 0,
        "livefyre": 2,
        "total": 2,
        "facebook": 0,
        "twitter": 0,
        "archive": 0,
        "instagram": 0
      }
    }
  }
}