GET | /portal/flows |
---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Voice.Api.App.Portal
Imports Voice.Api
Imports Voice.Api.Flows
Imports Voice.Api.Customers
Imports Voice.Api.Flows.Data
Imports Voice.Api.Endpoints
Imports Voice.Api.Settings
Imports Voice.Api.Accounts
Namespace Global
Namespace Voice.Api
Public Partial Class EntityInfo
'''<Summary>
'''The ID of the object
'''</Summary>
<ApiMember(Description:="The ID of the object")>
Public Overridable Property Id As String
'''<Summary>
'''The date the object was created
'''</Summary>
<ApiMember(Description:="The date the object was created")>
Public Overridable Property DateCreated As String
'''<Summary>
'''The date the object was last modified
'''</Summary>
<ApiMember(Description:="The date the object was last modified")>
Public Overridable Property DateLastModified As String
'''<Summary>
'''The user that created this object
'''</Summary>
<ApiMember(Description:="The user that created this object")>
Public Overridable Property CreatedBy As String
'''<Summary>
'''The user that last modified this object
'''</Summary>
<ApiMember(Description:="The user that last modified this object")>
Public Overridable Property LastModifiedBy As String
End Class
Public Partial Class ListRequest(Of T)
Implements IGet
'''<Summary>
'''The page of data to retrieve
'''</Summary>
<ApiMember(Description:="The page of data to retrieve")>
Public Overridable Property Page As Integer
'''<Summary>
'''If you want all objects to be returned. This should be used with care
'''</Summary>
<ApiMember(Description:="If you want all objects to be returned. This should be used with care")>
Public Overridable Property All As Boolean
'''<Summary>
'''The number per page to retrieve
'''</Summary>
<ApiMember(Description:="The number per page to retrieve")>
Public Overridable Property CountPerPage As Integer
'''<Summary>
'''Specific IDs
'''</Summary>
<ApiMember(Description:="Specific IDs")>
Public Overridable Property SpecificIds As List(Of String)
'''<Summary>
'''Specify a sort field
'''</Summary>
<ApiMember(Description:="Specify a sort field")>
Public Overridable Property SortField As String
'''<Summary>
'''Specify a sort order
'''</Summary>
<ApiMember(Description:="Specify a sort order")>
Public Overridable Property SortOrder As SortOrders
'''<Summary>
'''Disables total / page counts - improves performance. Returns only data. If there is no more data, Items will be empty array
'''</Summary>
<ApiMember(Description:="Disables total / page counts - improves performance. Returns only data. If there is no more data, Items will be empty array")>
Public Overridable Property SimplifiedPaging As Boolean
End Class
Public Partial Class ListResponse(Of T)
'''<Summary>
'''The items
'''</Summary>
<ApiMember(Description:="The items")>
Public Overridable Property Items As List(Of AccountInfo)
'''<Summary>
'''The total number of items
'''</Summary>
<ApiMember(Description:="The total number of items")>
Public Overridable Property TotalCount As Integer
'''<Summary>
'''The total number of pages
'''</Summary>
<ApiMember(Description:="The total number of pages")>
Public Overridable Property TotalPages As Integer
'''<Summary>
'''Are there more pages of items? Used with simplified paging
'''</Summary>
<ApiMember(Description:="Are there more pages of items? Used with simplified paging")>
Public Overridable Property HasMorePages As Boolean
End Class
Public Enum SortOrders
Ascend
Descend
End Enum
End Namespace
Namespace Voice.Api.Accounts
Public Partial Class AccountInfo
Inherits EntityInfo
'''<Summary>
'''The name of this account
'''</Summary>
<ApiMember(Description:="The name of this account")>
Public Overridable Property Name As String
'''<Summary>
'''The ID of this account's parent
'''</Summary>
<ApiMember(Description:="The ID of this account's parent")>
Public Overridable Property ParentAccountId As String
'''<Summary>
'''The twilio account SID
'''</Summary>
<ApiMember(Description:="The twilio account SID")>
Public Overridable Property TwilioAccountSid As String
'''<Summary>
'''The ancestors of this account. Useful for breadcrumbs
'''</Summary>
<ApiMember(Description:="The ancestors of this account. Useful for breadcrumbs")>
Public Overridable Property AncestorIds As List(Of String)
'''<Summary>
'''The max number of phone numbers this account can have
'''</Summary>
<ApiMember(Description:="The max number of phone numbers this account can have")>
Public Overridable Property MaxPhoneNumbers As Integer
'''<Summary>
'''This account is BYOA
'''</Summary>
<ApiMember(Description:="This account is BYOA")>
Public Overridable Property IsBYOA As Boolean
'''<Summary>
'''TrustHub Profile Sid
'''</Summary>
<ApiMember(Description:="TrustHub Profile Sid")>
Public Overridable Property TrustHubProfileSid As String
'''<Summary>
'''The ID of the logo file
'''</Summary>
<ApiMember(Description:="The ID of the logo file")>
Public Overridable Property LogoId As String
'''<Summary>
'''The URI of the logo file
'''</Summary>
<ApiMember(Description:="The URI of the logo file")>
Public Overridable Property LogoUri As String
'''<Summary>
'''The billing settings for this account
'''</Summary>
<ApiMember(Description:="The billing settings for this account")>
Public Overridable Property BillingSettings As BillingSettings
End Class
Public Partial Class BillingItem
Public Overridable Property BaseCost As Double
Public Overridable Property RawUnitMultiplier As Double
Public Overridable Property UnitCost As Double
Public Overridable Property Allowance As Integer
End Class
Public Partial Class BillingSettings
Public Overridable Property Base As BillingItem
Public Overridable Property LocalNumbers As BillingItem
Public Overridable Property TollFreeNumbers As BillingItem
Public Overridable Property InboundVoiceCalls As BillingItem
Public Overridable Property OutboundVoiceCalls As BillingItem
Public Overridable Property InboundFaxes As BillingItem
Public Overridable Property OutboundFaxes As BillingItem
Public Overridable Property InboundSmsMessages As BillingItem
Public Overridable Property OutboundSmsMessages As BillingItem
Public Overridable Property AIInsights As BillingItem
Public Overridable Property AILiveMinutes As BillingItem
End Class
End Namespace
Namespace Voice.Api.App.Portal
Public Partial Class AppGetFlows
Inherits ListRequest(Of FlowInfo)
Public Overridable Property AccountId As String
Public Overridable Property CustomerId As String
Public Overridable Property NameFilter As String
Public Overridable Property Role As FlowRoles?
End Class
End Namespace
Namespace Voice.Api.Customers
Public Partial Class CustomerBreadcrumb
Public Overridable Property Id As String
Public Overridable Property Name As String
End Class
End Namespace
Namespace Voice.Api.Endpoints
Public Enum UserDataFieldModes
Hidden
[ReadOnly]
ReadWrite
End Enum
End Namespace
Namespace Voice.Api.Flows
Public Enum FlowChannels
Voice
Chat
Fax
End Enum
Public Partial Class FlowExit
'''<Summary>
'''The unique ID for this exit
'''</Summary>
<ApiMember(Description:="The unique ID for this exit")>
Public Overridable Property Id As String
'''<Summary>
'''The name of this exit
'''</Summary>
<ApiMember(Description:="The name of this exit")>
Public Overridable Property Name As String
'''<Summary>
'''The UI for the exit
'''</Summary>
<ApiMember(Description:="The UI for the exit")>
Public Overridable Property UI As FlowNodeUI
End Class
Public Partial Class FlowInfo
Inherits EntityInfo
'''<Summary>
'''The name of this flow
'''</Summary>
<ApiMember(Description:="The name of this flow")>
Public Overridable Property Name As String
'''<Summary>
'''The roles that this flow has
'''</Summary>
<ApiMember(Description:="The roles that this flow has")>
Public Overridable Property Roles As List(Of FlowRoles)
'''<Summary>
'''What this flow does
'''</Summary>
<ApiMember(Description:="What this flow does")>
Public Overridable Property Description As String
'''<Summary>
'''Any notes for this flow
'''</Summary>
<ApiMember(Description:="Any notes for this flow")>
Public Overridable Property Notes As String
'''<Summary>
'''The ID of the account associated with the flow
'''</Summary>
<ApiMember(Description:="The ID of the account associated with the flow")>
Public Overridable Property AccountId As String
'''<Summary>
'''The name of the account associated with the flow
'''</Summary>
<ApiMember(Description:="The name of the account associated with the flow")>
Public Overridable Property AccountName As String
'''<Summary>
'''The ID of the customer this flow is associated with
'''</Summary>
<ApiMember(Description:="The ID of the customer this flow is associated with")>
Public Overridable Property CustomerId As String
'''<Summary>
'''The name of the customer this flow is associated with
'''</Summary>
<ApiMember(Description:="The name of the customer this flow is associated with")>
Public Overridable Property CustomerName As String
'''<Summary>
'''The breadcrumb to the flow for this endpoint
'''</Summary>
<ApiMember(Description:="The breadcrumb to the flow for this endpoint")>
Public Overridable Property CustomerBreadcrumb As List(Of CustomerBreadcrumb)
'''<Summary>
'''The nodes in this flow
'''</Summary>
<ApiMember(Description:="The nodes in this flow")>
Public Overridable Property Nodes As List(Of FlowNode)
'''<Summary>
'''The flow's parameters
'''</Summary>
<ApiMember(Description:="The flow's parameters")>
Public Overridable Property Parameters As List(Of FlowParameter)
'''<Summary>
'''The flow's exits
'''</Summary>
<ApiMember(Description:="The flow's exits")>
Public Overridable Property Exits As List(Of FlowExit)
'''<Summary>
'''The UI data for the flow
'''</Summary>
<ApiMember(Description:="The UI data for the flow")>
Public Overridable Property UI As FlowUI
'''<Summary>
'''The list of tags for this flow
'''</Summary>
<ApiMember(Description:="The list of tags for this flow")>
Public Overridable Property Tags As List(Of Tag)
'''<Summary>
'''The number of nodes in this flow
'''</Summary>
<ApiMember(Description:="The number of nodes in this flow")>
Public Overridable Property NodeCount As Integer
End Class
Public Partial Class FlowNode
'''<Summary>
'''The ID of this node. Must be unique within the flow but can be anything
'''</Summary>
<ApiMember(Description:="The ID of this node. Must be unique within the flow but can be anything")>
Public Overridable Property Id As String
'''<Summary>
'''Is this the starting node for the flow. Only one node can have this set
'''</Summary>
<ApiMember(Description:="Is this the starting node for the flow. Only one node can have this set")>
Public Overridable Property IsStartNode As Boolean
'''<Summary>
'''The name of the node, descriptive to be used as a reminder in the GUI
'''</Summary>
<ApiMember(Description:="The name of the node, descriptive to be used as a reminder in the GUI")>
Public Overridable Property Name As String
'''<Summary>
'''The specification for the node
'''</Summary>
<ApiMember(Description:="The specification for the node")>
Public Overridable Property Spec As FlowNodeSpec
'''<Summary>
'''The UI data for the node
'''</Summary>
<ApiMember(Description:="The UI data for the node")>
Public Overridable Property UI As FlowNodeUI
'''<Summary>
'''The data for this node. These will be POST'd to the endpoint when it is called.
'''</Summary>
<ApiMember(Description:="The data for this node. These will be POST'd to the endpoint when it is called.")>
Public Overridable Property Parameters As NodeParameterMap
End Class
Public Enum FlowNodeCategories
General
Voice
Logic
DateAndTime
Audio
Messaging
Assistant
Flows
Fax
Network
Cookies
CallCenter
Intelligence
End Enum
Public Partial Class FlowNodeSpec
'''<Summary>
'''The name of this node
'''</Summary>
<ApiMember(Description:="The name of this node")>
Public Overridable Property Name As String
'''<Summary>
'''A description of this node
'''</Summary>
<ApiMember(Description:="A description of this node")>
Public Overridable Property Description As String
'''<Summary>
'''Icon class for this node (FontAwesome)
'''</Summary>
<ApiMember(Description:="Icon class for this node (FontAwesome)")>
Public Overridable Property IconClass As String
'''<Summary>
'''The type name for this node
'''</Summary>
<ApiMember(Description:="The type name for this node")>
Public Overridable Property TypeName As String
'''<Summary>
'''The category this node should be grouped under
'''</Summary>
<ApiMember(Description:="The category this node should be grouped under")>
Public Overridable Property Category As FlowNodeCategories
'''<Summary>
'''The URL where this node is located
'''</Summary>
<ApiMember(Description:="The URL where this node is located")>
Public Overridable Property Url As String
'''<Summary>
'''The data type for this node
'''</Summary>
<ApiMember(Description:="The data type for this node")>
Public Overridable Property DataType As DataType
'''<Summary>
'''URL for documentation for this node
'''</Summary>
<ApiMember(Description:="URL for documentation for this node")>
Public Overridable Property DocumentationUrl As String
'''<Summary>
'''The channels that this node is restricted to
'''</Summary>
<ApiMember(Description:="The channels that this node is restricted to")>
Public Overridable Property RestrictToChannels As List(Of FlowChannels)
End Class
Public Partial Class FlowNodeUI
'''<Summary>
'''The X position of the node
'''</Summary>
<ApiMember(Description:="The X position of the node")>
Public Overridable Property X As Double
'''<Summary>
'''The Y position of the node
'''</Summary>
<ApiMember(Description:="The Y position of the node")>
Public Overridable Property Y As Double
'''<Summary>
'''Notes for this node
'''</Summary>
<ApiMember(Description:="Notes for this node")>
Public Overridable Property Notes As String
End Class
Public Partial Class FlowParameter
Inherits DataField
Public Overridable Property IsPublic As Boolean
Public Overridable Property IsKnob As Boolean
End Class
Public Enum FlowRoles
UI
Reference
PhoneNumberRouting
UserDialOut
FaxNumberRouting
End Enum
Public Partial Class FlowUI
Public Overridable Property SelectedNode As String
Public Overridable Property CanvasX As Double
Public Overridable Property CanvasY As Double
Public Overridable Property CanvasZoom As Double
End Class
Public Partial Class NodeParameter
Public Overridable Property Id As String
Public Overridable Property Type As ValueTypes
Public Overridable Property Source As ValueSources
Public Overridable Property IsAsync As Boolean
Public Overridable Property ReferenceId As String
Public Overridable Property Value As Value
Public Overridable Property NoEvalTemplate As Boolean
Public Overridable Property ListParameters As List(Of NodeParameterMap)
Public Overridable Property StructParameters As NodeParameterMap
Public Overridable Property IsOutput As Boolean
Public Overridable Property Expression As String
Public Overridable Property ListType As DataType
End Class
Public Partial Class NodeParameterMap
Inherits Dictionary(Of String, NodeParameter)
End Class
End Namespace
Namespace Voice.Api.Flows.Data
Public Partial Class DataField
Public Overridable Property Id As String
Public Overridable Property Name As String
Public Overridable Property Type As ValueTypes
Public Overridable Property UIHint As UIHints
Public Overridable Property UITab As String
Public Overridable Property IsAsync As Boolean
Public Overridable Property DisableBinding As Boolean
Public Overridable Property StructType As DataType
Public Overridable Property ListType As DataType
Public Overridable Property Description As String
Public Overridable Property PossibleValues As List(Of String)
Public Overridable Property IsOutput As Boolean
Public Overridable Property CustomFieldValuesUrl As String
Public Overridable Property DefaultValue As Value
Public Overridable Property TransitionNameFormat As String
Public Overridable Property Uniqueness As DataFieldUniqueness
Public Overridable Property VoiceOnly As Boolean
Public Overridable Property ConditionalVisibilityField As String
Public Overridable Property ConditionalVisibilityValue As String
Public Overridable Property NoEvalTemplate As Boolean
Public Overridable Property UserMode As UserDataFieldModes
Public Overridable Property AnyValueType As Boolean
End Class
Public Enum DataFieldUniqueness
NotUnique
Unique
UniqueToCustomer
End Enum
Public Partial Class DataType
Public Overridable Property TypeName As String
Public Overridable Property Fields As List(Of DataField)
End Class
Public Partial Class Struct
Inherits Dictionary(Of String, Value)
End Class
Public Enum UIHints
None
LargeText
InlineForm
Password
InlineStruct
End Enum
Public Partial Class Value
Public Overridable Property BoolValue As Boolean?
Public Overridable Property StringValue As String
Public Overridable Property NumberValue As Double?
Public Overridable Property ListValue As List(Of Struct)
Public Overridable Property StructValue As Struct
End Class
Public Enum ValueSources
Value
Flow
System
Customer
Session
Endpoint
Expression
User
End Enum
Public Enum ValueTypes
NotSpecified
[String]
[Boolean]
Number
List
Struct
Transition
Custom
[Date]
AudioFile
TimeZoneId
PhoneNumber
User
Endpoint
Time
File
FaxNumber
EmailAccount
Customer
Flow
Team
FlowReference
Integration
Assistant
End Enum
End Namespace
Namespace Voice.Api.Settings
Public Partial Class Tag
Public Overridable Property Id As String
Public Overridable Property Name As String
Public Overridable Property Color As TagColors
End Class
Public Enum TagColors
Magenta
Red
Volcano
Orange
Gold
Lime
Green
Cyan
Blue
GeekBlue
Purple
End Enum
End Namespace
End Namespace
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 /portal/flows HTTP/1.1 Host: team.evovoice.io Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { items: [ { name: String, roles: [ UI ], description: String, notes: String, accountId: String, accountName: String, customerId: String, customerName: String, customerBreadcrumb: [ { id: String, name: String } ], nodes: [ { id: String, isStartNode: False, name: String, spec: { name: String, description: String, iconClass: String, typeName: String, category: General, url: String, documentationUrl: String, restrictToChannels: [ Voice ] }, ui: { x: 0, y: 0, notes: String }, parameters: {} } ], parameters: [ { isPublic: False, isKnob: False, id: String, name: String, type: NotSpecified, uiHint: None, uiTab: String, isAsync: False, disableBinding: False, description: String, possibleValues: [ String ], isOutput: False, customFieldValuesUrl: String, defaultValue: { boolValue: False, stringValue: String, numberValue: 0, listValue: [ null ] }, transitionNameFormat: String, uniqueness: NotUnique, voiceOnly: False, conditionalVisibilityField: String, conditionalVisibilityValue: String, noEvalTemplate: False, userMode: Hidden, anyValueType: False } ], exits: [ { id: String, name: String, ui: { x: 0, y: 0, notes: String } } ], ui: { selectedNode: String, canvasX: 0, canvasY: 0, canvasZoom: 0 }, tags: [ { id: String, name: String, color: Magenta } ], nodeCount: 0, id: String, dateCreated: String, dateLastModified: String, createdBy: String, lastModifiedBy: String } ], totalCount: 0, totalPages: 0, hasMorePages: False }