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" : "78f6d081-4ed3-49a1-a169-8a23766d6e14",
"message" : "SIT-generated reply Pesho [2024-05-11T09:42:48.651331] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-05-11T08:42:48.729412",
"lastModified" : "2024-05-11T08:42:48.729412",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "a522a405-c599-4c01-be3b-11e482a7bc5c",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14",
"type" : "POST"
}
}
}
Requests
- View all comments on a dataset
- View a comment
- View the edit history of a comment
- View all replies to a comment
- Initialise a comment on a dataset
- Initialise a reply to a comment
- Create a comment
- Update a comment
- Record a like of a comment
- Remove a like from a comment
- Delete a comment
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:443/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/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:443/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/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" : "e574a4cf-3c49-4013-87b6-01356f87d495",
"message" : "SIT-generated reply Pesho [2024-05-11T09:42:46.559927] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-05-11T08:42:46.793703",
"lastModified" : "2024-05-11T08:42:46.793703",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "a522a405-c599-4c01-be3b-11e482a7bc5c",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments/e574a4cf-3c49-4013-87b6-01356f87d495",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/e574a4cf-3c49-4013-87b6-01356f87d495",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/e574a4cf-3c49-4013-87b6-01356f87d495"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/e574a4cf-3c49-4013-87b6-01356f87d495/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/e574a4cf-3c49-4013-87b6-01356f87d495",
"type" : "POST"
}
}
}, {
"id" : "58d0d110-fea0-48a1-8b46-a30e6d2305ed",
"message" : "SIT-generated reply Pesho [2024-05-11T09:42:46.121032] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-05-11T08:42:46.35945",
"lastModified" : "2024-05-11T08:42:46.35945",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "a522a405-c599-4c01-be3b-11e482a7bc5c",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments/58d0d110-fea0-48a1-8b46-a30e6d2305ed",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/58d0d110-fea0-48a1-8b46-a30e6d2305ed",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/58d0d110-fea0-48a1-8b46-a30e6d2305ed"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/58d0d110-fea0-48a1-8b46-a30e6d2305ed/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/58d0d110-fea0-48a1-8b46-a30e6d2305ed",
"type" : "POST"
}
}
}, {
"id" : "d473f7c6-07b1-4bad-a241-adf55dcb7574",
"message" : "SIT-generated reply Pesho [2024-05-11T09:42:45.834504] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-05-11T08:42:45.910899",
"lastModified" : "2024-05-11T08:42:45.910899",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "a522a405-c599-4c01-be3b-11e482a7bc5c",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments/d473f7c6-07b1-4bad-a241-adf55dcb7574",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/d473f7c6-07b1-4bad-a241-adf55dcb7574",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/d473f7c6-07b1-4bad-a241-adf55dcb7574"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/d473f7c6-07b1-4bad-a241-adf55dcb7574/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/d473f7c6-07b1-4bad-a241-adf55dcb7574",
"type" : "POST"
}
}
}, {
"id" : "9fbf9a37-8058-4717-b0a9-c5526b67d43a",
"message" : "SIT-generated reply Pesho [2024-05-11T09:42:41.497986] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-05-11T08:42:41.57171",
"lastModified" : "2024-05-11T08:42:41.571711",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 3,
"datasetId" : "a522a405-c599-4c01-be3b-11e482a7bc5c",
"_links" : {
"comments" : {
"href" : "https://catalog.matatika.com/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments?parentId=9fbf9a37-8058-4717-b0a9-c5526b67d43a",
"type" : "GET"
},
"edit-history" : {
"href" : "https://catalog.matatika.com/api/comments/9fbf9a37-8058-4717-b0a9-c5526b67d43a/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments/9fbf9a37-8058-4717-b0a9-c5526b67d43a",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/9fbf9a37-8058-4717-b0a9-c5526b67d43a",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/9fbf9a37-8058-4717-b0a9-c5526b67d43a"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/9fbf9a37-8058-4717-b0a9-c5526b67d43a/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/9fbf9a37-8058-4717-b0a9-c5526b67d43a",
"type" : "POST"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/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:443/api/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14' -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/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Comment with HAL links.
{
"id" : "78f6d081-4ed3-49a1-a169-8a23766d6e14",
"message" : "SIT-generated reply Pesho [2024-05-11T09:42:48.651331] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-05-11T08:42:48.729412",
"lastModified" : "2024-05-11T08:42:48.729412",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "a522a405-c599-4c01-be3b-11e482a7bc5c",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14",
"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:443/api/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14/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:443/api/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14/history"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
[ {
"lastModified" : "2024-05-11T08:42:48.732",
"message" : "SIT-generated reply Pesho [2024-05-11T09:42:48.651331] to ",
"editVersion" : "139469"
}, {
"lastModified" : "2024-05-11T08:42:49.038",
"message" : "SIT-generated reply Pesho [2024-05-11T09:42:48.961478] to ",
"editVersion" : "139470"
} ]
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:443/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments?parentId=9fbf9a37-8058-4717-b0a9-c5526b67d43a' -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/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments?parentId=9fbf9a37-8058-4717-b0a9-c5526b67d43a"
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" : "209b541d-d2bb-4cad-8d50-c99233366747",
"message" : "SIT-generated reply Pesho [2024-05-11T09:42:43.568975] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-05-11T08:42:43.80762",
"lastModified" : "2024-05-11T08:42:43.80762",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "a522a405-c599-4c01-be3b-11e482a7bc5c",
"parentId" : "9fbf9a37-8058-4717-b0a9-c5526b67d43a",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments/209b541d-d2bb-4cad-8d50-c99233366747",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/209b541d-d2bb-4cad-8d50-c99233366747",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/209b541d-d2bb-4cad-8d50-c99233366747"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/209b541d-d2bb-4cad-8d50-c99233366747/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/209b541d-d2bb-4cad-8d50-c99233366747",
"type" : "POST"
}
}
}, {
"id" : "2b331c4c-8903-4bfb-8afb-76fa16150719",
"message" : "SIT-generated reply Pesho [2024-05-11T09:42:43.129034] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-05-11T08:42:43.212688",
"lastModified" : "2024-05-11T08:42:43.212688",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "a522a405-c599-4c01-be3b-11e482a7bc5c",
"parentId" : "9fbf9a37-8058-4717-b0a9-c5526b67d43a",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments/2b331c4c-8903-4bfb-8afb-76fa16150719",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/2b331c4c-8903-4bfb-8afb-76fa16150719",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/2b331c4c-8903-4bfb-8afb-76fa16150719"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/2b331c4c-8903-4bfb-8afb-76fa16150719/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/2b331c4c-8903-4bfb-8afb-76fa16150719",
"type" : "POST"
}
}
}, {
"id" : "09dcbaf3-f09a-47e5-9341-b4401a6568a7",
"message" : "SIT-generated reply Pesho [2024-05-11T09:42:42.541069] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-05-11T08:42:42.774331",
"lastModified" : "2024-05-11T08:42:42.774332",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "a522a405-c599-4c01-be3b-11e482a7bc5c",
"parentId" : "9fbf9a37-8058-4717-b0a9-c5526b67d43a",
"_links" : {
"edit-history" : {
"href" : "https://catalog.matatika.com/api/comments/09dcbaf3-f09a-47e5-9341-b4401a6568a7/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments/09dcbaf3-f09a-47e5-9341-b4401a6568a7",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/09dcbaf3-f09a-47e5-9341-b4401a6568a7",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/09dcbaf3-f09a-47e5-9341-b4401a6568a7"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/09dcbaf3-f09a-47e5-9341-b4401a6568a7/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/09dcbaf3-f09a-47e5-9341-b4401a6568a7",
"type" : "POST"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments?parentId=9fbf9a37-8058-4717-b0a9-c5526b67d43a&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:443/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/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:443/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/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" : "50950477-b210-42fe-a128-41aac73f0951",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-05-11T08:42:48.258718831",
"lastModified" : "2024-05-11T08:42:48.258719131",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "a522a405-c599-4c01-be3b-11e482a7bc5c",
"_links" : {
"create comment" : {
"href" : "https://catalog.matatika.com/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments/50950477-b210-42fe-a128-41aac73f0951",
"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:443/api/comments/9fbf9a37-8058-4717-b0a9-c5526b67d43a' -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:443/api/comments/9fbf9a37-8058-4717-b0a9-c5526b67d43a"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("POST", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Comment with HAL links.
{
"id" : "01dba642-bd45-4935-be69-67cc6ce86518",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-05-11T08:42:47.556905731",
"lastModified" : "2024-05-11T08:42:47.556906331",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "a522a405-c599-4c01-be3b-11e482a7bc5c",
"parentId" : "9fbf9a37-8058-4717-b0a9-c5526b67d43a",
"_links" : {
"create comment" : {
"href" : "https://catalog.matatika.com/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments/01dba642-bd45-4935-be69-67cc6ce86518",
"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 [2024-05-11T09:42:47.008944] to ",
"datasetId" : "a522a405-c599-4c01-be3b-11e482a7bc5c"
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments/9572676b-8cf9-438c-92d4-afaa6fc35d6b' -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 [2024-05-11T09:42:47.008944] to ",
"datasetId" : "a522a405-c599-4c01-be3b-11e482a7bc5c"
}'
Python (requests
)
import requests
url = "https://catalog.matatika.com:443/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments/9572676b-8cf9-438c-92d4-afaa6fc35d6b"
data = {
"message" : "SIT-generated reply Pesho [2024-05-11T09:42:47.008944] to ",
"datasetId" : "a522a405-c599-4c01-be3b-11e482a7bc5c"
}
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" : "9572676b-8cf9-438c-92d4-afaa6fc35d6b",
"message" : "SIT-generated reply Pesho [2024-05-11T09:42:47.008944] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-05-11T08:42:47.39841265",
"lastModified" : "2024-05-11T08:42:47.39841275",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "a522a405-c599-4c01-be3b-11e482a7bc5c",
"_links" : {
"edit-history" : {
"href" : "https://catalog.matatika.com/api/comments/9572676b-8cf9-438c-92d4-afaa6fc35d6b/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments/9572676b-8cf9-438c-92d4-afaa6fc35d6b",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/9572676b-8cf9-438c-92d4-afaa6fc35d6b",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/9572676b-8cf9-438c-92d4-afaa6fc35d6b"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/9572676b-8cf9-438c-92d4-afaa6fc35d6b/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/9572676b-8cf9-438c-92d4-afaa6fc35d6b",
"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 [2024-05-11T09:42:48.333175] to "
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14' -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/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Comment with HAL links.
{
"id" : "78f6d081-4ed3-49a1-a169-8a23766d6e14",
"message" : "SIT-generated reply Pesho [2024-05-11T09:42:48.651331] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-05-11T08:42:48.729412",
"lastModified" : "2024-05-11T08:42:48.729412",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "a522a405-c599-4c01-be3b-11e482a7bc5c",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/a522a405-c599-4c01-be3b-11e482a7bc5c/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/78f6d081-4ed3-49a1-a169-8a23766d6e14",
"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:443/api/comments/9fbf9a37-8058-4717-b0a9-c5526b67d43a/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:443/api/comments/9fbf9a37-8058-4717-b0a9-c5526b67d43a/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:443/api/comments/9fbf9a37-8058-4717-b0a9-c5526b67d43a/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:443/api/comments/9fbf9a37-8058-4717-b0a9-c5526b67d43a/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:443/api/comments/45ae3f28-64ca-4a1a-b4bc-c0f05ca37942' -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:443/api/comments/45ae3f28-64ca-4a1a-b4bc-c0f05ca37942"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("DELETE", url, headers=headers)
print(response.text.encode('utf8'))
Response
204 No Content
No response body provided.