Test API for Advanced Extraction
curl --request POST \
--url https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/extraction/advanced/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "[00:00:02] Sarah: Hello. [00:00:04] Mark: Hi.",
"advancedSchema": {
"fields": [
{
"name": "speaker",
"type": "string"
},
{
"name": "text",
"type": "string"
}
]
}
}
'import requests
url = "https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/extraction/advanced/test"
payload = {
"content": "[00:00:02] Sarah: Hello. [00:00:04] Mark: Hi.",
"advancedSchema": { "fields": [
{
"name": "speaker",
"type": "string"
},
{
"name": "text",
"type": "string"
}
] }
}
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({
content: '[00:00:02] Sarah: Hello. [00:00:04] Mark: Hi.',
advancedSchema: {fields: [{name: 'speaker', type: 'string'}, {name: 'text', type: 'string'}]}
})
};
fetch('https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/extraction/advanced/test', 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://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/extraction/advanced/test",
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([
'content' => '[00:00:02] Sarah: Hello. [00:00:04] Mark: Hi.',
'advancedSchema' => [
'fields' => [
[
'name' => 'speaker',
'type' => 'string'
],
[
'name' => 'text',
'type' => 'string'
]
]
]
]),
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://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/extraction/advanced/test"
payload := strings.NewReader("{\n \"content\": \"[00:00:02] Sarah: Hello. [00:00:04] Mark: Hi.\",\n \"advancedSchema\": {\n \"fields\": [\n {\n \"name\": \"speaker\",\n \"type\": \"string\"\n },\n {\n \"name\": \"text\",\n \"type\": \"string\"\n }\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://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/extraction/advanced/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"[00:00:02] Sarah: Hello. [00:00:04] Mark: Hi.\",\n \"advancedSchema\": {\n \"fields\": [\n {\n \"name\": \"speaker\",\n \"type\": \"string\"\n },\n {\n \"name\": \"text\",\n \"type\": \"string\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/extraction/advanced/test")
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 \"content\": \"[00:00:02] Sarah: Hello. [00:00:04] Mark: Hi.\",\n \"advancedSchema\": {\n \"fields\": [\n {\n \"name\": \"speaker\",\n \"type\": \"string\"\n },\n {\n \"name\": \"text\",\n \"type\": \"string\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_bodyAI Extraction
Test API for Advanced Extraction
1️⃣ Overview
Purpose:
Runs an advanced extraction test using inline content or a file identifier.
2️⃣ Endpoint
POST /noCo/api/v2/workspaces/{workspaceId}/extraction/advanced/test
3️⃣ Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| workspaceId | UUID | ✅ Yes | Identifier of the workspace |
4️⃣ Authentication
Requires authentication using:
Authorization: Bearer <token>
5️⃣ Request Headers
| Header | Required |
|---|---|
| Authorization | ✅ Yes |
| Content-Type: application/json | ✅ Yes |
6️⃣ Request Body Schema
{
"content": "string",
"advancedSchema": {},
"elementId": "string"
}
7️⃣ Field Descriptions
Extraction Test Fields
| Field | Type | Required | Description |
|---|---|---|---|
| content | string | ✅ Yes | Inline content to test extraction |
| advancedSchema | object | ✅ Yes | JSON schema for advanced extraction |
| elementId | string | ❌ No | File ID for testing instead of content |
8️⃣ Example Request
curl -X POST https://{base_url}/noCo/api/v2/workspaces/{workspaceId}/extraction/advanced/test \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"content": "Sample invoice text",
"advancedSchema": {
"fields": []
}
}'
9️⃣ Behavior Summary
Performs an advanced extraction test using either inline content or a file reference.
POST
/
noCo
/
api
/
v2
/
workspaces
/
{workspaceId}
/
extraction
/
advanced
/
test
Test API for Advanced Extraction
curl --request POST \
--url https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/extraction/advanced/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "[00:00:02] Sarah: Hello. [00:00:04] Mark: Hi.",
"advancedSchema": {
"fields": [
{
"name": "speaker",
"type": "string"
},
{
"name": "text",
"type": "string"
}
]
}
}
'import requests
url = "https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/extraction/advanced/test"
payload = {
"content": "[00:00:02] Sarah: Hello. [00:00:04] Mark: Hi.",
"advancedSchema": { "fields": [
{
"name": "speaker",
"type": "string"
},
{
"name": "text",
"type": "string"
}
] }
}
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({
content: '[00:00:02] Sarah: Hello. [00:00:04] Mark: Hi.',
advancedSchema: {fields: [{name: 'speaker', type: 'string'}, {name: 'text', type: 'string'}]}
})
};
fetch('https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/extraction/advanced/test', 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://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/extraction/advanced/test",
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([
'content' => '[00:00:02] Sarah: Hello. [00:00:04] Mark: Hi.',
'advancedSchema' => [
'fields' => [
[
'name' => 'speaker',
'type' => 'string'
],
[
'name' => 'text',
'type' => 'string'
]
]
]
]),
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://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/extraction/advanced/test"
payload := strings.NewReader("{\n \"content\": \"[00:00:02] Sarah: Hello. [00:00:04] Mark: Hi.\",\n \"advancedSchema\": {\n \"fields\": [\n {\n \"name\": \"speaker\",\n \"type\": \"string\"\n },\n {\n \"name\": \"text\",\n \"type\": \"string\"\n }\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://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/extraction/advanced/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"[00:00:02] Sarah: Hello. [00:00:04] Mark: Hi.\",\n \"advancedSchema\": {\n \"fields\": [\n {\n \"name\": \"speaker\",\n \"type\": \"string\"\n },\n {\n \"name\": \"text\",\n \"type\": \"string\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/extraction/advanced/test")
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 \"content\": \"[00:00:02] Sarah: Hello. [00:00:04] Mark: Hi.\",\n \"advancedSchema\": {\n \"fields\": [\n {\n \"name\": \"speaker\",\n \"type\": \"string\"\n },\n {\n \"name\": \"text\",\n \"type\": \"string\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
This API uses OAuth 2.0 with the authorization code grant flow.
Path Parameters
Body
application/json
Response
200
Test API for Advanced Extraction