Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Get Agent Definition Version

GET/api/v2/agents/agentDefinitions/{agentDefinitionApiName}/versions/{agentDefinitionVersionVersion}
Warning

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.

Path parameters

agentDefinitionApiName
string

The name of the Agent in the API.

agentDefinitionVersionVersion
string

Identifies a version of an Agent. Written <major>.<minor>.<patch>-<tag>, where -<tag> is optional. Examples: 1.2.3, 1.2.3-rc1.

Query parameters

ontology
string

The API name or RID of the Ontology. To find the API name or RID, use the List Ontologies endpoint or check the Ontology Manager.

preview
booleanoptional

Enables the use of preview functionality.

Response body

AgentDefinitionVersion
object
Hide child attributes

Hide child attributes

version
string

Identifies a version of an Agent. Written <major>.<minor>.<patch>-<tag>, where -<tag> is optional. Examples: 1.2.3, 1.2.3-rc1.

createdTime
string

The time at which the resource was created.

createdBy
string

The Foundry user who created this resource

argumentDefinitions
list<ArgumentDefinition>optional
Show child attributes

Show child attributes

eventDefinitions
list<EventDefinition>optional
Show child attributes

Show child attributes

agentStateType
union

Describes the supported schema for a piece of data, for example an event payload or the data for a context item.

Show child attributes

Show child attributes

contextItemDefinitions
list<ContextItemDefinition>optional
Show child attributes

Show child attributes

Examples

Request

Copied!
1 2 3 curl \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/agents/agentDefinitions/customerSupportAgent/versions/1.2.0?preview=true"

Response

Copied!
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 responses

Error Name
AgentDefinitionNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given Agent could not be found.
ParametersagentDefinitionApiName
OntologyNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe requested Ontology is not found, or the client token does not have access to it.
ParametersontologyRid, apiName
ObjectTypeNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe requested object type is not found, or the client token does not have access to it.
ParametersobjectType, objectTypeRid
UnsupportedDataTypeError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe Agent definition version contains a data type that is not supported by this API.
ParametersdataType
AgentDefinitionVersionNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given AgentDefinitionVersion could not be found.
ParametersagentDefinitionVersionVersion, agentDefinitionApiName