Intent

The Intent API handles Intents and their utterances, also handling their mass import through files, known as Bulk Training.

API SUBPATH: eva-intent

Intents

Pagination and Listings

Paginates through the Intents of a given bot.

get
Path parameters
orgUUIDstringRequired

It is the organization where the intents are, it is used to connect to the correct database.

envUUIDstringRequired

It is the environment where the intents are, it is used to connect to the correct database.

botUUIDstringRequired

It is the bot where the intents are, it is used to filter intents.

Query parameters
enabledbooleanRequired

It is the status of the intents, represents whether are active, default value true.

Example: true
pageinteger · int32Required

It is the number of pages that will be returned, default value 0.

Default: 0Example: 1
linesPerPageinteger · int32Required

It is the number of intent per page, default value 5.

Default: 5Example: 1
orderBystringRequired

It is the intent attribute used for ordination the page, default attribute name.

Default: name
directionstringRequired

It is the sorting type, default value ASC.

Default: ASC
searchTermsstringRequired

It is the parameter that contains the user data entry, that will be used to filter the intents.

Header parameters
x-request-idstringOptional

It is an identifier provided by the API client that will be used to identify distributed logs.

Responses
200
OK
*/*
get
GET /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents?enabled=true&page=0&linesPerPage=5&orderBy=name&direction=ASC&searchTerms=text HTTP/1.1
Host: 
Accept: */*
{
  "totalPages": 1,
  "totalElements": 1,
  "first": true,
  "last": true,
  "numberOfElements": 1,
  "pageable": {
    "paged": true,
    "unpaged": true,
    "pageNumber": 1,
    "pageSize": 1,
    "sort": {
      "unsorted": true,
      "sorted": true,
      "empty": true
    },
    "offset": 1
  },
  "sort": {
    "unsorted": true,
    "sorted": true,
    "empty": true
  },
  "size": 1,
  "content": [
    {
      "name": "text",
      "utterances": [
        "text"
      ],
      "tags": [
        {
          "name": "text"
        }
      ],
      "id": "text",
      "flows": [
        "text"
      ],
      "lastModified": {
        "uuid": "text",
        "image": "text",
        "name": "text",
        "timestamp": 1
      }
    }
  ],
  "number": 1,
  "empty": true
}

Searches (greedily) for any Intent names that exists in a bot, matching the typed term, left-to-right, and returns a list of up to 6 Strings, ordered alphabetically.

get
Path parameters
orgUUIDstringRequired

It is the organization where the flow is, used to connect to the correct database

envUUIDstringRequired

It is the environment where the flow is, used to connect to the correct database

botUUIDstringRequired

It is the bot where the flow is, used to filter intents

Query parameters
namestringRequired

It is the parameter used to search for intents related to the entered value

limitinteger · int32Optional

It is the max number of result, default value 6

Default: 6Example: 6
Header parameters
x-request-idstringOptional

It is an identifier provided by the API client that will be used to identify distributed logs.

Responses
200
Ok
*/*
Responsestring[]
get
GET /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/quicksearch?name=text HTTP/1.1
Host: 
Accept: */*
[
  "text"
]

Acquires a full list of Intents. This method is intended to be consumed on the Flow editing screen and brings information regarding each Intent's current usage on the current Flow.

get
Path parameters
orgUUIDstringRequired

It is the organization where the intents are, used to connect to the correct database.

envUUIDstringRequired

It is the environment where the intents are, used to connect to the correct database.

botUUIDstringRequired

It is the bot where the intents are, used to filter intents.

Header parameters
x-request-idstringOptional

It is an identifier provided by the API client that will be used to identify distributed logs.

Responses
200
OK
*/*
get
GET /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/list-on-flow HTTP/1.1
Host: 
Accept: */*
[
  {
    "name": "text",
    "utterances": [
      "text"
    ],
    "tags": [
      {
        "name": "text"
      }
    ],
    "id": "text",
    "flows": [
      "text"
    ],
    "lastModified": {
      "uuid": "text",
      "image": "text",
      "name": "text",
      "timestamp": 1
    },
    "description": "text",
    "firstCell": true
  }
]

CRUD Operations

Retrieves complete information regarding a given Intent, by it's UUID.

get
Path parameters
orgUUIDstringRequired

It is the organization where the intents are, used to connect to the correct database.

envUUIDstringRequired

It is the environment where the intents are, used to connect to the correct database.

botUUIDstringRequired

It is the bot where the intents are, used to filter intents.

uuidstringRequired

