More REST Examples in SharePoint

Get a List by Title

We can get list information using the Title of the list. Make sure you have a list named Contacts.

Note

Please note that the REST API is provided using the context _api.

Using the Chrome browser I received the following output.

output

Although IE 11 failed to show the output, giving an error message instead.

error

But in IE too, we can view the output using the View Source option.

View Source

Note

By default an XML format result is provided by SharePoint REST services. In a programmatic manner, we can format these results to JSON format.

Getting List Items

We can try getting the list items using REST.

Using the Chrome browser I was able to view the following results.

results

However In IE the result summary was as in the following:

IE the result summary

Note

Please note that REST is trending as a replacement for JSOM in the SharePoint world. REST provides much easier, less-code ways of working with the client-side object model.

References


Summary

In this article we explored a few REST examples using the browser's URL box.

Up Next
    Ebook Download
    View all
    Learn
    View all