# Intent

{% hint style="info" %}
**API SUBPATH**: eva-intent
{% endhint %}

## Intents

### Pagination and Listings

## GET /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents

> Paginates through the Intents of a given bot.

```json
{"openapi":"3.0.1","info":{"title":"eva-intent API Documentation","version":"4.8.0"},"tags":[{"name":"intents","description":"Controller responsible for providing the services of listing, creating, updating and deleting intents and utterances."}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents":{"get":{"tags":["intents"],"summary":"Paginates through the Intents of a given bot.","operationId":"findAll","parameters":[{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}},{"name":"orgUUID","in":"path","description":"It is the organization where the intents are, it is used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"It is the environment where the intents are, it is used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"It is the bot where the intents are, it is used to filter intents.","required":true,"schema":{"type":"string"}},{"name":"enabled","in":"query","description":"It is the status of the intents, represents whether are active, default value true.","required":true,"schema":{"type":"boolean"}},{"name":"page","in":"query","description":"It is the number of pages that will be returned, default value 0.","required":true,"schema":{"type":"integer","format":"int32","default":0}},{"name":"linesPerPage","in":"query","description":"It is the number of intent per page, default value 5.","required":true,"schema":{"type":"integer","format":"int32","default":5}},{"name":"orderBy","in":"query","description":"It is the intent attribute used for ordination the page, default attribute name.","required":true,"schema":{"type":"string","default":"name"}},{"name":"direction","in":"query","description":"It is the sorting type, default value ASC.","required":true,"schema":{"type":"string","default":"ASC"}},{"name":"searchTerms","in":"query","description":"It is the parameter that contains the user data entry, that will be used to filter the intents.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageIntentDetailsDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"PageIntentDetailsDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"first":{"type":"boolean"},"last":{"type":"boolean"},"numberOfElements":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/IntentDetailsDTO"}},"number":{"type":"integer","format":"int32"},"sort":{"$ref":"#/components/schemas/SortObject"},"empty":{"type":"boolean"}}},"PageableObject":{"type":"object","properties":{"unpaged":{"type":"boolean"},"paged":{"type":"boolean"},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"offset":{"type":"integer","format":"int64"},"sort":{"$ref":"#/components/schemas/SortObject"}}},"SortObject":{"type":"object","properties":{"unsorted":{"type":"boolean"},"sorted":{"type":"boolean"},"empty":{"type":"boolean"}}},"IntentDetailsDTO":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the intent."},"utterances":{"uniqueItems":true,"type":"array","description":"Utterances of the intent.","items":{"type":"string","description":"Utterances of the intent."}},"tags":{"uniqueItems":true,"type":"array","description":"These are the tags used in the intent.","items":{"$ref":"#/components/schemas/TagDTO"}},"id":{"type":"string","description":"Uuid of the intent."},"flows":{"uniqueItems":true,"type":"array","description":"Flows where intent is being used.","items":{"type":"string","description":"Flows where intent is being used."}},"lastModified":{"$ref":"#/components/schemas/UserDTO"}},"description":"Contains data created after creating or updating an intent."},"TagDTO":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Tag."}},"description":"Represents the tag data, used to reference the tags being used in the intent."},"UserDTO":{"type":"object","properties":{"uuid":{"type":"string","description":"Uuid of the User."},"image":{"type":"string","description":"Image of the User."},"name":{"type":"string","description":"Name of the User."},"timestamp":{"type":"integer","description":"Date of last edition of the Flow.","format":"int64"}},"description":"Represents the basic data of a User, in this case the last user to edit the intent."},"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```

## GET /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/quicksearch

> 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.<br>

```json
{"openapi":"3.0.1","info":{"title":"eva-intent API Documentation","version":"4.8.0"},"tags":[{"name":"intents","description":"Controller responsible for providing the services of listing, creating, updating and deleting intents and utterances."}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/quicksearch":{"get":{"tags":["intents"],"summary":"Searches (greedily) for any Intent names that exists in a bot,\nmatching the typed term, left-to-right, and returns a list of up\nto 6 Strings, ordered alphabetically.\n","operationId":"quicksearch","parameters":[{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}},{"name":"orgUUID","in":"path","description":"It is the organization where the flow is, used to connect to the correct database","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"It is the environment where the flow is, used to connect to the correct database","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"It is the bot where the flow is, used to filter intents","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"It is the parameter used to search for intents related to the entered value","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"It is the max number of result, default value 6","required":false,"schema":{"type":"integer","format":"int32","default":6}}],"responses":{"200":{"description":"Ok","content":{"*/*":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```

