Link Search Menu Expand Document

Datasets

Datasets are modules of data that can be published to workspaces. Datasets are visualised in the Matatika app following the Chart.js specifications.


Objects

Dataset

Path Type Format Description
id String Version 4 UUID The dataset ID
published String ISO 8601 timestamp The instant the dataset was published
alias String   The dataset alias
workspaceId String Version 4 UUID The workspace ID of the published dataset
source String   The channel ID where the dataset was initially published to
title String   The dataset title
description String   The dataset description (may contain markdown)
questions String   The dataset questions
rawData String JSON The dataset raw data
visualisation String JSON The dataset visualisation metadata. More Info
metadata String JSON The dataset metadata. More Info
query String SQL statement The dataset query. More Info
likeCount Integer   The number of likes the dataset has received
likedByProfiles Array of Member   The members that have liked the dataset
commentCount Integer   The number of comments the dataset has received
viewCount Integer   The number of views the dataset has received
created String ISO 8601 timestamp The instant the dataset was create
score Float   The dataset score used to determine its position in the workspace Feed
{
  "id" : "253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
  "published" : "2022-11-04T15:18:50.839469",
  "alias" : "sit-generated-dataset",
  "workspaceId" : "defad70d-128d-4891-a941-d48a4de9a106",
  "source" : "@support+integrationtests+a7o91bel",
  "title" : "SIT-Generated Dataset [2022-11-04T15:18:50.701724]",
  "description" : "This dataset was created during a SIT run.",
  "questions" : "What questions might this dataset help answer?",
  "query" : "SELECT * FROM table_name;",
  "likeCount" : 0,
  "likedByProfiles" : [ ],
  "commentCount" : 0,
  "viewCount" : 0,
  "created" : "2022-11-04T15:18:50.839469",
  "score" : 1.0,
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb"
    },
    "delete dataset" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
      "type" : "DELETE"
    },
    "edit dataset" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
      "type" : "PATCH"
    },
    "data" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/data",
      "type" : "GET"
    },
    "source" : {
      "href" : "https://catalog.matatika.com/api/channels/ffd1f7eb-572e-44cd-bd5a-db0f238b12e1",
      "type" : "GET"
    },
    "new comment" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/comments",
      "type" : "POST"
    },
    "add like" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/like",
      "type" : "PUT"
    },
    "add view" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/view",
      "type" : "PUT"
    },
    "new alert" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/alerts"
    },
    "add subscription" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/subscriptions"
    },
    "new message" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/messages"
    }
  },
  "_embedded" : {
    "source" : {
      "name" : "@support+integrationtests+a7o91bel",
      "description" : "[email protected] Channel"
    }
  }
}

Dataset Message

Path Type Format Description
id String Version 4 UUID The dataset message ID (shared with the resulting notification)
recipientId String   The recipient profile ID
message String   The dataset message content
datasetId String Version 4 UUID The message subject dataset ID
{
  "id" : "f23ef417-83c9-472e-abf9-6bd7fd709dd0",
  "recipientId" : "auth0|5eb0327cbfd7490bff55feeb",
  "message" : "SIT-generated dataset message [2022-11-04T15:18:55.193902]",
  "datasetId" : "253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
  "_links" : {
    "notification" : {
      "href" : "https://catalog.matatika.com/api/notifications/f23ef417-83c9-472e-abf9-6bd7fd709dd0"
    }
  }
}

Requests

See Also


View all datasets in a workspace

GET

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

Returns all datasets in the workspace {workspace-id}.

