TransWikia.com

SP Online rest api: how to get the "author byline field"?

SharePoint Asked on December 14, 2021

This gets the name in the "created by" field fine, but for news posts I need the "author byline" field:

https://xxx.sharepoint.com/sites/xxx/_api/web/lists/getbytitle('Site Pages')/items?$select=Title,FileRef,CanvasContent1,Videourl,BannerImageUrl,Author/Title&$expand=Author&$filter=ID eq '193'

The internal field name is "_AuthorByline" but the response is that doesn’t exist. Does the field have to be a managed property for the api call to work?

I should add that in a search rest api, "Author" returns the "AuthorByline" field, if populated, "created by" if not..

2 Answers

Just to close this out-the syntax to get authorbyline for a specific page is:

/_api/web/lists/getbytitle('Site Pages')/items?$select=OData__AuthorByline/Title&$expand=OData__AuthorByline&$filter=ID eq '<pageid>'

Thanks to user92888 for the tip!

Answered by matt on December 14, 2021

You can get to the field using: OData__AuthorBylineId If you dive into items(id)/properties - you will be able to get the AuthorByline items.

This is a person-field allowing multiple persons.

Also in Flow the Byline field shows on an item.

Answered by user92888 on December 14, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP