Exporting intents
note
This section is about programmatically exporting intent data from custom applications. If you are looking to automate your workflows, our command line tool allow importing and exporting intents in various formats and can be easily added to custom scripts and continuous integration pipelines.
#
Request#
EndpointPart | Value |
---|---|
URL | https://api.humanfirst.ai/v1alpha1/workspaces/<NAMESPACE>/<WORKSPACE_ID>/intents/export_http |
Method | POST |
Body | JSON object |
Response | Bytes of the selected format |
Note: To find your namespace and the workspace id, see this.
#
Request bodyThe complete specifications of the intent export request can be found in the API Reference section.
The request body is a JSON object with the following fields:
Field | Type | Description |
---|---|---|
format | numeric | The format of the exported data. See Data format |
format_options | FormatOptions | Options for the selected format. |
#
Data formatSpecifies the format in which the intent data is going to be converted before exporting.
Numeric format | String format | Description |
---|---|---|
1 | INTENTS_FORMAT_CSV_SIMPLE_INTENTS | Two-column csv formatted as text,intent_name - fields delimited by "" |
2 | INTENTS_FORMAT_RASA_MARKDOWN | Rasa 1.0 NLU format |
3 | INTENTS_FORMAT_RASA_YAML | Rasa 2.0 NLU format |
5 | INTENTS_FORMAT_DIALOGFLOW_ES_AGENT | Dialogflow agent export format |
7 | INTENTS_FORMAT_HF_JSON | HumanFirst JSON format |
8 | INTENTS_FORMAT_COGNIGY_JSON | Cognigy intents JSON format |
#
Format optionsField | Type | Description |
---|---|---|
hierarchicalIntentNameDisabled | bool | Disables intents hierarchy encoding in the intents name |
hierarchicalDelimiter | string | Specifies the delimiter to use when encoding the hierarchy inside intent names |
hierarchicalFollowup | bool | (Dialogflow only) Use intent hierarchy when encoding follow up intents |
#
Curl examplenote
In the following example, the hf
command line tool is used to fetch a valid access token.
See how to install and configure it here.
To return export a workspace and its intents in our JSON format, use the following curl command: