Account API

Provides limited meta information (entity counts, entity activity rates, etc.) about a set of streams belonging to an individual user account.

Commonly, a user in the Spredfast Experiences system will have multiple streams under their account. For example, the MassRelDemo user has (amongst others) streams named:

This API endpoint is useful for accessing meta information about all of these streams in a single request.

Resource URL

http://api.massrelevance.com/:account.:format

Example URL: http://api.massrelevance.com/MassRelDemo.json

In this example, the response will contain meta information about ALL of the streams under the specified account (MassRelDemo).

Parameters

streams Comma-delimited set of stream names for which to pull meta information.
Type: string
Default: N/A
Example Value: galaxy-topic1,galaxy-topic2,galaxy-topic3
Example Value: galaxy-top*
Note: Per the second-example, the streams parameter will also accept a wildcard asterisk in the stream name.
num_minutes
optional
Number of minutes of activity to include
Type: integer
Default: 60
Example Value: 120
Notes: Must be > 0
num_trends
optional
Number of trends to return in response per bucket
Type: integer
Default: 30
Example Value: 5
Notes: 5
disregard
optional
Exclude trends that match supplied values from buckets while trying to ensure `num_trends` is met
Type: strong
Default: N/A
Example Value: obama,romney
Notes: Accepts a string list delimited by commas
start
optional
Unix time of the point of which activity data should start. This will be reflected by the value of the first item of the minute activities.
Type: integer
Default: N/A
Example Value: 1349278694
Notes: Only use the seconds portion of unix time (JavaScript will give use the number in milliseconds. Divide by 1000). If a `start` param is specified, then `finish` must also be specified.
finish
optional
Unix time of the point of which activity data should end. This will be reflected by the value of the last item of the minute activities.
Type: integer
Default: N/A
Example Value: 1349278694
Notes: Only use the seconds portion of unix time (JavaScript will give use the number in milliseconds. To Divide by 1000). If a `finish` param is specified, then `start` must also be specified.
streams_with_topics Returns streams that do or do not have topics configured. 0 returns all streams, 1 returns streams with topics configured.
Type: bit
Default: 0
Example Value: 1

Example Request

This is a standard account request, returning some meta information for 3 of MassRelDemo's streams:

$ curl http://api.massrelevance.com/MassRelDemo.json?streams=galaxy-topic1,galaxy-topic2,galaxy-topic3

Here is the response:

{
  "streams": [
    {
      "count": {
        "approved": 1934,
        "total": 1934,
        "rejected": 0,
        "pending": 0
      },
      "tpm": 0,
      "activity": {
        "minute": {
          "approved": [],
          "total": [],
          "rejected": [],
          "pending": []
        }
      },
      "full_name": "MassRelDemo/galaxy-topic1",
      "approved_tpm": 0,
      "created_at": "2012-02-03T15:17:01Z",
      "description": "Topic 1",
      "name": "galaxy-topic1"
    },
    {
      "count": {
        "approved": 847,
        "total": 847,
        "rejected": 0,
        "pending": 0
      },
      "tpm": 0,
      "activity": {
        "minute": {
          "approved": [],
          "total": [],
          "rejected": [],
          "pending": []
        }
      },
      "full_name": "MassRelDemo/galaxy-topic2",
      "approved_tpm": 0,
      "created_at": "2012-02-03T15:18:50Z",
      "description": "Topic 2",
      "name": "galaxy-topic2"
    },
    {
      "count": {
        "approved": 492,
        "total": 492,
        "rejected": 0,
        "pending": 0
      },
      "tpm": 0,
      "activity": {
        "minute": {
          "approved": [],
          "total": [],
          "rejected": [],
          "pending": []
        }
      },
      "full_name": "MassRelDemo/galaxy-topic3",
      "approved_tpm": 0,
      "created_at": "2012-02-03T15:19:17Z",
      "description": "Topic 3",
      "name": "galaxy-topic3"
    }
  ]
}