Skip to main content
GET
/
v1
/
ai
/
agents
/
tasks
/
{taskId}
Get an AI Agent Task
curl --request GET \
  --url https://eu1.api.matillion.com/dpc/v1/ai/agents/tasks/{taskId} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://eu1.api.matillion.com/dpc/v1/ai/agents/tasks/{taskId}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://eu1.api.matillion.com/dpc/v1/ai/agents/tasks/{taskId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://eu1.api.matillion.com/dpc/v1/ai/agents/tasks/{taskId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://eu1.api.matillion.com/dpc/v1/ai/agents/tasks/{taskId}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://eu1.api.matillion.com/dpc/v1/ai/agents/tasks/{taskId}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://eu1.api.matillion.com/dpc/v1/ai/agents/tasks/{taskId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "taskId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "STOPPED",
  "description": "Build a pipeline to load sales data",
  "createdAt": "2024-01-15T10:30:00.000Z",
  "modifiedAt": "2024-01-15T10:45:00.000Z",
  "agentConfig": {
    "name": "data_engineer_agent",
    "mode": "ACT",
    "projectId": "550e8400-e29b-41d4-a716-446655440001",
    "sourceBranchName": "main",
    "environmentName": "development"
  },
  "grantedPermissions": [],
  "pendingDecisions": []
}
{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}
{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}
{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}
{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}
{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}
{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"violations": [
"<string>"
]
}

Authorizations

Authorization
string
header
required

a valid bearer token

Path Parameters

taskId
string<uuid>
required

Response

Agent task retrieved successfully

agentConfig
object

The configuration of the agent handling the task

createdAt
string<date-time>

The date and time the task was created

Example:

"2024-01-15T10:30:00.000Z"

description
string

A short description of what the agent was asked to do

Example:

"Build a pipeline to load sales data from S3 into Snowflake"

grantedPermissions
object[]

Permissions that have been granted to the agent for this task

modifiedAt
string<date-time>

The date and time the task was last modified

Example:

"2024-01-15T10:45:00.000Z"

pendingDecisions
object[]

Decisions awaiting approval before the agent can proceed

status
enum<string>

The current status of the task

Available options:
RUNNING,
STOPPED,
STOPPING,
ERRORED
Example:

"STOPPED"

taskId
string<uuid>

The unique identifier of the task

Example:

"550e8400-e29b-41d4-a716-446655440000"