Link Search Menu Expand Document

Comments

Comments aid conversation and collaboration around workspace datasets. Comments can be made on datasets, or other comments to form threads.


Objects

Comment

Path Type Format Description
id String Version 4 UUID The comment ID
message String   The comment message
likeCount Integer Unsigned The number of likes the comment has received
likedByProfiles Array of Member   The workspace members that have liked the comment
created String ISO 8601 timestamp Timestamp denoting when the comment was created
lastModified String ISO 8601 timestamp Timestamp denoting when the comment was last modified
from Member   The comment author
commentCount Integer Unsigned The number of replies the comment has received
datasetId String Version 4 UUID The ID of the dataset comment subject
parentId String Version 4 UUID The ID of the parent comment
{
  "id" : "2d5b7d59-51e4-4c97-8def-496f980e9719",
  "message" : "SIT-generated reply Pesho [2022-01-21T09:31:35.245005] to ",
  "likeCount" : 0,
  "likedByProfiles" : [ ],
  "created" : "2022-01-21T09:31:35.351233",
  "lastModified" : "2022-01-21T09:31:35.351234",
  "from" : {
    "id" : "auth0|5eb0327cbfd7490bff55feeb",
    "name" : "[email protected]",
    "handle" : "@support+integrationtests+a7o91bel"
  },
  "commentCount" : 0,
  "datasetId" : "823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0",
  "_links" : {
    "edit-history" : {
      "href" : "https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719/history",
      "type" : "GET"
    },
    "update comment" : {
      "href" : "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments/2d5b7d59-51e4-4c97-8def-496f980e9719",
      "type" : "PUT"
    },
    "delete comment" : {
      "href" : "https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719",
      "type" : "DELETE"
    },
    "self" : {
      "href" : "https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719"
    },
    "add like" : {
      "href" : "https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719/like",
      "type" : "PUT"
    },
    "new reply" : {
      "href" : "https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719",
      "type" : "POST"
    }
  }
}

Requests


View all comments on a dataset

GET

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

Returns all comments on 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/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments' -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/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

Comment collection with HAL links.

