Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Create a new extraction schema for the team.
Python
import requests url = "https://www.datalab.to/api/v1/extraction_schemas" payload = { "name": "<string>", "schema_json": {}, "description": "<string>" } headers = { "X-API-Key": "<api-key>", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text)
curl --request POST \ --url https://www.datalab.to/api/v1/extraction_schemas \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <api-key>' \ --data ' { "name": "<string>", "schema_json": {}, "description": "<string>" } '
const options = { method: 'POST', headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'}, body: JSON.stringify({name: '<string>', schema_json: {}, description: '<string>'}) }; fetch('https://www.datalab.to/api/v1/extraction_schemas', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://www.datalab.to/api/v1/extraction_schemas" payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"schema_json\": {},\n \"description\": \"<string>\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("X-API-Key", "<api-key>") 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)) }
{ "id": 123, "schema_id": "<string>", "name": "<string>", "description": "<string>", "schema_json": {}, "version": 123, "archived": true, "created": "2023-11-07T05:31:56Z", "updated": "2023-11-07T05:31:56Z", "version_history": [ "<unknown>" ] }
{ "detail": [ { "loc": [ "<string>" ], "msg": "<string>", "type": "<string>", "input": "<unknown>", "ctx": {} } ] }
200
JSON schema for extraction (must contain 'properties' key)
5000
Successful Response
Was this page helpful?