Skip to content

Incorrect code shown for "retrieve a specific list if you know its GUID" #6802

@John471

Description

@John471

The code shown to retrieve a specific list if you know its GUID appears to be incorrect. I cannot make it work as shown.
Code Shown: https://{site_url}/_api/web/lists(**guid**'{list_guid}')
Response: <m:message xml:lang="en-US">The expression "web/lists(**guid**'{77777777-cccc-4444-aaaa-555555555555}')" is not valid.</m:message>
However, I can make it work with: https://{site_url}/_api/web/lists('{list_guid}')
There is an apparently superfluous literal string **guid** in the example, that renders it non-functional.
Note : This apparent flaw is repeated several times on this page.

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:csom/rest/apiCategory: SharePoint Client Side Object Model SDK / REST APIarea:docs-commentCategory: Comment left on bottom of a docs page here: https://docs.microsoft.com/sharepoint/devtype:archive-old-issueIssues which are closed as tool old for active work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions