List all tasks / datasets
curl --request GET \
--url https://api.enkryptai.com/datasets/list-tasks \
--header 'apikey: <api-key>'import requests
url = "https://api.enkryptai.com/datasets/list-tasks"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://api.enkryptai.com/datasets/list-tasks', 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.enkryptai.com/datasets/list-tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>"
],
]);
$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://api.enkryptai.com/datasets/list-tasks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.enkryptai.com/datasets/list-tasks")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/datasets/list-tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"datasets": [
"Election",
"Healthcare"
],
"pagination": {
"page": 1,
"per_page": 10,
"total_count": 25,
"total_pages": 3,
"has_next": true,
"has_previous": false
}
}{
"error": "Invalid pagination parameters. Page must be >= 1, per_page must be between 1 and 100"
}Datasets (Legacy)
List Tasks
List all dataset tasks with pagination support
GET
/
datasets
/
list-tasks
List all tasks / datasets
curl --request GET \
--url https://api.enkryptai.com/datasets/list-tasks \
--header 'apikey: <api-key>'import requests
url = "https://api.enkryptai.com/datasets/list-tasks"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://api.enkryptai.com/datasets/list-tasks', 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.enkryptai.com/datasets/list-tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>"
],
]);
$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://api.enkryptai.com/datasets/list-tasks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.enkryptai.com/datasets/list-tasks")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/datasets/list-tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"datasets": [
"Election",
"Healthcare"
],
"pagination": {
"page": 1,
"per_page": 10,
"total_count": 25,
"total_pages": 3,
"has_next": true,
"has_previous": false
}
}{
"error": "Invalid pagination parameters. Page must be >= 1, per_page must be between 1 and 100"
}List Tasks
Retrieve a paginated list of all dataset tasks in your account.Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
status | string | No | - | Filter tasks by status. Valid values: Queued, Running, Finished, Failed |
page | integer | No | 1 | Page number (must be >= 1) |
per_page | integer | No | 10 | Number of items per page (must be between 1 and 100) |
Example Request
curl -X GET "https://api.enkryptai.com/datasets/list-tasks?status=Finished&page=1&per_page=10" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
"datasets": [
"Election",
"Healthcare"
],
"pagination": {
"page": 1,
"per_page": 10,
"total_count": 25,
"total_pages": 3,
"has_next": true,
"has_previous": false
}
}
Error Responses
400 Bad Request - Invalid Pagination Parameters
{
"error": "Invalid pagination parameters. Page must be >= 1, per_page must be between 1 and 100"
}
Pagination
The response includes pagination metadata to help you navigate through the results:page: Current page numberper_page: Number of items per pagetotal_count: Total number of items across all pagestotal_pages: Total number of pageshas_next: Boolean indicating if thereβs a next pagehas_previous: Boolean indicating if thereβs a previous page
page parameter. For example, to get page 2:
GET /datasets/list-tasks?page=2&per_page=10
Status Filtering
You can filter tasks by their status using thestatus parameter:
Queued: Tasks waiting to be processedRunning: Tasks currently being processedFinished: Completed tasksFailed: Tasks that failed to complete
GET /datasets/list-tasks?status=Finished&page=1&per_page=10
Authorizations
Query Parameters
The status of the task
Available options:
Queued, Running, Finished, Failed Page number (must be >= 1)
Required range:
x >= 1Example:
1
Number of items per page (must be between 1 and 100)
Required range:
1 <= x <= 100Example:
10