Prerequisites

  • The user must be a member of the workspace {workspace-id}

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/workspaces/defad70d-128d-4891-a941-d48a4de9a106/datasets' -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/defad70d-128d-4891-a941-d48a4de9a106/datasets"

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" : "18e87d30-a7a6-482e-9a17-785fc6339b6a",
      "published" : "2022-11-04T15:18:55.879725",
      "workspaceId" : "defad70d-128d-4891-a941-d48a4de9a106",
      "source" : "@support+integrationtests+a7o91bel",
      "title" : "SIT-Generated Dataset [2022-11-04T15:18:50.701724]",
      "description" : "This dataset was created during a SIT run.",
      "questions" : "What questions might this dataset help answer?",
      "query" : "SELECT * FROM table_name;",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "commentCount" : 0,
      "viewCount" : 0,
      "created" : "2022-11-04T15:18:55.879725",
      "score" : 1.0,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a"
        },
        "delete dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a",
          "type" : "DELETE"
        },
        "edit dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a",
          "type" : "PATCH"
        },
        "data" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a/data",
          "type" : "GET"
        },
        "source" : {
          "href" : "https://catalog.matatika.com/api/channels/ffd1f7eb-572e-44cd-bd5a-db0f238b12e1",
          "type" : "GET"
        },
        "new comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a/comments",
          "type" : "POST"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a/like",
          "type" : "PUT"
        },
        "add view" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a/view",
          "type" : "PUT"
        },
        "new alert" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a/alerts"
        },
        "add subscription" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a/subscriptions"
        },
        "new message" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a/messages"
        }
      },
      "_embedded" : {
        "source" : {
          "name" : "@support+integrationtests+a7o91bel",
          "description" : "[email protected] Channel"
        }
      }
    }, {
      "id" : "cc4087fd-044b-46c0-a4c6-530ec1cd5b72",
      "published" : "2022-11-04T15:18:56.106135",
      "workspaceId" : "defad70d-128d-4891-a941-d48a4de9a106",
      "source" : "@support+integrationtests+a7o91bel",
      "title" : "SIT-Generated Dataset [2022-11-04T15:18:50.701724]",
      "description" : "This dataset was created during a SIT run.",
      "questions" : "What questions might this dataset help answer?",
      "query" : "SELECT * FROM table_name;",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "commentCount" : 0,
      "viewCount" : 0,
      "created" : "2022-11-04T15:18:56.106135",
      "score" : 1.0,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72"
        },
        "delete dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72",
          "type" : "DELETE"
        },
        "edit dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72",
          "type" : "PATCH"
        },
        "data" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72/data",
          "type" : "GET"
        },
        "source" : {
          "href" : "https://catalog.matatika.com/api/channels/ffd1f7eb-572e-44cd-bd5a-db0f238b12e1",
          "type" : "GET"
        },
        "new comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72/comments",
          "type" : "POST"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72/like",
          "type" : "PUT"
        },
        "add view" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72/view",
          "type" : "PUT"
        },
        "new alert" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72/alerts"
        },
        "add subscription" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72/subscriptions"
        },
        "new message" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72/messages"
        }
      },
      "_embedded" : {
        "source" : {
          "name" : "@support+integrationtests+a7o91bel",
          "description" : "[email protected] Channel"
        }
      }
    }, {
      "id" : "fc4f9701-d8ce-470f-8389-495a64b7d196",
      "published" : "2022-11-04T15:18:56.279341",
      "workspaceId" : "defad70d-128d-4891-a941-d48a4de9a106",
      "source" : "@support+integrationtests+a7o91bel",
      "title" : "SIT-Generated Dataset [2022-11-04T15:18:50.701724]",
      "description" : "This dataset was created during a SIT run.",
      "questions" : "What questions might this dataset help answer?",
      "query" : "SELECT * FROM table_name;",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "commentCount" : 0,
      "viewCount" : 0,
      "created" : "2022-11-04T15:18:56.279341",
      "score" : 1.0,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196"
        },
        "delete dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196",
          "type" : "DELETE"
        },
        "edit dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196",
          "type" : "PATCH"
        },
        "data" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196/data",
          "type" : "GET"
        },
        "source" : {
          "href" : "https://catalog.matatika.com/api/channels/ffd1f7eb-572e-44cd-bd5a-db0f238b12e1",
          "type" : "GET"
        },
        "new comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196/comments",
          "type" : "POST"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196/like",
          "type" : "PUT"
        },
        "add view" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196/view",
          "type" : "PUT"
        },
        "new alert" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196/alerts"
        },
        "add subscription" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196/subscriptions"
        },
        "new message" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196/messages"
        }
      },
      "_embedded" : {
        "source" : {
          "name" : "@support+integrationtests+a7o91bel",
          "description" : "[email protected] Channel"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/workspaces/defad70d-128d-4891-a941-d48a4de9a106/datasets?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 3,
    "totalPages" : 1,
    "number" : 0
  }
}

