Lists FAQ pages. Without limit every match comes back.
Pages
FAQ pages, which form a tree and keep their content in revisions.
List FAQ pages#
/cdna-api/faq/pages
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Model
- Page, in the Reference
Parameters
propertiesquery- selector
- The fields and relations to return, such as
{id,name,slug,parent{id}}. 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 comparetotalCountwith the unfiltered list's to confirm a filter applied. orderByquery- string
field:ASCorfield:DESC, comma-separated. Stored fields only.limitquery- integer
- Records per response. There is no default.
offsetquery- integer
- Records to skip.
retrieveUnpublishedquery- 1
- Include unpublished records.
Example
GET /cdna-api/faq/pages?limit=2&properties={id,name,slug,parent{id}} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json{
"result": "success",
"totalCount": 10,
"data": [
{
"id": 1,
"name": "Troubleshooting",
"slug": "troubleshooting",
"parent": null
},
{
"id": 8,
"name": "Commerce",
"slug": "commerce",
"parent": {
"id": 1
}
}
]
}List root FAQ pages#
/cdna-api/faq/pages
Lists the FAQ pages at the top of the tree, with parent=NULL.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Model
- Page, in the Reference
Parameters
propertiesquery- selector
- The fields and relations to return, such as
{id,name,slug,parent{id}}. 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 comparetotalCountwith the unfiltered list's to confirm a filter applied. orderByquery- string
field:ASCorfield:DESC, comma-separated. Stored fields only.limitquery- integer
- Records per response. There is no default.
offsetquery- integer
- Records to skip.
retrieveUnpublishedquery- 1
- Include unpublished records.
Example
GET /cdna-api/faq/pages?parent=NULL&limit=2&properties={id,name,slug,parent{id}} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json{
"result": "success",
"totalCount": 1,
"data": [
{
"id": 1,
"name": "Troubleshooting",
"slug": "troubleshooting",
"parent": null
}
]
}List the children of an FAQ page#
/cdna-api/faq/pages
Lists the FAQ pages under one page, with parent.id.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Model
- Page, in the Reference
Parameters
propertiesquery- selector
- The fields and relations to return, such as
{id,name,slug,parent{id}}. 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 comparetotalCountwith the unfiltered list's to confirm a filter applied. orderByquery- string
field:ASCorfield:DESC, comma-separated. Stored fields only.limitquery- integer
- Records per response. There is no default.
offsetquery- integer
- Records to skip.
retrieveUnpublishedquery- 1
- Include unpublished records.
Example
GET /cdna-api/faq/pages?parent.id=1&limit=2&properties={id,name,slug,parent{id}} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json{
"result": "success",
"totalCount": 9,
"data": [
{
"id": 2,
"name": "It is not showing up",
"slug": "not-showing-up",
"parent": {
"id": 1
}
},
{
"id": 3,
"name": "Errors and blank pages",
"slug": "errors-and-blank-pages",
"parent": {
"id": 1
}
}
]
}Show an FAQ page#
/cdna-api/faq/page/{id}
Reads one FAQ page by its id.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Model
- Page, in the Reference
Parameters
idpathrequired- integer
- The FAQ page id.
propertiesquery- selector
- The fields and relations to return, such as
{id,name,slug,parent{id}}.
Example
GET /cdna-api/faq/page/1?properties={id,name,slug,parent{id}} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json{
"result": "success",
"data": {
"id": 1,
"name": "Troubleshooting",
"slug": "troubleshooting",
"parent": null
}
}Show an FAQ page by its URL#
/cdna-api/faq/page/{fullSlug}
Finds an FAQ page by its path, the way the public site does: a custom URL first, then the slugs.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Model
- Page, in the Reference
Parameters
fullSlugpathrequired- string
- The FAQ page’s path, its slugs joined with slashes.
propertiesquery- selector
- The fields and relations to return, such as
{id,name,slug,parent{id}}.
Example
GET /cdna-api/faq/page/troubleshooting?properties={id,name,slug,parent{id}} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json{
"result": "success",
"data": {
"id": 1,
"name": "Troubleshooting",
"slug": "troubleshooting",
"parent": null
}
}Create an FAQ page#
/cdna-api/faq/page
Creates an FAQ page.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
languagebody- number
- The language, by id.
revisionsbody- object
- A new revision:
name,layoutandareas, ortextfor a record with a body. Areas left out are empty.
Example
POST /cdna-api/faq/page HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"language": 47,
"revisions": {
"name": "Test Page from API 95",
"layout": 20,
"areas": {
"content": "Main page text 34"
}
}
}{
"result": "success",
"data": {
"page": {
"name": "Test Page from API 655",
"originalPath": "/faq/page/test-page-from-api-655",
"fullSlug": "test-page-from-api-655",
"fullPath": "/faq/page/test-page-from-api-655",
"id": 6,
"slug": "test-page-from-api-655",
"created": "2020-11-17T14:49:04+02:00",
"modified": "2020-11-17T14:49:04+02:00",
"published": false,
"customUrl": null
}
},
"message": "The Page has been added successfully."
}Edit an FAQ page#
/cdna-api/faq/page/{id}
Changes an FAQ page. Fields left out keep their values.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
idpathrequired- integer
- The FAQ page id.
revisionsbody- object
- A new revision:
name,layoutandareas, ortextfor a record with a body. Areas left out are empty.
A revisions object makes a new revision that is not live unless the request also sends "activeRevision": true, and it holds only the areas sent. To change some areas and keep the rest, use patchRevision with originRevision.
Example
PUT /cdna-api/faq/page/6 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"revisions": {
"name": "Changed test Page from API 935",
"layout": 20,
"areas": {
"content": "Changed main page text 283"
}
}
}{
"result": "success",
"data": {
"page": {
"name": "Test Page from API 655",
"originalPath": "/faq/page/test-page-from-api-655",
"fullSlug": "test-page-from-api-655",
"fullPath": "/faq/page/test-page-from-api-655",
"id": 6,
"slug": "test-page-from-api-655",
"created": "2020-11-17T14:49:04+02:00",
"modified": "2020-11-17T14:49:04+02:00",
"published": false,
"customUrl": null
}
},
"message": "The Page has been saved successfully."
}Make an earlier revision live#
/cdna-api/faq/page/{id}
Rolls the record back, or forward, to a revision it already has. No new revision is made, and published does not change.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
idpathrequired- integer
- The FAQ page id.
activeRevisionbodyrequired- id
- A revision of this page.
Example
PUT /cdna-api/faq/page/6 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"activeRevision": 16
}{
"result": "success",
"data": {
"page": {
"name": "Changed test Page from API 944",
"originalPath": "/faq/page/test-page-from-api-655",
"fullSlug": "test-page-from-api-655",
"fullPath": "/faq/page/test-page-from-api-655",
"id": 6,
"slug": "test-page-from-api-655",
"created": "2020-11-17T14:49:04+02:00",
"modified": "2020-11-17T14:52:47+02:00",
"published": false,
"customUrl": null
}
},
"message": "The Page has been saved successfully."
}Delete an FAQ page#
/cdna-api/faq/page/{id}
Deletes an FAQ page.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
idpathrequired- integer
- The FAQ page id.
Example
DELETE /cdna-api/faq/page/7 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json{
"result": "success",
"data": {
"page": {
"name": "Test Page from API 182",
"originalPath": "/faq/page/test-page-from-api-182",
"fullSlug": "test-page-from-api-182",
"fullPath": "/faq/page/test-page-from-api-182",
"id": 7,
"slug": "test-page-from-api-182",
"created": "2020-11-17T14:53:25+02:00",
"modified": "2020-11-17T14:53:25+02:00",
"published": false,
"customUrl": null
}
},
"message": "The Page has been successfully deleted."
}Duplicate an FAQ page#
/cdna-api/faq/duplicate-page/{id}
Copies an FAQ page next to the original. The copy is unpublished.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
idpathrequired- integer
- The FAQ page id.
Example
POST /cdna-api/faq/duplicate-page/1 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json{
"result": "success",
"data": {
"page": {
"name": "Copy of Page",
"originalPath": "/faq/page/page-copy-1",
"fullSlug": "page-copy-1",
"fullPath": "/faq/page/page-copy-1",
"id": 20,
"slug": "page-copy-1",
"created": "2021-06-10T11:30:20+00:00",
"modified": "2021-07-07T07:41:53+00:00",
"published": false,
"customUrl": null
}
},
"message": "The Page has been successfully duplicated."
}Check that a FAQ page slug is free#
/cdna-api/faq/pages/check-slug
Answers {"result":"success"} when no FAQ page uses the slug. A slug in use, or one with characters a slug cannot have, answers HTTP 200 too, with "result": "error" and a message. Slugs are unique per parent, so parent is required.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
slugbodyrequired- string
- The slug to check.
idbody- integer
- A record to leave out of the check, when renaming it.
parentbodyrequired- integer
- The parent the slug must be unique under.
sitebody- integer
- The site to check in.
Example
POST /cdna-api/faq/pages/check-slug HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"slug": "troubleshooting",
"parent": 1
}{
"result": "success"
}