Platform API

<back to all web services

UpdateRoleWithSharing

Updates a Role record, and updates Sharing.

Requires Authentication
The following routes are available for this service:
PUT/api/roles
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 ListItemFilterModel
            Public Overridable Property ListItemFilterId As Guid
            Public Overridable Property FilterName As String
            Public Overridable Property ListId As Guid
            Public Overridable Property ListItemId As Guid
            Public Overridable Property ListItemIsInFilter As Boolean
        End Class

        Public Partial Class ObjectShareModel
            Public Overridable Property ObjectShareId As Guid
            Public Overridable Property ObjectId As Guid
            Public Overridable Property ObjectName As String
            Public Overridable Property Name As String
            Public Overridable Property Description As String
            Public Overridable Property Reference As String
            Public Overridable Property ContactId As Guid
            Public Overridable Property ContactName As String
            Public Overridable Property ContactType As String
            Public Overridable Property ContactImageUrlPrimary As String
            Public Overridable Property ContactImageUrlPrimaryThmbnail As String
            Public Overridable Property ShareStatusId As Guid
            Public Overridable Property ShareStatusName As String
        End Class

        Public Partial Class RoleDetailsModel
            '''<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 Connection Definition Id
            '''</Summary>
            <ApiMember(DataType:="Guid", Description:="Role Connection Definition Id", Name:="RoleConnectionDefinitionId")>
            Public Overridable Property RoleConnectionDefinitionId As Guid

            '''<Summary>
            '''Contact Types the Role applies to
            '''</Summary>
            <ApiMember(DataType:="List", Description:="Contact Types the Role applies to", Name:="ContactTypes")>
            Public Overridable Property ContactTypes As List(Of Guid)

            '''<Summary>
            '''Does the role require contacts to accept it?
            '''</Summary>
            <ApiMember(DataType:="bool", Description:="Does the role require contacts to accept it?", Name:="RequireContactsToAccept")>
            Public Overridable Property RequireContactsToAccept As Boolean

            '''<Summary>
            '''Filters linked to the custom role.
            '''</Summary>
            <ApiMember(DataType:="List", Description:="Filters linked to the custom role.", Name:="ListItemFilters")>
            Public Overridable Property ListItemFilters As List(Of ListItemFilterModel)
        End Class
    End Namespace

    Namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModel

        '''<Summary>
        '''Updates a Role record, and updates Sharing.
        '''</Summary>
        <Api(Description:="Updates a Role record, and updates Sharing.")>
        Public Partial Class UpdateRoleWithSharing
            '''<Summary>
            '''Details of the Contact Role to be Updated.
            '''</Summary>
            <ApiMember(DataType:="RoleDetailsModel", Description:="Details of the Contact Role to be Updated.", IsRequired:=true, Name:="RoleDetails", ParameterType:="query")>
            Public Overridable Property RoleDetails As RoleDetailsModel

            '''<Summary>
            '''
            '''</Summary>
            <ApiMember(DataType:="FormCollection", Description:="", Name:="Form", ParameterType:="query")>
            Public Overridable Property Form As FormCollection

            '''<Summary>
            '''List of Object Share details.
            '''</Summary>
            <ApiMember(DataType:="List<ObjectShareModel>", Description:="List of Object Share details.", Name:="ShareList", ParameterType:="query")>
            Public Overridable Property ShareList As List(Of ObjectShareModel)
        End Class
    End Namespace
End Namespace

VB.NET UpdateRoleWithSharing DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

PUT /api/roles HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"RoleDetails":{"RoleId":"00000000-0000-0000-0000-000000000000","RoleName":"String","RoleConnectionDefinitionId":"00000000-0000-0000-0000-000000000000","ContactTypes":["00000000-0000-0000-0000-000000000000"],"RequireContactsToAccept":false,"ListItemFilters":[{"ListItemFilterId":"00000000-0000-0000-0000-000000000000","FilterName":"String","ListId":"00000000-0000-0000-0000-000000000000","ListItemId":"00000000-0000-0000-0000-000000000000","ListItemIsInFilter":false}]},"Form":[],"ShareList":[{"ObjectShareId":"00000000-0000-0000-0000-000000000000","ObjectId":"00000000-0000-0000-0000-000000000000","ObjectName":"String","Name":"String","Description":"String","Reference":"String","ContactId":"00000000-0000-0000-0000-000000000000","ContactName":"String","ContactType":"String","ContactImageUrlPrimary":"String","ContactImageUrlPrimaryThmbnail":"String","ShareStatusId":"00000000-0000-0000-0000-000000000000","ShareStatusName":"String"}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}