spws • Docs
spws / getList
getList(
listName
,__namedParameters
):Promise
<Operation
>
Returns a schema for the specified list.
• listName: string
The list display name or GUID
• __namedParameters = {}
• __namedParameters.attributes?: ("Title"
| "Name"
| "ID"
| "Modified"
| "Created"
| "AllowDeletion"
| "BaseType"
| "Description"
| "Hidden"
| "StaticName"
| "Version"
| "AllowMultiResponses"
| "AnonymousPermMask"
| "Author"
| "DefaultViewUrl"
| "Direction"
| "DocTemplateUrl"
| "EmailAlias"
| "EnableAttachments"
| "EnableFolderCreation"
| "EnableMinorVersion"
| "EnableModeration"
| "EnablePeopleSelector"
| "EnableResourceSelector"
| "EnableVersioning"
| "EnforceDataValidation"
| "EventSinkAssembly"
| "EventSinkClass"
| "EventSinkData"
| "ExcludeFromOfflineClient"
| "FeatureId"
| "Fields"
| "Flags"
| "HasExternalDataSource"
| "HasRelatedLists"
| "HasUniqueScopes"
| "ImageUrl"
| "IrmEnabled"
| "IsApplicationList"
| "ItemCount"
| "LastDeleted"
| "MajorVersionLimit"
| "MajorWithMinorVersionsLimit"
| "MaxItemsPerThrottledOperation"
| "MobileDefaultViewUrl"
| "MultipleDataList"
| "NoThrottleListOperations"
| "Ordered"
| "PreserveEmptyValues"
| "ReadSecurity"
| "RequireCheckout"
| "RootFolder"
| "ScopeId"
| "SendToLocation"
| "ServerTemplate"
| "ShowUser"
| "StrictTypeCoercion"
| "ThrottleListOperations"
| "ThumbnailSize"
| "WebFullUrl"
| "WebId"
| "WebImageHeight"
| "WebImageWidth"
| "WorkFlowId"
| "WriteSecurity"
)[] = []
The list attributes that should be returned in the data object
• __namedParameters.webURL?: string
= defaults.webURL
The SharePoint web URL
Promise
<Operation
>
// Get list using default parameters
const list = await getList({ listName: "Announcements" });
// Get list on another site
const list = await getList({ listName: "Announcements", webURL: "/sites/hr" });
// Get list with only the Title and Fields attributes parsed
const list = await getList({ listName: "Title", attributes: ["Title", "Fields"] })