This endpoint is in preview and may be modified or removed at any time.
To use this endpoint, add preview=true to the request query parameters.
Get the AgentDefinitionVersion with the specified version.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:agents-read.
stringThe name of the Agent in the API.
stringIdentifies a version of an Agent. Written <major>.<minor>.<patch>-<tag>, where -<tag> is optional.
Examples: 1.2.3, 1.2.3-rc1.
stringThe API name or RID of the Ontology. To find the API name or RID, use the List Ontologies endpoint or check the Ontology Manager.
booleanoptionalEnables the use of preview functionality.
objectstringIdentifies a version of an Agent. Written <major>.<minor>.<patch>-<tag>, where -<tag> is optional.
Examples: 1.2.3, 1.2.3-rc1.
stringThe time at which the resource was created.
stringThe Foundry user who created this resource
list<ArgumentDefinition>optionallist<EventDefinition>optionalunionDescribes the supported schema for a piece of data, for example an event payload or the data for a context item.
list<ContextItemDefinition>optional1
2
3
curl \
\t-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/v2/agents/agentDefinitions/customerSupportAgent/versions/1.2.0?preview=true"1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
"eventDefinitions": [
{
"eventType": "userMessage",
"payloadType": {
"type": "struct",
"fields": [
{
"name": "text",
"dataType": {
"type": "string"
}
}
]
}
}
],
"createdBy": "f05f8da4-b84c-4fca-9c77-8af0b13d11de",
"contextItemDefinitions": [
{
"contextItemType": "message",
"dataType": {
"type": "struct",
"fields": [
{
"name": "role",
"dataType": {
"type": "string"
}
},
{
"name": "text",
"dataType": {
"type": "string"
}
}
]
}
}
],
"agentStateType": {
"type": "struct",
"fields": [
{
"name": "role",
"dataType": {
"type": "string"
}
},
{
"name": "text",
"dataType": {
"type": "string"
}
}
]
},
"createdTime": "2003-05-06T12:34:56.789Z",
"argumentDefinitions": [
{
"name": "customer",
"dataType": {
"type": "string"
},
"requirement": {
"type": "required"
}
}
],
"version": "1.2.0"
}| Error Name | ||
|---|---|---|
Agent | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The given Agent could not be found. | |
| Parameters | agentDefinitionApiName | |
Ontology | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The requested Ontology is not found, or the client token does not have access to it. | |
| Parameters | ontologyRid, apiName | |
Object | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The requested object type is not found, or the client token does not have access to it. | |
| Parameters | objectType, objectTypeRid | |
Unsupported | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The Agent definition version contains a data type that is not supported by this API. | |
| Parameters | dataType | |
Agent | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The given AgentDefinitionVersion could not be found. | |
| Parameters | agentDefinitionVersionVersion, agentDefinitionApiName | |
See Errors for a general overview of errors in the platform.