| All Verbs | /api/contactrolegroups/{LicenseeId} |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Eros.Subtle.Canvara.WebAPIModel.ServiceModel
Imports Eros.Saguna.Common.WebAPIModel.Models
Namespace Global
Namespace Eros.Saguna.Common.WebAPIModel.Models
Public Partial Class PagedModel
'''<Summary>
'''Page Number to retrieve
'''</Summary>
<ApiMember(DataType:="int", Description:="Page Number to retrieve", Name:="PageNumber")>
Public Overridable Property PageNumber As Integer
'''<Summary>
'''Number of records to retrieve
'''</Summary>
<ApiMember(DataType:="int", Description:="Number of records to retrieve", Name:="PageSize")>
Public Overridable Property PageSize As Integer
'''<Summary>
'''Index of field to sort results by
'''</Summary>
<ApiMember(DataType:="int", Description:="Index of field to sort results by", Name:="SortIndex")>
Public Overridable Property SortIndex As Integer
'''<Summary>
'''Sort Order - Ascending or Descending
'''</Summary>
<ApiMember(DataType:="int", Description:="Sort Order - Ascending or Descending", Name:="SortOrder")>
Public Overridable Property SortOrder As SortOrder
End Class
Public Partial Class RoleGroupModel
'''<Summary>
'''Role Group Id
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Role Group Id", Name:="RoleGroupId")>
Public Overridable Property RoleGroupId As Guid
'''<Summary>
'''Role Group Name
'''</Summary>
<ApiMember(DataType:="string", Description:="Role Group Name", Name:="Name")>
Public Overridable Property Name As String
'''<Summary>
'''Owner Contact Id
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Owner Contact Id", Name:="OwnerContactId")>
Public Overridable Property OwnerContactId As Guid
'''<Summary>
'''Number of Roles
'''</Summary>
<ApiMember(DataType:="int", Description:="Number of Roles", Name:="NumberOfRoles")>
Public Overridable Property NumberOfRoles As Integer
'''<Summary>
'''Roles belonging to the Role Group
'''</Summary>
<ApiMember(DataType:="List", Description:="Roles belonging to the Role Group", Name:="Roles")>
Public Overridable Property Roles As List(Of RoleGroupRolesModel)
'''<Summary>
''''A' (Active), 'I' (Inactive)
'''</Summary>
<ApiMember(DataType:="string", Description:="'A' (Active), 'I' (Inactive)", Name:="RecordStatus")>
Public Overridable Property RecordStatus As String
'''<Summary>
'''True if Licensee-owned, allowing editing, deleting, archiving
'''</Summary>
<ApiMember(DataType:="bool", Description:="True if Licensee-owned, allowing editing, deleting, archiving", Name:="AllowEdit", ParameterType:="query")>
Public Overridable Property AllowEdit As Boolean
End Class
Public Partial Class RoleGroupRolesModel
'''<Summary>
'''Role Id
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Role Id", Name:="RoleId")>
Public Overridable Property RoleId As Guid
'''<Summary>
'''Role Name
'''</Summary>
<ApiMember(DataType:="string", Description:="Role Name", Name:="RoleName")>
Public Overridable Property RoleName As String
'''<Summary>
'''Role Group Id
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Role Group Id", Name:="RoleGroupId")>
Public Overridable Property RoleGroupId As Guid
'''<Summary>
'''Role Group Name
'''</Summary>
<ApiMember(DataType:="string", Description:="Role Group Name", Name:="RoleGroupName")>
Public Overridable Property RoleGroupName As String
'''<Summary>
'''Role Group Role Id
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Role Group Role Id", Name:="RoleGroupRoleId")>
Public Overridable Property RoleGroupRoleId As Guid
'''<Summary>
''''A' (Active), 'I' (Inactive)
'''</Summary>
<ApiMember(DataType:="string", Description:="'A' (Active), 'I' (Inactive)", Name:="RecordStatus")>
Public Overridable Property RecordStatus As String
'''<Summary>
'''Owner Contact Id
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Owner Contact Id", Name:="OwnerContactId")>
Public Overridable Property OwnerContactId As Guid
End Class
Public Enum SortOrder
Ascending
Descending
End Enum
End Namespace
Namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModel
'''<Summary>
'''Get role groups for the given criteria
'''</Summary>
<Api(Description:="Get role groups for the given criteria")>
Public Partial Class GetContactRoleGroups
Inherits PagedModel
'''<Summary>
'''Get contact role groups for the specified licensee
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Get contact role groups for the specified licensee", IsRequired:=true, Name:="LicenseeId", ParameterType:="query")>
Public Overridable Property LicenseeId As Guid
'''<Summary>
'''Role Group Name
'''</Summary>
<ApiMember(DataType:="string", Description:="Role Group Name", Name:="Name", ParameterType:="query")>
Public Overridable Property Name As String
'''<Summary>
'''Active/Archived filter
'''</Summary>
<ApiMember(DataType:="string", Description:="Active/Archived filter", Name:="RecordStatus", ParameterType:="query")>
Public Overridable Property RecordStatus As String
End Class
<ApiResponse(Description:="List of role groups")>
Public Partial Class GetContactRoleGroupsResponse
Public Overridable Property RoleGroups As List(Of RoleGroupModel)
Public Overridable Property TotalRoleGroups As Integer
Public Overridable Property ResponseStatus As ResponseStatus
End Class
End Namespace
End Namespace
VB.NET GetContactRoleGroups DTOs
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 /api/contactrolegroups/{LicenseeId} HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"LicenseeId":"00000000-0000-0000-0000-000000000000","Name":"String","RecordStatus":"String","PageNumber":0,"PageSize":0,"SortIndex":0,"SortOrder":"Ascending"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"RoleGroups":[{"RoleGroupId":"00000000-0000-0000-0000-000000000000","Name":"String","OwnerContactId":"00000000-0000-0000-0000-000000000000","NumberOfRoles":0,"Roles":[{"RoleId":"00000000-0000-0000-0000-000000000000","RoleName":"String","RoleGroupId":"00000000-0000-0000-0000-000000000000","RoleGroupName":"String","RoleGroupRoleId":"00000000-0000-0000-0000-000000000000","RecordStatus":"String","OwnerContactId":"00000000-0000-0000-0000-000000000000"}],"RecordStatus":"String","AllowEdit":false}],"TotalRoleGroups":0,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}