Agent
GET /agent/{id}/output
Get data from an agent: console output, status, progress and messages. This API endpoint is specifically designed so that it’s easy to get incremental data from an agent.
Request
- Base URLhttps://api.phantombuster.com/api/v2
- AuthAPI key in header X-Phantombuster-Key-1
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
idinteger required
ID of the agent from which to retrieve the output, status and messages.
Query parameters
mode'track' | 'most-recent'
This allows you to choose what type of response to receive.
- track - the console output from a particular instance is returned, as specified by the containerId parameter.
- most-recent - the most recent instance is selected each time a request is made.
containerIdnumber
ID of the instance from which to get console output.
fromOutputPosnumber
Return the agent’s console output starting from this position.
withoutResultObjectboolean
If true, omit the agent’s result object from the response.
Response
Success
Example response
{
"status": "success",
"data": {
"agentStatus": "running",
"containerStatus": "running",
"runningContainers": 1,
"containerId": 76427,
"progress": {
"progress": 0.1,
"label": "Initializing...",
"runtime": 3
},
"messages": [
{
"id": 65444,
"date": 1414080820,
"text": "Agent started",
"type": "normal",
"context": [
"Launch type: manual"
]
}
],
"output": "* Container a255b8220379 started in directory /home/phantom/agent",
"outputPos": 245
}
}Changes
No recorded changes to this operation across all 1 revision of this API.