{
  "_embedded" : {
    "datasetComments" : [ {
      "id" : "890aab68-fba4-4464-9bc2-dc82ad95cad8",
      "message" : "SIT-generated reply Pesho [2022-01-21T09:31:33.050048] to ",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "created" : "2022-01-21T09:31:33.157509",
      "lastModified" : "2022-01-21T09:31:33.157509",
      "from" : {
        "id" : "auth0|5eb0327cbfd7490bff55feeb",
        "name" : "[email protected]",
        "handle" : "@support+integrationtests+a7o91bel"
      },
      "commentCount" : 0,
      "datasetId" : "823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0",
      "_links" : {
        "update comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments/890aab68-fba4-4464-9bc2-dc82ad95cad8",
          "type" : "PUT"
        },
        "delete comment" : {
          "href" : "https://catalog.matatika.com/api/comments/890aab68-fba4-4464-9bc2-dc82ad95cad8",
          "type" : "DELETE"
        },
        "self" : {
          "href" : "https://catalog.matatika.com/api/comments/890aab68-fba4-4464-9bc2-dc82ad95cad8"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/comments/890aab68-fba4-4464-9bc2-dc82ad95cad8/like",
          "type" : "PUT"
        },
        "new reply" : {
          "href" : "https://catalog.matatika.com/api/comments/890aab68-fba4-4464-9bc2-dc82ad95cad8",
          "type" : "POST"
        }
      }
    }, {
      "id" : "59d1f4a3-2715-48f4-a8e1-ae3bfdff400f",
      "message" : "SIT-generated reply Pesho [2022-01-21T09:31:32.758560] to ",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "created" : "2022-01-21T09:31:32.88199",
      "lastModified" : "2022-01-21T09:31:32.881991",
      "from" : {
        "id" : "auth0|5eb0327cbfd7490bff55feeb",
        "name" : "[email protected]",
        "handle" : "@support+integrationtests+a7o91bel"
      },
      "commentCount" : 0,
      "datasetId" : "823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0",
      "_links" : {
        "edit-history" : {
          "href" : "https://catalog.matatika.com/api/comments/59d1f4a3-2715-48f4-a8e1-ae3bfdff400f/history",
          "type" : "GET"
        },
        "update comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments/59d1f4a3-2715-48f4-a8e1-ae3bfdff400f",
          "type" : "PUT"
        },
        "delete comment" : {
          "href" : "https://catalog.matatika.com/api/comments/59d1f4a3-2715-48f4-a8e1-ae3bfdff400f",
          "type" : "DELETE"
        },
        "self" : {
          "href" : "https://catalog.matatika.com/api/comments/59d1f4a3-2715-48f4-a8e1-ae3bfdff400f"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/comments/59d1f4a3-2715-48f4-a8e1-ae3bfdff400f/like",
          "type" : "PUT"
        },
        "new reply" : {
          "href" : "https://catalog.matatika.com/api/comments/59d1f4a3-2715-48f4-a8e1-ae3bfdff400f",
          "type" : "POST"
        }
      }
    }, {
      "id" : "a082cabc-17e7-4bc5-9096-11b5e42bd257",
      "message" : "SIT-generated reply Pesho [2022-01-21T09:31:32.469460] to ",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "created" : "2022-01-21T09:31:32.576023",
      "lastModified" : "2022-01-21T09:31:32.576024",
      "from" : {
        "id" : "auth0|5eb0327cbfd7490bff55feeb",
        "name" : "[email protected]",
        "handle" : "@support+integrationtests+a7o91bel"
      },
      "commentCount" : 0,
      "datasetId" : "823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0",
      "_links" : {
        "edit-history" : {
          "href" : "https://catalog.matatika.com/api/comments/a082cabc-17e7-4bc5-9096-11b5e42bd257/history",
          "type" : "GET"
        },
        "update comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments/a082cabc-17e7-4bc5-9096-11b5e42bd257",
          "type" : "PUT"
        },
        "delete comment" : {
          "href" : "https://catalog.matatika.com/api/comments/a082cabc-17e7-4bc5-9096-11b5e42bd257",
          "type" : "DELETE"
        },
        "self" : {
          "href" : "https://catalog.matatika.com/api/comments/a082cabc-17e7-4bc5-9096-11b5e42bd257"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/comments/a082cabc-17e7-4bc5-9096-11b5e42bd257/like",
          "type" : "PUT"
        },
        "new reply" : {
          "href" : "https://catalog.matatika.com/api/comments/a082cabc-17e7-4bc5-9096-11b5e42bd257",
          "type" : "POST"
        }
      }
    }, {
      "id" : "d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8",
      "message" : "SIT-generated reply Pesho [2022-01-21T09:31:27.910270] to ",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "created" : "2022-01-21T09:31:28.043015",
      "lastModified" : "2022-01-21T09:31:28.043033",
      "from" : {
        "id" : "auth0|5eb0327cbfd7490bff55feeb",
        "name" : "[email protected]",
        "handle" : "@support+integrationtests+a7o91bel"
      },
      "commentCount" : 3,
      "datasetId" : "823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0",
      "_links" : {
        "comments" : {
          "href" : "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments?parentId=d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8",
          "type" : "GET"
        },
        "edit-history" : {
          "href" : "https://catalog.matatika.com/api/comments/d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8/history",
          "type" : "GET"
        },
        "update comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments/d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8",
          "type" : "PUT"
        },
        "delete comment" : {
          "href" : "https://catalog.matatika.com/api/comments/d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8",
          "type" : "DELETE"
        },
        "self" : {
          "href" : "https://catalog.matatika.com/api/comments/d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/comments/d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8/like",
          "type" : "PUT"
        },
        "new reply" : {
          "href" : "https://catalog.matatika.com/api/comments/d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8",
          "type" : "POST"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 4,
    "totalPages" : 1,
    "number" : 0
  }
}

View a comment

GET

/api/comments/{comment-id}

Returns the comment {comment-id}.

