| GET | /api/riskstore/eventsource-perspective | Get event source and their perspectives, used by the Excel Add-On |
|---|
import Foundation
import ServiceStack
public class GetEventSourcePerspectiveRequest : IGet, Codable
{
/**
* Flag to indicate if to return only active perspectives (false) or all (true)
*/
// @ApiMember(DataType="boolean", Description="Flag to indicate if to return only active perspectives (false) or all (true)", IsRequired=true)
public var includeInactive:Bool
required public init(){}
}
public class GetEventSourcePerspectiveResponse : Codable
{
public var eventSourcePerspectives:[EventSourcePerspective]
public var responseStatus:ResponseStatus
required public init(){}
}
public class EventSourcePerspective : Codable
{
public var eventSourceId:Int
public var eventSourceSystem:String
public var eventSourceVersion:String
public var perspectiveId:Int
public var perspectiveName:String
public var isActive:Bool
required public init(){}
}
Swift GetEventSourcePerspectiveRequest 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/riskstore/eventsource-perspective HTTP/1.1 Host: riskstoreng-dev.nephila.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
eventSourcePerspectives:
[
{
eventSourceId: 0,
eventSourceSystem: String,
eventSourceVersion: String,
perspectiveId: 0,
perspectiveName: String,
isActive: False
}
],
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}