Update DriveItem of SharePoint

Akshith Reddy Thalla 100 Reputation points
2024-07-18T09:27:19.1666667+00:00

We have done the SharePoint Integration using MSGraph API. Now, by using the given API: https://learn.microsoft.com/en-us/graph/api/driveitem-update?view=graph-rest-1.0&tabs=http

can only able to update the name column, can we also update the values of other column?

Assume, I want to update the DocType column over here:

User's image

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,380 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,249 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 44,071 Reputation points Microsoft Vendor
    2024-07-19T02:57:58.2533333+00:00

    What is the type of DocType column?

    Here is an example to update a customized single line of text column named "emilytest":

    PATCH https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items/{item-id}/fields
    Content-Type: application/json
    {
        "emilytest": "testB"
    }
    

    1

    2

    3


    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.