| author | spgraph-docs-team |
|---|---|
| description | Represents an item in a SharePoint list. |
| title | listItem resource type |
| ms.localizationpriority | medium |
| ms.subservice | sharepoint |
| doc_type | resourcePageType |
| ms.date | 10/10/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Represents an item in a SharePoint list.
All items in a SharePoint document library can be represented as a listItem or driveItem resource.
Column values in the list are available through the fieldValueSet dictionary.
The following tasks are available for listItem resources.
All examples are relative to a list; for example, https://graph.microsoft.com/beta/sites/{site-id}/lists/{list-id}.
| Method | Return Type | Description |
|---|---|---|
| List | listItem collection | Get the collection of items in a list. |
| Create | listItem | Create a new listItem in a list. |
| Get | listItem | Get an item in a list. |
| Update | fieldValueSet | Update the properties on a listItem. |
| Delete | No Content | Removes an item from a list. |
| Get analytics | itemAnalytics | Get analytics for this resource. |
| Get recent activities | itemActivity collection | List the recent activities that took place on a drive, list, item, or within an item hierarchy. |
| Get column values | listItem | Get column values from listItem. |
| Update column values | fieldValueSet | Update column values on a listItem. |
| List document set version | documentSetVersion collection | Get a list of the versions of a document set item in a list. |
| Create document set version | documentSetVersion | Create a new version of a document set item in a list. |
| Restore document set version | No Content | Restore the document set item to a specific version. |
| Get delta | listItem collection | Get newly created, updated, or deleted list items without having to perform a full read of the entire items collection. |
| List permissions | permission | Get a list of the permission objects associated with a listItem. |
| Create permission | permission | Create a new permission object on a listItem. |
| Get permission | permission | Get a list of the permission objects associated with a listItem. |
| Update permission | permission | Update a permission object on a listItem. |
| Delete permission | None | Delete a permission object on a listItem. |
The listItem resource has the following properties.
| Property | Type | Description |
|---|---|---|
| contentType | contentTypeInfo | The content type of this list item |
The following properties are inherited from baseItem.
| Property name | Type | Description |
|---|---|---|
| id | string | The unique identifier of the item. Read-only. |
| name | string | The name / title of the item. |
| createdBy | identitySet | Identity of the creator of this item. Read-only. |
| createdDateTime | DateTimeOffset | The date and time the item was created. Read-only. |
| description | string | The descriptive text for the item. |
| eTag | string | ETag for the item. Read-only. |
| lastModifiedBy | identitySet | Identity of the last modifier of this item. Read-only. |
| lastModifiedDateTime | DateTimeOffset | The date and time the item was last modified. Read-only. |
| parentReference | itemReference | Parent information, if the item has a parent. Read-write. |
| sharepointIds | sharepointIds | Returns identifiers useful for SharePoint REST compatibility. Read-only. |
| webUrl | string (url) | URL that displays the item in the browser. Read-only. |
The listItem resource has the following relationships to other resources.
| Relationship | Type | Description |
|---|---|---|
| activities | itemActivity collection | The list of recent activities that took place on this item. |
| analytics | itemAnalytics resource | Analytics about the view activities that took place on this item. |
| documentSetVersions | documentSetVersion collection | Version information for a document set version created by a user. |
| driveItem | driveItem | For document libraries, the driveItem relationship exposes the listItem as a driveItem |
| fields | fieldValueSet | The values of the columns set on this list item. |
| permissions | permission collection | The set of permissions for the item. Read-only. Nullable. |
| versions | listItemVersion collection | The list of previous versions of the list item. |
The following JSON representation shows the resource type.
{
"contentType": { "@odata.type": "microsoft.graph.contentTypeInfo" },
"fields": { "@odata.type": "microsoft.graph.fieldValueSet" },
"sharepointIds": { "@odata.type": "microsoft.graph.sharepointIds" },
/* relationships */
"activities": [{"@odata.type": "microsoft.graph.itemActivity"}],
"analytics": { "@odata.type": "microsoft.graph.itemAnalytics" },
"documentSetVersions": [{"@odata.type": "microsoft.graph.documentSetVersion"}],
"driveItem": { "@odata.type": "microsoft.graph.driveItem" },
"versions": [{"@odata.type": "microsoft.graph.listItemVersion"}],
/* inherited from baseItem */
"id": "string",
"name": "name of resource",
"createdBy": { "@odata.type": "microsoft.graph.identitySet" },
"createdDateTime": "timestamp",
"description": "description of resource",
"eTag": "string",
"lastModifiedBy": { "@odata.type": "microsoft.graph.identitySet" },
"lastModifiedDateTime": "timestamp",
"parentReference": { "@odata.type": "microsoft.graph.itemReference"},
"webUrl": "url"
}