SharePoint .NET 服务器、CSOM、JSOM 和 REST API 索引SharePoint .NET Server, CSOM, JSOM, and REST API index

使用 API 索引,可查找在 .NET 服务器对象模型中以及在至少一个客户端编程模型(.NET 客户端对象模型 (CSOM)、JavaScript 对象模型 (JSOM) 和/或 REST)中实现的最常用的类型和对象。Use the API index to look up many of the most frequently used types and objects that are implemented in the .NET server object model and at least one client programming model: .NET client-side object model (CSOM), JavaScript object model (JSOM), and/or REST.

此表列出最常用的核心 API,这些 API 在大多数情况下都基于 .NET 服务器实现的类型。This table lists the most frequently used core APIs, which are in most cases based on types from the .NET server implementation. 在某些情况下,类型对于 SharePoint 客户端编程而言是原生的,并且没有等效的 .NET 服务器类型。In some cases, types are native to SharePoint client programming, and there is no equivalent .NET server type. 在其他情况下,存在某些(但并非所有)特定类型的可能的客户端编程模型实现。In other cases, some but not all possible client programming model implementations of a specific type exist.

备注

使用表中所示的 REST 终结点 URI 之前,请将 缩写替换为 SharePoint 网站的路径;例如 http://<site collection>/<site>/_api/web/listsBefore using a REST endpoint URI shown in the table, replace the abbreviation with the path to your SharePoint site; for example http://<site collection>/<site>/_api/web/lists.

SharePoint API 索引SharePoint API index

