Skip to main content
PUT
/
api
/
v1
/
extraction_schemas
/
{schema_id}
Update Extraction Schema
import requests

url = "https://www.datalab.to/api/v1/extraction_schemas/{schema_id}"

payload = {
    "name": "<string>",
    "description": "<string>",
    "schema_json": {},
    "archived": True,
    "create_new_version": False
}
headers = {
    "X-API-Key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
{
  "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>"
  ]
}

Authorizations

X-API-Key
string
header
required

Path Parameters

schema_id
string
required

Cookies

wos-session
string
datalab_active_team
string

Body

application/json
name
string | null
Maximum string length: 200
description
string | null
schema_json
Schema Json · object
archived
boolean | null
create_new_version
boolean
default:false

If true, creates a new version instead of updating the current one

Response

Successful Response

id
integer
required
schema_id
string
required
name
string
required
description
string | null
required
schema_json
Schema Json · object
required
version
integer
required
archived
boolean
required
created
string<date-time> | null
required
updated
string<date-time> | null
required
version_history
any[] | null