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" : "5a0dc55f-423e-4e9f-9e34-e58b60ec46b1",
"message" : "SIT-generated reply Pesho [2024-09-17T16:53:17.653925] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-09-17T15:53:17.78008",
"lastModified" : "2024-09-17T15:53:17.780081",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "6e8749c0-3fdb-46fb-a401-b5a26b909751",
"_links" : {
"edit-history" : {
"href" : "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1",
"type" : "DELETE"
},
"self" : {
"href" : "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1"
},
"add like" : {
"href" : "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1",
"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://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/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://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/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" : "ad99450d-13e9-47f7-b74d-c57455cee212",
"message" : "SIT-generated reply Pesho [2024-09-17T16:53:15.611146] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-09-17T15:53:15.699872",
"lastModified" : "2024-09-17T15:53:15.699872",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "6e8749c0-3fdb-46fb-a401-b5a26b909751",
"_links" : {
"update comment" : {
"href" : "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments/ad99450d-13e9-47f7-b74d-c57455cee212",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://app.matatika.com/api/comments/ad99450d-13e9-47f7-b74d-c57455cee212",
"type" : "DELETE"
},
"self" : {
"href" : "https://app.matatika.com/api/comments/ad99450d-13e9-47f7-b74d-c57455cee212"
},
"add like" : {
"href" : "https://app.matatika.com/api/comments/ad99450d-13e9-47f7-b74d-c57455cee212/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://app.matatika.com/api/comments/ad99450d-13e9-47f7-b74d-c57455cee212",
"type" : "POST"
}
}
}, {
"id" : "57a10209-8c86-4d11-ae27-a1fd2ca91109",
"message" : "SIT-generated reply Pesho [2024-09-17T16:53:15.284259] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-09-17T15:53:15.382603",
"lastModified" : "2024-09-17T15:53:15.382603",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "6e8749c0-3fdb-46fb-a401-b5a26b909751",
"_links" : {
"update comment" : {
"href" : "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments/57a10209-8c86-4d11-ae27-a1fd2ca91109",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://app.matatika.com/api/comments/57a10209-8c86-4d11-ae27-a1fd2ca91109",
"type" : "DELETE"
},
"self" : {
"href" : "https://app.matatika.com/api/comments/57a10209-8c86-4d11-ae27-a1fd2ca91109"
},
"add like" : {
"href" : "https://app.matatika.com/api/comments/57a10209-8c86-4d11-ae27-a1fd2ca91109/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://app.matatika.com/api/comments/57a10209-8c86-4d11-ae27-a1fd2ca91109",
"type" : "POST"
}
}
}, {
"id" : "0ef8fd95-68cb-4639-8174-c8f3a43c8a49",
"message" : "SIT-generated reply Pesho [2024-09-17T16:53:14.966586] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-09-17T15:53:15.072605",
"lastModified" : "2024-09-17T15:53:15.072606",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "6e8749c0-3fdb-46fb-a401-b5a26b909751",
"_links" : {
"edit-history" : {
"href" : "https://app.matatika.com/api/comments/0ef8fd95-68cb-4639-8174-c8f3a43c8a49/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments/0ef8fd95-68cb-4639-8174-c8f3a43c8a49",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://app.matatika.com/api/comments/0ef8fd95-68cb-4639-8174-c8f3a43c8a49",
"type" : "DELETE"
},
"self" : {
"href" : "https://app.matatika.com/api/comments/0ef8fd95-68cb-4639-8174-c8f3a43c8a49"
},
"add like" : {
"href" : "https://app.matatika.com/api/comments/0ef8fd95-68cb-4639-8174-c8f3a43c8a49/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://app.matatika.com/api/comments/0ef8fd95-68cb-4639-8174-c8f3a43c8a49",
"type" : "POST"
}
}
}, {
"id" : "27b5a828-02de-4583-b90b-da8550c917c9",
"message" : "SIT-generated reply Pesho [2024-09-17T16:53:11.750020] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-09-17T15:53:11.855086",
"lastModified" : "2024-09-17T15:53:11.855086",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 3,
"datasetId" : "6e8749c0-3fdb-46fb-a401-b5a26b909751",
"_links" : {
"comments" : {
"href" : "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments?parentId=27b5a828-02de-4583-b90b-da8550c917c9",
"type" : "GET"
},
"update comment" : {
"href" : "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments/27b5a828-02de-4583-b90b-da8550c917c9",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://app.matatika.com/api/comments/27b5a828-02de-4583-b90b-da8550c917c9",
"type" : "DELETE"
},
"self" : {
"href" : "https://app.matatika.com/api/comments/27b5a828-02de-4583-b90b-da8550c917c9"
},
"add like" : {
"href" : "https://app.matatika.com/api/comments/27b5a828-02de-4583-b90b-da8550c917c9/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://app.matatika.com/api/comments/27b5a828-02de-4583-b90b-da8550c917c9",
"type" : "POST"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/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://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1' -i -X GET \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Comment with HAL links.
{
"id" : "5a0dc55f-423e-4e9f-9e34-e58b60ec46b1",
"message" : "SIT-generated reply Pesho [2024-09-17T16:53:17.653925] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-09-17T15:53:17.78008",
"lastModified" : "2024-09-17T15:53:17.780081",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "6e8749c0-3fdb-46fb-a401-b5a26b909751",
"_links" : {
"edit-history" : {
"href" : "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1",
"type" : "DELETE"
},
"self" : {
"href" : "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1"
},
"add like" : {
"href" : "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1",
"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://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1/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://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1/history"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
[ {
"lastModified" : "2024-09-17T15:53:17.783",
"message" : "SIT-generated reply Pesho [2024-09-17T16:53:17.653925] to ",
"editVersion" : "163303"
}, {
"lastModified" : "2024-09-17T15:53:18.134",
"message" : "SIT-generated reply Pesho [2024-09-17T16:53:18.042081] to ",
"editVersion" : "163304"
} ]
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://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments?parentId=27b5a828-02de-4583-b90b-da8550c917c9' -i -X GET \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments?parentId=27b5a828-02de-4583-b90b-da8550c917c9"
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" : "60951d53-bf86-4bce-a9ea-914ee497e913",
"message" : "SIT-generated reply Pesho [2024-09-17T16:53:13.409171] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-09-17T15:53:13.499941",
"lastModified" : "2024-09-17T15:53:13.499941",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "6e8749c0-3fdb-46fb-a401-b5a26b909751",
"parentId" : "27b5a828-02de-4583-b90b-da8550c917c9",
"_links" : {
"update comment" : {
"href" : "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments/60951d53-bf86-4bce-a9ea-914ee497e913",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://app.matatika.com/api/comments/60951d53-bf86-4bce-a9ea-914ee497e913",
"type" : "DELETE"
},
"self" : {
"href" : "https://app.matatika.com/api/comments/60951d53-bf86-4bce-a9ea-914ee497e913"
},
"add like" : {
"href" : "https://app.matatika.com/api/comments/60951d53-bf86-4bce-a9ea-914ee497e913/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://app.matatika.com/api/comments/60951d53-bf86-4bce-a9ea-914ee497e913",
"type" : "POST"
}
}
}, {
"id" : "72153af4-b59e-42a1-9d4a-5194cb56f034",
"message" : "SIT-generated reply Pesho [2024-09-17T16:53:13.067915] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-09-17T15:53:13.188666",
"lastModified" : "2024-09-17T15:53:13.188666",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "6e8749c0-3fdb-46fb-a401-b5a26b909751",
"parentId" : "27b5a828-02de-4583-b90b-da8550c917c9",
"_links" : {
"update comment" : {
"href" : "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments/72153af4-b59e-42a1-9d4a-5194cb56f034",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://app.matatika.com/api/comments/72153af4-b59e-42a1-9d4a-5194cb56f034",
"type" : "DELETE"
},
"self" : {
"href" : "https://app.matatika.com/api/comments/72153af4-b59e-42a1-9d4a-5194cb56f034"
},
"add like" : {
"href" : "https://app.matatika.com/api/comments/72153af4-b59e-42a1-9d4a-5194cb56f034/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://app.matatika.com/api/comments/72153af4-b59e-42a1-9d4a-5194cb56f034",
"type" : "POST"
}
}
}, {
"id" : "52b07d3f-6e25-435e-8e49-40e0fc39d310",
"message" : "SIT-generated reply Pesho [2024-09-17T16:53:12.772130] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-09-17T15:53:12.859314",
"lastModified" : "2024-09-17T15:53:12.859314",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "6e8749c0-3fdb-46fb-a401-b5a26b909751",
"parentId" : "27b5a828-02de-4583-b90b-da8550c917c9",
"_links" : {
"update comment" : {
"href" : "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments/52b07d3f-6e25-435e-8e49-40e0fc39d310",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://app.matatika.com/api/comments/52b07d3f-6e25-435e-8e49-40e0fc39d310",
"type" : "DELETE"
},
"self" : {
"href" : "https://app.matatika.com/api/comments/52b07d3f-6e25-435e-8e49-40e0fc39d310"
},
"add like" : {
"href" : "https://app.matatika.com/api/comments/52b07d3f-6e25-435e-8e49-40e0fc39d310/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://app.matatika.com/api/comments/52b07d3f-6e25-435e-8e49-40e0fc39d310",
"type" : "POST"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments?parentId=27b5a828-02de-4583-b90b-da8550c917c9&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://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/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://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/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" : "6c0572b6-2297-4bb3-8fb0-3576afb21fc8",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-09-17T15:53:17.255156313",
"lastModified" : "2024-09-17T15:53:17.255156613",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "6e8749c0-3fdb-46fb-a401-b5a26b909751",
"_links" : {
"create comment" : {
"href" : "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments/6c0572b6-2297-4bb3-8fb0-3576afb21fc8",
"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://app.matatika.com/api/comments/27b5a828-02de-4583-b90b-da8550c917c9' -i -X POST \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://app.matatika.com/api/comments/27b5a828-02de-4583-b90b-da8550c917c9"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("POST", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Comment with HAL links.
{
"id" : "05933bb0-1aea-4aeb-a430-a47cb5e6c4dc",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-09-17T15:53:16.427954943",
"lastModified" : "2024-09-17T15:53:16.427955143",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "6e8749c0-3fdb-46fb-a401-b5a26b909751",
"parentId" : "27b5a828-02de-4583-b90b-da8550c917c9",
"_links" : {
"create comment" : {
"href" : "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments/05933bb0-1aea-4aeb-a430-a47cb5e6c4dc",
"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-09-17T16:53:15.952083] to ",
"datasetId" : "6e8749c0-3fdb-46fb-a401-b5a26b909751"
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments/2e7c1bb0-6a37-40aa-92dc-b74592e15af6' -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-09-17T16:53:15.952083] to ",
"datasetId" : "6e8749c0-3fdb-46fb-a401-b5a26b909751"
}'
Python (requests
)
import requests
url = "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments/2e7c1bb0-6a37-40aa-92dc-b74592e15af6"
data = {
"message" : "SIT-generated reply Pesho [2024-09-17T16:53:15.952083] to ",
"datasetId" : "6e8749c0-3fdb-46fb-a401-b5a26b909751"
}
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" : "2e7c1bb0-6a37-40aa-92dc-b74592e15af6",
"message" : "SIT-generated reply Pesho [2024-09-17T16:53:15.952083] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-09-17T15:53:16.24258381",
"lastModified" : "2024-09-17T15:53:16.24258421",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "6e8749c0-3fdb-46fb-a401-b5a26b909751",
"_links" : {
"edit-history" : {
"href" : "https://app.matatika.com/api/comments/2e7c1bb0-6a37-40aa-92dc-b74592e15af6/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments/2e7c1bb0-6a37-40aa-92dc-b74592e15af6",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://app.matatika.com/api/comments/2e7c1bb0-6a37-40aa-92dc-b74592e15af6",
"type" : "DELETE"
},
"self" : {
"href" : "https://app.matatika.com/api/comments/2e7c1bb0-6a37-40aa-92dc-b74592e15af6"
},
"add like" : {
"href" : "https://app.matatika.com/api/comments/2e7c1bb0-6a37-40aa-92dc-b74592e15af6/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://app.matatika.com/api/comments/2e7c1bb0-6a37-40aa-92dc-b74592e15af6",
"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-09-17T16:53:17.327221] to "
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1' -i -X GET \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Comment with HAL links.
{
"id" : "5a0dc55f-423e-4e9f-9e34-e58b60ec46b1",
"message" : "SIT-generated reply Pesho [2024-09-17T16:53:17.653925] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-09-17T15:53:17.78008",
"lastModified" : "2024-09-17T15:53:17.780081",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "6e8749c0-3fdb-46fb-a401-b5a26b909751",
"_links" : {
"edit-history" : {
"href" : "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://app.matatika.com/api/datasets/6e8749c0-3fdb-46fb-a401-b5a26b909751/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1",
"type" : "DELETE"
},
"self" : {
"href" : "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1"
},
"add like" : {
"href" : "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://app.matatika.com/api/comments/5a0dc55f-423e-4e9f-9e34-e58b60ec46b1",
"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://app.matatika.com/api/comments/27b5a828-02de-4583-b90b-da8550c917c9/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://app.matatika.com/api/comments/27b5a828-02de-4583-b90b-da8550c917c9/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://app.matatika.com/api/comments/27b5a828-02de-4583-b90b-da8550c917c9/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://app.matatika.com/api/comments/27b5a828-02de-4583-b90b-da8550c917c9/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://app.matatika.com/api/comments/b6bc416e-141a-4bc0-80fd-13a63a231b51' -i -X DELETE \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://app.matatika.com/api/comments/b6bc416e-141a-4bc0-80fd-13a63a231b51"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("DELETE", url, headers=headers)
print(response.text.encode('utf8'))
Response
204 No Content
No response body provided.