regis

<back to all web services

CRMSharepointFileRequest

Requires Authentication
Required permission:SharepointFiles
The following routes are available for this service:
POST/DynamicsCRM/Sharepoint/File
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 CRMSharepointFileRequest
            Public Overridable Property filename As String
            Public Overridable Property item_id As String
            Public Overridable Property convert_to_pdf As Boolean
            Public Overridable Property as_thumbnail As Boolean
            Public Overridable Property is_development As Boolean
            Public Overridable Property is_invoice As Boolean
            Public Overridable Property is_tax_receipt 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 CRMSharepointFileRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /DynamicsCRM/Sharepoint/File HTTP/1.1 
Host: data.regent-college.edu 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	filename: String,
	item_id: String,
	convert_to_pdf: False,
	as_thumbnail: False,
	is_development: False,
	is_invoice: False,
	is_tax_receipt: 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
}