SharePointAPI about web_link

Ayase Morita 60 Reputation points
2025-02-04T00:51:58.1533333+00:00

In SharePointAPI, I want to determine if a file included in the “GET /drives/{drive-id}/items/{item-id}/children” API response I want to determine if the file included in the “GET /drives/{drive-id/items/{item-id/children” API response is a web_link.

Currently, the method to determine if a file is a web_link is based on whether the name property ends with “.url” or not.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,994 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,267 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ling Zhou_MSFT 21,245 Reputation points Microsoft Vendor
    2025-02-04T02:08:09.2966667+00:00

    Hi @Ayase Morita,

    Thanks for reaching out to us. We are very pleased to support you.

    There are two ways to determine if a file is a web link:

    1. Check the name property: As you mentioned, if the name ends with ".url", it is likely a web link. User's image
    2. Inspect the file property: Look for a file object in the response. If the file object has a mimeType property with the value "application/octet-stream", it indicates that the item is a web link.

    User's image

    If you have any questions, please do not hesitate to contact me.

    Moreover, if the issue can be fixed successfully, please click "Accept Answer" so that we can better archive the case and the other community members who are suffering the same issue can benefit from it.

    Your kind contribution is much appreciated.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.