| GET | /api/objects/{RmsTableCtxIdConnectionMethod}/connectionsFrom/{FromObjectId} | ||
|---|---|---|---|
| GET | /api/objects/{RmsTableCtxIdConnectionMethod}/connectionsTo/{ToObjectId} |
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Eros.Saguna.Common.WebAPIModel.ServiceModels
Imports Eros.Saguna.Common.WebAPIModel.Models
Namespace Global
Namespace Eros.Saguna.Common.WebAPIModel.Models
Public Partial Class ObjectConnectionModel
Public Overridable Property ObjectConnectionId As Guid
Public Overridable Property ObjectIdFrom As Guid
Public Overridable Property ObjectFromReference As String
Public Overridable Property ObjectToReference As String
Public Overridable Property ObjectIdTo As Guid
Public Overridable Property ConnectionMethodId As Guid
Public Overridable Property ObjectFromName As String
Public Overridable Property ObjectToName As String
Public Overridable Property RecordStatus As String
End Class
End Namespace
Namespace Eros.Saguna.Common.WebAPIModel.ServiceModels
'''<Summary>
'''Get object connections for the specified object and connection method.
'''</Summary>
<Api(Description:="Get object connections for the specified object and connection method.")>
Public Partial Class GetObjectConnections
'''<Summary>
''''From' object ID in the connection.
'''</Summary>
<ApiMember(DataType:="Guid", Description:="'From' object ID in the connection.", IsRequired:=true, Name:="FromObjectId", ParameterType:="query")>
Public Overridable Property FromObjectId As Guid
'''<Summary>
''''To' object ID in the connection.
'''</Summary>
<ApiMember(DataType:="Guid", Description:="'To' object ID in the connection.", IsRequired:=true, Name:="ToObjectId", ParameterType:="query")>
Public Overridable Property ToObjectId As Guid
'''<Summary>
'''Guid representing the Connection Method to use to connect the objects with.
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Guid representing the Connection Method to use to connect the objects with.", IsRequired:=true, Name:="RmsTableCtxIdConnectionMethod", ParameterType:="query")>
Public Overridable Property RmsTableCtxIdConnectionMethod As Guid
'''<Summary>
'''Status of object Connections to retrieve, if not specified active connections are retrieved by default.
'''</Summary>
<ApiMember(DataType:="string", Description:="Status of object Connections to retrieve, if not specified active connections are retrieved by default.", Name:="RecordStatus", ParameterType:="query")>
Public Overridable Property RecordStatus As String
End Class
<ApiResponse(Description:="Returns the connections for the specified object.")>
Public Partial Class GetObjectConnectionsResponse
Public Overridable Property ObjectConnections As List(Of ObjectConnectionModel)
Public Overridable Property ResponseStatus As ResponseStatus
End Class
End Namespace
End Namespace
VB.NET GetObjectConnections 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/objects/{RmsTableCtxIdConnectionMethod}/connectionsFrom/{FromObjectId} HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ObjectConnections":[{"ObjectConnectionId":"00000000-0000-0000-0000-000000000000","ObjectIdFrom":"00000000-0000-0000-0000-000000000000","ObjectFromReference":"String","ObjectToReference":"String","ObjectIdTo":"00000000-0000-0000-0000-000000000000","ConnectionMethodId":"00000000-0000-0000-0000-000000000000","ObjectFromName":"String","ObjectToName":"String","RecordStatus":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}