Comment item¶
Read/write
This resource type refers to a user’s feed comment.
-
GET
/api/v1/comments/
(int: comment_id)/
¶ Synopsis: Gets a feed comment. Example request:
GET /api/v1/comments/1/ HTTP/1.1 Host: localhost:8000 Accept: application/vnd.collection+json
Example response:
HTTP/1.1 200 OK Allow: GET, PUT, DELETE Content-Type: application/vnd.collection+json { "collection": { "href": "https://localhost:8000/api/v1/comments/1/", "items": [ { "data": [ { "name": "title", "value": "Looks good" }, { "name": "owner", "value": "jbernal" }, { "name": "content", "value": "The data looks really good!" } ], "href": "https://localhost:8000/api/v1/comments/1/", "links": [ { "href": "https://localhost:8000/api/v1/35/", "rel": "feed" } ] } ], "links": [], "template": { "data": [ { "name": "content", "value": "" }, { "name": "title", "value": "" } ] }, "version": "1.0" } }
Request Headers: - Accept – application/vnd.collection+json
Response Headers: - Content-Type – application/vnd.collection+json
Status Codes: - 200 OK – no error
- 401 Unauthorized – authentication credentials were not provided
- 404 Not Found – not found
Properties (API semantic descriptors):
- owner (string) – the comment’s owner’s username. Read-only
- title (string) – comment’s title. Can be part of the template object in PUT and POST requests
- content (string) – comment’s content. Can be part of the template object in PUT and POST requests
- feed – links to the corresponding feed