REST Api for different operations in a SP site

There are several REST api defined which helps in getting quick responses from the servers.Here, I have listed them few on which I have worked upon.

1.To get the details of the Links present in the Top Navigation Bar:

sitename/_api/navigation/menustatemapprovidername=%27GlobalNavigationSwitchableProvider%27

2.To get the details of the Links present in the Current Navigation Bar:

“sitename/_api/navigation/menustatemapprovidername=%27CurrentNavigationSwitchableProvider%27”

3.To get the Current User Profile Pic of the same SP site:

//sitename/_layouts/15/userphoto.aspx?username=emailaddressofuserwithdomain

eg.abcd@domain.com

This method is used when accessing from same SP, incase of CORS a request executor is used and the URL too changes and it isn’t a REST call.

4.To get fields from the List:

sitename/_api/web/lists/getbytitle(‘xyz’)/fields?$select=Title

 

5.To get itemsfrom the List:

sitename/_api/web/lists/getbytitle(‘xyz’)/Items?$select=Title

6.To get all lists from the SP site:

https://sitename/_api/web/lists?$select=Title

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s