Platform API

<back to all web services

GetRolesForAutomationNotifications

Get eligible roles for automation notifications

Requires Authentication
The following routes are available for this service:
GET/api/automation/notification/{ObjectId}/roles
namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModel

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type GroupedListItemModel() = 
        member val ListItemId:Guid = new Guid() with get,set
        member val Name:String = null with get,set
        member val GroupId:Guid = new Guid() with get,set
        member val GroupName:String = null with get,set

    [<ApiResponse(Description="A list of roles that are eligible to be assigned to a notification.")>]
    [<AllowNullLiteral>]
    type GetRolesForAutomationNotificationsResponse() = 
        ///<summary>
        ///List of all roles (grouped by suite) that can be assigned to a notification.
        ///</summary>
        [<ApiMember(Description="List of all roles (grouped by suite) that can be assigned to a notification.")>]
        member val AllRoles:ResizeArray<GroupedListItemModel> = null with get,set

        ///<summary>
        ///List of roles that are already assigned to an email notification for the object, these should be excluded from being selected again.
        ///</summary>
        [<ApiMember(Description="List of roles that are already assigned to an email notification for the object, these should be excluded from being selected again.")>]
        member val RolesUsedEmail:ResizeArray<Guid> = null with get,set

        ///<summary>
        ///List of roles that are already assigned to an sms notification for the object, these should be excluded from being selected again.
        ///</summary>
        [<ApiMember(Description="List of roles that are already assigned to an sms notification for the object, these should be excluded from being selected again.")>]
        member val RolesUsedSMS:ResizeArray<Guid> = null with get,set

        member val ResponseStatus:ResponseStatus = null with get,set

    ///<summary>
    ///Get eligible roles for automation notifications
    ///</summary>
    [<Api(Description="Get eligible roles for automation notifications")>]
    [<ApiResponse(Description="A list of roles that are eligible to be assigned to a notification.")>]
    [<AllowNullLiteral>]
    type GetRolesForAutomationNotifications() = 
        inherit GetRolesForAutomationNotificationsResponse()
        ///<summary>
        ///Object the notification will be for. Used to exclude any currently assigned roles.
        ///</summary>
        [<ApiMember(Description="Object the notification will be for. Used to exclude any currently assigned roles.", ParameterType="path")>]
        member val ObjectId:Guid = new Guid() with get,set

F# GetRolesForAutomationNotifications DTOs

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

HTTP + CSV

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

GET /api/automation/notification/{ObjectId}/roles HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"AllRoles":[{"ListItemId":"00000000-0000-0000-0000-000000000000","Name":"String","GroupId":"00000000-0000-0000-0000-000000000000","GroupName":"String"}],"RolesUsedEmail":["00000000-0000-0000-0000-000000000000"],"RolesUsedSMS":["00000000-0000-0000-0000-000000000000"],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}