API Reference

Pages

FAQ pages, which form a tree and keep their content in revisions.

Pages in Postman

List FAQ pages#

GET /cdna-api/faq/pages

Lists FAQ pages. Without limit every match comes back.

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 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.
retrieveUnpublishedquery
1
Include unpublished records.

Example

List FAQ pages
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
Response 200 OK
{
  "result": "success",
  "totalCount": 10,
  "data": [
    {
      "id": 1,
      "name": "Troubleshooting",
      "slug": "troubleshooting",
      "parent": null
    },
    {
      "id": 8,
      "name": "Commerce",
      "slug": "commerce",
      "parent": {
        "id": 1
      }
    }
  ]
}
Open in Postman docs Real response from this documentation site

List root FAQ pages#

GET /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 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.
retrieveUnpublishedquery
1
Include unpublished records.

Example

List root FAQ pages
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
Response 200 OK
{
  "result": "success",
  "totalCount": 1,
  "data": [
    {
      "id": 1,
      "name": "Troubleshooting",
      "slug": "troubleshooting",
      "parent": null
    }
  ]
}
Open in Postman docs Real response from this documentation site

List the children of an FAQ page#

GET /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 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.
retrieveUnpublishedquery
1
Include unpublished records.

Example

List the children of an FAQ page
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
Response 200 OK
{
  "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
      }
    }
  ]
}
Open in Postman docs Real response from this documentation site

Show an FAQ page#

GET /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

Show an FAQ page
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
Response 200 OK
{
  "result": "success",
  "data": {
    "id": 1,
    "name": "Troubleshooting",
    "slug": "troubleshooting",
    "parent": null
  }
}
Open in Postman docs Real response from this documentation site

Show an FAQ page by its URL#

GET /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

Show an FAQ page by its URL
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
Response 200 OK
{
  "result": "success",
  "data": {
    "id": 1,
    "name": "Troubleshooting",
    "slug": "troubleshooting",
    "parent": null
  }
}
Open in Postman docs Real response from this documentation site

Create an FAQ page#

POST /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, layout and areas, or text for a record with a body. Areas left out are empty.

Example

Create an FAQ page
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"
    }
  }
}
Response 200 OK
{
  "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."
}
Open in Postman docs Saved response from the Postman collection, shortened

Edit an FAQ page#

PUT /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, layout and areas, or text for 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

Edit an FAQ page
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"
    }
  }
}
Response 200 OK
{
  "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."
}
Open in Postman docs Saved response from the Postman collection, shortened

Make an earlier revision live#

PUT /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

Make an earlier revision live
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
}
Response 200 OK
{
  "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."
}
Open in Postman docs Saved response from the Postman collection, shortened

Delete an FAQ page#

DELETE /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 an FAQ page
DELETE /cdna-api/faq/page/7 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Response 200 OK
{
  "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."
}
Open in Postman docs Saved response from the Postman collection, shortened

Duplicate an FAQ page#

POST /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

Duplicate an FAQ page
POST /cdna-api/faq/duplicate-page/1 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Response 200 OK
{
  "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."
}
Open in Postman docs Saved response from the Postman collection, shortened

Check that a FAQ page slug is free#

POST /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

Check that a FAQ page slug is free
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
}
Response 200 OKFree
{
  "result": "success"
}
Real response from this documentation site