It is the uuid used to search for an intent.

Header parameters
x-request-idstringOptional

It is an identifier provided by the API client that will be used to identify distributed logs.

Responses
200
OK
*/*
get
GET /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/{uuid} HTTP/1.1
Host: 
Accept: */*
{
  "success": 1,
  "expWithItents": 1,
  "intWithExp": 1,
  "duplicateExp": 1,
  "intAlerExistsInRepo": 1,
  "expAlerExistsInRepo": 1,
  "invalidIntentName": 1,
  "notLines": true,
  "exceedsMaxEmptyLines": true
}

Creates a new Intent, according to the provided body. Utterances submitted must be previously validated or it will fail.

post
Path parameters
orgUUIDstringRequired

It is the organization where the intents are, used to connect to the correct database.

envUUIDstringRequired

It is the bot where the intents are, it is used to create intents.

botUUIDstringRequired

It is the bot where the intents are, used to filter intents.

Header parameters
x-request-idstringOptional

It is an identifier provided by the API client that will be used to identify distributed logs.

Body

It is the object that contains the data needed to create an intent.

namestringRequired

Name of the intent.

utterancesstring[]Required

Utterances of the intent.

descriptionstringOptional

Description of the intent.

Responses
200
OK
*/*
post
POST /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 83

{
  "name": "text",
  "utterances": [
    "text"
  ],
  "tags": [
    {
      "name": "text"
    }
  ],
  "description": "text"
}
{
  "name": "text",
  "utterances": [
    "text"
  ],
  "tags": [
    {
      "name": "text"
    }
  ],
  "id": "text",
  "flows": [
    "text"
  ],
  "lastModified": {
    "uuid": "text",
    "image": "text",
    "name": "text",
    "timestamp": 1
  }
}

Updates an existing Intent. Utterances submitted overwrite the previous one, so you must submit the previous utterances you previously had, with their UUID, if you intend to persist them.

put
Path parameters
orgUUIDstringRequired

It is the organization where the intents are, used to connect to the correct database.

envUUIDstringRequired

It is the environment where the intents are, used to connect to the correct database.

botUUIDstringRequired

It is the bot where the intents are, used to filter intents.

uuidstringRequired

It is the uuid used to search for an intent, in this case it is the intent will be updated.

Header parameters
x-request-idstringOptional

It is an identifier provided by the API client that will be used to identify distributed logs.

Body

It is the object that contains the data needed to create an intent.

namestringRequired

Name of the intent.

utterancesstring[]Required

Utterances of the intent.

descriptionstringOptional

Description of the intent.

Responses
200
OK
*/*
put
PUT /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/{uuid} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 83

{
  "name": "text",
  "utterances": [
    "text"
  ],
  "tags": [
    {
      "name": "text"
    }
  ],
  "description": "text"
}
{
  "name": "text",
  "utterances": [
    "text"
  ],
  "tags": [
    {
      "name": "text"
    }
  ],
  "id": "text",
  "flows": [
    "text"
  ],
  "lastModified": {
    "uuid": "text",
    "image": "text",
    "name": "text",
    "timestamp": 1
  }
}

Removes an existing Intent and their associated Utterances.

delete
Path parameters
orgUUIDstringRequired

It is the organization where the intents are, used to connect to the correct database.

envUUIDstringRequired

It is the environment where the intents are, used to connect to the correct database.

botUUIDstringRequired

It is the bot where the intents are, used to filter intents.

uuidstringRequired

It is the uuid used to delete an intent.

Header parameters
x-request-idstringOptional

It is an identifier provided by the API client that will be used to identify distributed logs.