APIAPI SP.Object/Enumeration (sp.js)SP.Object/Enumeration (sp.js) REST 端点REST Endpoint
AttachmentCollection SPAttachmentCollectionAttachmentCollection SPAttachmentCollection SP.AttachmentCollectionSP.AttachmentCollection …/_api/web/lists('<list id>')/items(<item id>)/attachmentfiles
BasePermissions SPBasePermissionsBasePermissions SPBasePermissions SP.BasePermissions 对象SP.BasePermissions object 不适用N/A
CalendarType SPCalendarTypeCalendarType SPCalendarType SP.CalendarType 枚举SP.CalendarType enumeration 不适用N/A
ChangeCollection SPChangeCollectionChangeCollection SPChangeCollection SP.ChangeCollection 对象SP.ChangeCollection object …/_api/web/getchanges(changequery)
ChangeSite SPChangeSiteChangeSite SPChangeSite SP.ChangeSite 枚举SP.ChangeSite enumeration 不适用N/A
ClientContextClientContext SP.ClientContext 对象SP.ClientContext object …/_api/contextinfo
ContentType SPContentTypeContentType SPContentType SP.ContentType 对象SP.ContentType object …/_api/web/contenttypes('<content type id>')
ContentTypeCollection SPContentTypeCollectionContentTypeCollection SPContentTypeCollection SP.ContentTypeCollection 对象SP.ContentTypeCollection object …/_api/web/contenttypes
SPContextSPContext SP.RequestContext 对象SP.RequestContext object 不适用N/A
EventReceiverDefinition SPEventReceiverDefinitionEventReceiverDefinition SPEventReceiverDefinition SP.EventReceiverDefinition 对象SP.EventReceiverDefinition object …/_api/web/eventreceivers
EventReceiverDefinitionCollection SPEventReceiverDefinitionCollectionEventReceiverDefinitionCollection SPEventReceiverDefinitionCollection SP.EventReceiverDefinitionCollection 对象SP.EventReceiverDefinitionCollection object …/_api/web/eventreceivers(eventreceiverid)
EventReceiverDefinitionCreationInformation SPEventReceiverDefinitionCreationInformationEventReceiverDefinitionCreationInformation SPEventReceiverDefinitionCreationInformation SP.EventReceiverDefinitionCreationInformation 对象SP.EventReceiverDefinitionCreationInformation object 不适用N/A
EventReceiverType SPEventReceiverTypeEventReceiverType SPEventReceiverType SP.EventReceiverType 枚举SP.EventReceiverType enumeration 不适用N/A
Feature SPFeatureFeature SPFeature SP.Feature 对象SP.Feature object …/_api/web/features(featureid)
FeatureCollection SPFeatureCollectionFeatureCollection SPFeatureCollection SP.FeatureCollection 对象SP.FeatureCollection object …/_api/web/features
FeatureDefinitionScope SPFeatureDefinitionScopeFeatureDefinitionScope SPFeatureDefinitionScope SP.FeatureDefinitionScope 枚举SP.FeatureDefinitionScope enumeration 不适用N/A
Field SPFieldField SPField SP.Field 对象SP.Field object …/_api/web/fields('')…/_api/web/fields('')
FieldCalculated SPFieldCalculatedFieldCalculated SPFieldCalculated SP.FieldCalculated 对象SP.FieldCalculated object …/_api/web/fields('')…/_api/web/fields('')
FieldChoice SPFieldChoiceFieldChoice SPFieldChoice SP.FieldChoice 对象SP.FieldChoice object …/_api/web/fields('')…/_api/web/fields('')
FieldCollection SPFieldCollectionFieldCollection SPFieldCollection SP.FieldCollection 对象SP.FieldCollection object …/_api/web/fields…/_api/web/fields
FieldComputed SPFieldComputedFieldComputed SPFieldComputed SP.FieldComputed 对象SP.FieldComputed object …/_api/web/fields('')…/_api/web/fields('')
FieldCurrency SPFieldCurrencyFieldCurrency SPFieldCurrency SP.FieldCurrency 对象SP.FieldCurrency object …/_api/web/fields('')…/_api/web/fields('')
FieldLink SPFieldLinkFieldLink SPFieldLink SP.FieldLink 对象SP.FieldLink object …/_api/web/contenttypes('<content type id>')/fieldlinks('<field link id>')
FieldLookupValue SPFieldLookupValueFieldLookupValue SPFieldLookupValue SP.FieldLookup 对象SP.FieldLookup object 不适用N/A
FieldMultiChoice SPFieldMultiChoiceFieldMultiChoice SPFieldMultiChoice SP.FieldMultiChoice 对象SP.FieldMultiChoice object …/_api/web/fields('')…/_api/web/fields('')
FieldMultiLineText SPFieldMultiLineTextFieldMultiLineText SPFieldMultiLineText SP.FieldMultiLineText 对象SP.FieldMultiLineText object …/_api/web/fields('')…/_api/web/fields('')
FieldNumber SPFieldNumberFieldNumber SPFieldNumber SP.FieldNumber 对象SP.FieldNumber object …/_api/web/fields('')…/_api/web/fields('')
FieldText SPFieldTextFieldText SPFieldText SP.FieldText 对象SP.FieldText object …/_api/web/fields('')…/_api/web/fields('')
FieldUrl SPFieldUrlFieldUrl SPFieldUrl SP.FieldUrl 对象SP.FieldUrl object …/_api/web/fields('')…/_api/web/fields('')
FieldUrlValue SPFieldUrlValueFieldUrlValue SPFieldUrlValue SP.FieldUrlValue 对象SP.FieldUrlValue object 不适用N/A
FieldUser SPFieldUserFieldUser SPFieldUser SP.FieldUser 对象SP.FieldUser object …/_api/web/fields('')…/_api/web/fields('')
File SPFileFile SPFile SP.File 对象SP.File object …/_api/web/getfilebyserverrelativeurl('//')…/_api/web/getfilebyserverrelativeurl('//')
FileCollection SPFileCollectionFileCollection SPFileCollection SP.FieldCollection 对象SP.FieldCollection object …/_api/web/getfolderbyserverrelativeurl('/')/文件…/_api/web/getfolderbyserverrelativeurl('/')/files
Folder SPFolderFolder SPFolder SP.Folder 对象SP.Folder object …/_api/web/getfolderbyserverrelativeurl('/')…/_api/web/getfolderbyserverrelativeurl('/')
Form SPFormForm SPForm SP.Form 对象SP.Form object …/_api/web/lists(guid'<list id>')/forms('<form id>')
Group SPGroupGroup SPGroup SP.Group 对象SP.Group object …/_api/web/sitegroups()…/_api/web/sitegroups()
GroupCollection SPGroupCollectionGroupCollection SPGroupCollection SP.GroupCollection 对象SP.GroupCollection object …/_api/web/sitegroups…/_api/web/sitegroups
Language SPLanguageLanguage SPLanguage SP.Language 对象SP.Language object 不适用N/A
List SPListList SPList SP.List 对象SP.List object …/_api/web/lists(guid'')…/_api/web/lists(guid'')
ListCollection SPListCollectionListCollection SPListCollection SP.ListCollection 对象SP.ListCollection object …/_api/web/列表…/_api/web/lists
ListDataSource SPListDataSourceListDataSource SPListDataSource SP.ListDataSource 对象SP.ListDataSource object 不适用N/A
ListItem SPListItemListItem SPListItem SP.ListItem 对象SP.ListItem object …/_api/web/lists(guid'')/items()…/_api/web/lists(guid'')/items()
ListItemCollection SPListItemCollectionListItemCollection SPListItemCollection SP.ListItemCollection 对象SP.ListItemCollection object …/_api/web/lists(guid'')/items…/_api/web/lists(guid'')/items
ListTemplateType SPListTemplateTypeListTemplateType SPListTemplateType SP.ListTemplateType 枚举SP.ListTemplateType enumeration 不适用N/A
Navigation SPNavigationNavigation SPNavigation SP.Navigation 对象SP.Navigation object …/_api/web/navigation
NavigationNode SPNavigationNodeNavigationNode SPNavigationNode SP.NavigationNode 对象SP.NavigationNode object 不适用N/A
Principal SPPrincipalPrincipal SPPrincipal SP.Principal 对象SP.Principal object 不适用N/A
SPQuerySPQuery 不适用N/A
RecycleBinItem SPRecycleBinItemRecycleBinItem SPRecycleBinItem SP.RecycleBinItem 对象SP.RecycleBinItem object …/_api/web/RecycleBin(recyclebinitemid)
RecycleBinItemCollection SPRecycleBinItemCollectionRecycleBinItemCollection SPRecycleBinItemCollection SP.RecycleBinItemCollection 对象SP.RecycleBinItemCollection object …/_api/web/RecycleBin
RegionalSettings SPRegionalSettingsRegionalSettings SPRegionalSettings SP.RegionalSettings 对象SP.RegionalSettings object …/_api/web/RegionalSettings
RoleAssignment SPRoleAssignmentRoleAssignment SPRoleAssignment SP.RoleAssignment 对象SP.RoleAssignment object …/_api/web/roleassignments()…/_api/web/roleassignments()
RoleAssignmentCollection SPRoleAssignmentCollectionRoleAssignmentCollection SPRoleAssignmentCollection SP.RoleAssignmentCollection 对象SP.RoleAssignmentCollection object …/_api/web/roleassignments…/_api/web/roleassignments
RoleDefinition SPRoleDefinitionRoleDefinition SPRoleDefinition SP.RoleDefinition 对象SP.RoleDefinition object …/_api/web/roledefinitions()…/_api/web/roledefinitions()
RoleType SPRoleTypeRoleType SPRoleType SP.RoleType 枚举SP.RoleType enumeration 不适用N/A
SecurableObject SPSecurableObjectSecurableObject SPSecurableObject SP.SecurableObject 对象SP.SecurableObject object 不适用N/A
网站 SPSiteSite SPSite SP.Site 对象SP.Site object …/_api/site
TimeZone SPTimeZoneTimeZone SPTimeZone SP.TimeZone 对象SP.TimeZone object …/_api/web/RegionalSettings/TimeZones(timzoneid)
Taxonomy SPTaxonomySessionTaxonomy SPTaxonomySession SP.Taxonomy.TaxonomySession 对象SP.Taxonomy.TaxonomySession object NANA
TimeZoneCollection SPTimeZoneCollectionTimeZoneCollection SPTimeZoneCollection SP.TimeZoneCollection 对象SP.TimeZoneCollection object …/_api/web/RegionalSettings/TimeZones
用户 SPUserUser SPUser SP.User 对象SP.User object …/_api/web/siteusers(@v)?@v=''…/_api/web/siteusers(@v)?@v=''
UserCollection SPUserCollectionUserCollection SPUserCollection SP.UserCollection 对象SP.UserCollection object …/_api/web/sitegroups()/users…/_api/web/sitegroups()/users
实用工具 SPUtilityUtility SPUtility SP.Utilities.Utility 对象 (sp.js)SP.Utilities.Utility object (sp.js) 不适用N/A
View SPViewView SPView SP.View 对象 (sp.js)SP.View object (sp.js) …/_api/web/lists(guid'')/views('')…/_api/web/lists(guid'')/views('')
ViewCollection SPViewCollectionViewCollection SPViewCollection SP.ViewCollection 对象SP.ViewCollection object …/_api/web/lists(guid'')/views…/_api/web/lists(guid'')/views
ViewFieldCollection SPViewFieldCollectionViewFieldCollection SPViewFieldCollection SP.ViewFieldCollection 对象SP.ViewFieldCollection object …/_api/web/lists(guid'')/views('')/字段…/_api/web/lists(guid'')/views('')/fields
Web SPWebWeb SPWeb SP.Web 对象SP.Web object …/_api/web…/_api/web
WebCollection SPWebCollectionWebCollection SPWebCollection SP.WebCollection 对象SP.WebCollection object …/_api/web/webs…/_api/web/webs
WebInformation SPWebInfoWebInformation SPWebInfo SP.WebInformation 对象SP.WebInformation object …/_api/web/webinfos('<web information id>')
WebTemplate SPWebTemplateWebTemplate SPWebTemplate SP.WebTemplate 对象SP.WebTemplate object …/_api/web/GetAvailableWebTemplates(languageid,includecrosslanguage)/getbyname(templatename)
WebTemplateCollection SPWebTemplateCollectionWebTemplateCollection SPWebTemplateCollection SP.WebTemplateCollection 对象SP.WebTemplateCollection object …/_api/web/GetAvailableWebTemplates(languageid,includecrosslanguage)

另请参阅See also