Required permission: | SharepointFiles |
POST | /DynamicsCRM/Sharepoint/File/Upload |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports regis.DynamicsCRM.Requests
Imports regis.DynamicsCRM.Responses
Namespace Global
Namespace regis.DynamicsCRM.Requests
Public Partial Class CRMSharepointFileUploadRequest
Public Overridable Property filename As String
Public Overridable Property file_base64 As String
Public Overridable Property is_invoice As Boolean
End Class
End Namespace
Namespace regis.DynamicsCRM.Responses
Public Partial Class CRMSharepointFileResponse
Public Overridable Property ResponseStatus As ResponseStatus
Public Overridable Property file_base64 As String
Public Overridable Property filename As String
Public Overridable Property item_id As String
Public Overridable Property filesize As Integer
Public Overridable Property mimetype As String
Public Overridable Property sharepoint_url As String
End Class
End Namespace
End Namespace
VB.NET CRMSharepointFileUploadRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /DynamicsCRM/Sharepoint/File/Upload HTTP/1.1
Host: data.regent-college.edu
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
filename: String,
file_base64: String,
is_invoice: False
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { responseStatus: { errorCode: String, message: String, stackTrace: String, errors: [ { errorCode: String, fieldName: String, message: String, meta: { String: String } } ], meta: { String: String } }, file_base64: String, filename: String, item_id: String, filesize: 0, mimetype: String, sharepoint_url: String }