## GET /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/list-on-flow

> 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.<br>

```json
{"openapi":"3.0.1","info":{"title":"eva-intent API Documentation","version":"4.8.0"},"tags":[{"name":"intents","description":"Controller responsible for providing the services of listing, creating, updating and deleting intents and utterances."}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/list-on-flow":{"get":{"tags":["intents"],"summary":"Acquires a full list of Intents. This method is intended to be\nconsumed on the Flow editing screen and brings information regarding\neach Intent's current usage on the current Flow.\n","operationId":"listOnFlow","parameters":[{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}},{"name":"orgUUID","in":"path","description":"It is the organization where the intents are, used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"It is the environment where the intents are, used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"It is the bot where the intents are, used to filter intents.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/IntentRuleDTO"}}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"IntentRuleDTO":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the intent."},"utterances":{"uniqueItems":true,"type":"array","description":"Utterances of the intent.","items":{"type":"string","description":"Utterances of the intent."}},"tags":{"uniqueItems":true,"type":"array","description":"These are the tags used in the intent.","items":{"$ref":"#/components/schemas/TagDTO"}},"id":{"type":"string","description":"Uuid of the intent."},"flows":{"uniqueItems":true,"type":"array","description":"Flows where intent is being used.","items":{"type":"string","description":"Flows where intent is being used."}},"lastModified":{"$ref":"#/components/schemas/UserDTO"},"about":{"type":"string","description":"Description of the intent."},"firstCell":{"type":"boolean","description":"Flag that indicates if the intent is being used to start flows."}},"description":"Contains data needed to create business rules about intent."},"TagDTO":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Tag."}},"description":"Represents the tag data, used to reference the tags being used in the intent."},"UserDTO":{"type":"object","properties":{"uuid":{"type":"string","description":"Uuid of the User."},"image":{"type":"string","description":"Image of the User."},"name":{"type":"string","description":"Name of the User."},"timestamp":{"type":"integer","description":"Date of last edition of the Flow.","format":"int64"}},"description":"Represents the basic data of a User, in this case the last user to edit the intent."},"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```

### CRUD Operations

## POST /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents

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

```json
{"openapi":"3.0.1","info":{"title":"eva-intent API Documentation","version":"4.8.0"},"tags":[{"name":"intents","description":"Controller responsible for providing the services of listing, creating, updating and deleting intents and utterances."}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents":{"post":{"tags":["intents"],"summary":"Creates a new Intent, according to the provided body. Utterances\nsubmitted must be previously validated or it will fail.\n","operationId":"create","parameters":[{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}},{"name":"orgUUID","in":"path","description":"It is the organization where the intents are, used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"It is the bot where the intents are, it is used to create intents.","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"It is the bot where the intents are, used to filter intents.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntentComplementaryDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/IntentDetailsDTO"}}}},"400":{"description":"The name cannot contain spaces","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"The name must be a maximum of 50 characters","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"429":{"description":"Utterance already exists","content":{"*/*":{"schema":{"$ref":"#/components/schemas/IntentDetailsDTO"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"IntentComplementaryDTO":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the intent."},"utterances":{"uniqueItems":true,"type":"array","description":"Utterances of the intent.","items":{"type":"string","description":"Utterances of the intent."}},"tags":{"uniqueItems":true,"type":"array","description":"These are the tags used in the intent.","items":{"$ref":"#/components/schemas/TagDTO"}},"about":{"maxLength":200,"minLength":0,"type":"string","description":"About of the intent."}},"description":"Is the data provided for generating example utterances"},"TagDTO":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Tag."}},"description":"Represents the tag data, used to reference the tags being used in the intent."},"IntentDetailsDTO":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the intent."},"utterances":{"uniqueItems":true,"type":"array","description":"Utterances of the intent.","items":{"type":"string","description":"Utterances of the intent."}},"tags":{"uniqueItems":true,"type":"array","description":"These are the tags used in the intent.","items":{"$ref":"#/components/schemas/TagDTO"}},"id":{"type":"string","description":"Uuid of the intent."},"flows":{"uniqueItems":true,"type":"array","description":"Flows where intent is being used.","items":{"type":"string","description":"Flows where intent is being used."}},"lastModified":{"$ref":"#/components/schemas/UserDTO"}},"description":"Contains data created after creating or updating an intent."},"UserDTO":{"type":"object","properties":{"uuid":{"type":"string","description":"Uuid of the User."},"image":{"type":"string","description":"Image of the User."},"name":{"type":"string","description":"Name of the User."},"timestamp":{"type":"integer","description":"Date of last edition of the Flow.","format":"int64"}},"description":"Represents the basic data of a User, in this case the last user to edit the intent."},"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```

