POST api/List/{listId}/UploadFile?folderUrl={folderUrl}&overwrite={overwrite}
Uploads a file on the given listId.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
listId |
The id of the list. |
string |
Required |
folderUrl |
An optional parameter. The relative folder Url from the list. By default the file will be uploaded to the root folder of the list. |
string |
Default value is |
overwrite |
An optional parameter. A boolean indicating if any existing file, with the same filename, should be overwritten. By default the file will not overwrite any existing files. |
boolean |
Default value is False |
Body Parameters
The file object that will be uploaded to the list
WorkPoint365.WebAPI.Model.SharePoint.ListItem+FileName | Description | Type | Additional information |
---|---|---|---|
Id |
Gets or sets the identifier. |
integer |
None. |
UniqueId |
Gets or sets the unique identifier. |
globally unique identifier |
None. |
FileBytes |
Gets or sets the file bytes. |
string |
None. |
FileName |
Gets or sets the name of the file. |
string |
None. |
Length |
Gets or sets the length. |
integer |
None. |
Request Formats
application/json, text/json
{ "Id": 1, "UniqueId": "9c2480cd-c01e-43d4-9924-16aeb2d63647", "FileBytes": "sample string 3", "FileName": "sample string 4", "Length": 5 }
application/xml, text/xml
<ListItem.File xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WorkPoint365.WebAPI.Model.SharePoint"> <FileBytes>sample string 3</FileBytes> <FileName>sample string 4</FileName> <Id>1</Id> <Length>5</Length> <UniqueId>9c2480cd-c01e-43d4-9924-16aeb2d63647</UniqueId> </ListItem.File>
Response Information
Resource Description
Returns a bool to indicate if the upload was succesful.
booleanResponse Formats
application/json, text/json
true
application/xml, text/xml
<boolean xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</boolean>