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" : "4470600d-af99-4adc-b350-bd0c2debc571",
"message" : "SIT-generated reply Pesho [2023-03-23T21:54:20.687562] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2023-03-23T21:54:20.774339",
"lastModified" : "2023-03-23T21:54:20.774339",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@support+integrationtests+a7o91bel"
},
"commentCount" : 0,
"datasetId" : "08e17f7f-3d7c-40a5-9119-7003ca35dc97",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments/4470600d-af99-4adc-b350-bd0c2debc571",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/4470600d-af99-4adc-b350-bd0c2debc571",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/4470600d-af99-4adc-b350-bd0c2debc571"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/4470600d-af99-4adc-b350-bd0c2debc571/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/4470600d-af99-4adc-b350-bd0c2debc571",
"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/08e17f7f-3d7c-40a5-9119-7003ca35dc97/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/08e17f7f-3d7c-40a5-9119-7003ca35dc97/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" : "3c7544cd-b92a-46db-bb8b-50554618031a",
"message" : "SIT-generated reply Pesho [2023-03-23T21:54:18.589622] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2023-03-23T21:54:18.677981",
"lastModified" : "2023-03-23T21:54:18.677981",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@support+integrationtests+a7o91bel"
},
"commentCount" : 0,
"datasetId" : "08e17f7f-3d7c-40a5-9119-7003ca35dc97",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments/3c7544cd-b92a-46db-bb8b-50554618031a",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/3c7544cd-b92a-46db-bb8b-50554618031a",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/3c7544cd-b92a-46db-bb8b-50554618031a"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/3c7544cd-b92a-46db-bb8b-50554618031a/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/3c7544cd-b92a-46db-bb8b-50554618031a",
"type" : "POST"
}
}
}, {
"id" : "8346785e-8746-4d01-96a0-a738b38d9ea2",
"message" : "SIT-generated reply Pesho [2023-03-23T21:54:18.276965] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2023-03-23T21:54:18.366948",
"lastModified" : "2023-03-23T21:54:18.366948",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@support+integrationtests+a7o91bel"
},
"commentCount" : 0,
"datasetId" : "08e17f7f-3d7c-40a5-9119-7003ca35dc97",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments/8346785e-8746-4d01-96a0-a738b38d9ea2",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/8346785e-8746-4d01-96a0-a738b38d9ea2",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/8346785e-8746-4d01-96a0-a738b38d9ea2"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/8346785e-8746-4d01-96a0-a738b38d9ea2/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/8346785e-8746-4d01-96a0-a738b38d9ea2",
"type" : "POST"
}
}
}, {
"id" : "9a68e834-1fbd-4d31-b1ba-8a5ac36ffafb",
"message" : "SIT-generated reply Pesho [2023-03-23T21:54:17.966841] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2023-03-23T21:54:18.05663",
"lastModified" : "2023-03-23T21:54:18.05663",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@support+integrationtests+a7o91bel"
},
"commentCount" : 0,
"datasetId" : "08e17f7f-3d7c-40a5-9119-7003ca35dc97",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments/9a68e834-1fbd-4d31-b1ba-8a5ac36ffafb",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/9a68e834-1fbd-4d31-b1ba-8a5ac36ffafb",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/9a68e834-1fbd-4d31-b1ba-8a5ac36ffafb"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/9a68e834-1fbd-4d31-b1ba-8a5ac36ffafb/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/9a68e834-1fbd-4d31-b1ba-8a5ac36ffafb",
"type" : "POST"
}
}
}, {
"id" : "b3284221-225d-4ef4-a588-f28e1d977560",
"message" : "SIT-generated reply Pesho [2023-03-23T21:54:13.806266] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2023-03-23T21:54:13.899601",
"lastModified" : "2023-03-23T21:54:13.899602",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@support+integrationtests+a7o91bel"
},
"commentCount" : 3,
"datasetId" : "08e17f7f-3d7c-40a5-9119-7003ca35dc97",
"_links" : {
"comments" : {
"href" : "https://catalog.matatika.com/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments?parentId=b3284221-225d-4ef4-a588-f28e1d977560",
"type" : "GET"
},
"edit-history" : {
"href" : "https://catalog.matatika.com/api/comments/b3284221-225d-4ef4-a588-f28e1d977560/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments/b3284221-225d-4ef4-a588-f28e1d977560",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/b3284221-225d-4ef4-a588-f28e1d977560",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/b3284221-225d-4ef4-a588-f28e1d977560"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/b3284221-225d-4ef4-a588-f28e1d977560/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/b3284221-225d-4ef4-a588-f28e1d977560",
"type" : "POST"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/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/4470600d-af99-4adc-b350-bd0c2debc571' -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/4470600d-af99-4adc-b350-bd0c2debc571"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Comment with HAL links.
{
"id" : "4470600d-af99-4adc-b350-bd0c2debc571",
"message" : "SIT-generated reply Pesho [2023-03-23T21:54:20.687562] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2023-03-23T21:54:20.774339",
"lastModified" : "2023-03-23T21:54:20.774339",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@support+integrationtests+a7o91bel"
},
"commentCount" : 0,
"datasetId" : "08e17f7f-3d7c-40a5-9119-7003ca35dc97",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments/4470600d-af99-4adc-b350-bd0c2debc571",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/4470600d-af99-4adc-b350-bd0c2debc571",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/4470600d-af99-4adc-b350-bd0c2debc571"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/4470600d-af99-4adc-b350-bd0c2debc571/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/4470600d-af99-4adc-b350-bd0c2debc571",
"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/4470600d-af99-4adc-b350-bd0c2debc571/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/4470600d-af99-4adc-b350-bd0c2debc571/history"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
[ {
"lastModified" : "2023-03-23T21:54:20.777",
"message" : "SIT-generated reply Pesho [2023-03-23T21:54:20.687562] to ",
"editVersion" : "70307"
}, {
"lastModified" : "2023-03-23T21:54:21.111",
"message" : "SIT-generated reply Pesho [2023-03-23T21:54:21.011540] to ",
"editVersion" : "70308"
} ]
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/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments?parentId=b3284221-225d-4ef4-a588-f28e1d977560' -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/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments?parentId=b3284221-225d-4ef4-a588-f28e1d977560"
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" : "758d6882-9ad2-4f98-a9a1-67206ed4eac7",
"message" : "SIT-generated reply Pesho [2023-03-23T21:54:15.987298] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2023-03-23T21:54:16.235972",
"lastModified" : "2023-03-23T21:54:16.235972",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@support+integrationtests+a7o91bel"
},
"commentCount" : 0,
"datasetId" : "08e17f7f-3d7c-40a5-9119-7003ca35dc97",
"parentId" : "b3284221-225d-4ef4-a588-f28e1d977560",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments/758d6882-9ad2-4f98-a9a1-67206ed4eac7",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/758d6882-9ad2-4f98-a9a1-67206ed4eac7",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/758d6882-9ad2-4f98-a9a1-67206ed4eac7"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/758d6882-9ad2-4f98-a9a1-67206ed4eac7/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/758d6882-9ad2-4f98-a9a1-67206ed4eac7",
"type" : "POST"
}
}
}, {
"id" : "2d5e27e8-3fae-44da-a314-2b1ea641e1c2",
"message" : "SIT-generated reply Pesho [2023-03-23T21:54:15.367787] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2023-03-23T21:54:15.618272",
"lastModified" : "2023-03-23T21:54:15.618272",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@support+integrationtests+a7o91bel"
},
"commentCount" : 0,
"datasetId" : "08e17f7f-3d7c-40a5-9119-7003ca35dc97",
"parentId" : "b3284221-225d-4ef4-a588-f28e1d977560",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments/2d5e27e8-3fae-44da-a314-2b1ea641e1c2",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/2d5e27e8-3fae-44da-a314-2b1ea641e1c2",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/2d5e27e8-3fae-44da-a314-2b1ea641e1c2"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/2d5e27e8-3fae-44da-a314-2b1ea641e1c2/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/2d5e27e8-3fae-44da-a314-2b1ea641e1c2",
"type" : "POST"
}
}
}, {
"id" : "7c5639d0-5b36-4109-9e71-f8173cc4e736",
"message" : "SIT-generated reply Pesho [2023-03-23T21:54:15.039412] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2023-03-23T21:54:15.136353",
"lastModified" : "2023-03-23T21:54:15.136354",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@support+integrationtests+a7o91bel"
},
"commentCount" : 0,
"datasetId" : "08e17f7f-3d7c-40a5-9119-7003ca35dc97",
"parentId" : "b3284221-225d-4ef4-a588-f28e1d977560",
"_links" : {
"edit-history" : {
"href" : "https://catalog.matatika.com/api/comments/7c5639d0-5b36-4109-9e71-f8173cc4e736/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments/7c5639d0-5b36-4109-9e71-f8173cc4e736",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/7c5639d0-5b36-4109-9e71-f8173cc4e736",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/7c5639d0-5b36-4109-9e71-f8173cc4e736"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/7c5639d0-5b36-4109-9e71-f8173cc4e736/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/7c5639d0-5b36-4109-9e71-f8173cc4e736",
"type" : "POST"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments?parentId=b3284221-225d-4ef4-a588-f28e1d977560&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/08e17f7f-3d7c-40a5-9119-7003ca35dc97/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/08e17f7f-3d7c-40a5-9119-7003ca35dc97/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" : "e096ce63-51fd-4eb1-b4fc-b94a7b036fda",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2023-03-23T21:54:20.250657348",
"lastModified" : "2023-03-23T21:54:20.250657648",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@support+integrationtests+a7o91bel"
},
"commentCount" : 0,
"datasetId" : "08e17f7f-3d7c-40a5-9119-7003ca35dc97",
"_links" : {
"create comment" : {
"href" : "https://catalog.matatika.com/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments/e096ce63-51fd-4eb1-b4fc-b94a7b036fda",
"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/b3284221-225d-4ef4-a588-f28e1d977560' -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/b3284221-225d-4ef4-a588-f28e1d977560"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("POST", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Comment with HAL links.
{
"id" : "aaade813-805e-4283-b0a9-0143ce569ec6",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2023-03-23T21:54:19.379755904",
"lastModified" : "2023-03-23T21:54:19.379756104",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@support+integrationtests+a7o91bel"
},
"commentCount" : 0,
"datasetId" : "08e17f7f-3d7c-40a5-9119-7003ca35dc97",
"parentId" : "b3284221-225d-4ef4-a588-f28e1d977560",
"_links" : {
"create comment" : {
"href" : "https://catalog.matatika.com/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments/aaade813-805e-4283-b0a9-0143ce569ec6",
"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 [2023-03-23T21:54:18.920176] to ",
"datasetId" : "08e17f7f-3d7c-40a5-9119-7003ca35dc97"
}
Example Snippets
- cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments/625d615c-fc83-4de5-833c-8b902541f814' -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 [2023-03-23T21:54:18.920176] to ",
"datasetId" : "08e17f7f-3d7c-40a5-9119-7003ca35dc97"
}'
- Python (requests)
import requests
url = "https://catalog.matatika.com:443/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments/625d615c-fc83-4de5-833c-8b902541f814"
data = {
"message" : "SIT-generated reply Pesho [2023-03-23T21:54:18.920176] to ",
"datasetId" : "08e17f7f-3d7c-40a5-9119-7003ca35dc97"
}
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" : "625d615c-fc83-4de5-833c-8b902541f814",
"message" : "SIT-generated reply Pesho [2023-03-23T21:54:18.920176] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2023-03-23T21:54:19.165904788",
"lastModified" : "2023-03-23T21:54:19.165904988",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@support+integrationtests+a7o91bel"
},
"commentCount" : 0,
"datasetId" : "08e17f7f-3d7c-40a5-9119-7003ca35dc97",
"_links" : {
"edit-history" : {
"href" : "https://catalog.matatika.com/api/comments/625d615c-fc83-4de5-833c-8b902541f814/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments/625d615c-fc83-4de5-833c-8b902541f814",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/625d615c-fc83-4de5-833c-8b902541f814",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/625d615c-fc83-4de5-833c-8b902541f814"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/625d615c-fc83-4de5-833c-8b902541f814/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/625d615c-fc83-4de5-833c-8b902541f814",
"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 [2023-03-23T21:54:20.314952] to "
}
Example Snippets
- cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/comments/4470600d-af99-4adc-b350-bd0c2debc571' -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/4470600d-af99-4adc-b350-bd0c2debc571"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Comment with HAL links.
{
"id" : "4470600d-af99-4adc-b350-bd0c2debc571",
"message" : "SIT-generated reply Pesho [2023-03-23T21:54:20.687562] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2023-03-23T21:54:20.774339",
"lastModified" : "2023-03-23T21:54:20.774339",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@support+integrationtests+a7o91bel"
},
"commentCount" : 0,
"datasetId" : "08e17f7f-3d7c-40a5-9119-7003ca35dc97",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/08e17f7f-3d7c-40a5-9119-7003ca35dc97/comments/4470600d-af99-4adc-b350-bd0c2debc571",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/4470600d-af99-4adc-b350-bd0c2debc571",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/4470600d-af99-4adc-b350-bd0c2debc571"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/4470600d-af99-4adc-b350-bd0c2debc571/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/4470600d-af99-4adc-b350-bd0c2debc571",
"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/b3284221-225d-4ef4-a588-f28e1d977560/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/b3284221-225d-4ef4-a588-f28e1d977560/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/b3284221-225d-4ef4-a588-f28e1d977560/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/b3284221-225d-4ef4-a588-f28e1d977560/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/9875c575-60db-4fb7-b28b-52c2c110a3d3' -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/9875c575-60db-4fb7-b28b-52c2c110a3d3"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("DELETE", url, headers=headers)
print(response.text.encode('utf8'))
Response
204 No Content
No response body provided.