API Reference

Question Comments

Comments on FAQ questions.

Prefix /cdna-api/faq ReferenceQuestionComment model
Question Comments in Postman

List comments on a question#

GET /cdna-api/faq/question-comments/{question.id}

Lists comments on a question. Without limit every match comes back.

Access
Admin users and integrations, with an OAuth access token or an API key.
Model
QuestionComment, in the Reference

Parameters

question.idpathrequired
integer
The question id.
propertiesquery
selector
The fields and relations to return, such as {id,text,published}.
filtersquery
name=value
Any stored field, or a relation with a dot, such as parent.id=12. Prefix the name with !, >, <, % or |. Use stored field names exactly as in the model, and compare totalCount with the unfiltered list's to confirm a filter applied.
orderByquery
string
field:ASC or field:DESC, comma-separated. Stored fields only.
limitquery
integer
Records per response. There is no default.
offsetquery
integer
Records to skip.

Example

List comments on a question
GET /cdna-api/faq/question-comments/2 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Response 200 OK
{
  "result": "success",
  "data": {
    "question": {
      "id": 2,
      "question": "Where is an Item entity?",
      "created": "2020-11-11T12:16:02+01:00",
      "modified": "2020-11-25T17:48:52+01:00",
      "owner": {
        "id": 96,
        "name": "Alex Example"
      }
    },
    "questionComments": [
      {
        "id": 2,
        "text": "<p>first comment updated</p>",
        "created": "2021-01-08T10:19:12+01:00",
        "modified": "2021-01-08T16:41:11+01:00"
      },
      {
        "id": 5,
        "text": "<p>A comment</p>",
        "created": "2021-01-08T15:05:53+01:00",
        "modified": "2021-01-08T16:41:11+01:00"
      }
    ]
  }
}
Open in Postman docs Saved response from the Postman collection

Create a comment#

POST /cdna-api/faq/question-comment/{question.id}

Creates a comment.

Access
Admin users and integrations, with an OAuth access token or an API key.

Parameters

question.idpathrequired
integer
The question id.
textbody
string
The body, as HTML.

Example

Create a comment
POST /cdna-api/faq/question-comment/4 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json

{
  "text": "Added test comment from API 688"
}
Response 200 OK
{
  "result": "success",
  "data": {
    "questionComment": {
      "id": 10,
      "text": "Added test comment from API 287",
      "created": "2021-01-11T12:52:56+01:00",
      "modified": "2021-01-11T12:52:56+01:00",
      "published": "2021-01-11T12:52:56+01:00",
      "question": 4,
      "person": null
    }
  },
  "message": "The entities.faq.question_comment has been added successfully."
}
Open in Postman docs Saved response from the Postman collection

Show a comment#

GET /cdna-api/faq/question-comment/{id}

Reads one comment by its id.

Access
Admin users and integrations, with an OAuth access token or an API key.
Model
QuestionComment, in the Reference

Parameters

idpathrequired
integer
The comment id.
propertiesquery
selector
The fields and relations to return, such as {id,text,published}.

Example

Show a comment
GET /cdna-api/faq/question-comment/2 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Response 200 OK
{
  "result": "success",
  "data": {
    "questionComment": {
      "id": 2,
      "text": "<p>first comment updated</p>",
      "created": "2021-01-08T10:19:12+01:00",
      "modified": "2021-01-08T16:41:11+01:00",
      "person": null,
      "question": {
        "name": "Where is an Item entity?"
      }
    }
  }
}
Open in Postman docs Saved response from the Postman collection

Edit a comment#

PUT /cdna-api/faq/question-comment/{id}

Changes a comment. Fields left out keep their values.

Access
Admin users and integrations, with an OAuth access token or an API key.

Parameters

idpathrequired
integer
The comment id.
textbody
string
The body, as HTML.

Example

Edit a comment
PUT /cdna-api/faq/question-comment/2 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json

{
  "text": "Changed comment from API 793"
}
Response 200 OK
{
  "result": "success",
  "data": {
    "questionComment": {
      "id": 2,
      "text": "Changed comment from API 333",
      "created": "2021-01-08T10:19:12+01:00",
      "modified": "2021-01-11T12:23:01+01:00",
      "published": false,
      "question": 2,
      "person": null
    }
  },
  "message": "The entities.faq.question_comment has been saved successfully."
}
Open in Postman docs Saved response from the Postman collection

Delete a comment#

DELETE /cdna-api/faq/question-comment/{id}

Deletes a comment.

Access
Admin users and integrations, with an OAuth access token or an API key.

Parameters

idpathrequired
integer
The comment id.

Example

Delete a comment
DELETE /cdna-api/faq/question-comment/7 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Response 200 OK
{
  "result": "success",
  "data": {
    "questionComment": {
      "id": 7,
      "text": "<p>A comment</p>",
      "created": "2021-01-08T16:43:41+01:00",
      "modified": "2021-01-08T16:43:41+01:00",
      "published": "2021-01-08T16:43:35+01:00",
      "question": 4,
      "person": null
    }
  },
  "message": "The entities.faq.question_comment has been successfully deleted."
}
Open in Postman docs Saved response from the Postman collection