Skip to main content

spo list view get

Gets information about specific list view

Usage

m365 spo list view get [options]

Options

-u, --webUrl <webUrl>

URL of the site where the list is located.

--listId [listId]

ID of the list where the view is located. Specify only one of listTitle, listId or listUrl.

--listTitle [listTitle]

Title of the list where the view is located. Specify only one of listTitle, listId or listUrl.

--listUrl [listUrl]

Server- or web-relative URL of the list where the view is located. Specify only one of listTitle, listId or listUrl.

--id [id]

ID of the view to get. Specify title or id but not both.

--title [title]

Title of the view to get. Specify title or id but not both.

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Examples

Gets a list view by name from a list located in the specified site.

m365 spo list view get --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle 'My List' --title 'All Items'

Gets a list view by ID from a list located in the specified site.

m365 spo list view get --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl 'Lists/My List' --id 330f29c5-5c4c-465f-9f4b-7903020ae1ce

Gets a list view by name from a list located in the specified site. Retrieve the list by its ID

m365 spo list view get --webUrl https://contoso.sharepoint.com/sites/project-x --listId 330f29c5-5c4c-465f-9f4b-7903020ae1c1 --title 'All Items'

Response

{
"Aggregations": null,
"AggregationsStatus": null,
"AssociatedContentTypeId": null,
"BaseViewId": "1",
"CalendarViewStyles": null,
"ColumnWidth": null,
"ContentTypeId": {
"StringValue": "0x"
},
"CustomFormatter": null,
"CustomOrder": null,
"DefaultView": false,
"DefaultViewForContentType": false,
"EditorModified": false,
"Formats": null,
"GridLayout": null,
"Hidden": false,
"HtmlSchemaXml": "<View Name=\"{3CD2E934-F482-4D4A-A9B8-A13B49B3D226}\" Type=\"HTML\" DisplayName=\"All events\" Url=\"/Lists/Test/All events.aspx\" Level=\"1\" BaseViewID=\"1\" ContentTypeID=\"0x\" ImageUrl=\"/_layouts/15/images/generic.png?rev=47\"><ViewFields><FieldRef Name=\"Title\" /></ViewFields><Query><OrderBy><FieldRef Name=\"Created\" Ascending=\"FALSE\" /></OrderBy><Where><Eq><FieldRef Name=\"TextFieldName\" /><Value Type=\"Text\">Field value</Value></Eq></Where></Query><RowLimit Paged=\"TRUE\">30</RowLimit><XslLink Default=\"TRUE\">main.xsl</XslLink><JSLink>clienttemplates.js</JSLink><Toolbar Type=\"Standard\" /><ParameterBindings><ParameterBinding Name=\"NoAnnouncements\" Location=\"Resource(wss,noXinviewofY_LIST)\" /><ParameterBinding Name=\"NoAnnouncementsHowTo\" Location=\"Resource(wss,noXinviewofY_DEFAULT)\" /></ParameterBindings></View>",
"Id": "3cd2e934-f482-4d4a-a9b8-a13b49b3d226",
"ImageUrl": "/_layouts/15/images/generic.png?rev=47",
"IncludeRootFolder": false,
"ViewJoins": null,
"JSLink": "clienttemplates.js",
"ListViewXml": "<View Name=\"{3CD2E934-F482-4D4A-A9B8-A13B49B3D226}\" Type=\"HTML\" DisplayName=\"All events\" Url=\"/Lists/Test/All events.aspx\" Level=\"1\" BaseViewID=\"1\" ContentTypeID=\"0x\" ImageUrl=\"/_layouts/15/images/generic.png?rev=47\" ><Query><OrderBy><FieldRef Name=\"Created\" Ascending=\"FALSE\" /></OrderBy><Where><Eq><FieldRef Name=\"TextFieldName\" /><Value Type=\"Text\">Field value</Value></Eq></Where></Query><ViewFields><FieldRef Name=\"Title\" /></ViewFields><RowLimit Paged=\"TRUE\">30</RowLimit><JSLink>clienttemplates.js</JSLink><XslLink Default=\"TRUE\">main.xsl</XslLink><Toolbar Type=\"Standard\"/></View>",
"Method": null,
"MobileDefaultView": false,
"MobileView": false,
"ModerationType": null,
"NewDocumentTemplates": null,
"OrderedView": false,
"Paged": true,
"PersonalView": false,
"ViewProjectedFields": null,
"ViewQuery": "<OrderBy><FieldRef Name=\"Created\" Ascending=\"FALSE\" /></OrderBy><Where><Eq><FieldRef Name=\"TextFieldName\" /><Value Type=\"Text\">Field value</Value></Eq></Where>",
"ReadOnlyView": false,
"RequiresClientIntegration": false,
"RowLimit": 30,
"Scope": 0,
"ServerRelativePath": {
"DecodedUrl": "/Lists/Test/All events.aspx"
},
"ServerRelativeUrl": "/Lists/Test/All events.aspx",
"StyleId": null,
"TabularView": true,
"Threaded": false,
"Title": "All events",
"Toolbar": "",
"ToolbarTemplateName": null,
"ViewType": "HTML",
"ViewData": null,
"ViewType2": null,
"VisualizationInfo": null
}
CTRL + M