Comments
These endpoints control the basic comment actions (get, create, edit and delete) on guides, steps, wikis, posts, info and stories.
GET /comments
List comments, ordered by commentid.
Query Parameters
- modifiedSince — Optional — integer
-
The earliest modified date for the comments to include in a response. Corresponds to a UNIX timestamp.
- createdSince — Optional — integer
-
The earliest created date for the comments to include in a response. Corresponds to a UNIX timestamp.
- context — Optional — enum
-
Must be one of the following:
guide
,step
,wiki
,info
,post
orstory
.Possible Values:
- guide
- step
- wiki
- info
- post
- story
- langid — Optional — string
-
langid of the comments to include in the response, one of: 'en', 'de', 'it', 'fr'...; Defaults to all.
- order — Optional — enum
-
Return the comments in ascending or descending commentid order. Defaults to 'ASC'.
Possible Values:
- ASC
- DESC
- offset — Optional — integer
-
The number of comments to skip from the beginning. Defaults to 0.
- limit — Optional — integer
-
The maximum number of comments to include in the response. Range: [1, 200]. Defaults to 20.
Response
Status: 200 OK
{ "commentid": 112565, "locale": "en", "context": "guide", "contextid": 23237, "parentid": null, "title": "How to make a paper airplane.", "text_raw": "Make everything as simple as possible, but not simpler.", "text_rendered": "<p>Make everything as simple as possible, but not simpler.<\/p>", "date": 1389999438, "modified_date": 0, "status": "public", "replies": [ { "commentid": 113265, "locale": "en", "context": "guide", "contextid": 23237, "parentid": 112565, "title": "How to make a paper airplane.", "text_raw": "Wise words.", "text_rendered": "<p>Wise words.<\/p>", "date": 1389999438, "modified_date": 0, "status": "public", "author": { "userid": 221432, "username": "Bill Clinton", "join_date": 12399436, "image": { "id": 3952, "guid": "y6kZd1oBioUbbMBj", "mini": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.mini", "thumbnail": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.thumbnail", "standard": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.standard", "medium": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.medium", "large": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.large", "original": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj" }, "teams": [], "reputation": 1 } } ], "author": { "userid": 772531, "username": "Albert Einstein", "join_date": 1389999436, "image": { "id": 3952, "guid": "y6kZd1oBioUbbMBj", "mini": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.mini", "thumbnail": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.thumbnail", "standard": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.standard", "medium": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.medium", "large": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.large", "original": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj" }, "teams": [], "reputation": 1955 } }
GET /comments/{commentid}
Get a comment by commentid.
Route Parameters
- commentid — Required — integer
-
Comment you want to retrieve.
Response
Status: 200 OK
{ "commentid": 112565, "locale": "en", "context": "guide", "contextid": 23237, "parentid": null, "title": "How to make a paper airplane.", "text_raw": "Make everything as simple as possible, but not simpler.", "text_rendered": "<p>Make everything as simple as possible, but not simpler.<\/p>", "date": 1389999438, "modified_date": 0, "status": "public", "replies": [ { "commentid": 113265, "locale": "en", "context": "guide", "contextid": 23237, "parentid": 112565, "title": "How to make a paper airplane.", "text_raw": "Wise words.", "text_rendered": "<p>Wise words.<\/p>", "date": 1389999438, "modified_date": 0, "status": "public", "author": { "userid": 221432, "username": "Bill Clinton", "join_date": 12399436, "image": { "id": 3952, "guid": "y6kZd1oBioUbbMBj", "mini": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.mini", "thumbnail": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.thumbnail", "standard": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.standard", "medium": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.medium", "large": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.large", "original": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj" }, "teams": [], "reputation": 1 } } ], "author": { "userid": 772531, "username": "Albert Einstein", "join_date": 1389999436, "image": { "id": 3952, "guid": "y6kZd1oBioUbbMBj", "mini": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.mini", "thumbnail": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.thumbnail", "standard": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.standard", "medium": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.medium", "large": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.large", "original": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj" }, "teams": [], "reputation": 1955 } }
POST /comments/{context}/{contextid}
Adds a new comment to the provided context.
Route Parameters
- context — Required — string
-
Must be one of the following:
guide
,step
,wiki
,info
,post
orstory
. - contextid — Required — string
-
The
guideid
orstepid
, depending on the context, where the comment will be added.
Request Body
- text — Required — string
-
Body of the comment. For sites with public registration, the
text
length must be at least 12 characters and no more than 1024 characters. - parentid — Optional — integer
-
If the comment is a reply, this is the commentid of the parent comment.
- langid — Optional — string
-
The
langid
you'd like to use for a given context.
Response
Status: 201 Created
{ "commentid": 112565, "locale": "en", "context": "guide", "contextid": 23237, "parentid": null, "title": "How to make a paper airplane.", "text_raw": "Make everything as simple as possible, but not simpler.", "text_rendered": "<p>Make everything as simple as possible, but not simpler.<\/p>", "date": 1389999438, "modified_date": 0, "status": "public", "replies": [ { "commentid": 113265, "locale": "en", "context": "guide", "contextid": 23237, "parentid": 112565, "title": "How to make a paper airplane.", "text_raw": "Wise words.", "text_rendered": "<p>Wise words.<\/p>", "date": 1389999438, "modified_date": 0, "status": "public", "author": { "userid": 221432, "username": "Bill Clinton", "join_date": 12399436, "image": { "id": 3952, "guid": "y6kZd1oBioUbbMBj", "mini": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.mini", "thumbnail": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.thumbnail", "standard": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.standard", "medium": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.medium", "large": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.large", "original": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj" }, "teams": [], "reputation": 1 } } ], "author": { "userid": 772531, "username": "Albert Einstein", "join_date": 1389999436, "image": { "id": 3952, "guid": "y6kZd1oBioUbbMBj", "mini": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.mini", "thumbnail": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.thumbnail", "standard": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.standard", "medium": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.medium", "large": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.large", "original": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj" }, "teams": [], "reputation": 1955 } }
PATCH /comments/{commentid}
Edit an existing comment. The authenticated user must be the owner of the comment to make an edit. The edit must be made within 5 minutes of the date
time.
Route Parameters
- commentid — Required — integer
-
Commentid of the comment to edit.
Request Body
- text — Required — string
-
Text for the updated comment. For sites with public registration, the
text
length must be at least 12 characters and no more than 1024 characters.
Response
Status: 200 OK
{ "commentid": 112565, "locale": "en", "context": "guide", "contextid": 23237, "parentid": null, "title": "How to make a paper airplane.", "text_raw": "Make everything as simple as possible, but not simpler.", "text_rendered": "<p>Make everything as simple as possible, but not simpler.<\/p>", "date": 1389999438, "modified_date": 0, "status": "public", "replies": [ { "commentid": 113265, "locale": "en", "context": "guide", "contextid": 23237, "parentid": 112565, "title": "How to make a paper airplane.", "text_raw": "Wise words.", "text_rendered": "<p>Wise words.<\/p>", "date": 1389999438, "modified_date": 0, "status": "public", "author": { "userid": 221432, "username": "Bill Clinton", "join_date": 12399436, "image": { "id": 3952, "guid": "y6kZd1oBioUbbMBj", "mini": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.mini", "thumbnail": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.thumbnail", "standard": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.standard", "medium": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.medium", "large": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.large", "original": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj" }, "teams": [], "reputation": 1 } } ], "author": { "userid": 772531, "username": "Albert Einstein", "join_date": 1389999436, "image": { "id": 3952, "guid": "y6kZd1oBioUbbMBj", "mini": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.mini", "thumbnail": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.thumbnail", "standard": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.standard", "medium": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.medium", "large": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj.large", "original": "https:\/\/www.ifixit.com\/igi\/y6kZd1oBioUbbMBj" }, "teams": [], "reputation": 1955 } }
DELETE /comments/{commentid}
Delete a comment. The authenticated user must be the owner of the comment to delete.
Route Parameters
- commentid — Required — integer
-
Commentid of the comment you want to delete.
Response
Status: 204 No Content