Prerequisites

  • Comment {comment-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719' -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/comments/2d5b7d59-51e4-4c97-8def-496f980e9719"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

Comment with HAL links.

{
  "id" : "2d5b7d59-51e4-4c97-8def-496f980e9719",
  "message" : "SIT-generated reply Pesho [2022-01-21T09:31:35.245005] to ",
  "likeCount" : 0,
  "likedByProfiles" : [ ],
  "created" : "2022-01-21T09:31:35.351233",
  "lastModified" : "2022-01-21T09:31:35.351234",
  "from" : {
    "id" : "auth0|5eb0327cbfd7490bff55feeb",
    "name" : "[email protected]",
    "handle" : "@support+integrationtests+a7o91bel"
  },
  "commentCount" : 0,
  "datasetId" : "823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0",
  "_links" : {
    "edit-history" : {
      "href" : "https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719/history",
      "type" : "GET"
    },
    "update comment" : {
      "href" : "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments/2d5b7d59-51e4-4c97-8def-496f980e9719",
      "type" : "PUT"
    },
    "delete comment" : {
      "href" : "https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719",
      "type" : "DELETE"
    },
    "self" : {
      "href" : "https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719"
    },
    "add like" : {
      "href" : "https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719/like",
      "type" : "PUT"
    },
    "new reply" : {
      "href" : "https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719",
      "type" : "POST"
    }
  }
}

View the edit history of a comment

GET

/api/comments/{comment-id}/history

Returns the edit history of the comment {comment-id}.

Prerequisites

  • Comment {comment-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719/history' -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/comments/2d5b7d59-51e4-4c97-8def-496f980e9719/history"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

[ {
  "lastModified" : "2022-01-21T09:31:35.357",
  "message" : "SIT-generated reply Pesho [2022-01-21T09:31:35.245005] to ",
  "editVersion" : "17647"
}, {
  "lastModified" : "2022-01-21T09:31:35.661",
  "message" : "SIT-generated reply Pesho [2022-01-21T09:31:35.552381] to ",
  "editVersion" : "17648"
} ]

View all replies to a comment

GET

/api/comments/{comment-id}

Returns all replies to the comment {comment-id}.

Prerequisites

  • Comment {comment-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments?parentId=d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8' -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/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments?parentId=d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

Comment with HAL links.

{
  "_embedded" : {
    "datasetComments" : [ {
      "id" : "7136a142-1e93-46e9-9e23-36a9182f8330",
      "message" : "SIT-generated reply Pesho [2022-01-21T09:31:30.026407] to ",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "created" : "2022-01-21T09:31:30.187863",
      "lastModified" : "2022-01-21T09:31:30.187864",
      "from" : {
        "id" : "auth0|5eb0327cbfd7490bff55feeb",
        "name" : "[email protected]",
        "handle" : "@support+integrationtests+a7o91bel"
      },
      "commentCount" : 0,
      "datasetId" : "823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0",
      "parentId" : "d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8",
      "_links" : {
        "edit-history" : {
          "href" : "https://catalog.matatika.com/api/comments/7136a142-1e93-46e9-9e23-36a9182f8330/history",
          "type" : "GET"
        },
        "update comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments/7136a142-1e93-46e9-9e23-36a9182f8330",
          "type" : "PUT"
        },
        "delete comment" : {
          "href" : "https://catalog.matatika.com/api/comments/7136a142-1e93-46e9-9e23-36a9182f8330",
          "type" : "DELETE"
        },
        "self" : {
          "href" : "https://catalog.matatika.com/api/comments/7136a142-1e93-46e9-9e23-36a9182f8330"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/comments/7136a142-1e93-46e9-9e23-36a9182f8330/like",
          "type" : "PUT"
        },
        "new reply" : {
          "href" : "https://catalog.matatika.com/api/comments/7136a142-1e93-46e9-9e23-36a9182f8330",
          "type" : "POST"
        }
      }
    }, {
      "id" : "962975dd-1cdc-43c7-ae11-54efe982273f",
      "message" : "SIT-generated reply Pesho [2022-01-21T09:31:29.464215] to ",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "created" : "2022-01-21T09:31:29.592659",
      "lastModified" : "2022-01-21T09:31:29.592659",
      "from" : {
        "id" : "auth0|5eb0327cbfd7490bff55feeb",
        "name" : "[email protected]",
        "handle" : "@support+integrationtests+a7o91bel"
      },
      "commentCount" : 0,
      "datasetId" : "823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0",
      "parentId" : "d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8",
      "_links" : {
        "update comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments/962975dd-1cdc-43c7-ae11-54efe982273f",
          "type" : "PUT"
        },
        "delete comment" : {
          "href" : "https://catalog.matatika.com/api/comments/962975dd-1cdc-43c7-ae11-54efe982273f",
          "type" : "DELETE"
        },
        "self" : {
          "href" : "https://catalog.matatika.com/api/comments/962975dd-1cdc-43c7-ae11-54efe982273f"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/comments/962975dd-1cdc-43c7-ae11-54efe982273f/like",
          "type" : "PUT"
        },
        "new reply" : {
          "href" : "https://catalog.matatika.com/api/comments/962975dd-1cdc-43c7-ae11-54efe982273f",
          "type" : "POST"
        }
      }
    }, {
      "id" : "b1cbeb36-fff6-4db8-ab2e-35b9b7d18601",
      "message" : "SIT-generated reply Pesho [2022-01-21T09:31:28.933660] to ",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "created" : "2022-01-21T09:31:29.277681",
      "lastModified" : "2022-01-21T09:31:29.277681",
      "from" : {
        "id" : "auth0|5eb0327cbfd7490bff55feeb",
        "name" : "[email protected]",
        "handle" : "@support+integrationtests+a7o91bel"
      },
      "commentCount" : 0,
      "datasetId" : "823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0",
      "parentId" : "d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8",
      "_links" : {
        "update comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments/b1cbeb36-fff6-4db8-ab2e-35b9b7d18601",
          "type" : "PUT"
        },
        "delete comment" : {
          "href" : "https://catalog.matatika.com/api/comments/b1cbeb36-fff6-4db8-ab2e-35b9b7d18601",
          "type" : "DELETE"
        },
        "self" : {
          "href" : "https://catalog.matatika.com/api/comments/b1cbeb36-fff6-4db8-ab2e-35b9b7d18601"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/comments/b1cbeb36-fff6-4db8-ab2e-35b9b7d18601/like",
          "type" : "PUT"
        },
        "new reply" : {
          "href" : "https://catalog.matatika.com/api/comments/b1cbeb36-fff6-4db8-ab2e-35b9b7d18601",
          "type" : "POST"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments?parentId=d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8&page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 3,
    "totalPages" : 1,
    "number" : 0
  }
}

Initialise a comment on a dataset

POST

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

Initialises a new comment on 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/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments' -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/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

Comment with HAL links.

{
  "id" : "f217d63c-49a6-445f-94a8-3a934dcee3d8",
  "likeCount" : 0,
  "likedByProfiles" : [ ],
  "created" : "2022-01-21T09:31:34.883983",
  "lastModified" : "2022-01-21T09:31:34.883984",
  "from" : {
    "id" : "auth0|5eb0327cbfd7490bff55feeb",
    "name" : "[email protected]",
    "handle" : "@support+integrationtests+a7o91bel"
  },
  "commentCount" : 0,
  "datasetId" : "823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0",
  "_links" : {
    "create comment" : {
      "href" : "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments/f217d63c-49a6-445f-94a8-3a934dcee3d8",
      "type" : "PUT"
    }
  }
}

Initialise a reply to a comment

POST

/api/comments/{comment-id}

Initialises a new reply comment to the comment {comment-id}.

Prerequisites

  • Comment {comment-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/comments/d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8' -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/comments/d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

Comment with HAL links.

{
  "id" : "5ef1b7b1-a693-44dc-8d3b-ff817e2b7a12",
  "likeCount" : 0,
  "likedByProfiles" : [ ],
  "created" : "2022-01-21T09:31:33.814327",
  "lastModified" : "2022-01-21T09:31:33.814328",
  "from" : {
    "id" : "auth0|5eb0327cbfd7490bff55feeb",
    "name" : "[email protected]",
    "handle" : "@support+integrationtests+a7o91bel"
  },
  "commentCount" : 0,
  "datasetId" : "823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0",
  "parentId" : "d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8",
  "_links" : {
    "create comment" : {
      "href" : "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments/5ef1b7b1-a693-44dc-8d3b-ff817e2b7a12",
      "type" : "PUT"
    }
  }
}

Create a comment

PUT

/api/comments/{comment-id}

Creates the comment {comment-id}.

Prerequisites

  • The comment must have been initialised in order to create it
  • The target dataset {dataset-id} or comment {comment-id} must exist

Request

Body

Comment resource.

{
  "message" : "SIT-generated reply Pesho [2022-01-21T09:31:33.372558] to ",
  "datasetId" : "823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0"
}

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments/47d79b73-6bdc-48ff-ad10-8aefc8fa4f49' -i -X PUT \
    -H 'Accept: application/json, application/javascript, text/javascript, text/json' \
    -H 'Content-Type: application/hal+json; charset=ISO-8859-1' \
    -d '{
  "message" : "SIT-generated reply Pesho [2022-01-21T09:31:33.372558] to ",
  "datasetId" : "823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0"
}'
  • Python (requests)
import requests

url = "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments/47d79b73-6bdc-48ff-ad10-8aefc8fa4f49"

data = {
  "message" : "SIT-generated reply Pesho [2022-01-21T09:31:33.372558] to ",
  "datasetId" : "823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0"
}
headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

201 Created

Comment with HAL links.

{
  "id" : "47d79b73-6bdc-48ff-ad10-8aefc8fa4f49",
  "message" : "SIT-generated reply Pesho [2022-01-21T09:31:33.372558] to ",
  "likeCount" : 0,
  "likedByProfiles" : [ ],
  "created" : "2022-01-21T09:31:33.64004",
  "lastModified" : "2022-01-21T09:31:33.64004",
  "from" : {
    "id" : "auth0|5eb0327cbfd7490bff55feeb",
    "name" : "[email protected]",
    "handle" : "@support+integrationtests+a7o91bel"
  },
  "commentCount" : 0,
  "datasetId" : "823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0",
  "_links" : {
    "update comment" : {
      "href" : "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments/47d79b73-6bdc-48ff-ad10-8aefc8fa4f49",
      "type" : "PUT"
    },
    "delete comment" : {
      "href" : "https://catalog.matatika.com/api/comments/47d79b73-6bdc-48ff-ad10-8aefc8fa4f49",
      "type" : "DELETE"
    },
    "self" : {
      "href" : "https://catalog.matatika.com/api/comments/47d79b73-6bdc-48ff-ad10-8aefc8fa4f49"
    },
    "add like" : {
      "href" : "https://catalog.matatika.com/api/comments/47d79b73-6bdc-48ff-ad10-8aefc8fa4f49/like",
      "type" : "PUT"
    },
    "new reply" : {
      "href" : "https://catalog.matatika.com/api/comments/47d79b73-6bdc-48ff-ad10-8aefc8fa4f49",
      "type" : "POST"
    }
  }
}

Update a comment

PUT

/api/comments/{comment-id}

Updates the comment {comment-id}.

Prerequisites

  • Comment {comment-id} must exist

Request

Body

Comment resource.

{
  "message" : "SIT-generated reply Pesho [2022-01-21T09:31:34.922830] to "
}

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719' -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/comments/2d5b7d59-51e4-4c97-8def-496f980e9719"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

Comment with HAL links.

{
  "id" : "2d5b7d59-51e4-4c97-8def-496f980e9719",
  "message" : "SIT-generated reply Pesho [2022-01-21T09:31:35.245005] to ",
  "likeCount" : 0,
  "likedByProfiles" : [ ],
  "created" : "2022-01-21T09:31:35.351233",
  "lastModified" : "2022-01-21T09:31:35.351234",
  "from" : {
    "id" : "auth0|5eb0327cbfd7490bff55feeb",
    "name" : "[email protected]",
    "handle" : "@support+integrationtests+a7o91bel"
  },
  "commentCount" : 0,
  "datasetId" : "823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0",
  "_links" : {
    "edit-history" : {
      "href" : "https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719/history",
      "type" : "GET"
    },
    "update comment" : {
      "href" : "https://catalog.matatika.com/api/datasets/823a42bb-b8f4-4ab2-b7eb-d80ff352bfe0/comments/2d5b7d59-51e4-4c97-8def-496f980e9719",
      "type" : "PUT"
    },
    "delete comment" : {
      "href" : "https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719",
      "type" : "DELETE"
    },
    "self" : {
      "href" : "https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719"
    },
    "add like" : {
      "href" : "https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719/like",
      "type" : "PUT"
    },
    "new reply" : {
      "href" : "https://catalog.matatika.com/api/comments/2d5b7d59-51e4-4c97-8def-496f980e9719",
      "type" : "POST"
    }
  }
}

Record a like of a comment

PUT

/api/comments/{comment-id}/like

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

Prerequisites

  • Comment {comment-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/comments/d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8/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/comments/d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8/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 comment

DELETE

/api/comments/{comment-id}/like

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

Prerequisites

  • Comment {comment-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/comments/d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8/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/comments/d4cbffc9-cfc0-4b26-b34a-c24f562eb2d8/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.


Delete a comment

DELETE

/api/comments/{comment-id}

Deletes the comment {comment-id}.

Prerequisites

  • Comment {comment-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/comments/d8e98e68-6545-4263-b8cb-37b41c8df820' -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/comments/d8e98e68-6545-4263-b8cb-37b41c8df820"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

204 No Content

No response body provided.