Get Event
client.events.retrieve(stringeventID, RequestOptionsoptions?): Event { id, agent_id, sequence_id, 3 more }
GET/events/{event_id}
Get Event
import Agentex from 'agentex';
const client = new Agentex({
apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});
const event = await client.events.retrieve('event_id');
console.log(event.id);{
"id": "id",
"agent_id": "agent_id",
"sequence_id": 0,
"task_id": "task_id",
"content": {
"author": "user",
"content": "content",
"attachments": [
{
"file_id": "file_id",
"name": "name",
"size": 0,
"type": "type"
}
],
"format": "markdown",
"style": "static",
"type": "text"
},
"created_at": "2019-12-27T18:11:19.117Z"
}Returns Examples
{
"id": "id",
"agent_id": "agent_id",
"sequence_id": 0,
"task_id": "task_id",
"content": {
"author": "user",
"content": "content",
"attachments": [
{
"file_id": "file_id",
"name": "name",
"size": 0,
"type": "type"
}
],
"format": "markdown",
"style": "static",
"type": "text"
},
"created_at": "2019-12-27T18:11:19.117Z"
}