0

I am trying to get the News Post metadata using REST call. I am getting all the fields value but not Publish Start Date. This field is being added when I have turned scheduled option for the library. Could you please help me why I am not getting the field value, it is giving error like:

"The field or property "_PublishStartDate" does not exist. I am using below Odata query.

/_api/web/lists/getByTitle('ListName')/items/?$select=Title,_PublishStartDate

1 Answer 1

1

I am able to fetch the Publish Start Date using OData__PublishStartDate.

Try using below, it should work for you:

/_api/web/Lists/getbytitle('Site Pages')/Items?$select=Title,OData__PublishStartDate

Output:

Sample XML response received when I called above endpoint directly in browser tab:

<content type="application/xml">
    <m:properties>
        <d:Title>TestModernPage</d:Title>
        <d:OData__PublishStartDate m:type="Edm.DateTime">2021-09-24T02:00:00Z</d:OData__PublishStartDate>
    </m:properties>
</content>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.