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" : "ea0993dc-d0eb-4708-afc0-342e5cb364d5",
"message" : "SIT-generated reply Pesho [2024-04-10T15:05:24.750561] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-04-10T14:05:24.84037",
"lastModified" : "2024-04-10T14:05:24.84037",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "0e6e1e5b-bc3c-44a2-a2ab-c463b2182341",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments/ea0993dc-d0eb-4708-afc0-342e5cb364d5",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/ea0993dc-d0eb-4708-afc0-342e5cb364d5",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/ea0993dc-d0eb-4708-afc0-342e5cb364d5"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/ea0993dc-d0eb-4708-afc0-342e5cb364d5/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/ea0993dc-d0eb-4708-afc0-342e5cb364d5",
"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/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/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/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/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" : "9a076df1-62d8-472a-8a0f-7ff57ed60241",
"message" : "SIT-generated reply Pesho [2024-04-10T15:05:21.737452] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-04-10T14:05:21.990997",
"lastModified" : "2024-04-10T14:05:21.990997",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "0e6e1e5b-bc3c-44a2-a2ab-c463b2182341",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments/9a076df1-62d8-472a-8a0f-7ff57ed60241",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/9a076df1-62d8-472a-8a0f-7ff57ed60241",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/9a076df1-62d8-472a-8a0f-7ff57ed60241"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/9a076df1-62d8-472a-8a0f-7ff57ed60241/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/9a076df1-62d8-472a-8a0f-7ff57ed60241",
"type" : "POST"
}
}
}, {
"id" : "c5912a28-5b3c-4ab0-80a0-ebc82f4cf695",
"message" : "SIT-generated reply Pesho [2024-04-10T15:05:21.446836] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-04-10T14:05:21.544881",
"lastModified" : "2024-04-10T14:05:21.544881",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "0e6e1e5b-bc3c-44a2-a2ab-c463b2182341",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments/c5912a28-5b3c-4ab0-80a0-ebc82f4cf695",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/c5912a28-5b3c-4ab0-80a0-ebc82f4cf695",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/c5912a28-5b3c-4ab0-80a0-ebc82f4cf695"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/c5912a28-5b3c-4ab0-80a0-ebc82f4cf695/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/c5912a28-5b3c-4ab0-80a0-ebc82f4cf695",
"type" : "POST"
}
}
}, {
"id" : "29611c97-04f5-429d-9984-0e121c9bb30e",
"message" : "SIT-generated reply Pesho [2024-04-10T15:05:21.155171] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-04-10T14:05:21.243848",
"lastModified" : "2024-04-10T14:05:21.243848",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "0e6e1e5b-bc3c-44a2-a2ab-c463b2182341",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments/29611c97-04f5-429d-9984-0e121c9bb30e",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/29611c97-04f5-429d-9984-0e121c9bb30e",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/29611c97-04f5-429d-9984-0e121c9bb30e"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/29611c97-04f5-429d-9984-0e121c9bb30e/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/29611c97-04f5-429d-9984-0e121c9bb30e",
"type" : "POST"
}
}
}, {
"id" : "14274c85-a1bc-4f4a-a815-81c5edc617d9",
"message" : "SIT-generated reply Pesho [2024-04-10T15:05:18.081827] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-04-10T14:05:18.183527",
"lastModified" : "2024-04-10T14:05:18.183528",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 3,
"datasetId" : "0e6e1e5b-bc3c-44a2-a2ab-c463b2182341",
"_links" : {
"comments" : {
"href" : "https://catalog.matatika.com/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments?parentId=14274c85-a1bc-4f4a-a815-81c5edc617d9",
"type" : "GET"
},
"edit-history" : {
"href" : "https://catalog.matatika.com/api/comments/14274c85-a1bc-4f4a-a815-81c5edc617d9/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments/14274c85-a1bc-4f4a-a815-81c5edc617d9",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/14274c85-a1bc-4f4a-a815-81c5edc617d9",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/14274c85-a1bc-4f4a-a815-81c5edc617d9"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/14274c85-a1bc-4f4a-a815-81c5edc617d9/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/14274c85-a1bc-4f4a-a815-81c5edc617d9",
"type" : "POST"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/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/ea0993dc-d0eb-4708-afc0-342e5cb364d5' -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/ea0993dc-d0eb-4708-afc0-342e5cb364d5"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Comment with HAL links.
{
"id" : "ea0993dc-d0eb-4708-afc0-342e5cb364d5",
"message" : "SIT-generated reply Pesho [2024-04-10T15:05:24.750561] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-04-10T14:05:24.84037",
"lastModified" : "2024-04-10T14:05:24.84037",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "0e6e1e5b-bc3c-44a2-a2ab-c463b2182341",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments/ea0993dc-d0eb-4708-afc0-342e5cb364d5",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/ea0993dc-d0eb-4708-afc0-342e5cb364d5",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/ea0993dc-d0eb-4708-afc0-342e5cb364d5"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/ea0993dc-d0eb-4708-afc0-342e5cb364d5/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/ea0993dc-d0eb-4708-afc0-342e5cb364d5",
"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/ea0993dc-d0eb-4708-afc0-342e5cb364d5/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/ea0993dc-d0eb-4708-afc0-342e5cb364d5/history"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
[ {
"lastModified" : "2024-04-10T14:05:24.843",
"message" : "SIT-generated reply Pesho [2024-04-10T15:05:24.750561] to ",
"editVersion" : "136123"
}, {
"lastModified" : "2024-04-10T14:05:25.174",
"message" : "SIT-generated reply Pesho [2024-04-10T15:05:25.085597] to ",
"editVersion" : "136124"
} ]
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/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments?parentId=14274c85-a1bc-4f4a-a815-81c5edc617d9' -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/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments?parentId=14274c85-a1bc-4f4a-a815-81c5edc617d9"
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" : "8e9320eb-4b8d-404a-bc47-8c50672ecd20",
"message" : "SIT-generated reply Pesho [2024-04-10T15:05:19.680868] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-04-10T14:05:19.775592",
"lastModified" : "2024-04-10T14:05:19.775592",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "0e6e1e5b-bc3c-44a2-a2ab-c463b2182341",
"parentId" : "14274c85-a1bc-4f4a-a815-81c5edc617d9",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments/8e9320eb-4b8d-404a-bc47-8c50672ecd20",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/8e9320eb-4b8d-404a-bc47-8c50672ecd20",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/8e9320eb-4b8d-404a-bc47-8c50672ecd20"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/8e9320eb-4b8d-404a-bc47-8c50672ecd20/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/8e9320eb-4b8d-404a-bc47-8c50672ecd20",
"type" : "POST"
}
}
}, {
"id" : "050b054c-f278-4f7b-94d6-a09a2e2af54d",
"message" : "SIT-generated reply Pesho [2024-04-10T15:05:19.392549] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-04-10T14:05:19.479191",
"lastModified" : "2024-04-10T14:05:19.479192",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "0e6e1e5b-bc3c-44a2-a2ab-c463b2182341",
"parentId" : "14274c85-a1bc-4f4a-a815-81c5edc617d9",
"_links" : {
"edit-history" : {
"href" : "https://catalog.matatika.com/api/comments/050b054c-f278-4f7b-94d6-a09a2e2af54d/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments/050b054c-f278-4f7b-94d6-a09a2e2af54d",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/050b054c-f278-4f7b-94d6-a09a2e2af54d",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/050b054c-f278-4f7b-94d6-a09a2e2af54d"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/050b054c-f278-4f7b-94d6-a09a2e2af54d/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/050b054c-f278-4f7b-94d6-a09a2e2af54d",
"type" : "POST"
}
}
}, {
"id" : "401b230d-c3cd-41b7-abb8-1667b4cdd893",
"message" : "SIT-generated reply Pesho [2024-04-10T15:05:19.065441] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-04-10T14:05:19.18304",
"lastModified" : "2024-04-10T14:05:19.18304",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "0e6e1e5b-bc3c-44a2-a2ab-c463b2182341",
"parentId" : "14274c85-a1bc-4f4a-a815-81c5edc617d9",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments/401b230d-c3cd-41b7-abb8-1667b4cdd893",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/401b230d-c3cd-41b7-abb8-1667b4cdd893",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/401b230d-c3cd-41b7-abb8-1667b4cdd893"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/401b230d-c3cd-41b7-abb8-1667b4cdd893/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/401b230d-c3cd-41b7-abb8-1667b4cdd893",
"type" : "POST"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments?parentId=14274c85-a1bc-4f4a-a815-81c5edc617d9&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/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/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/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/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" : "6d8c6030-597c-4a76-bc89-6e03da841c5f",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-04-10T14:05:24.164579682",
"lastModified" : "2024-04-10T14:05:24.164579782",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "0e6e1e5b-bc3c-44a2-a2ab-c463b2182341",
"_links" : {
"create comment" : {
"href" : "https://catalog.matatika.com/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments/6d8c6030-597c-4a76-bc89-6e03da841c5f",
"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/14274c85-a1bc-4f4a-a815-81c5edc617d9' -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/14274c85-a1bc-4f4a-a815-81c5edc617d9"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("POST", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Comment with HAL links.
{
"id" : "aaf3c96a-1784-4a7f-9889-9948745bd068",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-04-10T14:05:23.004371993",
"lastModified" : "2024-04-10T14:05:23.004372193",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "0e6e1e5b-bc3c-44a2-a2ab-c463b2182341",
"parentId" : "14274c85-a1bc-4f4a-a815-81c5edc617d9",
"_links" : {
"create comment" : {
"href" : "https://catalog.matatika.com/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments/aaf3c96a-1784-4a7f-9889-9948745bd068",
"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-04-10T15:05:22.235402] to ",
"datasetId" : "0e6e1e5b-bc3c-44a2-a2ab-c463b2182341"
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments/c811aa8f-dd82-418e-a345-f34a82f27de2' -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-04-10T15:05:22.235402] to ",
"datasetId" : "0e6e1e5b-bc3c-44a2-a2ab-c463b2182341"
}'
Python (requests
)
import requests
url = "https://catalog.matatika.com:443/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments/c811aa8f-dd82-418e-a345-f34a82f27de2"
data = {
"message" : "SIT-generated reply Pesho [2024-04-10T15:05:22.235402] to ",
"datasetId" : "0e6e1e5b-bc3c-44a2-a2ab-c463b2182341"
}
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" : "c811aa8f-dd82-418e-a345-f34a82f27de2",
"message" : "SIT-generated reply Pesho [2024-04-10T15:05:22.235402] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-04-10T14:05:22.817860533",
"lastModified" : "2024-04-10T14:05:22.817860633",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "0e6e1e5b-bc3c-44a2-a2ab-c463b2182341",
"_links" : {
"edit-history" : {
"href" : "https://catalog.matatika.com/api/comments/c811aa8f-dd82-418e-a345-f34a82f27de2/history",
"type" : "GET"
},
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments/c811aa8f-dd82-418e-a345-f34a82f27de2",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/c811aa8f-dd82-418e-a345-f34a82f27de2",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/c811aa8f-dd82-418e-a345-f34a82f27de2"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/c811aa8f-dd82-418e-a345-f34a82f27de2/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/c811aa8f-dd82-418e-a345-f34a82f27de2",
"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-04-10T15:05:24.230989] to "
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/comments/ea0993dc-d0eb-4708-afc0-342e5cb364d5' -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/ea0993dc-d0eb-4708-afc0-342e5cb364d5"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Comment with HAL links.
{
"id" : "ea0993dc-d0eb-4708-afc0-342e5cb364d5",
"message" : "SIT-generated reply Pesho [2024-04-10T15:05:24.750561] to ",
"likeCount" : 0,
"likedByProfiles" : [ ],
"created" : "2024-04-10T14:05:24.84037",
"lastModified" : "2024-04-10T14:05:24.84037",
"from" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod"
},
"commentCount" : 0,
"datasetId" : "0e6e1e5b-bc3c-44a2-a2ab-c463b2182341",
"_links" : {
"update comment" : {
"href" : "https://catalog.matatika.com/api/datasets/0e6e1e5b-bc3c-44a2-a2ab-c463b2182341/comments/ea0993dc-d0eb-4708-afc0-342e5cb364d5",
"type" : "PUT"
},
"delete comment" : {
"href" : "https://catalog.matatika.com/api/comments/ea0993dc-d0eb-4708-afc0-342e5cb364d5",
"type" : "DELETE"
},
"self" : {
"href" : "https://catalog.matatika.com/api/comments/ea0993dc-d0eb-4708-afc0-342e5cb364d5"
},
"add like" : {
"href" : "https://catalog.matatika.com/api/comments/ea0993dc-d0eb-4708-afc0-342e5cb364d5/like",
"type" : "PUT"
},
"new reply" : {
"href" : "https://catalog.matatika.com/api/comments/ea0993dc-d0eb-4708-afc0-342e5cb364d5",
"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/14274c85-a1bc-4f4a-a815-81c5edc617d9/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/14274c85-a1bc-4f4a-a815-81c5edc617d9/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/14274c85-a1bc-4f4a-a815-81c5edc617d9/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/14274c85-a1bc-4f4a-a815-81c5edc617d9/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/72c1c34e-39ae-4842-8d41-8c7598821790' -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/72c1c34e-39ae-4842-8d41-8c7598821790"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("DELETE", url, headers=headers)
print(response.text.encode('utf8'))
Response
204 No Content
No response body provided.