| GET | /api/automation/{AutomationId}/inspection |
|---|
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 AutoInspectionModel
Inherits AutomationModel
'''<Summary>
'''The inspection type for the template.
'''</Summary>
<ApiMember(Description:="The inspection type for the template.", ParameterType:="query")>
Public Overridable Property InspectionTypeId As Guid
'''<Summary>
'''The template to base the new inspection on.
'''</Summary>
<ApiMember(Description:="The template to base the new inspection on.", ParameterType:="query")>
Public Overridable Property InspectionTemplateId As Guid
'''<Summary>
'''The inspector chosen for this inspection will be a contact linked to the project in this role. If no one matches the description, the inspector is not set.
'''</Summary>
<ApiMember(Description:="The inspector chosen for this inspection will be a contact linked to the project in this role. If no one matches the description, the inspector is not set. ", ParameterType:="query")>
Public Overridable Property ContactRoleId As Guid
'''<Summary>
'''If this is true, then if a project inspection for this template already exists, we will not create another inspection.
'''</Summary>
<ApiMember(Description:="If this is true, then if a project inspection for this template already exists, we will not create another inspection.", ParameterType:="query")>
Public Overridable Property IgnoreIfExists As Boolean
End Class
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 details of a specific inspection automation
'''</Summary>
<Api(Description:="Get details of a specific inspection automation")>
Public Partial Class GetInspectionAutomation
'''<Summary>
'''Automation Id.
'''</Summary>
<ApiMember(Description:="Automation Id.", ParameterType:="path")>
Public Overridable Property AutomationId As Guid
End Class
<ApiResponse(Description:="Returns an inspection automation")>
Public Partial Class GetInspectionAutomationResponse
'''<Summary>
'''Inspection Automation
'''</Summary>
<ApiMember(Description:="Inspection Automation")>
Public Overridable Property Automation As AutoInspectionModel
Public Overridable Property ResponseStatus As ResponseStatus
End Class
End Namespace
End Namespace
VB.NET GetInspectionAutomation 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/{AutomationId}/inspection HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Automation":{"InspectionTypeId":"00000000-0000-0000-0000-000000000000","InspectionTemplateId":"00000000-0000-0000-0000-000000000000","ContactRoleId":"00000000-0000-0000-0000-000000000000","IgnoreIfExists":false,"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"}}}