Compact, Canonical reference to a versioned document?

Ernest Prabhakar 0 Reputation points
2024-07-16T17:53:45.5866667+00:00

Hello,

We are building versioned data containers on top of SharePoint, which requires us to have unambiguous URIs pointing to specific versions. For Amazon S3, we have a URI of the form:

s3://$bucket/$path?versionId=$version_id

Is there an analogous form we could/should use for SharePoint?

My naive guess is something like:

sharepoint://$tenant_name/$site_name/{$folders/}$file?versionId=$major_version

Does that make sense? Or is there already a simple string that encodes all that information?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,406 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,265 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.
2,805 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 44,146 Reputation points Microsoft Vendor
    2024-07-17T09:20:04.7+00:00

    You could use following graph to get the specific version of a file.

    https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items/{item-id}/versions/{version-id}
    

    Example:

    1


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.