Intents
Intents identify an intended action. The intents endpoints allow you to create, delete, and rename an intent. You can also use them to get details about intents in a project.
See Intents for more information about intents.
Get intents
GET /v4/projects/{projectId}/intents
Retrieve the list of intents available in a project.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of intents | mix.api.ListIntentsResponse |
401 | Unauthorized | Request could not be authorized | Inline |
500 | Internal Server Error | Internal server error | Inline |
default | Default | An unexpected error response. | grpc.gateway.runtime.Error |
Example responses
Create a new intent
POST /v4/projects/{projectId}/intents
Create a new intent in a project.
Parameters
Name | In | Type | Description |
---|---|---|---|
projectId | path | string | ID of project under which the intent will be created. |
body | body | mix.api.CreateIntentPayload | Object that defines the intent to create. |
Body parameter
{
"intentName": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Intent successfully created | mix.api.CreateIntentResponse |
401 | Unauthorized | Request could not be authorized | Inline |
500 | Internal Server Error | Internal server error | Inline |
default | Default | An unexpected error response. | grpc.gateway.runtime.Error |
Example responses
Get intent details
GET /v4/projects/{projectId}/intents/{intentName}
Retrieve the details of an intent in a project.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Intent details | mix.api.GetIntentResponse |
401 | Unauthorized | Request could not be authorized | Inline |
404 | Not Found | Intent not found | Inline |
500 | Internal Server Error | Internal server error | Inline |
default | Default | An unexpected error response. | grpc.gateway.runtime.Error |
Example responses
Delete an intent
DELETE /v4/projects/{projectId}/intents/{intentName}
Delete an intent from a project.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Intent successfully deleted | google.rpc.Status |
401 | Unauthorized | Request could not be authorized | Inline |
404 | Not Found | Intent not found | Inline |
500 | Internal Server Error | Internal server error | Inline |
default | Default | An unexpected error response. | grpc.gateway.runtime.Error |
Example responses
Rename an intent
PUT /v4/projects/{projectId}/intents/{intentName}/.rename
Rename an intent.
Parameters
Name | In | Type | Description |
---|---|---|---|
projectId | path | string | ID of project for which to rename the intent. |
intentName | path | string | Name of the intent to update. |
body | body | mix.api.RenameIntentPayload | Object that defines the new intent name. |
Body parameter
{
"newIntentName": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Intent successfully renamed | mix.api.RenameIntentResponse |
401 | Unauthorized | Request could not be authorized | Inline |
404 | Not Found | Intent not found | Inline |
500 | Internal Server Error | Internal server error | Inline |
default | Default | An unexpected error response. | grpc.gateway.runtime.Error |
Example responses
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.