Content Delivery API -- Not returning all properties of Page

Vote:
 

I had implemented Content Delivery API which seems to be working fine in local environment. After I push it to DXC and had ensured that I gave read access to contentapiread to root and to all sub pages (Apply settings for all subitems).

When I hit the API I get the response but it has only the base ContentAPI model response. It doesn't have any of the properties of the page. Below is the sample.

Response:

{
    "contentLink": {
        "id"5,
        "workId"0,
        "guidValue""579a0a5b-c951-4da9-819d-0d020a737bb4",
        "providerName"null,
        "url"null,
        "expanded"null
    },
    "name""Episerver Forms",
    "language"null,
    "existingLanguages": [],
    "masterLanguage"null,
    "contentType": [
        "SysContentFolder"
    ],
    "parentLink": {
        "id"3,
        "workId"0,
        "guidValue""e56f85d0-e833-4e02-976a-2d11fe4d598c",
        "providerName"null,
        "url"null,
        "expanded"null
    },
    "routeSegment""episerver-forms",
    "url"null,
    "changed""2019-04-24T18:48:05Z",
    "created""2019-04-24T18:48:05Z",
    "startPublish"null,
    "stopPublish"null,
    "saved""2019-04-24T18:48:05Z",
    "status"null
}
Any idea what I could be missing ?
#218805
Mar 21, 2020 1:32
Vote:
 

Hi Dileep, I'm assuming you are making a call to the content delivery API with url something like this: /api/episerver/v2.0/content/5?

By the looks of the response, you have fetched content by id 5 and that is a system folder for Episerver Forms in that environment. What is it you are trying to fetch from the API?

You have to note that content IDs are not the same in all environments. So if you for example want the site start page, look what is the id of the start page (site start page) in Episerver edit mode (hover your cursor over the start page to see the id of the page) or from Admin view (site configuration, what is configured as the site start page) - and then use that id in your call.

#218825
Edited, Mar 22, 2020 11:23
Dileep D - Mar 23, 2020 0:33
Thanks for pointing out. Feels so stupid of me now :). Should have taken time investigating this before posting the question.

All the environments had start page id as 5 other than the one I was looking for. It was 6 here. For some reason my web app started throwing error ( is currently unable to handle this request.HTTP ERROR 500) before I could test it out.
I will test it once this issue is resolved and accept your answer.
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.