Toggle menu

attachFileToListItem

Description

Attach a file to a list item in a SharePoint list.

Parameters

NameTypeComments
listTitleStringThe title of the list that contains the list item to attach the file to. Exactly one of 'listTitle' or 'listUrl' must be specified
listUrlStringThe relative server list that contains the list item to attach the file to. Exactly one of 'listTitle' or 'listUrl' must be specified
listItemIdNumberThe id of the list item to attach the file to
filestoreIdString/UUIDUUID file identifier of the file to upload
authDetailsObject, optionalThe authDetails set in the worker configuration to use. If not set the request will use the default authDetails
authDetails.identifierStringThe identifier of the sharepointAuthDetails (in the worker configuration) you would like to use
authDetails.authTypeStringThe authentication of the sharepointAuthDetails (in the worker configuration) you would like to use
fileNameString, optionalThe name to call the file when it is uploaded to SharePoint. If not specified it will take the name of the file in the file store
filestoreApiKeyString, optionalAn API Key to access the file store

Example

{
    "id": "123",
    "jsonrpc": "2.0",
    "method": "attachFileToListItem",
    "params": {
        "listTitle": "GossTest",
        "listItemId": 1,
        "filestoreId": "00000000-0000-0000-0000-000000000000",
        "fileName": "MyImage.jpg"
    }
}

Last modified on 27 June 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon