Classify a phrase against one version
POST
/v1/t/adapters/ids/classifier/{id}/version/{version}/classify
const url = 'https://example.com/v1/t/adapters/ids/classifier/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/version/1/classify';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"phrase":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/t/adapters/ids/classifier/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/version/1/classify \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "phrase": "example" }'Classifies a phrase using the trained artefact of the addressed version, so a caller that pinned a version keeps getting that version’s behavior while another version is being trained. Classification is bound to a short deadline; exceeding it yields 504, a client cancellation 499.
Permission
This operation needs the permission tenant:scenario_template:manage.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Classifier id (UUID).
version
required
integer
Classifier version. Version 0 is the one every classifier created before versioning occupies.
Header Parameters
Section titled “Header Parameters”X-Tenant-Sid
string
Names the target tenant.
By principal:
- A tenant-scoped principal may omit it.
- A principal with no tenant of its own names one here.
Refused when:
- A tenant-scoped principal sends a value naming any other tenant.
- A principal with no tenant of its own omits it.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
phrase
required
string
Examplegenerated
{ "phrase": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
intents
required
object
key
additional properties
number format: float
Examplegenerated
{ "intents": { "additionalProperty": 1 }}Bad request
Media typeapplication/json
object
name
required
string
message
required
string
code
required
integer
status
required
integer
Examplegenerated
{ "name": "example", "message": "example", "code": 1, "status": 1}Unauthorized
Forbidden
Not found
Media typeapplication/json
object
name
required
string
message
required
string
code
required
integer
status
required
integer
Examplegenerated
{ "name": "example", "message": "example", "code": 1, "status": 1}Internal server error
Media typeapplication/json
object
name
required
string
message
required
string
code
required
integer
status
required
integer
Examplegenerated
{ "name": "example", "message": "example", "code": 1, "status": 1}Bad gateway (upstream adapter error)
Classification deadline exceeded
Media typeapplication/json
object
name
required
string
message
required
string
code
required
integer
status
required
integer
Examplegenerated
{ "name": "example", "message": "example", "code": 1, "status": 1}