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" : "8f764651-c2ad-4f78-8d23-23f4a51f3db9",
"message" : "SIT-generated reply Pesho [2024-03-17T20:54:22.981955] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-03-17T20:54:23.068293",
"lastModified" : "2024-03-17T20:54:23.068294",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "e84f05b1-fbec-49ff-a451-d889ea03010a",
"_links" : {
"edit-history" : {
"href" : "https://catalog.matatika.com/api/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9",
"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/e84f05b1-fbec-49ff-a451-d889ea03010a/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/e84f05b1-fbec-49ff-a451-d889ea03010a/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" : "dda39395-70ed-4b05-9a57-f897f9839763",
"message" : "SIT-generated reply Pesho [2024-03-17T20:54:19.843653] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-03-17T20:54:20.096231",
"lastModified" : "2024-03-17T20:54:20.096231",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "e84f05b1-fbec-49ff-a451-d889ea03010a",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments/dda39395-70ed-4b05-9a57-f897f9839763",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/dda39395-70ed-4b05-9a57-f897f9839763",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/dda39395-70ed-4b05-9a57-f897f9839763"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/dda39395-70ed-4b05-9a57-f897f9839763/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/dda39395-70ed-4b05-9a57-f897f9839763",
"type" : "POST"
}
}
}, {
"id" : "e973163a-ce05-4055-8f6b-43375b1b35aa",
"message" : "SIT-generated reply Pesho [2024-03-17T20:54:19.248271] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-03-17T20:54:19.495448",
"lastModified" : "2024-03-17T20:54:19.495449",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "e84f05b1-fbec-49ff-a451-d889ea03010a",
"_links" : {
"edit-history" : {
"href" : "https://catalog.matatika.com/api/comments/e973163a-ce05-4055-8f6b-43375b1b35aa/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments/e973163a-ce05-4055-8f6b-43375b1b35aa",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/e973163a-ce05-4055-8f6b-43375b1b35aa",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/e973163a-ce05-4055-8f6b-43375b1b35aa"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/e973163a-ce05-4055-8f6b-43375b1b35aa/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/e973163a-ce05-4055-8f6b-43375b1b35aa",
"type" : "POST"
}
}
}, {
"id" : "d81135ca-588a-4dad-b0df-8aecd388a83a",
"message" : "SIT-generated reply Pesho [2024-03-17T20:54:18.965667] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-03-17T20:54:19.053754",
"lastModified" : "2024-03-17T20:54:19.053755",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "e84f05b1-fbec-49ff-a451-d889ea03010a",
"_links" : {
"edit-history" : {
"href" : "https://catalog.matatika.com/api/comments/d81135ca-588a-4dad-b0df-8aecd388a83a/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments/d81135ca-588a-4dad-b0df-8aecd388a83a",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/d81135ca-588a-4dad-b0df-8aecd388a83a",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/d81135ca-588a-4dad-b0df-8aecd388a83a"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/d81135ca-588a-4dad-b0df-8aecd388a83a/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/d81135ca-588a-4dad-b0df-8aecd388a83a",
"type" : "POST"
}
}
}, {
"id" : "89c233ea-a04d-48e9-92fe-876224a04af9",
"message" : "SIT-generated reply Pesho [2024-03-17T20:54:15.993830] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-03-17T20:54:16.095691",
"lastModified" : "2024-03-17T20:54:16.095692",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 3,
"datasetId" : "e84f05b1-fbec-49ff-a451-d889ea03010a",
"_links" : {
"comments" : {
"href" : "https://catalog.matatika.com/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments?parentId=89c233ea-a04d-48e9-92fe-876224a04af9",
"type" : "GET"
},
"edit-history" : {
"href" : "https://catalog.matatika.com/api/comments/89c233ea-a04d-48e9-92fe-876224a04af9/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments/89c233ea-a04d-48e9-92fe-876224a04af9",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/89c233ea-a04d-48e9-92fe-876224a04af9",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/89c233ea-a04d-48e9-92fe-876224a04af9"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/89c233ea-a04d-48e9-92fe-876224a04af9/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/89c233ea-a04d-48e9-92fe-876224a04af9",
"type" : "POST"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/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/8f764651-c2ad-4f78-8d23-23f4a51f3db9' -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/8f764651-c2ad-4f78-8d23-23f4a51f3db9"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Comment with HAL links.
{
"id" : "8f764651-c2ad-4f78-8d23-23f4a51f3db9",
"message" : "SIT-generated reply Pesho [2024-03-17T20:54:22.981955] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-03-17T20:54:23.068293",
"lastModified" : "2024-03-17T20:54:23.068294",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "e84f05b1-fbec-49ff-a451-d889ea03010a",
"_links" : {
"edit-history" : {
"href" : "https://catalog.matatika.com/api/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9",
"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/8f764651-c2ad-4f78-8d23-23f4a51f3db9/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/8f764651-c2ad-4f78-8d23-23f4a51f3db9/history"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
[ {
"lastModified" : "2024-03-17T20:54:23.070",
"message" : "SIT-generated reply Pesho [2024-03-17T20:54:22.981955] to ",
"editVersion" : "133366"
}, {
"lastModified" : "2024-03-17T20:54:23.377",
"message" : "SIT-generated reply Pesho [2024-03-17T20:54:23.291504] to ",
"editVersion" : "133367"
} ]
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/e84f05b1-fbec-49ff-a451-d889ea03010a/comments?parentId=89c233ea-a04d-48e9-92fe-876224a04af9' -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/e84f05b1-fbec-49ff-a451-d889ea03010a/comments?parentId=89c233ea-a04d-48e9-92fe-876224a04af9"
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" : "9970051e-3f84-4064-b797-5c3464c1e664",
"message" : "SIT-generated reply Pesho [2024-03-17T20:54:17.542422] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-03-17T20:54:17.630349",
"lastModified" : "2024-03-17T20:54:17.630349",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "e84f05b1-fbec-49ff-a451-d889ea03010a",
"parentId" : "89c233ea-a04d-48e9-92fe-876224a04af9",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments/9970051e-3f84-4064-b797-5c3464c1e664",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/9970051e-3f84-4064-b797-5c3464c1e664",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/9970051e-3f84-4064-b797-5c3464c1e664"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/9970051e-3f84-4064-b797-5c3464c1e664/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/9970051e-3f84-4064-b797-5c3464c1e664",
"type" : "POST"
}
}
}, {
"id" : "26ada4c9-e2da-415a-8aa0-6e8da50e5e59",
"message" : "SIT-generated reply Pesho [2024-03-17T20:54:17.256336] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-03-17T20:54:17.347798",
"lastModified" : "2024-03-17T20:54:17.347798",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "e84f05b1-fbec-49ff-a451-d889ea03010a",
"parentId" : "89c233ea-a04d-48e9-92fe-876224a04af9",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments/26ada4c9-e2da-415a-8aa0-6e8da50e5e59",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/26ada4c9-e2da-415a-8aa0-6e8da50e5e59",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/26ada4c9-e2da-415a-8aa0-6e8da50e5e59"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/26ada4c9-e2da-415a-8aa0-6e8da50e5e59/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/26ada4c9-e2da-415a-8aa0-6e8da50e5e59",
"type" : "POST"
}
}
}, {
"id" : "56c893d8-21b9-4b30-a940-81ccd0e07652",
"message" : "SIT-generated reply Pesho [2024-03-17T20:54:16.957128] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-03-17T20:54:17.050332",
"lastModified" : "2024-03-17T20:54:17.050332",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "e84f05b1-fbec-49ff-a451-d889ea03010a",
"parentId" : "89c233ea-a04d-48e9-92fe-876224a04af9",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments/56c893d8-21b9-4b30-a940-81ccd0e07652",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/56c893d8-21b9-4b30-a940-81ccd0e07652",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/56c893d8-21b9-4b30-a940-81ccd0e07652"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/56c893d8-21b9-4b30-a940-81ccd0e07652/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/56c893d8-21b9-4b30-a940-81ccd0e07652",
"type" : "POST"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments?parentId=89c233ea-a04d-48e9-92fe-876224a04af9&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/e84f05b1-fbec-49ff-a451-d889ea03010a/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/e84f05b1-fbec-49ff-a451-d889ea03010a/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" : "726d4de9-967a-4078-a634-090bdc887abc",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-03-17T20:54:22.583739656",
"lastModified" : "2024-03-17T20:54:22.583739856",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "e84f05b1-fbec-49ff-a451-d889ea03010a",
"_links" : {
"create comment" : {
"href" : "https://catalog.matatika.com/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments/726d4de9-967a-4078-a634-090bdc887abc",
"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/89c233ea-a04d-48e9-92fe-876224a04af9' -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/89c233ea-a04d-48e9-92fe-876224a04af9"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("POST", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Comment with HAL links.
{
"id" : "58fbd631-0977-4fb7-9217-a8a13ea4e3ae",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-03-17T20:54:21.265128062",
"lastModified" : "2024-03-17T20:54:21.265128162",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "e84f05b1-fbec-49ff-a451-d889ea03010a",
"parentId" : "89c233ea-a04d-48e9-92fe-876224a04af9",
"_links" : {
"create comment" : {
"href" : "https://catalog.matatika.com/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments/58fbd631-0977-4fb7-9217-a8a13ea4e3ae",
"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-03-17T20:54:20.488698] to ",
"datasetId" : "e84f05b1-fbec-49ff-a451-d889ea03010a"
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments/60f18573-d2e7-4907-b6b2-ad84084ee234' -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-03-17T20:54:20.488698] to ",
"datasetId" : "e84f05b1-fbec-49ff-a451-d889ea03010a"
}'
Python (requests
)
import requests
url = "https://catalog.matatika.com:443/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments/60f18573-d2e7-4907-b6b2-ad84084ee234"
data = {
"message" : "SIT-generated reply Pesho [2024-03-17T20:54:20.488698] to ",
"datasetId" : "e84f05b1-fbec-49ff-a451-d889ea03010a"
}
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" : "60f18573-d2e7-4907-b6b2-ad84084ee234",
"message" : "SIT-generated reply Pesho [2024-03-17T20:54:20.488698] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-03-17T20:54:20.879547967",
"lastModified" : "2024-03-17T20:54:20.879548467",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "e84f05b1-fbec-49ff-a451-d889ea03010a",
"_links" : {
"edit-history" : {
"href" : "https://catalog.matatika.com/api/comments/60f18573-d2e7-4907-b6b2-ad84084ee234/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments/60f18573-d2e7-4907-b6b2-ad84084ee234",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/60f18573-d2e7-4907-b6b2-ad84084ee234",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/60f18573-d2e7-4907-b6b2-ad84084ee234"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/60f18573-d2e7-4907-b6b2-ad84084ee234/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/60f18573-d2e7-4907-b6b2-ad84084ee234",
"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-03-17T20:54:22.645430] to "
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9' -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/8f764651-c2ad-4f78-8d23-23f4a51f3db9"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Comment with HAL links.
{
"id" : "8f764651-c2ad-4f78-8d23-23f4a51f3db9",
"message" : "SIT-generated reply Pesho [2024-03-17T20:54:22.981955] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-03-17T20:54:23.068293",
"lastModified" : "2024-03-17T20:54:23.068294",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "e84f05b1-fbec-49ff-a451-d889ea03010a",
"_links" : {
"edit-history" : {
"href" : "https://catalog.matatika.com/api/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/e84f05b1-fbec-49ff-a451-d889ea03010a/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/8f764651-c2ad-4f78-8d23-23f4a51f3db9",
"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/89c233ea-a04d-48e9-92fe-876224a04af9/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/89c233ea-a04d-48e9-92fe-876224a04af9/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/89c233ea-a04d-48e9-92fe-876224a04af9/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/89c233ea-a04d-48e9-92fe-876224a04af9/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/a40fada9-f11d-49e9-8a8e-c4546f2ba5c9' -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/a40fada9-f11d-49e9-8a8e-c4546f2ba5c9"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("DELETE", url, headers=headers)
print(response.text.encode('utf8'))
Response
204 No Content
No response body provided.