Skip Navigation
Expand
'Expired' status from the KA REST API call (Get Content with mode=FULL) metadata fields
Answer ID 12571   |   Last Review Date 02/28/2023

Why am I unable to see the 'Expired' status from the KA REST API call (Get Content with mode=FULL) metadata fields?

Environment:

Knowledge Advanced for Oracle B2C Service

Resolution:

Unlike the "Publish'/'Draft' status (which is statically set in one of content metadata fields.), the 'Expired' status is a dynamically evaluated status.  Hence, you will not see an 'Expired' status from the KA REST API call (Get Content with mode=FULL) metadata fields.  Instead, you will need to dynamically evaluate if the content version is expired or not based on the following static field values:  Published='Y' and (DISPLAYENDDATE > CurrentPodDateTime)
The KA REST API Get Content (mode=FULL) call:  "/km/api/latest/content/answers/<answerId>?isForEdit=true&mode=FULL" would return all the metadata of a given content version.  You may parse them to get its PUBLISHED and DISPALYENDDATE values and then dynamically evaluate them to see if it is "Expired" or not. For example, checking for (Published='Y' and (DISPLAYENDDATE > CurrentPodDateTime))

Note: The time-zone of CurrentPodDateTime is based on where your KA site is hosted.  For example, CurrentPodDateTime will be in EST/EDT if your KA site is hosted at our AC datacenter (Ashburn, VA).  Or CurrentPodDateTime will be in MST if your KA site is hosted at our PH datacenter (Phoenix, AZ).