| 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 .jsv suffix or ?format=jsv
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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Automations:
[
{
AutomationType: String,
ObjectName: String,
RmsTableCtxName: String,
ActionList:
[
00000000-0000-0000-0000-000000000000
],
Actions: String,
Name: String,
Description: String,
RecordStatus: String
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}