Purpose:
Generates a schema based on provided file content or file identifier.
The schema generation is driven by an instruction prompt.
POST /noCo/api/v2/workspaces/{workspaceId}/extraction/schema/generate
| Parameter | Type | Required | Description |
|---|---|---|---|
| workspaceId | UUID | ✅ Yes | Identifier of the workspace |
Requires authentication using:
Authorization: Bearer <token>
| Header | Required |
|---|---|
| Authorization | ✅ Yes |
| Content-Type: application/json | ✅ Yes |
{
"prompt": "string",
"content": "string",
"fileId": "string"
}
| Field | Type | Required | Description |
|---|---|---|---|
| prompt | string | ✅ Yes | Instruction for schema generation |
| content | string | ❌ Optional | File content (if not using fileId) |
| fileId | string | ❌ Optional | File ID (if not using content) |
curl -X POST https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/extraction/schema/generate \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Extract schema from invoice file",
"content": "file raw text content here"
}'
Generates a schema using either file content or file ID based on the provided prompt instruction.