View all liked datasets in a workspace

GET

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

Returns all datasets in the workspace {workspace-id} liked by the authenticated profile.

Prerequisites

  • The user must be a member of the workspace {workspace-id}

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/workspaces/defad70d-128d-4891-a941-d48a4de9a106/liked' -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/defad70d-128d-4891-a941-d48a4de9a106/liked"

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" : "253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
      "published" : "2022-11-04T15:18:53.642839",
      "alias" : "sit-generated-dataset",
      "workspaceId" : "defad70d-128d-4891-a941-d48a4de9a106",
      "source" : "@support+integrationtests+a7o91bel",
      "title" : "SIT-Generated Dataset [2022-11-04T15:18:53.550893]",
      "description" : "This dataset was edited during a SIT run.",
      "questions" : "What questions might this dataset help answer?",
      "query" : "SELECT * FROM table_name;",
      "likeCount" : 1,
      "likedByProfiles" : [ {
        "id" : "auth0|5eb0327cbfd7490bff55feeb",
        "name" : "[email protected]",
        "handle" : "@support+integrationtests+a7o91bel"
      } ],
      "commentCount" : 0,
      "viewCount" : 1,
      "created" : "2022-11-04T15:18:50.839469",
      "score" : 1.0,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb"
        },
        "delete dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
          "type" : "DELETE"
        },
        "edit dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
          "type" : "PATCH"
        },
        "data" : {
          "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/data",
          "type" : "GET"
        },
        "source" : {
          "href" : "https://catalog.matatika.com/api/channels/ffd1f7eb-572e-44cd-bd5a-db0f238b12e1",
          "type" : "GET"
        },
        "new comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/comments",
          "type" : "POST"
        },
        "remove like" : {
          "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/like",
          "type" : "DELETE"
        },
        "add view" : {
          "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/view",
          "type" : "PUT"
        },
        "new alert" : {
          "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/alerts"
        },
        "add subscription" : {
          "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/subscriptions"
        },
        "new message" : {
          "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/messages"
        }
      },
      "_embedded" : {
        "source" : {
          "name" : "@support+integrationtests+a7o91bel",
          "description" : "[email protected] Channel"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/workspaces/defad70d-128d-4891-a941-d48a4de9a106/liked?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

View datasets by channel

GET

/api/channels/{channel-id}/datasets

Returns datasets by the channel {channel-id}.

Prerequisites

  • Channel {channel-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/channels/ffd1f7eb-572e-44cd-bd5a-db0f238b12e1/datasets' -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/channels/ffd1f7eb-572e-44cd-bd5a-db0f238b12e1/datasets"

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" : "18e87d30-a7a6-482e-9a17-785fc6339b6a",
      "published" : "2022-11-04T15:18:55.879725",
      "workspaceId" : "defad70d-128d-4891-a941-d48a4de9a106",
      "source" : "@support+integrationtests+a7o91bel",
      "title" : "SIT-Generated Dataset [2022-11-04T15:18:50.701724]",
      "description" : "This dataset was created during a SIT run.",
      "questions" : "What questions might this dataset help answer?",
      "query" : "SELECT * FROM table_name;",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "commentCount" : 0,
      "viewCount" : 0,
      "created" : "2022-11-04T15:18:55.879725",
      "score" : 1.0,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a"
        },
        "delete dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a",
          "type" : "DELETE"
        },
        "edit dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a",
          "type" : "PATCH"
        },
        "data" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a/data",
          "type" : "GET"
        },
        "source" : {
          "href" : "https://catalog.matatika.com/api/channels/ffd1f7eb-572e-44cd-bd5a-db0f238b12e1",
          "type" : "GET"
        },
        "new comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a/comments",
          "type" : "POST"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a/like",
          "type" : "PUT"
        },
        "add view" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a/view",
          "type" : "PUT"
        },
        "new alert" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a/alerts"
        },
        "add subscription" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a/subscriptions"
        },
        "new message" : {
          "href" : "https://catalog.matatika.com/api/datasets/18e87d30-a7a6-482e-9a17-785fc6339b6a/messages"
        }
      },
      "_embedded" : {
        "source" : {
          "name" : "@support+integrationtests+a7o91bel",
          "description" : "[email protected] Channel",
          "picture" : "https://s.gravatar.com/avatar/8f4ad8fa0793181b761d030196e62053?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fsu.png"
        }
      }
    }, {
      "id" : "cc4087fd-044b-46c0-a4c6-530ec1cd5b72",
      "published" : "2022-11-04T15:18:56.106135",
      "workspaceId" : "defad70d-128d-4891-a941-d48a4de9a106",
      "source" : "@support+integrationtests+a7o91bel",
      "title" : "SIT-Generated Dataset [2022-11-04T15:18:50.701724]",
      "description" : "This dataset was created during a SIT run.",
      "questions" : "What questions might this dataset help answer?",
      "query" : "SELECT * FROM table_name;",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "commentCount" : 0,
      "viewCount" : 0,
      "created" : "2022-11-04T15:18:56.106135",
      "score" : 1.0,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72"
        },
        "delete dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72",
          "type" : "DELETE"
        },
        "edit dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72",
          "type" : "PATCH"
        },
        "data" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72/data",
          "type" : "GET"
        },
        "source" : {
          "href" : "https://catalog.matatika.com/api/channels/ffd1f7eb-572e-44cd-bd5a-db0f238b12e1",
          "type" : "GET"
        },
        "new comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72/comments",
          "type" : "POST"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72/like",
          "type" : "PUT"
        },
        "add view" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72/view",
          "type" : "PUT"
        },
        "new alert" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72/alerts"
        },
        "add subscription" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72/subscriptions"
        },
        "new message" : {
          "href" : "https://catalog.matatika.com/api/datasets/cc4087fd-044b-46c0-a4c6-530ec1cd5b72/messages"
        }
      },
      "_embedded" : {
        "source" : {
          "name" : "@support+integrationtests+a7o91bel",
          "description" : "[email protected] Channel",
          "picture" : "https://s.gravatar.com/avatar/8f4ad8fa0793181b761d030196e62053?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fsu.png"
        }
      }
    }, {
      "id" : "fc4f9701-d8ce-470f-8389-495a64b7d196",
      "published" : "2022-11-04T15:18:56.279341",
      "workspaceId" : "defad70d-128d-4891-a941-d48a4de9a106",
      "source" : "@support+integrationtests+a7o91bel",
      "title" : "SIT-Generated Dataset [2022-11-04T15:18:50.701724]",
      "description" : "This dataset was created during a SIT run.",
      "questions" : "What questions might this dataset help answer?",
      "query" : "SELECT * FROM table_name;",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "commentCount" : 0,
      "viewCount" : 0,
      "created" : "2022-11-04T15:18:56.279341",
      "score" : 1.0,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196"
        },
        "delete dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196",
          "type" : "DELETE"
        },
        "edit dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196",
          "type" : "PATCH"
        },
        "data" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196/data",
          "type" : "GET"
        },
        "source" : {
          "href" : "https://catalog.matatika.com/api/channels/ffd1f7eb-572e-44cd-bd5a-db0f238b12e1",
          "type" : "GET"
        },
        "new comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196/comments",
          "type" : "POST"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196/like",
          "type" : "PUT"
        },
        "add view" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196/view",
          "type" : "PUT"
        },
        "new alert" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196/alerts"
        },
        "add subscription" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196/subscriptions"
        },
        "new message" : {
          "href" : "https://catalog.matatika.com/api/datasets/fc4f9701-d8ce-470f-8389-495a64b7d196/messages"
        }
      },
      "_embedded" : {
        "source" : {
          "name" : "@support+integrationtests+a7o91bel",
          "description" : "[email protected] Channel",
          "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/channels/ffd1f7eb-572e-44cd-bd5a-db0f238b12e1/datasets?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 3,
    "totalPages" : 1,
    "number" : 0
  }
}

