Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports IDB.API.DTO.UserInformation.Operations
Imports IDB.API.DTO.UserInformation
Imports IDB.API.DTO
Imports IDB.API.DTO.Controls.QuickLookup
Namespace Global
Namespace IDB.API.DTO
Public Partial Class UserOrGroup
Public Overridable Property ID As Integer
Public Overridable Property Title As String
Public Overridable Property IsChecked As Boolean
Public Overridable Property Image As String
End Class
End Namespace
Namespace IDB.API.DTO.Controls.QuickLookup
Public Partial Class QuickAddOption
Public Overridable Property Name As String
Public Overridable Property EntityType As String
End Class
End Namespace
Namespace IDB.API.DTO.UserInformation
Public Partial Class UsersOrGroupsResponse
Implements IBaseQuickLookupResponse
Public Overridable Property NumberOfAllRecords As Integer Implements IBaseQuickLookupResponse.NumberOfAllRecords
Public Overridable Property UsersOrGroups As List(Of UserOrGroup)
Public Overridable Property QuickAddOptions As List(Of QuickAddOption) Implements IBaseQuickLookupResponse.QuickAddOptions
End Class
End Namespace
Namespace IDB.API.DTO.UserInformation.Operations
Public Partial Class GetUsersAndGroups
Implements IPageOptions
Implements ISearchCriteria
Public Overridable Property UserEnvironment As Integer
Public Overridable Property PageSize As Integer Implements IPageOptions.PageSize
Public Overridable Property PageNumber As Integer Implements IPageOptions.PageNumber
Public Overridable Property SearchCriteria As String Implements ISearchCriteria.SearchCriteria
Public Overridable Property SelectedUserIDs As List(Of Integer)
Public Overridable Property SelectedGroupIDs As List(Of Integer)
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /csv/reply/GetUsersAndGroups HTTP/1.1
Host: dogw.klokgroep.nl
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"UserEnvironment":0,"PageSize":0,"PageNumber":0,"SearchCriteria":"String","SelectedUserIDs":[0],"SelectedGroupIDs":[0]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"NumberOfAllRecords":0,"UsersOrGroups":[{}],"QuickAddOptions":[{"Name":"String","EntityType":"String"}]}