| GET | /api/automation/{ObjectId}/list |
|---|
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 AutomationModel
'''<Summary>
'''The unique automation Id
'''</Summary>
<ApiMember(Description:="The unique automation Id", ParameterType:="query")>
Public Overridable Property AutomationId As Guid
'''<Summary>
'''The automation type Id
'''</Summary>
<ApiMember(Description:="The automation type Id", ParameterType:="query")>
Public Overridable Property AutomationTypeId As Guid
'''<Summary>
'''The automation type
'''</Summary>
<ApiMember(Description:="The automation type", ParameterType:="query")>
Public Overridable Property AutomationType As String
'''<Summary>
'''The object this automation applies to
'''</Summary>
<ApiMember(Description:="The object this automation applies to", ParameterType:="query")>
Public Overridable Property ObjectId As Guid
'''<Summary>
'''The object name this automation applies to
'''</Summary>
<ApiMember(Description:="The object name this automation applies to", ParameterType:="query")>
Public Overridable Property ObjectName As String
'''<Summary>
'''The Id of the object type that this automation applies to.
'''</Summary>
<ApiMember(Description:="The Id of the object type that this automation applies to. ", ParameterType:="query")>
Public Overridable Property RmsTableCtxIdObject As Guid
'''<Summary>
'''The name of the object type that this automation applies to.
'''</Summary>
<ApiMember(Description:="The name of the object type that this automation applies to.", ParameterType:="query")>
Public Overridable Property RmsTableCtxName As String
'''<Summary>
'''A guid list containing the selected system action Id's that trigger this automation.
'''</Summary>
<ApiMember(Description:="A guid list containing the selected system action Id's that trigger this automation.", ParameterType:="query")>
Public Overridable Property ActionList As List(Of Guid)
'''<Summary>
'''A comma separated string of the selected system action names that trigger this automation.
'''</Summary>
<ApiMember(Description:="A comma separated string of the selected system action names that trigger this automation.", ParameterType:="query")>
Public Overridable Property Actions As String
'''<Summary>
'''Name of the automation.
'''</Summary>
<ApiMember(Description:="Name of the automation.", ParameterType:="query")>
Public Overridable Property Name As String
'''<Summary>
'''Description of the automation
'''</Summary>
<ApiMember(Description:="Description of the automation", ParameterType:="query")>
Public Overridable Property Description As String
'''<Summary>
'''Owner Contact Id
'''</Summary>
<ApiMember(Description:="Owner Contact Id", ParameterType:="query")>
Public Overridable Property OwnerContactId As Guid
'''<Summary>
'''Record Status of the automation.
'''</Summary>
<ApiMember(Description:="Record Status of the automation.", ParameterType:="query")>
Public Overridable Property RecordStatus As String
End Class
End Namespace
Namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModel
'''<Summary>
'''Get automations that are setup for an object
'''</Summary>
<Api(Description:="Get automations that are setup for an object")>
Public Partial Class GetAutomationsForObject
'''<Summary>
'''Object to retrieve automations for.
'''</Summary>
<ApiMember(Description:="Object to retrieve automations for.", ParameterType:="path")>
Public Overridable Property ObjectId As Guid
End Class
<ApiResponse(Description:="List of automations that are setup for an object")>
Public Partial Class GetAutomationsForObjectResponse
'''<Summary>
'''List of automations.
'''</Summary>
<ApiMember(Description:="List of automations.")>
Public Overridable Property Automations As List(Of AutomationModel)
Public Overridable Property ResponseStatus As ResponseStatus
End Class
End Namespace
End Namespace
VB.NET GetAutomationsForObject 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/automation/{ObjectId}/list HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Automations":[{"AutomationId":"00000000-0000-0000-0000-000000000000","AutomationTypeId":"00000000-0000-0000-0000-000000000000","AutomationType":"String","ObjectId":"00000000-0000-0000-0000-000000000000","ObjectName":"String","RmsTableCtxIdObject":"00000000-0000-0000-0000-000000000000","RmsTableCtxName":"String","ActionList":["00000000-0000-0000-0000-000000000000"],"Actions":"String","Name":"String","Description":"String","OwnerContactId":"00000000-0000-0000-0000-000000000000","RecordStatus":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}