View a dataset

GET

/api/datasets/{dataset-id}

Returns the dataset {dataset-id}.

Prerequisites

  • Dataset {dataset-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb' -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/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

Dataset with HAL links.

{
  "id" : "253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
  "published" : "2022-11-04T15:18:50.839469",
  "alias" : "sit-generated-dataset",
  "workspaceId" : "defad70d-128d-4891-a941-d48a4de9a106",
  "source" : "@support+integrationtests+a7o91bel",
  "title" : "SIT-Generated Dataset [2022-11-04T15:18:50.701724]",
  "description" : "This dataset was created during a SIT run.",
  "questions" : "What questions might this dataset help answer?",
  "query" : "SELECT * FROM table_name;",
  "likeCount" : 0,
  "likedByProfiles" : [ ],
  "commentCount" : 0,
  "viewCount" : 0,
  "created" : "2022-11-04T15:18:50.839469",
  "score" : 1.0,
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb"
    },
    "delete dataset" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
      "type" : "DELETE"
    },
    "edit dataset" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
      "type" : "PATCH"
    },
    "data" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/data",
      "type" : "GET"
    },
    "source" : {
      "href" : "https://catalog.matatika.com/api/channels/ffd1f7eb-572e-44cd-bd5a-db0f238b12e1",
      "type" : "GET"
    },
    "new comment" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/comments",
      "type" : "POST"
    },
    "add like" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/like",
      "type" : "PUT"
    },
    "add view" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/view",
      "type" : "PUT"
    },
    "new alert" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/alerts"
    },
    "add subscription" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/subscriptions"
    },
    "new message" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/messages"
    }
  },
  "_embedded" : {
    "source" : {
      "name" : "@support+integrationtests+a7o91bel",
      "description" : "[email protected] Channel"
    }
  }
}

