Introduction to the use of SharePoint REST services

Source: Internet
Author: User

Source: http://www.cnblogs.com/jianyus/p/4113845.html

1. Create a test using the list "REST Demo", insert some test data, such as:

2. Add a Content editor and add script references and HTML code such as:

The div for result is used for the display result, and the input tag triggers the method in the rest service's JavaScript script;

3, write the rest service script, read the list, such as:

URL: The address of the rest service (refer to the attached API link for details); Method:post or get,post to add or delete to use, get for check, at least I understand; success and error are method definitions that perform success or failure;

4. To view the added Content editor, click Excute Script to execute scripts such as:

5. Click Execute script to get the data from the test list through the rest service and get the success! Such as:

6, write the update script, such as:

Special: The type inside the body parameter needs to be specially obtained, the other parameter reference API can be;

7. View the XML for the list rest service in the browser, such as:

8. Right-click on the source file in the XML of the list to find the Listitementitytypefullname property of the list field, that is, the type value, such as:

9. Click on the button on the page to update through the rest service, such as:

10, the View list, the project with ID 1 has been updated successfully, such as:

11, write the deletion of the script, the main method is changed to delete can, such as:

12. Execute scripts on the page, such as:

13, delete the success, such as:

14, write the added script, the URL parameters have changed, into items, such as:

15, execute the script on the page, such as:

16. Add success through rest services, such as:

17. The properties used in the rest request (click on the Picture Popup details page), such as:

Summary

The REST service, as a new feature of SharePoint 2013, is rarely used, and it feels good to have time to try it out.

All right, here we go, rest. Take a break.

Reference documents

http://msdn.microsoft.com/ZH-CN/library/office/jj164022 (v=office.15). aspx

Introduction to the use of SharePoint REST services

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.