Skip to main content
NICE CXone Expert

Scheduled CxOne Expert Maintenance - Oct 26th 11:59 pm PT - Learn More

Expert Success Center

Page

Page resources are the most common resource in the Expert API.

Page Types

Existing Page

Existing pages, including unpublished pages with content under preparation as drafts and deleted pages that have not yet been purged from the archive, are pages that are found in the page hierarchy. Pages include all Guided Content Framework page types such as Categories, Guides, Topics, and References.

<page id="{id}"
      guid="{guid}"
      draft.state="{draft.state}"
      href="https://{hostname}/@api/deki/pages/{id}?redirects=0"
      deleted="{deleted}"
      revision="{revision">
    <uri.ui>https://{hostname}/{path}</uri.ui>
    <title>{title}</title>   
    <path seo="{seo}" type="{path/@type}">{path}</path>
    <namespace>{namespace}</namespace>
    <date.created>{date.created}</date.created>
    <language>{language}</language>
</page> 

Virtual Page

Virtual pages are placeholder locations in the page hierarchy where a page has not yet been created.

<page id="0"
      guid="00000000000000000000000000000000"
      virtual="true"
      draft.state="inactive"
      href="https://{hostname}/@api/deki/pages/0?redirects=0"
      deleted="false">
    <uri.ui>https://{hostname}/{path}</uri.ui>
    <title>{title}</title>
    <path seo="{seo}">{path}</path>
    <namespace>{namespace}</namespace>
    <date.created>1970-01-01T00:00:00Z</date.created>
    <language>{language}</language>
    {security}
    {page.parent}
</page>

Redirect Page

Redirect pages are existing pages that point to a different page in the page hierarchy or an external URL.

<page id="{id}"
      guid="00000000000000000000000000000000"
      redirect="true"
      draft.state="inactive"
      href="https://{hostname}/@api/deki/pages/{id}?redirects=0"
      deleted="false"
      revision="{revision}"
      type="{page/@type}">
    <uri.ui>https://{hostname}/{path}</uri.ui>
    <title>{title}</title>
    <path seo="{seo}">{path}</path>
    <namespace>{namespace}</namespace>
    <date.created>1970-01-01T00:00:00Z</date.created>
    <language>{language}</language>
    
    <!-- page.redirectedto is available when page/@type = "internal-redirect" -->
    {page.redirectedto}
    
    <!-- uri.redirectedto is available when page/@type = "external-redirect" -->
    <uri.redirectedto>{uri.redirectedto}</uri.redirectedto>
</page>

Page Data

Name Type Description
{id} int Local page id - if the page is exported and imported into a different Expert site, a new local page id will be assigned
{guid} string Global page id - if the page is exported and imported into a different Expert site, the same global page id will be preserved
{draft.state} {active, inactive, unpublished} Does the page have an active or unpublished draft?
{hostname} string The Expert site hostname
{deleted} bool Is the page deleted and in the archive?
{revision} int The page revision
{page/@type} {internal-redirect, external-redirect} Does the page redirect to an external URL or an existing page in the page hierarchy
{title} string The page display title
{seo} bool Is the page URL search engine optimized?
{path} string The page URL path
{namespace} {main, template} Is the page in the template directory or a child of the home page in the page hierarchy?
{date.created} datetime ISO 8601 representation of the page's creation timestamp
{language} string The page (site) language
{page.parent} Page The page that is the direct parent in the page hierarchy - the {page.parent} may also contain its own {page.parent} resource, depending upon its position in the page hierarchy
{security} Security The allowed operations and assigned permissions for the page
{page.redirectedto} Page The existing page that the page URL will redirect to
{uri.redirectedto} uri The external URL that the page URL will redirect to

Retrieving Pages

A local page id or global page id (guid) can be used to retrieve page resource data from the Expert API. They can also be used to create links that resolve and redirect to the page content in the Expert user interface.

This example HTML will create contextual help links to the KCS Methodology guide. Hover over the links to view the target page id or guid.

Follow this page id

Follow this page guid

<!-- resolve and redirect to a page using a local page id -->
<a class="F1" href="https://{hostname}/@go/page/{id}">Follow this page id</a>

<!-- resolve and redirect to a page using a page guid -->
<a class="F1" href="https://{hostname}/@go/page/:{guid}">Follow this page guid</a>

Page Content

A known custom header starting with X-Deki is always required for retrieving and updating content with the content type of text/plain.  An opaque header X-Deki-CSRFcan also be used.

Retrieve

$ curl --header 'X-Deki-Token: {signature}' https://{hostname}/@api/deki/site/pages/{id}/contents
Response

The body of the response is html encoded and needs to be decoded for a page content for content type text/plain.  Alternatively, a content type of application/xml could be used on the POST request with this response.

<content revision="56" type="text/html" title="X-15"><body> &lt;p&gt;test&lt;/p&gt; </body><body target="toc">&lt;em&gt;No headers&lt;/em&gt;</body></content>
Updating
$ curl --request POST --header 'X-Deki-Token: {signature}' --header 'Content-Type: text/plain; charset=utf-8' https://{hostname}/@api/deki/site/pages/{id}/contents?edittime=now --data {body}

 

  • Was this article helpful?