View a dataset in a workspace

GET

/api/workspaces/{workspace-id}/datasets/{dataset-id-or-alias}

Returns the dataset {dataset-id-or-alias} in the workspace {workspace-id}.

Prerequisites

  • The user must be a member of the workspace {workspace-id}
  • Dataset {dataset-id-or-alias} must exist within the workspace {workspace-id}

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/workspaces/defad70d-128d-4891-a941-d48a4de9a106/datasets/sit-generated-dataset' -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/defad70d-128d-4891-a941-d48a4de9a106/datasets/sit-generated-dataset"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

Dataset with HAL links.

{
  "id" : "253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
  "published" : "2022-11-04T15:18:50.839469",
  "alias" : "sit-generated-dataset",
  "workspaceId" : "defad70d-128d-4891-a941-d48a4de9a106",
  "source" : "@support+integrationtests+a7o91bel",
  "title" : "SIT-Generated Dataset [2022-11-04T15:18:50.701724]",
  "description" : "This dataset was created during a SIT run.",
  "questions" : "What questions might this dataset help answer?",
  "query" : "SELECT * FROM table_name;",
  "likeCount" : 0,
  "likedByProfiles" : [ ],
  "commentCount" : 0,
  "viewCount" : 0,
  "created" : "2022-11-04T15:18:50.839469",
  "score" : 1.0,
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb"
    },
    "delete dataset" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
      "type" : "DELETE"
    },
    "edit dataset" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
      "type" : "PATCH"
    },
    "data" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/data",
      "type" : "GET"
    },
    "source" : {
      "href" : "https://catalog.matatika.com/api/channels/ffd1f7eb-572e-44cd-bd5a-db0f238b12e1",
      "type" : "GET"
    },
    "new comment" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/comments",
      "type" : "POST"
    },
    "add like" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/like",
      "type" : "PUT"
    },
    "add view" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/view",
      "type" : "PUT"
    },
    "new alert" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/alerts"
    },
    "add subscription" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/subscriptions"
    },
    "new message" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/messages"
    }
  },
  "_embedded" : {
    "source" : {
      "name" : "@support+integrationtests+a7o91bel",
      "description" : "[email protected] Channel"
    }
  }
}

