Link Search Menu Expand Document

Feed

The feed returns the most relevant datasets for the authenticated user profile. Member interactions with datasets are scored, determining their position within the feed.

User and member interactions that affect a dataset’s score:

  • Creating or modifying a dataset
  • Viewing a dataset
  • Liking a dataset
  • Commenting on a dataset

Requests

See Also


View the feed of a workspace

GET

/api/workspaces/{workspace-id}/feed

Returns the feed of the workspace {workspace-id}.

Prerequisites

  • Workspace {workspace-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/workspaces/3b2e15fc-2f84-4eee-a8e8-16d7ccd5e52f/feed' -i -X GET \
    -H 'Accept: application/json, application/javascript, text/javascript, text/json' \
    -H 'Content-Type: application/json'
  • Python (requests)
import requests

url = "https://catalog.matatika.com/api/workspaces/3b2e15fc-2f84-4eee-a8e8-16d7ccd5e52f/feed"

headers = {
  'Authorization': ACCESS_TOKEN
}

response = requests.request("GET", url, headers=headers)

print(response.text.encode('utf8'))

Response

200 OK

Dataset collection with HAL links.

{
  "_embedded" : {
    "datasets" : [ {
      "id" : "bd3d7a4d-d35c-45ad-846b-a086799a1e4d",
      "published" : "2022-06-30T15:36:11.840585",
      "alias" : "simple-bar-chart",
      "workspaceId" : "3b2e15fc-2f84-4eee-a8e8-16d7ccd5e52f",
      "source" : "matatika-limited",
      "title" : "How many people have visited our website?",
      "description" : "# Some Markdown\n- point 1\n- point 2\n- point 3\n",
      "questions" : "[''This is my question'', ''this is second question'']",
      "visualisation" : "{\"google-chart\": {\"chartType\": \"BarChart\",\"options\": {\"title\": \"Website visitors\"}}}",
      "query" : "SELECT to_char(date(report_date),'YYYYMM') as year_month, SUM(sessions) \n   FROM\n     \"google_analytics_website_overview\"\n   WHERE\n     \"google_analytics_website_overview\".\"report_date\" >= DATE(NOW()) - INTERVAL '365 DAY'\n   GROUP BY year_month\n   ORDER BY year_month ASC;",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "commentCount" : 0,
      "viewCount" : 0,
      "created" : "2022-06-30T15:36:11.840585",
      "score" : 5.9999833,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/datasets/bd3d7a4d-d35c-45ad-846b-a086799a1e4d"
        },
        "delete dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/bd3d7a4d-d35c-45ad-846b-a086799a1e4d",
          "type" : "DELETE"
        },
        "edit dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/bd3d7a4d-d35c-45ad-846b-a086799a1e4d",
          "type" : "PATCH"
        },
        "data" : {
          "href" : "https://catalog.matatika.com/api/datasets/bd3d7a4d-d35c-45ad-846b-a086799a1e4d/data",
          "type" : "GET"
        },
        "channel" : {
          "href" : "https://catalog.matatika.com/api/channels/d882fb00-f31b-4c0b-b592-7897a221932b",
          "type" : "GET"
        },
        "new comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/bd3d7a4d-d35c-45ad-846b-a086799a1e4d/comments",
          "type" : "POST"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/datasets/bd3d7a4d-d35c-45ad-846b-a086799a1e4d/like",
          "type" : "PUT"
        },
        "add view" : {
          "href" : "https://catalog.matatika.com/api/datasets/bd3d7a4d-d35c-45ad-846b-a086799a1e4d/view",
          "type" : "PUT"
        },
        "new alert" : {
          "href" : "https://catalog.matatika.com/api/datasets/bd3d7a4d-d35c-45ad-846b-a086799a1e4d/alerts"
        },
        "add subscription" : {
          "href" : "https://catalog.matatika.com/api/datasets/bd3d7a4d-d35c-45ad-846b-a086799a1e4d/subscriptions"
        },
        "new message" : {
          "href" : "https://catalog.matatika.com/api/datasets/bd3d7a4d-d35c-45ad-846b-a086799a1e4d/messages"
        }
      },
      "_embedded" : {
        "channel" : {
          "name" : "matatika-limited",
          "description" : "Matatika Limited",
          "picture" : "https://cdn.auth0.com/avatars/ml.png?ssl=1"
        }
      }
    }, {
      "id" : "435e280d-3d44-4ff7-9992-77960148c137",
      "published" : "2022-06-30T15:36:11.839569",
      "alias" : "analytics-tables",
      "workspaceId" : "3b2e15fc-2f84-4eee-a8e8-16d7ccd5e52f",
      "source" : "no-picture",
      "title" : "What tables are in our #fantastic data warehouse?",
      "description" : "# Overview\nThis example is a standalone data set with no visualisation.\n\n## What tables are in my data warehouse\nOur query in this dataset selects all the tables in the same schema we have configured the workspace to use.\n```SHOW TABLES```\n\n## Notes\nThe query is database specific.  The postgres query is\n\n```SELECT * FROM pg_tables where schemaname = 'mdfacxy'```",
      "visualisation" : "{\"google-chart\": {\"chartType\": \"Table\", \"options\": {\"title\": \"Tables\"}}}",
      "metadata" : "  {    \"name\":\"table_model\",    \"label\":\"Analytics Tables\",    \"related_table\":{      \"columns\":[        {          \"name\":\"schemaname\",          \"label\":\"Schema Name\"        }      ]    }  }",
      "query" : "SELECT schemaname \"table_model.schemaname\",tablename \"table_model.tablename\",tableowner \"table_model.tableowner\"FROM pg_tables where schemaname = 'mdfacxy'",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "commentCount" : 0,
      "viewCount" : 0,
      "created" : "2022-06-30T15:36:11.839568",
      "score" : 5.9999833,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/datasets/435e280d-3d44-4ff7-9992-77960148c137"
        },
        "delete dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/435e280d-3d44-4ff7-9992-77960148c137",
          "type" : "DELETE"
        },
        "edit dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/435e280d-3d44-4ff7-9992-77960148c137",
          "type" : "PATCH"
        },
        "data" : {
          "href" : "https://catalog.matatika.com/api/datasets/435e280d-3d44-4ff7-9992-77960148c137/data",
          "type" : "GET"
        },
        "channel" : {
          "href" : "https://catalog.matatika.com/api/channels/e8966b14-bf7b-42db-a4a6-eedb39db2847",
          "type" : "GET"
        },
        "new comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/435e280d-3d44-4ff7-9992-77960148c137/comments",
          "type" : "POST"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/datasets/435e280d-3d44-4ff7-9992-77960148c137/like",
          "type" : "PUT"
        },
        "add view" : {
          "href" : "https://catalog.matatika.com/api/datasets/435e280d-3d44-4ff7-9992-77960148c137/view",
          "type" : "PUT"
        },
        "new alert" : {
          "href" : "https://catalog.matatika.com/api/datasets/435e280d-3d44-4ff7-9992-77960148c137/alerts"
        },
        "add subscription" : {
          "href" : "https://catalog.matatika.com/api/datasets/435e280d-3d44-4ff7-9992-77960148c137/subscriptions"
        },
        "new message" : {
          "href" : "https://catalog.matatika.com/api/datasets/435e280d-3d44-4ff7-9992-77960148c137/messages"
        }
      },
      "_embedded" : {
        "channel" : {
          "name" : "no-picture",
          "description" : "No picture",
          "picture" : "https://s.gravatar.com/avatar/8f4ad8fa0793181b761d030196e62053?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fsu.png"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/workspaces/3b2e15fc-2f84-4eee-a8e8-16d7ccd5e52f/feed?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}