Contents
I want to get the Author field from Discussion forum list in SharePoint online using REST API in POST method. I tried the below approach, it is not working. The output is like below.
This is for SharePoint 2010. I am using REST to query lists, but the “Created By” and “Modified By” columns are returning the user’s numeric ID. I am wanting to get the user’s fullname and email address, given their numeric ID.
How to return all fields in a SharePoint query?
Use the $select query option to specify which fields to return for a given list, list item, or other SharePoint object represented by an entity set. You can use $select=* to return all available fields. In general, if you do not specify the $select query option, the REST service returns all available fields by default.
How to retrieve a list from SharePoint rest?
This topic assumes that you’re already familiar with the topics Get to know the SharePoint REST service and Complete basic operations using SharePoint REST endpoints. It doesn’t provide code snippets. The following example shows how to retrieve a specific list if you know its GUID.
How to get created by user display name?
Select the “Select the first property from the property list”. This will ensure that a unique author value is mapped to the “Created By” property (and multiple values are not returned in this property). Make sure to select refinement enabled, so that you can replace the default “Author” refinement filter with the “Created By” refinement filter.
How to get list items created by logged in user?
Afterwards, you could retrieve my list items as demonstrated below. I don’t believe there is much you can do since the list only stores the User Id. Rather than querying the UserInformationList for the Id, you can grab it from _spPageContextInfo if you are doing this from the client side.
Where to find user ID in SharePoint Stack Exchange?
Rather than querying the UserInformationList for the Id, you can grab it from _spPageContextInfo if you are doing this from the client side. Thanks for contributing an answer to SharePoint Stack Exchange! Please be sure to answer the question. Provide details and share your research!
How to delete a list using REST API?
The following example shows how to delete a list. When referring to a lookup column inside a list using REST API, use the display name of the lookup column instead of the internal name. The following example shows how to retrieve all of a list’s items. The OData $skip query parameter doesn’t work when querying list items.
How to make batch requests with REST APIs?
For details and links to code samples, see Make batch requests with the REST APIs. This topic assumes that you’re already familiar with the topics Get to know the SharePoint REST service and Complete basic operations using SharePoint REST endpoints. It doesn’t provide code snippets.