View the data of a dataset

GET

/api/datasets/{dataset-id}/data

Returns the data of the dataset {dataset-id}.

Prerequisites

  • Dataset {dataset-id} must exist

Request

Headers

Accept
Media Type(s) Description
application/json */* Sets the response content type format to JSON
text/csv Sets the response content type format to CSV

Defaults to application/json (given Accept */* or no Accept header).

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/datasets/8fb3f18a-f30c-40fe-a69a-f56433785683/data' -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/datasets/8fb3f18a-f30c-40fe-a69a-f56433785683/data"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

  • 200: The dataset data (defaults to JSON format).
[ {
  "gitflixusers.name" : "John",
  "gitflixusers.age" : "23"
}, {
  "gitflixusers.name" : "George",
  "gitflixusers.age" : "42"
}, {
  "gitflixusers.name" : "Mary",
  "gitflixusers.age" : "19"
}, {
  "gitflixusers.name" : "Kate",
  "gitflixusers.age" : "52"
}, {
  "gitflixusers.name" : "Bill",
  "gitflixusers.age" : "35"
}, {
  "gitflixusers.name" : "Fiona",
  "gitflixusers.age" : "63"
} ]
  • 204: No response body provided.

Publish a dataset to a workspace

POST

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

Publishes a dataset to the workspace {workspace-id}.

Prerequisites

  • The user must be a member of the workspace {workspace-id}

Request

Making the request with an existing id or alias will result in the respective dataset being overwritten.

Dataset resource.

{
  "alias" : "sit-generated-dataset",
  "title" : "SIT-Generated Dataset [2022-11-04T15:18:50.701724]",
  "description" : "This dataset was created during a SIT run.",
  "questions" : "What questions might this dataset help answer?",
  "query" : "SELECT * FROM table_name;"
}

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/workspaces/defad70d-128d-4891-a941-d48a4de9a106/datasets' -i -X POST \
    -H 'Accept: application/json, application/javascript, text/javascript, text/json' \
    -H 'Content-Type: application/hal+json; charset=ISO-8859-1' \
    -d '{
  "alias" : "sit-generated-dataset",
  "title" : "SIT-Generated Dataset [2022-11-04T15:18:50.701724]",
  "description" : "This dataset was created during a SIT run.",
  "questions" : "What questions might this dataset help answer?",
  "query" : "SELECT * FROM table_name;"
}'
  • Python (requests)
import requests

url = "https://catalog.matatika.com/api/workspaces/defad70d-128d-4891-a941-d48a4de9a106/datasets"

data = {
  "alias" : "sit-generated-dataset",
  "title" : "SIT-Generated Dataset [2022-11-04T15:18:50.701724]",
  "description" : "This dataset was created during a SIT run.",
  "questions" : "What questions might this dataset help answer?",
  "query" : "SELECT * FROM table_name;"
}
headers = {
  'Authorization': ACCESS_TOKEN
}

response = requests.request("POST", url, headers=headers, data=data)

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

Response

200 OK / 201 Created

Dataset with HAL links.

