Intent
The Intent API handles Intents and their utterances, also handling their mass import through files, known as Bulk Training.
Intents
Pagination and Listings
It is the organization where the intents are, it is used to connect to the correct database.
It is the environment where the intents are, it is used to connect to the correct database.
It is the bot where the intents are, it is used to filter intents.
It is the status of the intents, represents whether are active, default value true.
true
It is the number of pages that will be returned, default value 0.
0
Example: 1
It is the number of intent per page, default value 5.
5
Example: 1
It is the intent attribute used for ordination the page, default attribute name.
name
It is the sorting type, default value ASC.
ASC
It is the parameter that contains the user data entry, that will be used to filter the intents.
It is an identifier provided by the API client that will be used to identify distributed logs.
OK
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Unprocessable Entity
Internal Server Error
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.
It is the organization where the flow is, used to connect to the correct database
It is the environment where the flow is, used to connect to the correct database
It is the bot where the flow is, used to filter intents
It is the parameter used to search for intents related to the entered value
It is the max number of result, default value 6
6
Example: 6
It is an identifier provided by the API client that will be used to identify distributed logs.
Ok
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Unprocessable Entity
Internal Server Error
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.
It is the organization where the intents are, used to connect to the correct database.
It is the environment where the intents are, used to connect to the correct database.
It is the bot where the intents are, used to filter intents.
It is an identifier provided by the API client that will be used to identify distributed logs.
OK
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Unprocessable Entity
Internal Server Error
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
It is the organization where the intents are, used to connect to the correct database.
It is the environment where the intents are, used to connect to the correct database.
It is the bot where the intents are, used to filter intents.
It is the uuid used to search for an intent.
It is an identifier provided by the API client that will be used to identify distributed logs.
OK
Intent is removed
Unauthorized
Forbidden
Resource not found
Conflict
Unprocessable Entity
Internal Server Error
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.
It is the organization where the intents are, used to connect to the correct database.
It is the bot where the intents are, it is used to create intents.
It is the bot where the intents are, used to filter intents.
It is an identifier provided by the API client that will be used to identify distributed logs.
It is the object that contains the data needed to create an intent.
Name of the intent.
Utterances of the intent.
Description of the intent.
OK
The name cannot contain spaces
Unauthorized
Forbidden
Not Found
Conflict
The name must be a maximum of 50 characters
Utterance already exists
Internal Server Error
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.
It is the organization where the intents are, used to connect to the correct database.
It is the environment where the intents are, used to connect to the correct database.
It is the bot where the intents are, used to filter intents.
It is the uuid used to search for an intent, in this case it is the intent will be updated.
It is an identifier provided by the API client that will be used to identify distributed logs.
It is the object that contains the data needed to create an intent.
Name of the intent.
Utterances of the intent.
Description of the intent.
OK
The name cannot contain spaces
Unauthorized
Forbidden
Not Found
Conflict
The name must be a maximum of 50 characters
Utterance already exists
Internal Server Error
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
}
}
It is the organization where the intents are, used to connect to the correct database.
It is the environment where the intents are, used to connect to the correct database.
It is the bot where the intents are, used to filter intents.
It is the uuid used to delete an intent.
It is an identifier provided by the API client that will be used to identify distributed logs.
OK
No content
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Unprocessable Entity
Internal Server Error
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.
It is the organization where the intents are, used to connect to the correct database.
It is the environment where the intents are, used to connect to the correct database.
It is the bot where the intents are, it is used to check the utterance.
It is an identifier provided by the API client that will be used to identify distributed logs.
It is the value of the intent example that will be checked if it already exists.
OK
No content
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Unprocessable Entity
Utterance already exists
Internal Server Error
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
It is the organization where the intents are, it is used to connect to the correct database.
It is the environment where the intents are, it is used to connect to the correct database.
Bot where intents and examples will be imported.
It is an identifier provided by the API client that will be used to identify distributed logs.
OK
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Unprocessable Entity
Internal Server Error
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.
It is the organization where the intents are, it is used to connect to the correct database.
It is the environment where the intents are, it is used to connect to the correct database.
Bot where intents and examples will be imported.
It is an identifier provided by the API client that will be used to identify distributed logs.
It is the file that contains the data to be analyzed.
OK
The file format is invalid
Unauthorized
Forbidden
Not Found
There is already a bulk training for this bot '{botUUID}'
Unprocessable Entity
Internal Server Error
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
}
}
It is the organization where the intents are, it is used to connect to the correct database.
It is the environment where the intents are, it is used to connect to the correct database.
Bot where intents and examples will be created.
It is an identifier provided by the API client that will be used to identify distributed logs.
OK
The file contains inconsistencies, fix it and try again
Unauthorized
Forbidden
Not Found
Wait for the upload to finish
Unprocessable Entity
Internal Server Error
PUT /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/intents HTTP/1.1
Host:
Accept: */*
{
"message": "text",
"data": 1
}
It is the organization where the intents are, it is used to connect to the correct database.
It is the environment where the intents are, it is used to connect to the correct database.
Bot that contains the bulk training that will be canceled
It is the id of the bulk training.
It is an identifier provided by the API client that will be used to identify distributed logs.
OK
No content
Wait for the upload to finish to cancel the bulk training action
Unauthorized
Forbidden
Not Found
Wait for the upload to finish
Unprocessable Entity
Internal Server Error
DELETE /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/{id} HTTP/1.1
Host:
Accept: */*
No content
Auxiliary Methods
It is the organization where the intents are, it is used to connect to the correct database.
It is the environment where the intents are, it is used to connect to the correct database.
Bot where intents and examples will be imported.
It is an identifier provided by the API client that will be used to identify distributed logs.
It is the file that contains the data to be analyzed.
OK
The file format is invalid
Unauthorized
Forbidden
Not Found
There is already a bulk training for this bot '{botUUID}'
Unprocessable Entity
Internal Server Error
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
}
}
It is the organization where the intents are, it is used to connect to the correct database.
It is the environment where the intents are, it is used to connect to the correct database.
Bot where the examples were loaded
It is an identifier provided by the API client that will be used to identify distributed logs.
OK
The file contains inconsistencies, fix it and try again
Unauthorized
Forbidden
Not Found
Wait for the upload to finish
Unprocessable Entity
Internal Server Error
PUT /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/utterances HTTP/1.1
Host:
Accept: */*
{
"message": "text",
"data": [
"text"
]
}
Was this helpful?