AIsuru Docs
AIsuru API
AIsuru API
  • Introduzione
  • Engine
    • ChatLogs
    • ContextVars
    • CorrelationPairs
    • CustomDictionary
    • Dialog
    • EventLogs
    • ExpertReferences
    • Functions
    • Intents
    • LocalizationKeys
    • Media
    • Memories
    • NLP
    • People
    • Search
    • Session
    • Stats
    • Topics
    • UnansweredQuestions
    • User
    • WebHooks
    • Models
  • Backend
    • ActionLog
    • Analysis
    • Asset
    • Badge
    • CompletionConfig
    • ConsumptionLog
    • ImportExport
    • Integration
    • Invitation
    • Memori
    • MemoriList
    • Notification
    • Process
    • Tenant
    • User
    • Models
Powered by GitBook
On this page
  1. Engine

WebHooks

PreviousUserNextModels

Test function: returns a random number between 0 and 999999.

get
Responses
200
Success
application/json
Responsestring
get
GET /memori/v2/TestFunctions/RandomNumber HTTP/1.1
Host: 
Accept: */*
200

Success

text
  • POSTReturns test slot values.
  • POSTReturns test intent results.
  • GETTest function: returns a random number between 0 and 999999.

Returns test slot values.

post

Currently available test slots are:

  • number: integer numbers between 1 and 10

  • letter: uppercase letters between A and Z

  • greek_letter: capitalized Greek letters between Alpha and Omega

Body

Specifications for a Slot Web Hook request.

slotNamestring | nullableOptional

Name of the slot.

requestIDinteger · int64Read-onlyOptional

Progressive number of the request. It is NOT a unique number, since it is reset each time the Server is restarted, but together with RequestDateTime (and optionally MemoriID) they form a reasonably unique identifier. This property is not used to match a request with cached responses of the same request, i.e.: two requests with identical properties but different RequestID are considered identical.

requestDateTimestring · date-timeRead-onlyOptional

Timestamp of the request in UTC time zone. This property is not used to match a request with cached responses of the same request, i.e.: two requests with identical properties but different RequestDateTime are considered identical.

requestValidityMinutesnumber · doubleRead-onlyOptional

Validity of the request, expressed in minutes, i.e. the time the response will be cached and considered valid. After this time the response will be automatically discarded. Two requests are considered identical (and the cached response of the first may be used for the second) if ALL of their parameters are identical EXCEPT RequestID, RequestDateTime and RequestValidityMinutes, and additionally SessionID for IntentWebHookRequest.

memoriIDstring | nullableOptional

ID of the Memori performing the request.

culturestring | nullableOptional

Culture of the request, expressed as a combination of an ISO-639 language code and an ISO-3166 country code. E.g. it-IT or en-US.

Responses
200
Success
application/json
post
POST /memori/v2/TestSlot HTTP/1.1
Host: 
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 54

{
  "slotName": "text",
  "memoriID": "text",
  "culture": "text"
}
200

Success

{
  "slotValues": [
    "text"
  ],
  "requestID": 1,
  "requestDateTime": "2025-06-07T14:08:07.083Z",
  "resultCode": 1,
  "resultMessage": "text"
}

Returns test intent results.

post

Currently available test intents are:

  • ECHO: emits the intent utterance as-is.

  • TUNNELING_ECHO: emits the intent utterance as-is and sets the Tunneling flag to true until an utterance with "END" is received.

  • HISTORY_ECHO: emits the latest transition history line, the current utterance and a follow up greek letter, and sets the Tunneling flag to true until an utterance with "END" is received

  • COMBINE_LETTER_AND_NUMBER: requires a letter slot and a number slot, emits the content of the two slots in juxtaposition, e.g. "A10".

  • DATE_RANGE: requires a date slot, emits the date range indicated by the date slot in the format "yyyy/MM/dd - yyyy/MM/dd".

  • AUTOINCREMENT: returns a progressive number that increments by 1 each time the intent is called.

  • FIBONACCI: returns the next element of the Fibonacci series, using context variables to store the series progression.

Body

Specifications for an Intent Web Hook request.

intentNamestring | nullableOptional

Name of the intent.

utterancestring | nullableOptional

Intent utterance as received by the Dialog State Machine. If Null the Intent is being called on a Timeout event.

sessionIDstring | nullableOptional

ID of the session where the request is being performed. This property is not used to match a request with cached responses of the same request, i.e.: two requests with identical properties but different SessionID are considered identical.

currentTagstring | nullableOptional

Latest tag set with a Tag Changed event. May be Null if the Memori session is currently anonymous.

currentTagAuthenticatedbooleanOptional

True if the CurrentTag refers to a person and they have been authenticated through their PIN. False otherwise.

currentDateUTCstring · date-time | nullableOptional

Latest date/time set with a Date Changed event. May be Null if the Memori session has no date/time set.

timeZonestring | nullableOptional

Time zone of the request, expressed as a TZ database name. E.g. Europe/Rome or America/Los_Angeles. Should be considered when the request depends on a date/time, since they are always specified in the UTC time zone.

beginUTCstring · date-timeOptional

Beginning of the date/time range the request refers to. If the intent uses the date slot, this corresponds to the initial timestamp of the date range. E.g. for "today" it is set to the instant of midnight of the current day, in the UTC time zone. If the intent does not use the date slot, BeginUTC and EndUTC are set by default to the date range of today.

endUTCstring · date-timeOptional

Ending of the date/time range the request refers to. If the intent uses the date slot, this corresponds to the final timestamp of the date range. E.g. for "today" it is set to the instant of midnight of the next day, in the UTC time zone. If the intent does not use the date slot, BeginUTC and EndUTC are set by default to the date range of today.

userEmailstring | nullableOptional

E-mail address of the current user, if available.

requestIDinteger · int64Read-onlyOptional

Progressive number of the request. It is NOT a unique number, since it is reset each time the Server is restarted, but together with RequestDateTime (and optionally MemoriID) they form a reasonably unique identifier. This property is not used to match a request with cached responses of the same request, i.e.: two requests with identical properties but different RequestID are considered identical.

requestDateTimestring · date-timeRead-onlyOptional

Timestamp of the request in UTC time zone. This property is not used to match a request with cached responses of the same request, i.e.: two requests with identical properties but different RequestDateTime are considered identical.

requestValidityMinutesnumber · doubleRead-onlyOptional

Validity of the request, expressed in minutes, i.e. the time the response will be cached and considered valid. After this time the response will be automatically discarded. Two requests are considered identical (and the cached response of the first may be used for the second) if ALL of their parameters are identical EXCEPT RequestID, RequestDateTime and RequestValidityMinutes, and additionally SessionID for IntentWebHookRequest.

memoriIDstring | nullableOptional

ID of the Memori performing the request.

culturestring | nullableOptional

Culture of the request, expressed as a combination of an ISO-639 language code and an ISO-3166 country code. E.g. it-IT or en-US.

Responses
200
Success
application/json
post
POST /memori/v2/TestIntent HTTP/1.1
Host: 
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 978

{
  "intentName": "text",
  "utterance": "text",
  "slotValues": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "sessionID": "text",
  "media": [
    {
      "mediumID": "text",
      "title": "text",
      "url": "text",
      "content": "text",
      "mimeType": "text",
      "properties": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    }
  ],
  "currentTag": "text",
  "currentTagAuthenticated": true,
  "currentDateUTC": "2025-06-07T14:08:07.083Z",
  "currentPlace": {
    "placeName": "text",
    "latitude": 1,
    "longitude": 1,
    "uncertaintyKm": 1
  },
  "timeZone": "text",
  "beginUTC": "2025-06-07T14:08:07.083Z",
  "endUTC": "2025-06-07T14:08:07.083Z",
  "contextVars": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "transitionHistory": [
    {
      "enteredText": "text",
      "enteredMedia": [
        {
          "mediumID": "text",
          "title": "text",
          "url": "text",
          "content": "text",
          "mimeType": "text",
          "properties": {
            "ANY_ADDITIONAL_PROPERTY": "text"
          }
        }
      ],
      "emission": "text",
      "emittedMedia": [
        {
          "mediumID": "text",
          "title": "text",
          "url": "text",
          "content": "text",
          "mimeType": "text",
          "properties": {
            "ANY_ADDITIONAL_PROPERTY": "text"
          }
        }
      ]
    }
  ],
  "userEmail": "text",
  "memoriID": "text",
  "culture": "text"
}
200

Success

{
  "emission": "text",
  "preformatted": true,
  "conclusive": true,
  "media": [
    {
      "mediumID": "text",
      "title": "text",
      "url": "text",
      "content": "text",
      "mimeType": "text",
      "properties": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    }
  ],
  "hints": [
    "text"
  ],
  "minTimeout": 1,
  "maxTimeout": 1,
  "contextVarsToSet": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "memoryTags": [
    "text"
  ],
  "tunneling": true,
  "requestID": 1,
  "requestDateTime": "2025-06-07T14:08:07.083Z",
  "resultCode": 1,
  "resultMessage": "text"
}