| Requires the role: | SystemAdministrator |
| POST | /ai/sessions/{sessionId}/apply |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Voice.Api.AI
Imports Voice.Api
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
End Namespace
Namespace Voice.Api.AI
Public Partial Class AISessionActionInfo
Public Overridable Property [Date] As String
Public Overridable Property Id As String
Public Overridable Property FunctionName As String
Public Overridable Property Arguments As String
Public Overridable Property Description As String
Public Overridable Property CanBeApplied As Boolean
End Class
Public Partial Class AISessionInfo
Inherits EntityInfo
'''<Summary>
'''The ID of the account associated with this session
'''</Summary>
<ApiMember(Description:="The ID of the account associated with this session")>
Public Overridable Property AccountId As String
'''<Summary>
'''The name of the account associated with this customer
'''</Summary>
<ApiMember(Description:="The name of the account associated with this customer")>
Public Overridable Property AccountName As String
'''<Summary>
'''The purpose for this AI session
'''</Summary>
<ApiMember(Description:="The purpose for this AI session")>
Public Overridable Property Purpose As String
'''<Summary>
'''The actions performed in this session
'''</Summary>
<ApiMember(Description:="The actions performed in this session")>
Public Overridable Property Actions As List(Of AISessionActionInfo)
End Class
'''<Summary>
'''Applies all changes for the specified session
'''</Summary>
<Api(Description:="Applies all changes for the specified session")>
Public Partial Class ApplyAISession
Implements IPost
'''<Summary>
'''The ID of the session to apply
'''</Summary>
<ApiMember(Description:="The ID of the session to apply")>
Public Overridable Property SessionId As String
End Class
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.
POST /ai/sessions/{sessionId}/apply HTTP/1.1
Host: evovoice.io
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
sessionId: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
accountId: String,
accountName: String,
purpose: String,
actions:
[
{
date: String,
id: String,
functionName: String,
arguments: String,
description: String,
canBeApplied: False
}
],
id: String,
dateCreated: String,
dateLastModified: String,
createdBy: String,
lastModifiedBy: String
}