Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


HTTP Method
API Endpoint
Request Body
Response
DELETE /behaviorstore/behaviorsets/{id}N/AN/A
GET /behaviorstore/behaviorsets/{id}N/ABehaviorSet model
PUT /behaviorstore/behaviorsets/{id}BehaviorSet modelN/A
GET /behaviorstore/behaviorsets/descriptorsN/ABehaviorSet model
POST /behaviorstore/behaviorsetsBehaviorSet modelN/A
GET /behaviorstore/behaviorsets/{id}/currentversionN/ABehaviorSet model
POST /behaviorstore/behaviorsets/{id}/currentversionBehaviorSet modelN/A

Example

We will demonstrate here the creation of a BehaviorSet

behaviorsets
Code Block
languagejs
themeEclipse
titleCreating the regular dictionarya BehaviorSet
collapsetrue
Request URL
	POST	http://localhost:7070/behaviorstore/behaviorsets

Request Body

{
  "behaviorGroups": [
    {
      "name": "Smalltalk",
      "behaviorRules": [
        {
          "name": "Welcome",
          "actions": [
            "welcome"
          ],
          "children": [
            {
              "type": "negation",
              "children": [
                {
                  "type": "occurrence",
                  "values": {
                    "maxTimesOccurred": 1,
                    "behaviorRuleName": "Welcome"
                  }
                }
              ]
            }
          ]
        },
        {
          "name": "Greeting",
          "actions": [
            "greet"
          ],
          "children": [
            {
              "type": "inputmatcher",
              "values": {
                "expressions": "greeting(*)",
                "occurrence": "currentStep"
              }
            }
          ]
        },
        {
          "name": "Goodbye",
          "actions": [
            "say_goodbye",
            "CONVERSATION_END"
          ],
          "children": [
            {
              "type": "inputmatcher",
              "values": {
                "expressions": "goodbye(*)"
              }
            }
          ]
        },
        {
          "name": "Thank",
          "actions": [
            "thank"
          ],
          "children": [
            {
              "type": "inputmatcher",
              "values": {
                "expressions": "thank(*)"
              }
            }
          ]
        },
        {
          "name": "how are you",
          "actions": [
            "how_are_you"
          ],
          "children": [
            {
              "type": "inputmatcher",
              "values": {
                "expressions": "how_are_you"
              }
            }
          ]
        }
      ]
    }
  ]
}

Response Body
	no content

Response Code
	201

Response Headers
{
  "access-control-allow-origin": "*",
  "date": "Thu, 21 Jun 2018 01:00:02 GMT",
  "access-control-allow-headers": "authorization, Content-Type",
  "content-length": "0",
  "location": "eddi://ai.labs.behavior/behaviorstore/behaviorsets/5b2af892ee5ee72440ee1b4b?version=1",
  "access-control-allow-methods": "GET, PUT, POST, DELETE, PATCH, OPTIONS",
  "access-control-expose-headers": "location",
  "content-type": null
}