## GET /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/{uuid}

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

```json
{"openapi":"3.0.1","info":{"title":"eva-intent API Documentation","version":"4.8.0"},"tags":[{"name":"intents","description":"Controller responsible for providing the services of listing, creating, updating and deleting intents and utterances."}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/{uuid}":{"get":{"tags":["intents"],"summary":"Retrieves complete information regarding a given Intent, by it's UUID.","operationId":"findById","parameters":[{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}},{"name":"orgUUID","in":"path","description":"It is the organization where the intents are, used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"It is the environment where the intents are, used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"It is the bot where the intents are, used to filter intents.","required":true,"schema":{"type":"string"}},{"name":"uuid","in":"path","description":"It is the uuid used to search for an intent.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/IntentDataDTO"}}}},"400":{"description":"Intent is removed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Resource not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"IntentDataDTO":{"type":"object","properties":{"success":{"type":"integer","description":"It is the number of correct intents","format":"int32"},"expWithItents":{"type":"integer","description":"It is the number of examples that have no intents in the file","format":"int32"},"intWithExp":{"type":"integer","description":"It is the number of intents that have no examples in the file","format":"int32"},"duplicateExp":{"type":"integer","description":"It is the number of duplicate examples in the file","format":"int32"},"intAlerExistsInRepo":{"type":"integer","description":"It is the number of intents that already exist in the system","format":"int32"},"expAlerExistsInRepo":{"type":"integer","description":"It is the number of examples that already exist in the system","format":"int32"},"invalidIntentName":{"type":"integer","description":"It is the number of intents that have invalid characters in the name","format":"int32"},"notLines":{"type":"boolean","description":"It is the flag that identifies if the file is empty"},"exceedsMaxEmptyLines":{"type":"boolean","description":"It is the flag that identifies if the file exceeds the maximum number of empty lines."}},"description":"Contains the summary of the analysis made of the intents"},"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```

## PUT /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/{uuid}

> 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.<br>

```json
{"openapi":"3.0.1","info":{"title":"eva-intent API Documentation","version":"4.8.0"},"tags":[{"name":"intents","description":"Controller responsible for providing the services of listing, creating, updating and deleting intents and utterances."}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/{uuid}":{"put":{"tags":["intents"],"summary":"Updates an existing Intent. Utterances submitted overwrite the\nprevious one, so you must submit the previous utterances you previously\nhad, with their UUID, if you intend to persist them.\n","operationId":"update","parameters":[{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}},{"name":"orgUUID","in":"path","description":"It is the organization where the intents are, used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"It is the environment where the intents are, used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"It is the bot where the intents are, used to filter intents.","required":true,"schema":{"type":"string"}},{"name":"uuid","in":"path","description":"It is the uuid used to search for an intent, in this case it is the intent will be updated.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntentComplementaryDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/IntentDetailsDTO"}}}},"400":{"description":"The name cannot contain spaces","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"The name must be a maximum of 50 characters","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"429":{"description":"Utterance already exists","content":{"*/*":{"schema":{"$ref":"#/components/schemas/IntentDetailsDTO"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"IntentComplementaryDTO":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the intent."},"utterances":{"uniqueItems":true,"type":"array","description":"Utterances of the intent.","items":{"type":"string","description":"Utterances of the intent."}},"tags":{"uniqueItems":true,"type":"array","description":"These are the tags used in the intent.","items":{"$ref":"#/components/schemas/TagDTO"}},"about":{"maxLength":200,"minLength":0,"type":"string","description":"About of the intent."}},"description":"Is the data provided for generating example utterances"},"TagDTO":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Tag."}},"description":"Represents the tag data, used to reference the tags being used in the intent."},"IntentDetailsDTO":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the intent."},"utterances":{"uniqueItems":true,"type":"array","description":"Utterances of the intent.","items":{"type":"string","description":"Utterances of the intent."}},"tags":{"uniqueItems":true,"type":"array","description":"These are the tags used in the intent.","items":{"$ref":"#/components/schemas/TagDTO"}},"id":{"type":"string","description":"Uuid of the intent."},"flows":{"uniqueItems":true,"type":"array","description":"Flows where intent is being used.","items":{"type":"string","description":"Flows where intent is being used."}},"lastModified":{"$ref":"#/components/schemas/UserDTO"}},"description":"Contains data created after creating or updating an intent."},"UserDTO":{"type":"object","properties":{"uuid":{"type":"string","description":"Uuid of the User."},"image":{"type":"string","description":"Image of the User."},"name":{"type":"string","description":"Name of the User."},"timestamp":{"type":"integer","description":"Date of last edition of the Flow.","format":"int64"}},"description":"Represents the basic data of a User, in this case the last user to edit the intent."},"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```

