curl -X POST 'https://api.cloud.llamaindex.ai/api/v1/extraction/schemas' \
-H "Authorization: Bearer [my api key]" \
-H 'Content-Type: application/json' \
-d '{
"name": "Simple Invoice Schema",
"data_schema": {
"type": "object",
"properties": {
"invoiceNumber": {"type": "string"},
"issueDate": {"type": "string", "format": "date"},
"totalAmount": {"type": "number"}
}
}
}'
{"detail":"Oops! Something went wrong on our end. Please try again in a few minutes. If the problem persists, please contact support by clicking the chat icon on cloud.llamaindex.ai providing this correlation ID: faa6e594-e45e-412d-942e-9b8ecb58032f"}%
Correlation ID: faa6e594-e45e-412d-942e-9b8ecb58032f"}%
Example:
curl -X POST 'https://api.cloud.llamaindex.ai/api/v1/extraction/schemas' \ -H "Authorization: Bearer [my api key]" \ -H 'Content-Type: application/json' \ -d '{ "name": "Simple Invoice Schema", "data_schema": { "type": "object", "properties": { "invoiceNumber": {"type": "string"}, "issueDate": {"type": "string", "format": "date"}, "totalAmount": {"type": "number"} } } }' {"detail":"Oops! Something went wrong on our end. Please try again in a few minutes. If the problem persists, please contact support by clicking the chat icon on cloud.llamaindex.ai providing this correlation ID: faa6e594-e45e-412d-942e-9b8ecb58032f"}%