{
  "id" : "253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
  "published" : "2022-11-04T15:18:50.839469429",
  "alias" : "sit-generated-dataset",
  "workspaceId" : "defad70d-128d-4891-a941-d48a4de9a106",
  "source" : "@support+integrationtests+a7o91bel",
  "title" : "SIT-Generated Dataset [2022-11-04T15:18:50.701724]",
  "description" : "This dataset was created during a SIT run.",
  "questions" : "What questions might this dataset help answer?",
  "query" : "SELECT * FROM table_name;",
  "likeCount" : 0,
  "likedByProfiles" : [ ],
  "commentCount" : 0,
  "viewCount" : 0,
  "created" : "2022-11-04T15:18:50.839469229",
  "score" : 1.0,
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb"
    },
    "delete dataset" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
      "type" : "DELETE"
    },
    "edit dataset" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
      "type" : "PATCH"
    },
    "data" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/data",
      "type" : "GET"
    },
    "source" : {
      "href" : "https://catalog.matatika.com/api/channels/ffd1f7eb-572e-44cd-bd5a-db0f238b12e1",
      "type" : "GET"
    },
    "new comment" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/comments",
      "type" : "POST"
    },
    "add like" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/like",
      "type" : "PUT"
    },
    "add view" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/view",
      "type" : "PUT"
    },
    "new alert" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/alerts"
    },
    "add subscription" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/subscriptions"
    },
    "new message" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/messages"
    }
  },
  "_embedded" : {
    "source" : {
      "name" : "@support+integrationtests+a7o91bel",
      "description" : "[email protected] Channel"
    }
  }
}

Edit a dataset

PATCH

/api/datasets/{dataset-id}

Edits the dataset {dataset-id}.

Prerequisites

  • Dataset {dataset-id} must exist

Request

Body

This request can update one or more of the dataset fields at once. With a single request, it is possible to - for example - edit the dataset title only, or both title and description (shown below).

{
  "title" : "SIT-Generated Dataset [2022-11-04T15:18:53.550893]",
  "description" : "This dataset was edited during a SIT run."
}

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb' -i -X PATCH \
    -H 'Accept: application/json, application/javascript, text/javascript, text/json' \
    -H 'Content-Type: application/hal+json; charset=ISO-8859-1' \
    -d '{
  "title" : "SIT-Generated Dataset [2022-11-04T15:18:53.550893]",
  "description" : "This dataset was edited during a SIT run."
}'
  • Python (requests)
import requests

url = "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb"

data = {
  "title" : "SIT-Generated Dataset [2022-11-04T15:18:53.550893]",
  "description" : "This dataset was edited during a SIT run."
}
headers = {
  'Authorization': ACCESS_TOKEN
}

response = requests.request("PATCH", url, headers=headers, data=data)

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

Response

200 OK

Dataset with HAL links.

{
  "id" : "253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
  "published" : "2022-11-04T15:18:53.642839156",
  "alias" : "sit-generated-dataset",
  "workspaceId" : "defad70d-128d-4891-a941-d48a4de9a106",
  "source" : "@support+integrationtests+a7o91bel",
  "title" : "SIT-Generated Dataset [2022-11-04T15:18:53.550893]",
  "description" : "This dataset was edited during a SIT run.",
  "questions" : "What questions might this dataset help answer?",
  "query" : "SELECT * FROM table_name;",
  "likeCount" : 0,
  "likedByProfiles" : [ ],
  "commentCount" : 0,
  "viewCount" : 0,
  "created" : "2022-11-04T15:18:50.839469",
  "score" : 1.0,
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb"
    },
    "delete dataset" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
      "type" : "DELETE"
    },
    "edit dataset" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
      "type" : "PATCH"
    },
    "data" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/data",
      "type" : "GET"
    },
    "source" : {
      "href" : "https://catalog.matatika.com/api/channels/ffd1f7eb-572e-44cd-bd5a-db0f238b12e1",
      "type" : "GET"
    },
    "new comment" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/comments",
      "type" : "POST"
    },
    "add like" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/like",
      "type" : "PUT"
    },
    "add view" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/view",
      "type" : "PUT"
    },
    "new alert" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/alerts"
    },
    "add subscription" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/subscriptions"
    },
    "new message" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/messages"
    }
  },
  "_embedded" : {
    "source" : {
      "name" : "@support+integrationtests+a7o91bel",
      "description" : "[email protected] Channel"
    }
  }
}