## DELETE /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/{uuid}

> Removes an existing Intent and their associated Utterances.

```json
{"openapi":"3.0.1","info":{"title":"eva-intent API Documentation","version":"4.8.0"},"tags":[{"name":"intents","description":"Controller responsible for providing the services of listing, creating, updating and deleting intents and utterances."}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/{uuid}":{"delete":{"tags":["intents"],"summary":"Removes an existing Intent and their associated Utterances.","operationId":"delete","parameters":[{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}},{"name":"orgUUID","in":"path","description":"It is the organization where the intents are, used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"It is the environment where the intents are, used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"It is the bot where the intents are, used to filter intents.","required":true,"schema":{"type":"string"}},{"name":"uuid","in":"path","description":"It is the uuid used to delete an intent.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```

### Auxiliary Methods

## POST /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/validate-utterance

> 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.<br>

```json
{"openapi":"3.0.1","info":{"title":"eva-intent API Documentation","version":"4.8.0"},"tags":[{"name":"intents","description":"Controller responsible for providing the services of listing, creating, updating and deleting intents and utterances."}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/validate-utterance":{"post":{"tags":["intents"],"summary":"Validates if an utterance is already being used in the bot elsewhere.\nShould be called to verify each utterance in a body for creating or\nupdating Intents.\n","operationId":"validateUtterance","parameters":[{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}},{"name":"orgUUID","in":"path","description":"It is the organization where the intents are, used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"It is the environment where the intents are, used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"It is the bot where the intents are, it is used to check the utterance.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string","description":"It is the value of the intent example that will be checked if it already exists."}}},"required":true},"responses":{"200":{"description":"OK"},"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"429":{"description":"Utterance already exists"},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```

## POST /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/complete

> Its function is responsible for communicating with the genai service to bring examples of utterances.

```json
{"openapi":"3.0.1","info":{"title":"eva-intent API Documentation","version":"4.8.0"},"tags":[{"name":"intents","description":"Controller responsible for providing the services of listing, creating, updating and deleting intents and utterances."}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/intents/complete":{"post":{"tags":["intents"],"summary":"Its function is responsible for communicating with the genai service to bring examples of utterances.","operationId":"completeUtterance","parameters":[{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}},{"name":"orgUUID","in":"path","description":"It is the organization where the intents are, used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"It is the environment where the intents are, used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"It is the bot where the intents are, it is used to check the utterance.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntentComplementaryDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"description":"Genai service did not return valid examples","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"IntentComplementaryDTO":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the intent."},"utterances":{"uniqueItems":true,"type":"array","description":"Utterances of the intent.","items":{"type":"string","description":"Utterances of the intent."}},"tags":{"uniqueItems":true,"type":"array","description":"These are the tags used in the intent.","items":{"$ref":"#/components/schemas/TagDTO"}},"about":{"maxLength":200,"minLength":0,"type":"string","description":"About of the intent."}},"description":"Is the data provided for generating example utterances"},"TagDTO":{"type":"object","properties":{"name":{"type":"string","description":"Name of the Tag."}},"description":"Represents the tag data, used to reference the tags being used in the intent."},"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```

