Skip to main content Link Menu Expand (external link) Document Search Copy Copied

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:443/api/workspaces/23d37b5f-98aa-43d7-a1bb-f628ad47e292/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:443/api/workspaces/23d37b5f-98aa-43d7-a1bb-f628ad47e292/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" : "a5c59a9d-f12e-4991-b63b-b19fc8ad5e7f",
      "published" : "2024-04-10T14:04:47.324065",
      "alias" : "simple-bar-chart",
      "workspaceId" : "23d37b5f-98aa-43d7-a1bb-f628ad47e292",
      "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" : "2024-04-10T14:04:47.324065",
      "score" : 5.9999886,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/datasets/a5c59a9d-f12e-4991-b63b-b19fc8ad5e7f"
        },
        "delete dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/a5c59a9d-f12e-4991-b63b-b19fc8ad5e7f",
          "type" : "DELETE"
        },
        "edit dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/a5c59a9d-f12e-4991-b63b-b19fc8ad5e7f",
          "type" : "PATCH"
        },
        "data" : {
          "href" : "https://catalog.matatika.com/api/datasets/a5c59a9d-f12e-4991-b63b-b19fc8ad5e7f/data",
          "type" : "GET"
        },
        "source" : {
          "href" : "https://catalog.matatika.com/api/channels/77c3fdbd-3bdc-4c86-8384-ba363c96d953",
          "type" : "GET"
        },
        "new comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/a5c59a9d-f12e-4991-b63b-b19fc8ad5e7f/comments",
          "type" : "POST"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/datasets/a5c59a9d-f12e-4991-b63b-b19fc8ad5e7f/like",
          "type" : "PUT"
        },
        "add view" : {
          "href" : "https://catalog.matatika.com/api/datasets/a5c59a9d-f12e-4991-b63b-b19fc8ad5e7f/view",
          "type" : "PUT"
        },
        "new alert" : {
          "href" : "https://catalog.matatika.com/api/datasets/a5c59a9d-f12e-4991-b63b-b19fc8ad5e7f/alerts"
        },
        "add subscription" : {
          "href" : "https://catalog.matatika.com/api/datasets/a5c59a9d-f12e-4991-b63b-b19fc8ad5e7f/subscriptions"
        },
        "new message" : {
          "href" : "https://catalog.matatika.com/api/datasets/a5c59a9d-f12e-4991-b63b-b19fc8ad5e7f/messages"
        }
      },
      "_embedded" : {
        "source" : {
          "name" : "matatika-limited",
          "description" : "Matatika Limited",
          "picture" : "https://cdn.auth0.com/avatars/ml.png?ssl=1"
        }
      }
    }, {
      "id" : "6b6eaedd-3645-4fb9-8fe7-650e5095c547",
      "published" : "2024-04-10T14:04:47.322979",
      "alias" : "analytics-tables",
      "workspaceId" : "23d37b5f-98aa-43d7-a1bb-f628ad47e292",
      "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 = 'ptdovhv'```",
      "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 = 'ptdovhv'",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "commentCount" : 0,
      "viewCount" : 0,
      "created" : "2024-04-10T14:04:47.322979",
      "score" : 5.9999886,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/datasets/6b6eaedd-3645-4fb9-8fe7-650e5095c547"
        },
        "delete dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/6b6eaedd-3645-4fb9-8fe7-650e5095c547",
          "type" : "DELETE"
        },
        "edit dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/6b6eaedd-3645-4fb9-8fe7-650e5095c547",
          "type" : "PATCH"
        },
        "data" : {
          "href" : "https://catalog.matatika.com/api/datasets/6b6eaedd-3645-4fb9-8fe7-650e5095c547/data",
          "type" : "GET"
        },
        "source" : {
          "href" : "https://catalog.matatika.com/api/channels/2b9bb3ce-5c83-40c9-b1d7-23bcbad2cc5f",
          "type" : "GET"
        },
        "new comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/6b6eaedd-3645-4fb9-8fe7-650e5095c547/comments",
          "type" : "POST"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/datasets/6b6eaedd-3645-4fb9-8fe7-650e5095c547/like",
          "type" : "PUT"
        },
        "add view" : {
          "href" : "https://catalog.matatika.com/api/datasets/6b6eaedd-3645-4fb9-8fe7-650e5095c547/view",
          "type" : "PUT"
        },
        "new alert" : {
          "href" : "https://catalog.matatika.com/api/datasets/6b6eaedd-3645-4fb9-8fe7-650e5095c547/alerts"
        },
        "add subscription" : {
          "href" : "https://catalog.matatika.com/api/datasets/6b6eaedd-3645-4fb9-8fe7-650e5095c547/subscriptions"
        },
        "new message" : {
          "href" : "https://catalog.matatika.com/api/datasets/6b6eaedd-3645-4fb9-8fe7-650e5095c547/messages"
        }
      },
      "_embedded" : {
        "source" : {
          "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/23d37b5f-98aa-43d7-a1bb-f628ad47e292/feed?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}