Create a task export job
curl --request POST \
--url https://api.tela.com/task/export-job \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"promptApplicationId": "95cec438-6080-44fe-8275-28b16bd40178",
"filterCriteria": {
"status": [
"completed"
],
"approvedDate": [
"2025-01-01T00:00:00Z",
"2025-01-31T23:59:59Z"
],
"approvedBy": [
"reviewer@company.com"
]
},
"options": {
"format": "csv",
"common": {
"includeMetadata": true
},
"csv": {
"separator": ";",
"singleCell": false,
"downloadType": "combined"
}
}
}
'import requests
url = "https://api.tela.com/task/export-job"
payload = {
"promptApplicationId": "95cec438-6080-44fe-8275-28b16bd40178",
"filterCriteria": {
"status": ["completed"],
"approvedDate": ["2025-01-01T00:00:00Z", "2025-01-31T23:59:59Z"],
"approvedBy": ["reviewer@company.com"]
},
"options": {
"format": "csv",
"common": { "includeMetadata": True },
"csv": {
"separator": ";",
"singleCell": False,
"downloadType": "combined"
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
promptApplicationId: '95cec438-6080-44fe-8275-28b16bd40178',
filterCriteria: {
status: ['completed'],
approvedDate: ['2025-01-01T00:00:00Z', '2025-01-31T23:59:59Z'],
approvedBy: ['reviewer@company.com']
},
options: {
format: 'csv',
common: {includeMetadata: true},
csv: {separator: ';', singleCell: false, downloadType: 'combined'}
}
})
};
fetch('https://api.tela.com/task/export-job', 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://api.tela.com/task/export-job",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'promptApplicationId' => '95cec438-6080-44fe-8275-28b16bd40178',
'filterCriteria' => [
'status' => [
'completed'
],
'approvedDate' => [
'2025-01-01T00:00:00Z',
'2025-01-31T23:59:59Z'
],
'approvedBy' => [
'reviewer@company.com'
]
],
'options' => [
'format' => 'csv',
'common' => [
'includeMetadata' => true
],
'csv' => [
'separator' => ';',
'singleCell' => false,
'downloadType' => 'combined'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tela.com/task/export-job"
payload := strings.NewReader("{\n \"promptApplicationId\": \"95cec438-6080-44fe-8275-28b16bd40178\",\n \"filterCriteria\": {\n \"status\": [\n \"completed\"\n ],\n \"approvedDate\": [\n \"2025-01-01T00:00:00Z\",\n \"2025-01-31T23:59:59Z\"\n ],\n \"approvedBy\": [\n \"reviewer@company.com\"\n ]\n },\n \"options\": {\n \"format\": \"csv\",\n \"common\": {\n \"includeMetadata\": true\n },\n \"csv\": {\n \"separator\": \";\",\n \"singleCell\": false,\n \"downloadType\": \"combined\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tela.com/task/export-job")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"promptApplicationId\": \"95cec438-6080-44fe-8275-28b16bd40178\",\n \"filterCriteria\": {\n \"status\": [\n \"completed\"\n ],\n \"approvedDate\": [\n \"2025-01-01T00:00:00Z\",\n \"2025-01-31T23:59:59Z\"\n ],\n \"approvedBy\": [\n \"reviewer@company.com\"\n ]\n },\n \"options\": {\n \"format\": \"csv\",\n \"common\": {\n \"includeMetadata\": true\n },\n \"csv\": {\n \"separator\": \";\",\n \"singleCell\": false,\n \"downloadType\": \"combined\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tela.com/task/export-job")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"promptApplicationId\": \"95cec438-6080-44fe-8275-28b16bd40178\",\n \"filterCriteria\": {\n \"status\": [\n \"completed\"\n ],\n \"approvedDate\": [\n \"2025-01-01T00:00:00Z\",\n \"2025-01-31T23:59:59Z\"\n ],\n \"approvedBy\": [\n \"reviewer@company.com\"\n ]\n },\n \"options\": {\n \"format\": \"csv\",\n \"common\": {\n \"includeMetadata\": true\n },\n \"csv\": {\n \"separator\": \";\",\n \"singleCell\": false,\n \"downloadType\": \"combined\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "0d5a5f3e-2c1b-4e9a-8f7d-6a5b4c3d2e10",
"status": "pending",
"totalTasks": 142,
"processedTasks": 0,
"hasFile": false,
"createdAt": "2025-01-15T12:00:00.000Z"
}Tasks
Create a task export job
Starts an asynchronous export of a Workstation/App’s tasks to CSV (default) or JSON. The job snapshots the current time: only tasks created at or before job creation are included.
POST
/
task
/
export-job
Create a task export job
curl --request POST \
--url https://api.tela.com/task/export-job \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"promptApplicationId": "95cec438-6080-44fe-8275-28b16bd40178",
"filterCriteria": {
"status": [
"completed"
],
"approvedDate": [
"2025-01-01T00:00:00Z",
"2025-01-31T23:59:59Z"
],
"approvedBy": [
"reviewer@company.com"
]
},
"options": {
"format": "csv",
"common": {
"includeMetadata": true
},
"csv": {
"separator": ";",
"singleCell": false,
"downloadType": "combined"
}
}
}
'import requests
url = "https://api.tela.com/task/export-job"
payload = {
"promptApplicationId": "95cec438-6080-44fe-8275-28b16bd40178",
"filterCriteria": {
"status": ["completed"],
"approvedDate": ["2025-01-01T00:00:00Z", "2025-01-31T23:59:59Z"],
"approvedBy": ["reviewer@company.com"]
},
"options": {
"format": "csv",
"common": { "includeMetadata": True },
"csv": {
"separator": ";",
"singleCell": False,
"downloadType": "combined"
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
promptApplicationId: '95cec438-6080-44fe-8275-28b16bd40178',
filterCriteria: {
status: ['completed'],
approvedDate: ['2025-01-01T00:00:00Z', '2025-01-31T23:59:59Z'],
approvedBy: ['reviewer@company.com']
},
options: {
format: 'csv',
common: {includeMetadata: true},
csv: {separator: ';', singleCell: false, downloadType: 'combined'}
}
})
};
fetch('https://api.tela.com/task/export-job', 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://api.tela.com/task/export-job",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'promptApplicationId' => '95cec438-6080-44fe-8275-28b16bd40178',
'filterCriteria' => [
'status' => [
'completed'
],
'approvedDate' => [
'2025-01-01T00:00:00Z',
'2025-01-31T23:59:59Z'
],
'approvedBy' => [
'reviewer@company.com'
]
],
'options' => [
'format' => 'csv',
'common' => [
'includeMetadata' => true
],
'csv' => [
'separator' => ';',
'singleCell' => false,
'downloadType' => 'combined'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tela.com/task/export-job"
payload := strings.NewReader("{\n \"promptApplicationId\": \"95cec438-6080-44fe-8275-28b16bd40178\",\n \"filterCriteria\": {\n \"status\": [\n \"completed\"\n ],\n \"approvedDate\": [\n \"2025-01-01T00:00:00Z\",\n \"2025-01-31T23:59:59Z\"\n ],\n \"approvedBy\": [\n \"reviewer@company.com\"\n ]\n },\n \"options\": {\n \"format\": \"csv\",\n \"common\": {\n \"includeMetadata\": true\n },\n \"csv\": {\n \"separator\": \";\",\n \"singleCell\": false,\n \"downloadType\": \"combined\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tela.com/task/export-job")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"promptApplicationId\": \"95cec438-6080-44fe-8275-28b16bd40178\",\n \"filterCriteria\": {\n \"status\": [\n \"completed\"\n ],\n \"approvedDate\": [\n \"2025-01-01T00:00:00Z\",\n \"2025-01-31T23:59:59Z\"\n ],\n \"approvedBy\": [\n \"reviewer@company.com\"\n ]\n },\n \"options\": {\n \"format\": \"csv\",\n \"common\": {\n \"includeMetadata\": true\n },\n \"csv\": {\n \"separator\": \";\",\n \"singleCell\": false,\n \"downloadType\": \"combined\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tela.com/task/export-job")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"promptApplicationId\": \"95cec438-6080-44fe-8275-28b16bd40178\",\n \"filterCriteria\": {\n \"status\": [\n \"completed\"\n ],\n \"approvedDate\": [\n \"2025-01-01T00:00:00Z\",\n \"2025-01-31T23:59:59Z\"\n ],\n \"approvedBy\": [\n \"reviewer@company.com\"\n ]\n },\n \"options\": {\n \"format\": \"csv\",\n \"common\": {\n \"includeMetadata\": true\n },\n \"csv\": {\n \"separator\": \";\",\n \"singleCell\": false,\n \"downloadType\": \"combined\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "0d5a5f3e-2c1b-4e9a-8f7d-6a5b4c3d2e10",
"status": "pending",
"totalTasks": 142,
"processedTasks": 0,
"hasFile": false,
"createdAt": "2025-01-15T12:00:00.000Z"
}Authorizations
Body
application/json
Response
Export job created