Responses
200
OK
delete
DELETE /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/{uuid} HTTP/1.1
Host: 
Accept: */*

No content

Auxiliary Methods

Validates if an utterance is already being used in the bot elsewhere. Should be called to verify each utterance in a body for creating or updating Intents.

post
Path parameters
orgUUIDstringRequired

It is the organization where the intents are, used to connect to the correct database.

envUUIDstringRequired

It is the environment where the intents are, used to connect to the correct database.

botUUIDstringRequired

It is the bot where the intents are, it is used to check the utterance.

Header parameters
x-request-idstringOptional

It is an identifier provided by the API client that will be used to identify distributed logs.

Body
stringOptional

It is the value of the intent example that will be checked if it already exists.

Responses
200
OK
post
POST /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/validate-utterance HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 6

"text"

No content

Bulk Trainings

CRUD Operations

Retrieves the status of the bot's current bulk training..

get
Path parameters
orgUUIDstringRequired

It is the organization where the intents are, it is used to connect to the correct database.

envUUIDstringRequired

It is the environment where the intents are, it is used to connect to the correct database.

botUUIDstringRequired

Bot where intents and examples will be imported.

Header parameters
x-request-idstringOptional

It is an identifier provided by the API client that will be used to identify distributed logs.

Responses
200
OK
*/*
get
GET /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training HTTP/1.1
Host: 
Accept: */*
{
  "id": "text",
  "botUuid": "text",
  "type": "text",
  "percentage": 1,
  "status": "text",
  "result": "text",
  "fileName": "text"
}

Receives and load intents and utterances to analyze data consistency, and generate a pre-save of the analyzed data which must be then approved and trained.

post
Path parameters
orgUUIDstringRequired

It is the organization where the intents are, it is used to connect to the correct database.

envUUIDstringRequired

It is the environment where the intents are, it is used to connect to the correct database.

botUUIDstringRequired

Bot where intents and examples will be imported.

Header parameters
x-request-idstringOptional

It is an identifier provided by the API client that will be used to identify distributed logs.

Body
filestring · binaryRequired

It is the file that contains the data to be analyzed.

Responses
200
OK
*/*
post
POST /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/intents HTTP/1.1
Host: 
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17

{
  "file": "binary"
}
{
  "message": "text",
  "data": {
    "success": 1,
    "expWithItents": 1,
    "intWithExp": 1,
    "duplicateExp": 1,
    "intAlerExistsInRepo": 1,
    "expAlerExistsInRepo": 1,
    "invalidIntentName": 1,
    "notLines": true,
    "exceedsMaxEmptyLines": true
  }
}

Create the intents and examples submitted by the upload service.

put
Path parameters
orgUUIDstringRequired

It is the organization where the intents are, it is used to connect to the correct database.

envUUIDstringRequired

It is the environment where the intents are, it is used to connect to the correct database.

botUUIDstringRequired

Bot where intents and examples will be created.

Header parameters
x-request-idstringOptional

It is an identifier provided by the API client that will be used to identify distributed logs.

Responses
200
OK
*/*
put
PUT /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/intents HTTP/1.1
Host: 
Accept: */*
{
  "message": "text",
  "data": 1
}

Deletes an existing Bulk Training. Both the uploaded data and it's status will be erased.

delete
Path parameters
orgUUIDstringRequired

It is the organization where the intents are, it is used to connect to the correct database.

envUUIDstringRequired

It is the environment where the intents are, it is used to connect to the correct database.

botUUIDstringRequired

Bot that contains the bulk training that will be canceled

idstringRequired

It is the id of the bulk training.

Header parameters
x-request-idstringOptional

It is an identifier provided by the API client that will be used to identify distributed logs.

Responses
200
OK
delete
DELETE /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/{id} HTTP/1.1
Host: 
Accept: */*

No content

Auxiliary Methods

Validates it a set of utterance/examples provided are valid.

post
Path parameters
orgUUIDstringRequired

It is the organization where the intents are, it is used to connect to the correct database.

envUUIDstringRequired

It is the environment where the intents are, it is used to connect to the correct database.

botUUIDstringRequired

Bot where intents and examples will be imported.

Header parameters
x-request-idstringOptional

It is an identifier provided by the API client that will be used to identify distributed logs.

Body
filestring · binaryRequired

It is the file that contains the data to be analyzed.

Responses
200
OK
*/*
post
POST /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/utterances HTTP/1.1
Host: 
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17

{
  "file": "binary"
}
{
  "message": "text",
  "data": {
    "success": 1,
    "uttWrong": 1,
    "expAlerExistsInRepo": 1,
    "notLines": true
  }
}

Acquired the utterance data that was uploaded by the upload service

put
Path parameters
orgUUIDstringRequired

It is the organization where the intents are, it is used to connect to the correct database.

envUUIDstringRequired

It is the environment where the intents are, it is used to connect to the correct database.

botUUIDstringRequired

Bot where the examples were loaded

Header parameters
x-request-idstringOptional

It is an identifier provided by the API client that will be used to identify distributed logs.

Responses
200
OK
*/*
put
PUT /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/utterances HTTP/1.1
Host: 
Accept: */*
{
  "message": "text",
  "data": [
    "text"
  ]
}

Was this helpful?

#144: 4.5 - Gen AI (KAI, Rephrase, Assist) + What's New (Notifications)

Change request updated