{% openapi src="/files/ettNUEQ7xu0ioI8BIdjJ" path="/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/tokens" method="get" %}
[eva-intent-4.7.0.yaml](https://4008706377-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fn6zS4HeuuVpRHZEvDiFU%2Fuploads%2FMxhJfADpevsOgGu7TZH0%2Feva-intent-4.7.0.yaml?alt=media\&token=95557ec2-f7a4-40d7-8c64-1b3821b7177b)
{% endopenapi %}

## Bulk Trainings

### CRUD Operations

## POST /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/intents

> 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.<br>

```json
{"openapi":"3.0.1","info":{"title":"eva-intent API Documentation","version":"4.8.0"},"tags":[{"name":"bulk-training","description":"Controller responsible for providing the services of bulk training of intents and examples."}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/intents":{"post":{"tags":["bulk-training"],"summary":"Receives and load intents and utterances to analyze data consistency,\nand generate a pre-save of the analyzed data which must be then approved\nand trained.\n","operationId":"uploadIntents","parameters":[{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}},{"name":"orgUUID","in":"path","description":"It is the organization where the intents are, it is used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"It is the environment where the intents are, it is used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"Bot where intents and examples will be imported.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","description":"It is the file that contains the data to be analyzed.","format":"binary"}}}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UploadResponseDTOIntentDataDTO"}}}},"400":{"description":"The file format is invalid","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"There is already a bulk training for this bot '{botUUID}'","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"UploadResponseDTOIntentDataDTO":{"type":"object","properties":{"message":{"type":"string","description":"Represents the bulk training status, which can be OK or NOK"},"data":{"$ref":"#/components/schemas/IntentDataDTO"}},"description":"Contains a summary of the analyses performed"},"IntentDataDTO":{"type":"object","properties":{"success":{"type":"integer","description":"It is the number of correct intents","format":"int32"},"expWithItents":{"type":"integer","description":"It is the number of examples that have no intents in the file","format":"int32"},"intWithExp":{"type":"integer","description":"It is the number of intents that have no examples in the file","format":"int32"},"duplicateExp":{"type":"integer","description":"It is the number of duplicate examples in the file","format":"int32"},"intAlerExistsInRepo":{"type":"integer","description":"It is the number of intents that already exist in the system","format":"int32"},"expAlerExistsInRepo":{"type":"integer","description":"It is the number of examples that already exist in the system","format":"int32"},"invalidIntentName":{"type":"integer","description":"It is the number of intents that have invalid characters in the name","format":"int32"},"notLines":{"type":"boolean","description":"It is the flag that identifies if the file is empty"},"exceedsMaxEmptyLines":{"type":"boolean","description":"It is the flag that identifies if the file exceeds the maximum number of empty lines."}},"description":"Contains the summary of the analysis made of the intents"},"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```

## GET /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training

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

```json
{"openapi":"3.0.1","info":{"title":"eva-intent API Documentation","version":"4.8.0"},"tags":[{"name":"bulk-training","description":"Controller responsible for providing the services of bulk training of intents and examples."}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training":{"get":{"tags":["bulk-training"],"summary":"Retrieves the status of the bot's current bulk training.","operationId":"getStatus","parameters":[{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}},{"name":"orgUUID","in":"path","description":"It is the organization where the intents are, it is used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"It is the environment where the intents are, it is used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"Bot where intents and examples will be imported.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BulkTrainingDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"BulkTrainingDTO":{"type":"object","properties":{"id":{"type":"string","description":"It is the bulk training status id"},"botUuid":{"type":"string","description":"It is the bot where the bulk training is running"},"type":{"type":"string","description":"It is the bulk training type and can be INTENTS or UTTERANCES"},"percentage":{"type":"integer","description":"It is the current percentage of the analysis and can be from 0 to 100","format":"int32"},"status":{"type":"string","description":"It is the status of mass training and can be PENDING or ERROR"},"result":{"type":"string","description":"Contains the result of the analysis in JSON format, this field is filled only at the end of the analysis"},"fileName":{"type":"string","description":"It is the name of the file that was uploaded"}},"description":"Object containing the current state of a bulk training"},"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```

## PUT /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/intents

> Create the intents and examples submitted by the upload service.

```json
{"openapi":"3.0.1","info":{"title":"eva-intent API Documentation","version":"4.8.0"},"tags":[{"name":"bulk-training","description":"Controller responsible for providing the services of bulk training of intents and examples."}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/intents":{"put":{"tags":["bulk-training"],"summary":"Create the intents and examples submitted by the upload service.","operationId":"importIntents","parameters":[{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}},{"name":"orgUUID","in":"path","description":"It is the organization where the intents are, it is used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"It is the environment where the intents are, it is used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"Bot where intents and examples will be created.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UploadResponseDTOInteger"}}}},"400":{"description":"The file contains inconsistencies, fix it and try again","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"Wait for the upload to finish","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"UploadResponseDTOInteger":{"type":"object","properties":{"message":{"type":"string","description":"Represents the bulk training status, which can be OK or NOK"},"data":{"type":"integer","description":"It is the content of the analysis, which can be a list of String, a number, an IntentDataDTO or UtteranceDataDTO","format":"int32"}},"description":"Contains a summary of the analyses performed"},"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```

## DELETE /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/{id}

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

```json
{"openapi":"3.0.1","info":{"title":"eva-intent API Documentation","version":"4.8.0"},"tags":[{"name":"bulk-training","description":"Controller responsible for providing the services of bulk training of intents and examples."}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/{id}":{"delete":{"tags":["bulk-training"],"summary":"Deletes an existing Bulk Training. Both the uploaded data and it's status will be erased.","operationId":"cancelBulkTraining","parameters":[{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}},{"name":"orgUUID","in":"path","description":"It is the organization where the intents are, it is used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"It is the environment where the intents are, it is used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"Bot that contains the bulk training that will be canceled","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"It is the id of the bulk training.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"204":{"description":"No Content"},"400":{"description":"Wait for the upload to finish to cancel the bulk training action","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"Wait for the upload to finish","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```

### Auxiliary Methods

## POST /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/utterances

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

```json
{"openapi":"3.0.1","info":{"title":"eva-intent API Documentation","version":"4.8.0"},"tags":[{"name":"bulk-training","description":"Controller responsible for providing the services of bulk training of intents and examples."}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/utterances":{"post":{"tags":["bulk-training"],"summary":"Validates it a set of utterance/examples provided are valid.","operationId":"uploadUtterances","parameters":[{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}},{"name":"orgUUID","in":"path","description":"It is the organization where the intents are, it is used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"It is the environment where the intents are, it is used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"Bot where intents and examples will be imported.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","description":"It is the file that contains the data to be analyzed.","format":"binary"}}}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UploadResponseDTOUtteranceDataDTO"}}}},"400":{"description":"The file format is invalid","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"There is already a bulk training for this bot '{botUUID}'","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"UploadResponseDTOUtteranceDataDTO":{"type":"object","properties":{"message":{"type":"string","description":"Represents the bulk training status, which can be OK or NOK"},"data":{"$ref":"#/components/schemas/UtteranceDataDTO"}},"description":"Contains a summary of the analyses performed"},"UtteranceDataDTO":{"type":"object","properties":{"success":{"type":"integer","description":"It is the number of correct examples","format":"int32"},"uttWrong":{"type":"integer","description":"It is the number of examples with error","format":"int32"},"expAlerExistsInRepo":{"type":"integer","description":"It is the number of examples that already exist in the system","format":"int32"},"notLines":{"type":"boolean","description":"It is the flag that identifies if the file is empty"}},"description":"Contains the summary of the analysis made of the examples"},"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```

## PUT /org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/utterances

> Acquired the utterance data that was uploaded by the upload service

```json
{"openapi":"3.0.1","info":{"title":"eva-intent API Documentation","version":"4.8.0"},"tags":[{"name":"bulk-training","description":"Controller responsible for providing the services of bulk training of intents and examples."}],"paths":{"/org/{orgUUID}/env/{envUUID}/bot/{botUUID}/bulk-training/utterances":{"put":{"tags":["bulk-training"],"summary":"Acquired the utterance data that was uploaded by the upload service","operationId":"importUtterances","parameters":[{"name":"x-request-id","in":"header","description":"It is an identifier provided by the API client that will be used to identify distributed logs.","required":false,"schema":{"type":"string"}},{"name":"orgUUID","in":"path","description":"It is the organization where the intents are, it is used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"envUUID","in":"path","description":"It is the environment where the intents are, it is used to connect to the correct database.","required":true,"schema":{"type":"string"}},{"name":"botUUID","in":"path","description":"Bot where the examples were loaded","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UploadResponseDTOListString"}}}},"400":{"description":"The file contains inconsistencies, fix it and try again","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"408":{"description":"Request Timeout","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"409":{"description":"Wait for the upload to finish","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/StandardError"}]}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StandardError"}}}}}}}},"components":{"schemas":{"UploadResponseDTOListString":{"type":"object","properties":{"message":{"type":"string","description":"Represents the bulk training status, which can be OK or NOK"},"data":{"type":"array","description":"It is the content of the analysis, which can be a list of String, a number, an IntentDataDTO or UtteranceDataDTO","items":{"type":"string","description":"It is the content of the analysis, which can be a list of String, a number, an IntentDataDTO or UtteranceDataDTO"}}},"description":"Contains a summary of the analyses performed"},"StandardError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"}}},"ValidationError":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"errorCode":{"type":"string"},"errorType":{"type":"string","enum":["API_ERROR","API_INFO","USER_ERROR"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/FieldMessage"}}}},"FieldMessage":{"type":"object","properties":{"fieldName":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.conversational-ai.syntphony.com/user-guide/api-docs/api-guidelines/management-api/instance-api/intent.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