Record a view of a dataset

PUT

/api/datasets/{dataset-id}/view

“Adds a view to the dataset {dataset-id}.

Prerequisites

  • Dataset {dataset-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/view' -i -X PUT \
    -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/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/view"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

No response body provided.


Record a like of a dataset

PUT

/api/datasets/{dataset-id}/like

Records a like of the dataset {dataset-id} from the authenticated user profile.

Prerequisites

  • Dataset {dataset-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/like' -i -X PUT \
    -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/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/like"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

No response body provided.


Remove a like from a dataset

DELETE

/api/datasets/{dataset-id}/like

Removes a like of the dataset {dataset-id} from the authenticated user profile.

Prerequisites

  • Dataset {dataset-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/like' -i -X DELETE \
    -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/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/like"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

204 No Content

No response body provided.


Initialise a new dataset message

POST

/api/datasets/{dataset-id}/messages

Initialises a new dataset message for the dataset {dataset-id}

Prerequisites

  • Dataset {dataset-id} must exist

Requests

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/messages' -i -X POST \
    -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/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/messages"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

Dataset Message with HAL links.

{
  "id" : "f23ef417-83c9-472e-abf9-6bd7fd709dd0",
  "datasetId" : "253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
  "_links" : {
    "create message" : {
      "href" : "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/messages/f23ef417-83c9-472e-abf9-6bd7fd709dd0"
    }
  }
}

Create or update a dataset message

PUT

/api/datasets/{dataset-id}/messages/{message-id}

Creates or updates the dataset message {message-id} for the dataset {dataset-id}. This appears as DATASET_MESSAGE notification for the recipient.

Prerequisites

  • Dataset {dataset-id} must exist

Request

Body

Dataset Message resource.

{
  "recipientId" : "auth0|5eb0327cbfd7490bff55feeb",
  "message" : "SIT-generated dataset message [2022-11-04T15:18:55.193902]"
}

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/messages/f23ef417-83c9-472e-abf9-6bd7fd709dd0' -i -X PUT \
    -H 'Accept: application/json, application/javascript, text/javascript, text/json' \
    -H 'Content-Type: application/hal+json; charset=ISO-8859-1' \
    -d '{
  "recipientId" : "auth0|5eb0327cbfd7490bff55feeb",
  "message" : "SIT-generated dataset message [2022-11-04T15:18:55.193902]"
}'
  • Python (requests)
import requests

url = "https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb/messages/f23ef417-83c9-472e-abf9-6bd7fd709dd0"

data = {
  "recipientId" : "auth0|5eb0327cbfd7490bff55feeb",
  "message" : "SIT-generated dataset message [2022-11-04T15:18:55.193902]"
}
headers = {
  'Authorization': ACCESS_TOKEN
}

response = requests.request("PUT", url, headers=headers, data=data)

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

Response

200 OK / 201 Created

Dataset Message with HAL links.

{
  "id" : "f23ef417-83c9-472e-abf9-6bd7fd709dd0",
  "recipientId" : "auth0|5eb0327cbfd7490bff55feeb",
  "message" : "SIT-generated dataset message [2022-11-04T15:18:55.193902]",
  "datasetId" : "253ad05b-d3a4-497d-a5a3-ada5044ca6eb",
  "_links" : {
    "notification" : {
      "href" : "https://catalog.matatika.com/api/notifications/f23ef417-83c9-472e-abf9-6bd7fd709dd0"
    }
  }
}

Delete a dataset

DELETE

/api/datasets/{dataset-id}

Deletes the dataset {dataset-id}.

Prerequisites

  • Dataset {dataset-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb' -i -X DELETE \
    -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/datasets/253ad05b-d3a4-497d-a5a3-ada5044ca6eb"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

204 No Content

No response body provided.



Further Reading: